From 1c16f4252dae8c1f8049559d94cc180206d2a54b Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 1 Apr 2010 15:25:06 +0400 Subject: Applying InnoDB snapshot Detailed revision comments: r6472 | calvin | 2010-01-16 01:53:47 +0200 (Sat, 16 Jan 2010) | 12 lines branches/zip: Merge revisions 6425:6471 from branches/5.1 to pick up the first part fix of bug49396. ------------------------------------------------------------------------ r6471 | calvin | 2010-01-15 17:43:27 -0600 (Fri, 15 Jan 2010) | 4 lines branches/5.1: fix bug#49396: main.innodb test fails in embedded mode Change replace_result by using $MYSQLD_DATADIR. Tested in both embedded mode and normal server mode. ------------------------------------------------------------------------ r6473 | calvin | 2010-01-16 01:58:16 +0200 (Sat, 16 Jan 2010) | 6 lines branches/zip: fix bug#49396: innodb.innodb-index test fails in embedded mode This is 2nd part of the fix for bug#49396. The 1st part is innodb.test. Tested in both embedded mode and normal server mode. --- mysql-test/suite/innodb/t/innodb-index.test | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mysql-test/suite/innodb/t/innodb-index.test') diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index b5dd2e037e7..09d6e2f8e3f 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -1,5 +1,7 @@ -- source include/have_innodb.inc +let $MYSQLD_DATADIR= `select @@datadir`; + let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb; @@ -146,7 +148,9 @@ delete from t1; --error ER_CANT_DROP_FIELD_OR_KEY drop index dc on t4; # there is no foreign key dc on t3 ---replace_regex /'\.\/test\/#sql2-[0-9a-f-]*'/'#sql2-temporary'/ +--replace_regex /'[^']*test\/#sql2-[0-9a-f-]*'/'#sql2-temporary'/ +# Embedded server doesn't chdir to data directory +--replace_result $MYSQLD_DATADIR ./ master-data/ '' --error ER_ERROR_ON_RENAME alter table t3 drop foreign key dc; alter table t4 drop foreign key dc; -- cgit v1.2.1 From ba8849da3def83f0bffb3ad24663220b9b137126 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 1 Apr 2010 16:04:43 +0400 Subject: Applying InnoDB snapshot Detailed revision comments: r6770 | marko | 2010-03-03 12:52:55 +0200 (Wed, 03 Mar 2010) | 12 lines branches/zip: Disallow duplicate index name when creating an index. This should fix Mantis Issue #461. innodb.test, innodb.result, innodb-index.test, innodb-index.result: Adjust the test result and mention that the introduced restriction has been reported as MySQL Bug #51451. innobase_check_index_keys(): Add a parameter for the InnoDB table and check that no duplicate index name is added. Report errors by my_error() instead of sql_print_error(). rb://260 approved by Sunny Bains --- mysql-test/suite/innodb/t/innodb-index.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/suite/innodb/t/innodb-index.test') diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index 09d6e2f8e3f..eeadc0f4783 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -141,6 +141,8 @@ show create table t4; --error ER_CANT_CREATE_TABLE alter table t3 add constraint dc foreign key (a) references t1(a); show create table t3; +# this should be fixed by MySQL (see Bug #51451) +--error ER_WRONG_NAME_FOR_INDEX alter table t2 drop index b, add index (b); show create table t2; --error ER_ROW_IS_REFERENCED_2 -- cgit v1.2.1