summaryrefslogtreecommitdiff
path: root/sql/sql_alter.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-15 20:00:28 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-15 21:00:41 +0100
commit0508d327aef520d3131ff8a85ed610337149fffc (patch)
tree7e04769f49b4aded9053adcad442fe00eb487d98 /sql/sql_alter.cc
parentbb8c82c66abddf796e8d44f817518e5ab38ae6e4 (diff)
parent34db9958e28c325b0f708f78b7ff029de810d5ea (diff)
downloadmariadb-git-0508d327aef520d3131ff8a85ed610337149fffc.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r--sql/sql_alter.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc
index 23522795cdc..f6db1847063 100644
--- a/sql/sql_alter.cc
+++ b/sql/sql_alter.cc
@@ -234,7 +234,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
@@ -272,7 +272,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);
}
@@ -283,9 +283,9 @@ 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.str;
- tmp_table.db= select_lex->db;
+ tmp_table.init_one_table(select_lex->db, strlen(select_lex->db),
+ lex->name.str, lex->name.length,
+ lex->name.str, TL_IGNORE);
tmp_table.grant.privilege= priv;
if (check_grant(thd, INSERT_ACL | CREATE_ACL, &tmp_table, FALSE,
UINT_MAX, FALSE))