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:
parent
a06c4b5353
commit
d4e4be8ad5
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user