From 3fe55fa8be9bdfbaefc69e0cd7dea12833fe9cbb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 6 Oct 2022 19:09:44 +0200 Subject: CREATE ... VALUES ... didn't require INSERT privilege --- mysql-test/main/grant3.result | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'mysql-test/main/grant3.result') diff --git a/mysql-test/main/grant3.result b/mysql-test/main/grant3.result index 63e343aaf4d..cd686e19a9b 100644 --- a/mysql-test/main/grant3.result +++ b/mysql-test/main/grant3.result @@ -195,4 +195,21 @@ connection default; DROP USER 'user2'@'%'; DROP DATABASE temp; set global sql_mode=default; -End of 5.0 tests +# +# End of 5.0 tests +# +create database db1; +create user foo@localhost; +grant create on db1.* to foo@localhost; +connect foo,localhost,foo; +create temporary table t as values (1),(2),(3); +use db1; +create table t1 as select * from test.t; +ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1` +create table t1 as values (1),(2),(3); +ERROR 42000: INSERT command denied to user 'foo'@'localhost' for table `db1`.`t1` +create table t1 (a int); +disconnect foo; +connection default; +drop user foo@localhost; +drop database db1; -- cgit v1.2.1