diff options
author | unknown <knielsen@knielsen-hq.org> | 2011-12-15 10:34:14 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2011-12-15 10:34:14 +0100 |
commit | a6c7c53b63384f0b58ff8e34798c0952ed6ac7a7 (patch) | |
tree | 5d4eaafa051042a726cc5ad7376b13b96111f6cd /mysql-test/suite/percona/percona_processlist_row_stats.test | |
parent | 79479ee97571e8023b0269ffddbf525d54955273 (diff) | |
parent | 6afbf295f018e077be7c569ef8e433e510441bea (diff) | |
download | mariadb-git-a6c7c53b63384f0b58ff8e34798c0952ed6ac7a7.tar.gz |
Merge XtraDB from Percona-server-5.5.17-rel22.1 into MariaDB 5.5
Diffstat (limited to 'mysql-test/suite/percona/percona_processlist_row_stats.test')
-rw-r--r-- | mysql-test/suite/percona/percona_processlist_row_stats.test | 63 |
1 files changed, 25 insertions, 38 deletions
diff --git a/mysql-test/suite/percona/percona_processlist_row_stats.test b/mysql-test/suite/percona/percona_processlist_row_stats.test index 230a9f4c311..17ebfedfa40 100644 --- a/mysql-test/suite/percona/percona_processlist_row_stats.test +++ b/mysql-test/suite/percona/percona_processlist_row_stats.test @@ -13,76 +13,63 @@ INSERT INTO t2 VALUES(20); INSERT INTO t2 VALUES(10); INSERT INTO t2 VALUES(20); -connect (conn1, localhost, root, ,); -connect (conn2, localhost, root, ,); +--connect (conn1, localhost, root, ,) +--connect (conn2, localhost, root, ,) --connection conn1 -echo Issuing operation that should not return any rows and stopping the thread #1; SET DEBUG_SYNC= 'locked_table_name SIGNAL thread1_ready WAIT_FOR threads_dumped'; send CREATE TABLE t1 (a INT); - --connection default SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; ---echo Thread #1 stopped --connection conn2 -echo Issuing row-returning query and stopping the thread #2 at the end of query; SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; send SELECT a FROM t2 WHERE a > 15; - --connection default SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; ---echo Thread #2 stopped ---echo Look at thread states - ---replace_column 1 ### 3 ### 6 ### 7 ### -SHOW PROCESSLIST; -# The running threads are different between SHOW above and SELECT below. Thus select info too to -# show the difference. Results are in the same order as in SHOW. ---replace_column 1 ### -SELECT id, info, rows_sent, rows_examined, rows_read FROM information_schema.processlist -ORDER BY id; -echo Let threads #1 and #2 finish their job; -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; +--source include/percona_processlist_row_stats_show.inc --connection conn1 reap; - --connection conn2 reap; -echo Issuing row-returning query and stopping the thread #2 in the middle of query; + +--connection conn1 +SET DEBUG_SYNC= 'sent_row SIGNAL thread1_ready WAIT_FOR threads_dumped'; +send SELECT a FROM t2 WHERE a < 15; +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; + +--connection conn2 SET DEBUG_SYNC= 'sent_row SIGNAL thread2_ready WAIT_FOR threads_dumped'; send SELECT a FROM t2 WHERE a > 15; - --connection default SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; -echo Thread #2 stopped, look at its state; ---replace_column 1 ### 3 ### 6 ### 7 ### -SHOW PROCESSLIST; ---replace_column 1 ### -SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; -echo Let thread #2 finish its job; +--source include/percona_processlist_row_stats_show.inc +--connection conn1 +reap; --connection conn2 reap; -echo Issuing an UPDATE and stopping thread #2; + +--connection conn1 +SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread1_ready WAIT_FOR threads_dumped'; +send UPDATE t2 SET a = 15 WHERE a = 20; +--connection default +SET DEBUG_SYNC= 'now WAIT_FOR thread1_ready'; + +--connection conn2 SET DEBUG_SYNC= 'execute_command_after_close_tables SIGNAL thread2_ready WAIT_FOR threads_dumped'; send UPDATE t2 SET a = 15 WHERE a = 10; - --connection default SET DEBUG_SYNC= 'now WAIT_FOR thread2_ready'; -echo Thread #2 stopped, look at its state; ---replace_column 1 ### 3 ### 6 ### 7 ### -SHOW PROCESSLIST; ---replace_column 1 ### -SELECT id,rows_sent,rows_examined,rows_read FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY Id; -SET DEBUG_SYNC= 'now SIGNAL threads_dumped'; -echo Let thread #2 finish its job; +--source include/percona_processlist_row_stats_show.inc +--connection conn1 +reap; --connection conn2 reap; |