1#
2# Here we collect tests that doesn't work with the embedded server
3#
4
5-- source include/not_embedded.inc
6
7# End of 4.1 tests
8
9call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
10
11#
12# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
13#
14
15SHOW VARIABLES like 'slave_skip_errors';
16
17--echo #
18--echo # Bug#58026: massive recursion and crash in regular expression handling
19--echo #
20
21--error ER_STACK_OVERRUN_NEED_MORE,ER_REGEXP_ERROR
22SELECT '1' RLIKE RPAD('1', 10000, '(');
23
24
25# End of 5.1 tests
26
27--echo #
28--echo # WL#4284: Transactional DDL locking
29--echo #
30--echo # FLUSH PRIVILEGES should not implicitly unlock locked tables.
31--echo #
32--disable_warnings
33DROP TABLE IF EXISTS t1;
34--enable_warnings
35CREATE TABLE t1 (c1 INT);
36LOCK TABLES t1 READ;
37--error ER_TABLE_NOT_LOCKED
38FLUSH PRIVILEGES;
39UNLOCK TABLES;
40DROP TABLE t1;
41
42--echo #
43--echo # Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
44--echo #
45
46CREATE USER nopriv_user@localhost;
47
48connection default;
49
50--disable_warnings
51DROP TABLE IF EXISTS t1,t2,t3;
52DROP FUNCTION IF EXISTS f;
53--enable_warnings
54
55CREATE TABLE t1 (key1 INT PRIMARY KEY);
56CREATE TABLE t2 (key2 INT);
57INSERT INTO t1 VALUES (1),(2);
58
59CREATE FUNCTION f() RETURNS INT RETURN 1;
60
61GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
62
63FLUSH PRIVILEGES;
64
65connect (con1,localhost,nopriv_user,,);
66connection con1;
67
68let outfile=$MYSQLTEST_VARDIR/tmp/mytest;
69--error 0,1
70--remove_file $outfile
71--replace_result $outfile <outfile>
72--error ER_PROCACCESS_DENIED_ERROR
73eval SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '$outfile';
74# A removal of the outfile is necessary, at least today (2010-12-07), because
75# the outfile is created even if the SELECT statement fails.
76# If the server is improved in the future this may not happen.
77# ==> Do not fail if the outfile does not exist.
78--error 0,1
79--remove_file $outfile
80
81--error ER_PROCACCESS_DENIED_ERROR
82INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
83
84--error ER_PROCACCESS_DENIED_ERROR
85SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1;
86
87--error ER_PROCACCESS_DENIED_ERROR
88CREATE TABLE t3 (i INT) AS SELECT MAX(key1) FROM t1 WHERE f() < 1;
89
90disconnect con1;
91--source include/wait_until_disconnected.inc
92
93connection default;
94
95DROP TABLE t1,t2;
96DROP FUNCTION f;
97DROP USER nopriv_user@localhost;
98
99--echo #
100--echo # End Bug#54812
101--echo #
102
103
104--echo
105--echo #
106--echo # Test for Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES
107--echo # IGNORED AND BREAKS REPLICATION
108--echo #
109
110SET @org_mode=@@sql_mode;
111
112SET @@sql_mode='';
113
114--echo # USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
115CREATE USER 'user\'s_12601974'@'localhost';
116--error ER_CANNOT_USER
117CREATE USER 'user\'s_12601974'@'localhost';
118DROP USER 'user\'s_12601974'@'localhost';
119
120CREATE USER 'user\"s_12601974'@'localhost';
121--error ER_CANNOT_USER
122CREATE USER 'user\"s_12601974'@'localhost';
123DROP USER 'user\"s_12601974'@'localhost';
124
125CREATE USER 'user\bs_12601974'@'localhost';
126--error ER_CANNOT_USER
127CREATE USER 'user\bs_12601974'@'localhost';
128DROP USER 'user\bs_12601974'@'localhost';
129
130CREATE USER 'user\ns_12601974'@'localhost';
131--error ER_CANNOT_USER
132CREATE USER 'user\ns_12601974'@'localhost';
133DROP USER 'user\ns_12601974'@'localhost';
134
135CREATE USER 'user\rs_12601974'@'localhost';
136--error ER_CANNOT_USER
137CREATE USER 'user\rs_12601974'@'localhost';
138DROP USER 'user\rs_12601974'@'localhost';
139
140CREATE USER 'user\ts_12601974'@'localhost';
141--error ER_CANNOT_USER
142CREATE USER 'user\ts_12601974'@'localhost';
143DROP USER 'user\ts_12601974'@'localhost';
144
145CREATE USER 'user\\s_12601974'@'localhost';
146--error ER_CANNOT_USER
147CREATE USER 'user\\s_12601974'@'localhost';
148DROP USER 'user\\s_12601974'@'localhost';
149
150CREATE USER 'user\%s_12601974'@'localhost';
151--error ER_CANNOT_USER
152CREATE USER 'user\%s_12601974'@'localhost';
153DROP USER 'user\%s_12601974'@'localhost';
154
155CREATE USER 'user\_s_12601974'@'localhost';
156--error ER_CANNOT_USER
157CREATE USER 'user\_s_12601974'@'localhost';
158DROP USER 'user\_s_12601974'@'localhost';
159--echo
160--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
161
162SET @@sql_mode='NO_BACKSLASH_ESCAPES';
163--echo # USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
164CREATE USER 'user\"s_12601974'@'localhost';
165--error ER_CANNOT_USER
166CREATE USER 'user\"s_12601974'@'localhost';
167DROP USER 'user\"s_12601974'@'localhost';
168
169CREATE USER 'user\bs_12601974'@'localhost';
170--error ER_CANNOT_USER
171CREATE USER 'user\bs_12601974'@'localhost';
172DROP USER 'user\bs_12601974'@'localhost';
173
174CREATE USER 'user\ns_12601974'@'localhost';
175--error ER_CANNOT_USER
176CREATE USER 'user\ns_12601974'@'localhost';
177DROP USER 'user\ns_12601974'@'localhost';
178
179CREATE USER 'user\rs_12601974'@'localhost';
180--error ER_CANNOT_USER
181CREATE USER 'user\rs_12601974'@'localhost';
182DROP USER 'user\rs_12601974'@'localhost';
183
184CREATE USER 'user\ts_12601974'@'localhost';
185--error ER_CANNOT_USER
186CREATE USER 'user\ts_12601974'@'localhost';
187DROP USER 'user\ts_12601974'@'localhost';
188
189CREATE USER 'user\\s_12601974'@'localhost';
190--error ER_CANNOT_USER
191CREATE USER 'user\\s_12601974'@'localhost';
192DROP USER 'user\\s_12601974'@'localhost';
193
194CREATE USER 'user\%s_12601974'@'localhost';
195--error ER_CANNOT_USER
196CREATE USER 'user\%s_12601974'@'localhost';
197DROP USER 'user\%s_12601974'@'localhost';
198
199CREATE USER 'user\_s_12601974'@'localhost';
200--error ER_CANNOT_USER
201CREATE USER 'user\_s_12601974'@'localhost';
202DROP USER 'user\_s_12601974'@'localhost';
203--echo
204--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
205SET @@sql_mode= @org_mode;
206
207--echo
208--echo #End of Test for Bug#12601974
209