Commit d4e4be8a authored by unknown's avatar unknown

Bug #20901: CREATE privilege is enough to insert into a table

CREATE TABLE IF NOT EXISTS ... SELECT let you insert into an existing
table as long as you had the CREATE privilege.  CREATE ... SELECT
variants now always require INSERT privilege on target table.


mysql-test/r/create.result:
  after-merge fixes, errno changed 4.1->5.0
mysql-test/t/create.test:
  after-merge fixes, errno changed 4.1->5.0
parent a06c4b53
...@@ -755,7 +755,7 @@ use mysqltest; ...@@ -755,7 +755,7 @@ use mysqltest;
grant create on mysqltest.* to mysqltest@localhost; grant create on mysqltest.* to mysqltest@localhost;
create table t1 (i INT); create table t1 (i INT);
insert into t1 values (1); insert into t1 values (1);
ERROR 42000: Access denied for user 'mysqltest'@'localhost' to database 'mysqltest' ERROR 42000: INSERT command denied to user 'mysqltest'@'localhost' for table 't1'
create table t2 (i INT); create table t2 (i INT);
create table t4 (i INT); create table t4 (i INT);
grant select, insert on mysqltest.t2 to mysqltest@localhost; grant select, insert on mysqltest.t2 to mysqltest@localhost;
......
...@@ -667,7 +667,7 @@ create table t1 (i INT); ...@@ -667,7 +667,7 @@ create table t1 (i INT);
connect (user1,localhost,mysqltest,,mysqltest); connect (user1,localhost,mysqltest,,mysqltest);
connection user1; connection user1;
# show we don't have INSERT # show we don't have INSERT
--error 1044 --error 1142
insert into t1 values (1); insert into t1 values (1);
# show we have CREATE # show we have CREATE
create table t2 (i INT); create table t2 (i INT);
......
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