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

« back to all changes in this revision

Viewing changes to mysql-test/t/lowercase_fs_off.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
#
 
2
# Specific tests for case sensitive file systems
 
3
# i.e. lower_case_filesystem=OFF
 
4
#
 
5
-- source include/have_case_sensitive_file_system.inc
 
6
-- source include/not_embedded.inc
 
7
 
 
8
connect (master,localhost,root,,);
 
9
connection master;
 
10
create database d1;
 
11
grant all on d1.* to 'sample'@'localhost' identified by 'password';
 
12
flush privileges;
 
13
 
 
14
connect (sample,localhost,sample,password,d1);
 
15
connection sample;
 
16
select database();
 
17
--error ER_DBACCESS_DENIED_ERROR
 
18
create database d2;
 
19
--error ER_DBACCESS_DENIED_ERROR
 
20
create database D1;
 
21
disconnect sample;
 
22
--source include/wait_until_disconnected.inc
 
23
 
 
24
connection master;
 
25
drop user 'sample'@'localhost';
 
26
drop database if exists d1;
 
27
disconnect master;
 
28
--source include/wait_until_disconnected.inc
 
29
connection default;
 
30
 
 
31
# End of 4.1 tests
 
32
 
 
33
#
 
34
# Bug#41049 does syntax "grant" case insensitive?
 
35
#
 
36
CREATE DATABASE d1;
 
37
USE d1;
 
38
CREATE TABLE T1(f1 INT);
 
39
CREATE TABLE t1(f1 INT);
 
40
GRANT SELECT ON T1 to user_1@localhost;
 
41
 
 
42
connect (con1,localhost,user_1,,d1);
 
43
--error ER_TABLEACCESS_DENIED_ERROR
 
44
select * from t1;
 
45
select * from T1;
 
46
connection default;
 
47
GRANT SELECT ON t1 to user_1@localhost;
 
48
connection con1;
 
49
select * from information_schema.table_privileges;
 
50
connection default;
 
51
disconnect con1;
 
52
 
 
53
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
 
54
DROP USER user_1@localhost;
 
55
DROP DATABASE d1;
 
56
USE test;
 
57
 
 
58
CREATE DATABASE db1;
 
59
USE db1;
 
60
CREATE PROCEDURE p1() BEGIN END;
 
61
CREATE FUNCTION f1(i INT) RETURNS INT RETURN i+1;
 
62
 
 
63
GRANT USAGE ON db1.* to user_1@localhost;
 
64
GRANT EXECUTE ON PROCEDURE db1.P1 to user_1@localhost;
 
65
GRANT EXECUTE ON FUNCTION db1.f1 to user_1@localhost;
 
66
GRANT UPDATE ON db1.* to USER_1@localhost;
 
67
 
 
68
connect (con1,localhost,user_1,,db1);
 
69
call p1();
 
70
call P1();
 
71
select f1(1);
 
72
connect (con2,localhost,USER_1,,db1);
 
73
--error ER_PROCACCESS_DENIED_ERROR
 
74
call p1();
 
75
--error ER_PROCACCESS_DENIED_ERROR
 
76
call P1();
 
77
--error ER_PROCACCESS_DENIED_ERROR
 
78
select f1(1);
 
79
 
 
80
connection default;
 
81
disconnect con1;
 
82
disconnect con2;
 
83
 
 
84
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_1@localhost;
 
85
REVOKE ALL PRIVILEGES, GRANT OPTION FROM USER_1@localhost;
 
86
DROP FUNCTION f1;
 
87
DROP PROCEDURE p1;
 
88
DROP USER user_1@localhost;
 
89
DROP USER USER_1@localhost;
 
90
DROP DATABASE db1;
 
91
use test;
 
92
 
 
93
# End of 5.0 tests