~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

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