mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-04 04:46:15 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			209 lines
		
	
	
	
		
			5.6 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			209 lines
		
	
	
	
		
			5.6 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
#
 | 
						|
# Here we collect tests that doesn't work with the embedded server
 | 
						|
#
 | 
						|
 | 
						|
-- source include/not_embedded.inc
 | 
						|
 | 
						|
# End of 4.1 tests
 | 
						|
 | 
						|
call mtr.add_suppression("Can't open and lock privilege tables: Table 'db' was not locked with LOCK TABLES");
 | 
						|
 | 
						|
#
 | 
						|
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
 | 
						|
#
 | 
						|
 | 
						|
SHOW VARIABLES like 'slave_skip_errors';
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # Bug#58026: massive recursion and crash in regular expression handling
 | 
						|
--echo #
 | 
						|
 | 
						|
--error ER_STACK_OVERRUN_NEED_MORE,ER_REGEXP_ERROR
 | 
						|
SELECT '1' RLIKE RPAD('1', 10000, '(');
 | 
						|
 | 
						|
 | 
						|
# End of 5.1 tests
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # WL#4284: Transactional DDL locking
 | 
						|
--echo #
 | 
						|
--echo # FLUSH PRIVILEGES should not implicitly unlock locked tables.
 | 
						|
--echo #
 | 
						|
--disable_warnings
 | 
						|
DROP TABLE IF EXISTS t1;
 | 
						|
--enable_warnings
 | 
						|
CREATE TABLE t1 (c1 INT);
 | 
						|
LOCK TABLES t1 READ;
 | 
						|
--error ER_TABLE_NOT_LOCKED
 | 
						|
FLUSH PRIVILEGES;
 | 
						|
UNLOCK TABLES;
 | 
						|
DROP TABLE t1;
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
 | 
						|
--echo #
 | 
						|
 | 
						|
CREATE USER nopriv_user@localhost;
 | 
						|
 | 
						|
connection default;
 | 
						|
 | 
						|
--disable_warnings
 | 
						|
DROP TABLE IF EXISTS t1,t2,t3;
 | 
						|
DROP FUNCTION IF EXISTS f;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
CREATE TABLE t1 (key1 INT PRIMARY KEY);
 | 
						|
CREATE TABLE t2 (key2 INT);
 | 
						|
INSERT INTO t1 VALUES (1),(2);
 | 
						|
 | 
						|
CREATE FUNCTION f() RETURNS INT RETURN 1;
 | 
						|
 | 
						|
GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
 | 
						|
GRANT SELECT,INSERT,CREATE ON test.* TO 'nopriv_user'@'localhost';
 | 
						|
 | 
						|
FLUSH PRIVILEGES;
 | 
						|
 | 
						|
connect (con1,localhost,nopriv_user,,);
 | 
						|
connection con1;
 | 
						|
 | 
						|
let outfile=$MYSQLTEST_VARDIR/tmp/mytest;
 | 
						|
--error 0,1
 | 
						|
--remove_file $outfile
 | 
						|
--replace_result $outfile <outfile>
 | 
						|
--error ER_PROCACCESS_DENIED_ERROR
 | 
						|
eval SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE '$outfile';
 | 
						|
# A removal of the outfile is necessary, at least today (2010-12-07), because
 | 
						|
# the outfile is created even if the SELECT statement fails.
 | 
						|
# If the server is improved in the future this may not happen.
 | 
						|
# ==> Do not fail if the outfile does not exist.
 | 
						|
--error 0,1
 | 
						|
--remove_file $outfile
 | 
						|
 | 
						|
--error ER_PROCACCESS_DENIED_ERROR
 | 
						|
INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
 | 
						|
 | 
						|
--error ER_PROCACCESS_DENIED_ERROR
 | 
						|
SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1;
 | 
						|
 | 
						|
--error ER_PROCACCESS_DENIED_ERROR
 | 
						|
CREATE TABLE t3 (i INT) AS SELECT MAX(key1) FROM t1 WHERE f() < 1;
 | 
						|
 | 
						|
disconnect con1;
 | 
						|
--source include/wait_until_disconnected.inc
 | 
						|
 | 
						|
connection default;
 | 
						|
 | 
						|
DROP TABLE t1,t2;
 | 
						|
DROP FUNCTION f;
 | 
						|
DROP USER nopriv_user@localhost;
 | 
						|
 | 
						|
--echo #
 | 
						|
--echo # End Bug#54812
 | 
						|
--echo #
 | 
						|
 | 
						|
 | 
						|
--echo 
 | 
						|
--echo #
 | 
						|
--echo # Test for Bug#12601974 - STORED PROCEDURE SQL_MODE=NO_BACKSLASH_ESCAPES
 | 
						|
--echo # IGNORED AND BREAKS REPLICATION
 | 
						|
--echo #
 | 
						|
 | 
						|
SET @org_mode=@@sql_mode;
 | 
						|
 | 
						|
SET @@sql_mode='';
 | 
						|
 | 
						|
--echo # USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
 | 
						|
CREATE USER 'user\'s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\'s_12601974'@'localhost';
 | 
						|
DROP USER 'user\'s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\"s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\"s_12601974'@'localhost';
 | 
						|
DROP USER 'user\"s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\bs_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\bs_12601974'@'localhost';
 | 
						|
DROP USER 'user\bs_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\ns_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\ns_12601974'@'localhost';
 | 
						|
DROP USER 'user\ns_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\rs_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\rs_12601974'@'localhost';
 | 
						|
DROP USER 'user\rs_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\ts_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\ts_12601974'@'localhost';
 | 
						|
DROP USER 'user\ts_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\\s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\\s_12601974'@'localhost';
 | 
						|
DROP USER 'user\\s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\%s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\%s_12601974'@'localhost';
 | 
						|
DROP USER 'user\%s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\_s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\_s_12601974'@'localhost';
 | 
						|
DROP USER 'user\_s_12601974'@'localhost';
 | 
						|
--echo 
 | 
						|
--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
 | 
						|
 | 
						|
SET @@sql_mode='NO_BACKSLASH_ESCAPES';
 | 
						|
--echo # USER NAME CONTAINING BACKSLASH IN DROP USER OPERATION
 | 
						|
CREATE USER 'user\"s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\"s_12601974'@'localhost';
 | 
						|
DROP USER 'user\"s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\bs_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\bs_12601974'@'localhost';
 | 
						|
DROP USER 'user\bs_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\ns_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\ns_12601974'@'localhost';
 | 
						|
DROP USER 'user\ns_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\rs_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\rs_12601974'@'localhost';
 | 
						|
DROP USER 'user\rs_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\ts_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\ts_12601974'@'localhost';
 | 
						|
DROP USER 'user\ts_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\\s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\\s_12601974'@'localhost';
 | 
						|
DROP USER 'user\\s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\%s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\%s_12601974'@'localhost';
 | 
						|
DROP USER 'user\%s_12601974'@'localhost';
 | 
						|
 | 
						|
CREATE USER 'user\_s_12601974'@'localhost';
 | 
						|
--error ER_CANNOT_USER
 | 
						|
CREATE USER 'user\_s_12601974'@'localhost';
 | 
						|
DROP USER 'user\_s_12601974'@'localhost';
 | 
						|
--echo 
 | 
						|
--echo # END OF CASE - USER NAME CONTAINING BACKSLASH IN CREATE USER OPERATION
 | 
						|
SET @@sql_mode= @org_mode;
 | 
						|
 | 
						|
--echo 
 | 
						|
--echo #End of Test for Bug#12601974 
 |