From c0277a1192d0526ea76968196584e7d2b5a51203 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2007 16:22:05 +0400 Subject: A fix and a test case for Bug#26104 Bug on foreign key class constructor. Fix the typo in the constructor. Cover a semantic check that previously never worked with a test. mysql-test/r/create.result: Update results (Bug#26104) mysql-test/r/innodb.result: Update results. mysql-test/t/create.test: Add a test case for Bug#26104 Bug on foreign key class constructor mysql-test/t/innodb.test: Return a new error number (MySQL error instead of internal InnoDB error). sql/sql_class.h: A fix for Bug#26104 Bug on foreign key class constructor -- fix the typo in the constructor --- mysql-test/t/create.test | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/t/create.test') diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 99f3fea416a..a6679cd674a 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1118,5 +1118,24 @@ show create table t1; drop table t1; +--echo +--echo Bug #26104 Bug on foreign key class constructor +--echo +--echo Check that ref_columns is initalized correctly in the constructor +--echo and semantic checks in mysql_prepare_table work. +--echo +--echo We do not need a storage engine that supports foreign keys +--echo for this test, as the checks are purely syntax-based, and the +--echo syntax is supported for all engines. +--echo +--disable_warnings +drop table if exists t1,t2; +--enable_warnings + +create table t1(a int not null, b int not null, primary key (a, b)); +--error ER_WRONG_FK_DEF +create table t2(a int not null, b int not null, c int not null, primary key (a), +foreign key fk_bug26104 (b,c) references t1(a)); +drop table t1; --echo End of 5.0 tests -- cgit v1.2.1