diff --git a/mysql-test/patches/README b/mysql-test/patches/README new file mode 100644 index 00000000000..ab159f4f870 --- /dev/null +++ b/mysql-test/patches/README @@ -0,0 +1,30 @@ +This directory contains patches that need to be applied to the MySQL +source tree in order to get the mysql-test suite to succeed (when +storage/innobase is replaced with this InnoDB branch). Things to keep +in mind when adding new patches here: + +* The patch must be appliable from the mysql top-level source directory. + +* The patch filename must end in ".diff". + +* All patches here are expected to apply cleanly to the latest MySQL 5.1 + tree with storage/innobase is replaced with this InnoDB branch. If + changes to either of those cause the patch to fail, then please check + whether the patch is still needed and, if yes, adjust it so it applies + cleanly. + +* If applicable, always submit the patch at http://bugs.mysql.com and + name the file here like bug%d.diff. Once the patch is committed to + MySQL remove the file from here. + +* If the patch cannot be proposed for inclusion in the MySQL source tree + (via http://bugs.mysql.com) then add a comment at the beginning of the + patch explaining the problem it is solving, how it does solve it and + why it is not applicable for inclusion in the MySQL source tree. + Obviously this is a very bad situation and should be avoided at all + costs, especially for files that are in the MySQL source repository + (not in storage/innobase). + +* If you ever need to add a patch here that is not related to mysql-test + suite, then please move this directory from ./mysql-test/patches to + ./patches and remove this text. diff --git a/mysql-test/patches/bug31231.diff b/mysql-test/patches/bug31231.diff new file mode 100644 index 00000000000..1e009e89e6b --- /dev/null +++ b/mysql-test/patches/bug31231.diff @@ -0,0 +1,38 @@ +diff -pu sql/mysql_priv.h sql/mysql_priv.h +--- sql/mysql_priv.h 2007-11-14 15:28:19.000000000 +0200 ++++ sql/mysql_priv.h 2008-01-08 10:45:53.000000000 +0200 +@@ -2094,6 +2094,7 @@ uint build_table_shadow_filename(char *b + #define FN_TO_IS_TMP (1 << 1) + #define FN_IS_TMP (FN_FROM_IS_TMP | FN_TO_IS_TMP) + #define NO_FRM_RENAME (1 << 2) ++#define FN_FRM_ONLY (1 << 3) + + /* from hostname.cc */ + struct in_addr; +diff -pu sql/sql_table.cc sql/sql_table.cc +--- sql/sql_table.cc 2007-11-02 00:48:11.000000000 +0200 ++++ sql/sql_table.cc 2008-01-08 10:46:04.000000000 +0200 +@@ -1791,8 +1791,9 @@ bool quick_rm_table(handlerton *base,con + if (my_delete(path,MYF(0))) + error= 1; /* purecov: inspected */ + path[path_length - reg_ext_length]= '\0'; // Remove reg_ext +- DBUG_RETURN(ha_delete_table(current_thd, base, path, db, table_name, 0) || +- error); ++ if (!(flags & FN_FRM_ONLY)) ++ error|= ha_delete_table(current_thd, base, path, db, table_name, 0); ++ DBUG_RETURN(error); + } + + /* +@@ -6680,7 +6681,10 @@ err1: + close_temporary_table(thd, new_table, 1, 1); + } + else +- VOID(quick_rm_table(new_db_type, new_db, tmp_name, FN_IS_TMP)); ++ VOID(quick_rm_table(new_db_type, new_db, tmp_name, ++ create_info->frm_only ++ ? FN_IS_TMP | FN_FRM_ONLY ++ : FN_IS_TMP)); + + err: + /* diff --git a/mysql-test/patches/bug35261.diff b/mysql-test/patches/bug35261.diff new file mode 100644 index 00000000000..4b849776e8d --- /dev/null +++ b/mysql-test/patches/bug35261.diff @@ -0,0 +1,85 @@ +--- mysql-test/t/date_formats.test.orig 2007-06-15 02:53:07.000000000 +0300 ++++ mysql-test/t/date_formats.test 2008-03-19 17:25:10.000000000 +0200 +@@ -7,9 +7,15 @@ + --enable_warnings + + --replace_result ROW STATEMENT MIXED +-SHOW GLOBAL VARIABLES LIKE "%e_format"; ++SELECT variable_name, variable_value ++FROM information_schema.global_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; + --replace_result ROW STATEMENT MIXED +-SHOW SESSION VARIABLES LIKE "%e_format"; ++SELECT variable_name, variable_value ++FROM information_schema.session_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; + + # + # Test setting a lot of different formats to see which formats are accepted and +@@ -37,7 +43,10 @@ + set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; + + --replace_result ROW STATEMENT MIXED +-SHOW SESSION VARIABLES LIKE "%e_format"; ++SELECT variable_name, variable_value ++FROM information_schema.session_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; + + --error 1231 + SET time_format='%h:%i:%s'; +--- mysql-test/r/date_formats.result.orig 2008-02-12 21:09:14.000000000 +0200 ++++ mysql-test/r/date_formats.result 2008-03-19 17:26:33.000000000 +0200 +@@ -1,14 +1,20 @@ + drop table if exists t1; +-SHOW GLOBAL VARIABLES LIKE "%e_format"; +-Variable_name Value +-date_format %d.%m.%Y +-datetime_format %Y-%m-%d %H:%i:%s +-time_format %H.%i.%s +-SHOW SESSION VARIABLES LIKE "%e_format"; +-Variable_name Value +-date_format %d.%m.%Y +-datetime_format %Y-%m-%d %H:%i:%s +-time_format %H.%i.%s ++SELECT variable_name, variable_value ++FROM information_schema.global_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; ++variable_name variable_value ++DATETIME_FORMAT %Y-%m-%d %H:%i:%s ++DATE_FORMAT %d.%m.%Y ++TIME_FORMAT %H.%i.%s ++SELECT variable_name, variable_value ++FROM information_schema.session_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; ++variable_name variable_value ++DATETIME_FORMAT %Y-%m-%d %H:%i:%s ++DATE_FORMAT %d.%m.%Y ++TIME_FORMAT %H.%i.%s + SET time_format='%H%i%s'; + SET time_format='%H:%i:%s.%f'; + SET time_format='%h-%i-%s.%f%p'; +@@ -26,11 +32,14 @@ + set datetime_format= '%H:%i:%s.%f %m-%d-%Y'; + set datetime_format= '%h:%i:%s %p %Y-%m-%d'; + set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d'; +-SHOW SESSION VARIABLES LIKE "%e_format"; +-Variable_name Value +-date_format %m-%d-%Y +-datetime_format %h:%i:%s.%f %p %Y-%m-%d +-time_format %h:%i:%s%p ++SELECT variable_name, variable_value ++FROM information_schema.session_variables ++WHERE variable_name IN ('date_format', 'datetime_format', 'time_format') ++ORDER BY variable_name; ++variable_name variable_value ++DATETIME_FORMAT %h:%i:%s.%f %p %Y-%m-%d ++DATE_FORMAT %m-%d-%Y ++TIME_FORMAT %h:%i:%s%p + SET time_format='%h:%i:%s'; + ERROR 42000: Variable 'time_format' can't be set to the value of '%h:%i:%s' + SET time_format='%H %i:%s'; diff --git a/mysql-test/patches/bug37312.diff b/mysql-test/patches/bug37312.diff new file mode 100644 index 00000000000..8b865ea85e3 --- /dev/null +++ b/mysql-test/patches/bug37312.diff @@ -0,0 +1,32 @@ +--- mysql-test/extra/binlog_tests/innodb_stat.test.orig 2008-06-10 15:12:02.000000000 +0300 ++++ mysql-test/extra/binlog_tests/innodb_stat.test 2008-06-10 15:12:06.000000000 +0300 +@@ -41,6 +41,7 @@ + + # Test for testable InnoDB status variables. This test + # uses previous ones(pages_created, rows_deleted, ...). ++-- replace_regex /51[12]/51_/ + show status like "Innodb_buffer_pool_pages_total"; + show status like "Innodb_page_size"; + show status like "Innodb_rows_deleted"; +--- mysql-test/suite/binlog/r/binlog_row_innodb_stat.result.orig 2008-06-10 15:29:44.000000000 +0300 ++++ mysql-test/suite/binlog/r/binlog_row_innodb_stat.result 2008-06-10 15:30:04.000000000 +0300 +@@ -24,7 +24,7 @@ + drop table t1; + show status like "Innodb_buffer_pool_pages_total"; + Variable_name Value +-Innodb_buffer_pool_pages_total 512 ++Innodb_buffer_pool_pages_total 51_ + show status like "Innodb_page_size"; + Variable_name Value + Innodb_page_size 16384 +--- mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result.orig 2008-06-10 15:33:43.000000000 +0300 ++++ mysql-test/suite/binlog/r/binlog_stm_innodb_stat.result 2008-06-10 15:33:55.000000000 +0300 +@@ -24,7 +24,7 @@ + drop table t1; + show status like "Innodb_buffer_pool_pages_total"; + Variable_name Value +-Innodb_buffer_pool_pages_total 512 ++Innodb_buffer_pool_pages_total 51_ + show status like "Innodb_page_size"; + Variable_name Value + Innodb_page_size 16384 diff --git a/mysql-test/patches/innodb-index.diff b/mysql-test/patches/innodb-index.diff new file mode 100644 index 00000000000..6cc8a989499 --- /dev/null +++ b/mysql-test/patches/innodb-index.diff @@ -0,0 +1,62 @@ +This part of the innodb-index test causes mysqld to print some warnings +and subsequently the whole mysql-test suite to fail. + +A permanent solution is probably to remove the printouts from the source +code or to somehow tell the mysql-test suite that warnings are expected. +Currently we simply do not execute the problematic tests. Please +coordinate a permanent solution with Marko, who added those tests. + +This cannot be proposed to MySQL because it touches files that are not +in the MySQL source repository. + +Index: storage/innobase/mysql-test/innodb-index.result +=================================================================== +--- storage/innobase/mysql-test/innodb-index.result (revision 2229) ++++ storage/innobase/mysql-test/innodb-index.result (working copy) +@@ -43,19 +43,12 @@ t1 CREATE TABLE `t1` ( + `b` int(11) DEFAULT NULL, + `c` char(10) NOT NULL, + `d` varchar(20) DEFAULT NULL, + KEY `d2` (`d`), + KEY `b` (`b`) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +-CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB; +-alter table t1 add unique index (c), add index (d); +-ERROR HY000: Table 'test.t1#1' already exists +-rename table `t1#1` to `t1#2`; +-alter table t1 add unique index (c), add index (d); +-ERROR HY000: Table 'test.t1#2' already exists +-drop table `t1#2`; + alter table t1 add unique index (c), add index (d); + show create table t1; + Table Create Table + t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) DEFAULT NULL, +Index: storage/innobase/mysql-test/innodb-index.test +=================================================================== +--- storage/innobase/mysql-test/innodb-index.test (revision 2229) ++++ storage/innobase/mysql-test/innodb-index.test (working copy) +@@ -14,22 +14,12 @@ select * from t1 force index (d2) order + --error ER_DUP_ENTRY + alter table t1 add unique index (b); + show create table t1; + alter table t1 add index (b); + show create table t1; + +-# Check how existing tables interfere with temporary tables. +-CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB; +- +---error 156 +-alter table t1 add unique index (c), add index (d); +-rename table `t1#1` to `t1#2`; +---error 156 +-alter table t1 add unique index (c), add index (d); +-drop table `t1#2`; +- + alter table t1 add unique index (c), add index (d); + show create table t1; + explain select * from t1 force index(c) order by c; + --error ER_REQUIRES_PRIMARY_KEY + drop index c on t1; + alter table t1 add primary key (a), drop index c;