summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-17 13:06:41 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-17 13:06:41 +0100
commitb64fde8f38515dc39e019de26db7624cc0ea7046 (patch)
tree0478ea4c3ddeee290f6d381a47efa4f9aded9c0b /sql/sql_alter.cc
parenta89ee3cd154a67df2231f034fd8339f9225dbe64 (diff)
parent1f020299f816263e347c852eb2a494b5ef1cbf0d (diff)
downloadmariadb-git-b64fde8f38515dc39e019de26db7624cc0ea7046.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 5fc9ff8209c..0408808d800 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -402,7 +402,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
DBUG_RETURN(TRUE); /* purecov: inspected */
/* If it is a merge table, check privileges for merge children. */
- if (create_info.merge_list.first)
+ if (create_info.merge_list)
{
/*
The user must have (SELECT_ACL | UPDATE_ACL | DELETE_ACL) on the
@@ -440,7 +440,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
*/
if (check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL,
- create_info.merge_list.first, FALSE, UINT_MAX, FALSE))
+ create_info.merge_list, FALSE, UINT_MAX, FALSE))
DBUG_RETURN(TRUE);
}
@@ -451,9 +451,7 @@ bool Sql_cmd_alter_table::execute(THD *thd)
{
// Rename of table
TABLE_LIST tmp_table;
- memset(&tmp_table, 0, sizeof(tmp_table));
- tmp_table.table_name= lex->name;
- tmp_table.db= select_lex->db;
+ tmp_table.init_one_table(&select_lex->db, &lex->name, 0, TL_IGNORE);
tmp_table.grant.privilege= priv;
if (check_grant(thd, INSERT_ACL | CREATE_ACL, &tmp_table, FALSE,
UINT_MAX, FALSE))
@@ -471,7 +469,6 @@ bool Sql_cmd_alter_table::execute(THD *thd)
"INDEX DIRECTORY");
create_info.data_file_name= create_info.index_file_name= NULL;
- thd->prepare_logs_for_admin_command();
#ifdef WITH_PARTITION_STORAGE_ENGINE
thd->work_part_info= 0;
#endif
@@ -519,8 +516,6 @@ bool Sql_cmd_discard_import_tablespace::execute(THD *thd)
if (check_grant(thd, ALTER_ACL, table_list, false, UINT_MAX, false))
return true;
- thd->prepare_logs_for_admin_command();
-
/*
Check if we attempt to alter mysql.slow_log or
mysql.general_log table and return an error if