From d8d57c77b1f3490b69e0ed116a766b6434137ecd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Sep 2006 15:13:40 +0200 Subject: Bug#22436 Four tests require "innodb" to be configured, fail in "classic" build - Disable warnings when creating the "innodb" tables if it works anyway. - Move test that are really innodb dependent to innodb_mysql mysql-test/r/create.result: Move the innodb dependent test to innodb_mysql.test mysql-test/r/innodb_mysql.result: Move the innodb dependent test to innodb_mysql.test mysql-test/t/create.test: Move the innodb dependent test to innodb_mysql.test mysql-test/t/innodb_mysql.test: Move the innodb dependent test to innodb_mysql.test mysql-test/t/lock_multi.test: Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same. mysql-test/t/sp.test: Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same. mysql-test/t/view.test: Disable warnings while creating the innodb table. If innodb is not available, the table will be created with default engine and thus create a warning. Regardless of this, test output should be the same. --- mysql-test/t/innodb_mysql.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t/innodb_mysql.test') diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index 59dbe5e96d4..1a6aede599f 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -302,3 +302,11 @@ SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%' OR FALSE; DROP TABLE t1,t2; + +# +# Bug#17530: Incorrect key truncation on table creation caused server crash. +# +create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb + character set utf8 collate utf8_general_ci; +insert into t1 values('aaa'); +drop table t1; -- cgit v1.2.1 From ca126a2bbdf50736d2cb1909be1bde8808ba2d6c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 11 Oct 2006 12:44:03 +0400 Subject: Fix for bug #22728 "Handler_rollback value is growing". The bug is present only in 4.1, will be null-merged to 5.0 For InnoDB, check value of thd->transaction.all.innodb_active_trans instead of thd->transaction.stmt.innobase_tid to see if we really need to rollback. mysql-test/r/innodb_mysql.result: Added testcase for bug #22728 "Handler_rollback value is growing" mysql-test/t/innodb_mysql.test: Added testcase for bug #22728 "Handler_rollback value is growing" sql/handler.cc: For InnoDB, check value of thd->transaction.all.innodb_active_trans instead of thd->transaction.stmt.innobase_tid to see if we really need to rollback. --- mysql-test/t/innodb_mysql.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/t/innodb_mysql.test') diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index f31e4d64789..ce8030d389d 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -57,3 +57,21 @@ where c.c_id = 218 and expiredate is null; drop table t1, t2; + +# +# Bug #22728 - Handler_rollback value is growing +# +flush status; +create table t1 (c1 int) engine=innodb; +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +connection con2; +handler t1 open; +handler t1 read first; +disconnect con2; +connection con1; +show /*!50002 GLOBAL */ status like 'Handler_rollback'; +connection default; +drop table t1; +disconnect con1; +--echo End of 4.1 tests -- cgit v1.2.1 From e948c64ff52fda43d2a7cb59bc631e53051adc05 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 Oct 2006 13:35:57 +0100 Subject: Improve comments around FLUSH STATUS It's not possible to flush the global status variables in 5.0 Update test case so it works by recording the value of handle_rollback before and compare it to the value after mysql-test/r/innodb_mysql.result: Update result file mysql-test/t/innodb_mysql.test: It's not possible to reset the global status variables in 5.0 so intead its value is recorded and compared to the after value. It should not have changed. sql/mysqld.cc: Improve comments sql/set_var.cc: Improve comments sql/sql_class.cc: Improve comments sql/sql_class.h: Improve comments --- mysql-test/t/innodb_mysql.test | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/innodb_mysql.test') diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index ff3089c98cf..73ae4845c06 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -119,7 +119,8 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = DROP TABLE t1, t2; # Bug #22728 - Handler_rollback value is growing # -flush status; + +let $before= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`; create table t1 (c1 int) engine=innodb; connect (con1,localhost,root,,); connect (con2,localhost,root,,); @@ -128,7 +129,11 @@ handler t1 open; handler t1 read first; disconnect con2; connection con1; -show /*!50002 GLOBAL */ status like 'Handler_rollback'; +let $after= `show /*!50002 GLOBAL */ status like 'Handler_rollback'`; +# Compare the before and after value, it should be equal +--disable_query_log +eval select STRCMP("$before", "$after") as "Before and after comparison"; +--enable_query_log connection default; drop table t1; disconnect con1; -- cgit v1.2.1