diff options
author | unknown <davi@moksha.com.br> | 2007-10-10 19:06:53 -0300 |
---|---|---|
committer | unknown <davi@moksha.com.br> | 2007-10-10 19:06:53 -0300 |
commit | 86cb5ae9bcdd609105fbb485879dadbd2d2838fd (patch) | |
tree | e24e52cbcc0ead08c4235f482668e28976acfd91 | |
parent | 954bb0f555c31d38147a3107335ab25cf3ac8f84 (diff) | |
download | mariadb-git-86cb5ae9bcdd609105fbb485879dadbd2d2838fd.tar.gz |
Post-merge test case for Bug 21587
mysql-test/include/handler.inc:
Add test case for Bug 21587
mysql-test/r/handler_innodb.result:
Add test case result for InnoDB run of the handler test for Bug 21587
mysql-test/r/handler_myisam.result:
Add test case result for MyISAM run of the handler test for Bug 21587
-rw-r--r-- | mysql-test/include/handler.inc | 35 | ||||
-rw-r--r-- | mysql-test/r/handler_innodb.result | 22 | ||||
-rw-r--r-- | mysql-test/r/handler_myisam.result | 22 |
3 files changed, 79 insertions, 0 deletions
diff --git a/mysql-test/include/handler.inc b/mysql-test/include/handler.inc index 437dd6ced4d..c957fa81040 100644 --- a/mysql-test/include/handler.inc +++ b/mysql-test/include/handler.inc @@ -498,3 +498,38 @@ handler t1_alias read a next; handler t1_alias READ a next where inexistent > 0; handler t1_alias close; drop table t1; + +# +# Bug#21587 FLUSH TABLES causes server crash when used with HANDLER statements +# + +--disable_warnings +drop table if exists t1,t2; +--enable_warnings +create table t1 (c1 int); +create table t2 (c1 int); +insert into t1 values (1); +insert into t2 values (2); +--echo connection: default +handler t1 open; +handler t1 read first; +connect (flush,localhost,root,,); +connection flush; +--echo connection: flush +--send flush tables; +connection default; +--echo connection: default +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Flushing tables"; +--source include/wait_condition.inc +handler t2 open; +handler t2 read first; +handler t1 read next; +handler t1 close; +handler t2 close; +connection flush; +reap; +connection default; +drop table t1,t2; +disconnect flush; diff --git a/mysql-test/r/handler_innodb.result b/mysql-test/r/handler_innodb.result index 98b8922bc5f..45a6218585d 100644 --- a/mysql-test/r/handler_innodb.result +++ b/mysql-test/r/handler_innodb.result @@ -535,3 +535,25 @@ handler t1_alias READ a next where inexistent > 0; ERROR 42S22: Unknown column 'inexistent' in 'field list' handler t1_alias close; drop table t1; +drop table if exists t1,t2; +create table t1 (c1 int); +create table t2 (c1 int); +insert into t1 values (1); +insert into t2 values (2); +connection: default +handler t1 open; +handler t1 read first; +c1 +1 +connection: flush +flush tables;; +connection: default +handler t2 open; +handler t2 read first; +c1 +2 +handler t1 read next; +c1 +handler t1 close; +handler t2 close; +drop table t1,t2; diff --git a/mysql-test/r/handler_myisam.result b/mysql-test/r/handler_myisam.result index 464b775b795..bc4a8e9081a 100644 --- a/mysql-test/r/handler_myisam.result +++ b/mysql-test/r/handler_myisam.result @@ -535,3 +535,25 @@ handler t1_alias READ a next where inexistent > 0; ERROR 42S22: Unknown column 'inexistent' in 'field list' handler t1_alias close; drop table t1; +drop table if exists t1,t2; +create table t1 (c1 int); +create table t2 (c1 int); +insert into t1 values (1); +insert into t2 values (2); +connection: default +handler t1 open; +handler t1 read first; +c1 +1 +connection: flush +flush tables;; +connection: default +handler t2 open; +handler t2 read first; +c1 +2 +handler t1 read next; +c1 +handler t1 close; +handler t2 close; +drop table t1,t2; |