summaryrefslogtreecommitdiff
path: root/mysql-test/r/grant2.result
diff options
context:
space:
mode:
authorunknown <msvensson@devsrv-b.mysql.com>2006-02-27 16:41:58 +0100
committerunknown <msvensson@devsrv-b.mysql.com>2006-02-27 16:41:58 +0100
commit79fbd665820592eda77b7c64807d4a1d70de8ad5 (patch)
treefd8437ac8876f1ce7113d7ee39c46cf187196be1 /mysql-test/r/grant2.result
parent85e54a08c4fc468ab89f8df27bc981027cb22e6c (diff)
downloadmariadb-git-79fbd665820592eda77b7c64807d4a1d70de8ad5.tar.gz
Bug#17279 user with no global privs and with create priv in db can create databases
- Use binary charset in acl_cache, to make searches case sensitive - Add testcase mysql-test/r/grant2.result: Update test result mysql-test/t/grant2.test: Add test case for bug#17279, checking that user with access to TESTDB can't create TEStdb sql/sql_acl.cc: Use binary charset for the acl_cache to make the hash lookups case sensitive. Thus denying user with access to "TESTDB" access to "TEStdb"
Diffstat (limited to 'mysql-test/r/grant2.result')
-rw-r--r--mysql-test/r/grant2.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index e38953b6446..9ddd6d4281e 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -334,3 +334,25 @@ lock table mysql.user write;
revoke all on *.* from 'mysqltest_1'@'localhost';
unlock tables;
drop user 'mysqltest_1'@'localhost';
+create database TESTDB;
+create table t2(a int);
+create temporary table t1 as select * from mysql.user;
+delete from mysql.user where host='localhost';
+INSERT INTO mysql.user VALUES
+('%','mysqltest_1',password('password'),'N','N','N','N','N','N',
+'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N',
+'','','','',0,0,0,0);
+INSERT INTO mysql.db VALUES
+('%','TESTDB','mysqltest_1','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','N','Y','Y','Y','
+Y','N');
+Warnings:
+Warning 1265 Data truncated for column 'Alter_routine_priv' at row 1
+FLUSH PRIVILEGES;
+create database TEStdb;
+ERROR 42000: Access denied for user 'mysqltest_1'@'%' to database 'TEStdb'
+delete from mysql.user;
+delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB';
+insert into mysql.user select * from t1;
+drop table t1, t2;
+drop database TESTDB;
+flush privileges;