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
This commit is contained in:
unknown 2007-10-23 07:09:16 +02:00
parent a06c4b5353
commit d4e4be8ad5
2 changed files with 2 additions and 2 deletions

View File

@ -755,7 +755,7 @@ use mysqltest;
grant create on mysqltest.* to mysqltest@localhost;
create table t1 (i INT);
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 t4 (i INT);
grant select, insert on mysqltest.t2 to mysqltest@localhost;

View File

@ -667,7 +667,7 @@ create table t1 (i INT);
connect (user1,localhost,mysqltest,,mysqltest);
connection user1;
# show we don't have INSERT
--error 1044
--error 1142
insert into t1 values (1);
# show we have CREATE
create table t2 (i INT);