Commit 5f57ca86 authored by Matthias Leich's avatar Matthias Leich

Merge fix for bug 42308 into GCA tree

parents 984d0841 02a902ed
......@@ -659,11 +659,16 @@ drop table t1;
connection thread1;
select * from t1;
--echo ** Cleanup
connection thread1;
disconnect thread1;
--source include/wait_until_disconnected.inc
--echo ** connection thread2
connection thread2;
disconnect thread2;
--source include/wait_until_disconnected.inc
--echo ** connection default
connection default;
drop table t1;
drop user mysqltest@localhost;
disconnect thread1;
disconnect thread2;
......@@ -171,15 +171,30 @@ show status like "Qcache_not_cached";
# Cleanup
--echo ----- switch to connection default and close connections -----
connection default;
--echo ----- close connections -----
connection root;
disconnect root;
--source include/wait_until_disconnected.inc
connection root2;
disconnect root2;
--source include/wait_until_disconnected.inc
connection user1;
disconnect user1;
--source include/wait_until_disconnected.inc
connection user2;
disconnect user2;
--source include/wait_until_disconnected.inc
connection user3;
disconnect user3;
--source include/wait_until_disconnected.inc
connection user4;
disconnect user4;
--source include/wait_until_disconnected.inc
connection unkuser;
disconnect unkuser;
--source include/wait_until_disconnected.inc
--echo ----- switch to connection default -----
connection default;
#
# A temporary 4.1 workaround to make this test pass if
......
......@@ -719,6 +719,7 @@ connection con1;
--reap
drop table t1;
disconnect con1;
--source include/wait_until_disconnected.inc
connection default;
#
......
......@@ -177,6 +177,7 @@ show status like "Qcache_hits";
# Final cleanup
eval set GLOBAL query_cache_size=$save_query_cache_size;
disconnect connection1;
--source include/wait_until_disconnected.inc
connection default;
drop table t2;
disconnect connection1;
......@@ -785,6 +785,8 @@ eta tipo c
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
** Cleanup
** connection thread2
** connection default
drop table t1;
drop user mysqltest@localhost;
......@@ -781,6 +781,8 @@ eta tipo c
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
** Cleanup
** connection thread2
** connection default
drop table t1;
drop user mysqltest@localhost;
......@@ -2829,7 +2829,11 @@ t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
---> connection: con2
---> connection: con3
---> connection: default
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
......@@ -2829,7 +2829,11 @@ t2 CREATE TABLE `t2` (
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
---> connection: con2
---> connection: con3
---> connection: default
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
......@@ -63,3 +63,4 @@ DROP TABLE fill_it1;
DROP TABLE fill_it2;
DROP TABLE fill_it3;
DROP DATABASE events_test;
SET GLOBAL event_scheduler=off;
......@@ -206,7 +206,8 @@ Qcache_hits 8
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 8
----- switch to connection default and close connections -----
----- close connections -----
----- switch to connection default -----
set names binary;
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
......
......@@ -206,7 +206,8 @@ Qcache_hits 8
show status like "Qcache_not_cached";
Variable_name Value
Qcache_not_cached 5
----- switch to connection default and close connections -----
----- close connections -----
----- switch to connection default -----
set names binary;
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
......
......@@ -94,5 +94,11 @@ INSERT INTO `t1` VALUES
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
# Determine the number of open sessions
--source include/count_sessions.inc
--exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1
drop table t1;
# Wait till the number of open sessions is <= the number before the run with $MYSQL_DUMP
# = The session caused by mysqldump has finished its disconnect
--source include/wait_until_count_sessions.inc
......@@ -18,6 +18,10 @@ create table t1 (
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
# Determine the number of open sessions
--source include/count_sessions.inc
--exec $MYSQL --xml test -e "select * from t1"
--exec $MYSQL_DUMP --xml --skip-create test
......@@ -33,3 +37,8 @@ drop table t1;
# Restore global concurrent_insert value
set @@global.concurrent_insert= @old_concurrent_insert;
# Wait till the number of open sessions is <= the number before the runs with
# $MYSQL and $MYSQL_DUMP
# = The session caused by mysql and mysqldump have finished their disconnect
--source include/wait_until_count_sessions.inc
......@@ -1800,10 +1800,11 @@ connect (con1,localhost,root,,);
# EE_FILENOTFOUND 29
--error 29
select * from t1;
--disconnect con1
--source include/wait_until_disconnected.inc
connection default;
unlock tables;
drop table t1;
--disconnect con1
#
# Bug#41441 repair csv table crashes debug server
......
......@@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
#
# Cleanup.
#
delimiter ;|
--connection default
--connection con2
--echo
--echo ---> connection: default
--echo ---> connection: con2
--disconnect con2
--source include/wait_until_disconnected.inc
--connection con3
--echo
--echo ---> connection: con3
--disconnect con3
--source include/wait_until_disconnected.inc
--connection default
--echo
--echo ---> connection: default
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
......@@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
#
# Cleanup.
#
delimiter ;|
--connection default
--connection con2
--echo
--echo ---> connection: default
--echo ---> connection: con2
--disconnect con2
--source include/wait_until_disconnected.inc
--connection con3
--echo
--echo ---> connection: con3
--disconnect con3
--source include/wait_until_disconnected.inc
--connection default
--echo
--echo ---> connection: default
USE test;
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
use test|
DROP DATABASE mysqltest1|
DROP DATABASE mysqltest2|
......@@ -273,7 +273,9 @@ select t2.* from ((select * from t1) as A inner join t2 on A.ID = t2.FID);
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
drop table t1, t2;
connection con1;
disconnect con1;
--source include/wait_until_disconnected.inc
connection default;
drop user mysqltest_1;
......
......@@ -117,8 +117,11 @@ connection addconroot1;
--reap
connection addconroot2;
--reap
disconnect addconroot1;
disconnect addconroot2;
--source include/wait_until_disconnected.inc
connection addconroot1;
disconnect addconroot1;
--source include/wait_until_disconnected.inc
connection default;
--echo End of 5.0 tests
......
......@@ -97,7 +97,9 @@ DROP EVENT one_event;
connection default;
--echo "One event should not be there"
SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;
connection ev_con1;
disconnect ev_con1;
--source include/wait_until_disconnected.inc
connection default;
DROP USER ev_test@localhost;
DROP DATABASE events_test2;
......@@ -106,9 +108,6 @@ DROP DATABASE events_test2;
# End of tests
#
let $wait_condition=
select count(*) = 0 from information_schema.processlist
where db='events_test' and command = 'Connect' and user=current_user();
--source include/wait_condition.inc
--source include/check_events_off.inc
DROP DATABASE events_test;
......@@ -109,7 +109,7 @@ connection conn3;
--send
DROP DATABASE events_conn3_db;
connection default;
--send
# --send
DROP DATABASE events_conn1_test2;
DROP DATABASE events_conn1_test3;
SET GLOBAL event_scheduler=off;
......@@ -135,3 +135,7 @@ DROP USER event_user3@localhost;
#
DROP DATABASE events_test;
# Cleanup
SET GLOBAL event_scheduler=off;
--source include/check_events_off.inc
......@@ -50,6 +50,7 @@ delete from t1;
commit work;
# Cleanup
disconnect conn1;
--source include/wait_until_disconnected.inc
connection default;
drop user mysqltest_user1@localhost;
drop database mysqltest_db2;
......
......@@ -51,8 +51,13 @@ echo;
-- disable_query_log
# Run the mysql_fix_privilege_tables.sql using "mysql --force"
# Determine the number of open sessions
--source include/count_sessions.inc
--exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/fix_priv_tables.log
# Wait till the number of open sessions is <= the number before the run with $MYSQL
# = The session caused by mysql has finished its disconnect
--source include/wait_until_count_sessions.inc
-- enable_query_log
-- enable_result_log
......
......@@ -171,6 +171,7 @@ set session low_priority_updates=default;
connect (con1,localhost,root,,);
send select benchmark(200, (select sin(1))) > 1000;
disconnect con1;
--source include/wait_until_disconnected.inc
connection default;
--echo End of 5.0 tests
......
......@@ -50,6 +50,7 @@ set @@global.max_allowed_packet=1048576*100;
--connect (newconn, localhost, root,,)
eval select compress(repeat('aaaaaaaaaa', IF('$LOW_MEMORY', 10, 10000000))) is null;
disconnect newconn;
--source include/wait_until_disconnected.inc
connection default;
set @@global.max_allowed_packet=default;
......
......@@ -14,16 +14,18 @@ flush privileges;
connect (sample,localhost,sample,password,d1);
connection sample;
select database();
--error 1044
--error ER_DBACCESS_DENIED_ERROR
create database d2;
--error 1044
--error ER_DBACCESS_DENIED_ERROR
create database D1;
disconnect sample;
--source include/wait_until_disconnected.inc
connection master;
drop user 'sample'@'localhost';
drop database if exists d1;
disconnect master;
--source include/wait_until_disconnected.inc
connection default;
# End of 4.1 tests
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment