diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-10 13:54:04 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-10 13:54:04 +0100 |
commit | bd87fed1dc0caa0720e5a60f0fca1b714c58ac75 (patch) | |
tree | 78117460df06878cb987630a95e6304b587a7f39 /mysql-test/t/grant_lowercase.test | |
parent | 3c987667d903826e8643f7835f102272ce98987e (diff) | |
parent | 2e11ca36f28133c18b72351d176ee2fd7fcbc465 (diff) | |
download | mariadb-git-bd87fed1dc0caa0720e5a60f0fca1b714c58ac75.tar.gz |
5.1 merge
Diffstat (limited to 'mysql-test/t/grant_lowercase.test')
-rw-r--r-- | mysql-test/t/grant_lowercase.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/grant_lowercase.test b/mysql-test/t/grant_lowercase.test new file mode 100644 index 00000000000..b07cb88afd6 --- /dev/null +++ b/mysql-test/t/grant_lowercase.test @@ -0,0 +1,31 @@ +# test cases for strmov(tmp_db, db) -> strnmov replacement in sql_acl.cc +--source include/not_embedded.inc + +# +# http://seclists.org/fulldisclosure/2012/Dec/4 +# + +# in acl_get(), check_grant_db(), mysql_grant() +grant file on *.* to user1@localhost with grant option; +grant select on `a%`.* to user1@localhost with grant option; +connect (conn1,localhost,user1,,); +connection conn1; +--error ER_WRONG_DB_NAME +grant file on aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.* to 'user'@'%' identified by 'secret'; +connection default; +disconnect conn1; +drop user user1@localhost; + +# in acl_load() +call mtr.add_suppression("Incorrect database name"); +alter table mysql.host modify Db varchar(200); +alter table mysql.db modify Db varchar(200); +insert mysql.host set db=concat('=>', repeat(_utf8 'й', 200)); +insert mysql.db set db=concat('=>', repeat(_utf8 'й', 200)); +flush privileges; # shouldn't crash here +delete from mysql.host where db like '=>%'; +delete from mysql.db where db like '=>%'; +alter table mysql.host modify Db char(64); +alter table mysql.db modify Db char(64); +flush privileges; + |