summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-10-23 07:09:16 +0200
committerunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-10-23 07:09:16 +0200
commitd4e4be8ad5ae3e717f31ebffae3f474586a753de (patch)
treeb97a5e2ef1112b22c613f57dfb7fb46965605854
parenta06c4b535308d641b354615f6a4c0ff06c3f9d0e (diff)
downloadmariadb-git-d4e4be8ad5ae3e717f31ebffae3f474586a753de.tar.gz
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
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/t/create.test2
2 files changed, 2 insertions, 2 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 006dc951297..daafaa1a45a 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -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;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 106ecbb2586..8d76787de5a 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -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);