~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/t/lowercase_table_grant.test

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Don't test with embedded server
 
2
-- source include/not_embedded.inc
 
3
 
 
4
# Test of grants when lower_case_table_names is on
 
5
use mysql;
 
6
 
 
7
# mixed-case database name for testing
 
8
create database MYSQLtest;
 
9
 
 
10
# check that database name gets forced to lowercase
 
11
grant all on MySQLtest.* to mysqltest_1@localhost;
 
12
show grants for mysqltest_1@localhost;
 
13
 
 
14
# now force it to mixed case, but see that it is lowercased in the acl cache
 
15
select * from db where user = 'mysqltest_1';
 
16
update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost';
 
17
flush privileges;
 
18
show grants for mysqltest_1@localhost;
 
19
select * from db where user = 'mysqltest_1';
 
20
 
 
21
# clear out the user we created
 
22
#
 
23
# can't use REVOKE because of the mixed-case database name
 
24
delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost';
 
25
flush privileges;
 
26
drop user mysqltest_1@localhost;
 
27
 
 
28
drop database MYSQLtest;
 
29
 
 
30
# End of 4.1 tests