Commit 5f26f500 authored by Sergei Golubchik's avatar Sergei Golubchik

typo fixed, followup for 3fe55fa8

parent 3fe55fa8
......@@ -211,5 +211,13 @@ ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1
create table t1 (a int);
disconnect foo;
connection default;
revoke create on db1.* from foo@localhost;
grant insert on db1.* to foo@localhost;
connect foo,localhost,foo;
use db1;
create table t2 as values (1),(2),(3);
ERROR 42000: CREATE command denied to user 'foo'@'localhost' for table `db1`.`t2`
disconnect foo;
connection default;
drop user foo@localhost;
drop database db1;
......@@ -223,6 +223,16 @@ create table t1 as select * from test.t;
create table t1 as values (1),(2),(3);
create table t1 (a int);
disconnect foo;
connection default;
revoke create on db1.* from foo@localhost;
grant insert on db1.* to foo@localhost;
connect foo,localhost,foo;
use db1;
--error ER_TABLEACCESS_DENIED_ERROR
create table t2 as values (1),(2),(3);
disconnect foo;
connection default;
drop user foo@localhost;
drop database db1;
......
......@@ -9869,7 +9869,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
if (lex->tmp_table())
want_priv= CREATE_TMP_ACL;
else if (select_lex->item_list.elements || select_lex->tvc)
want_priv= INSERT_ACL;
want_priv|= INSERT_ACL;
/* CREATE OR REPLACE on not temporary tables require DROP_ACL */
if (lex->create_info.or_replace() && !lex->tmp_table())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment