summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-07-18 16:22:05 +0400
committerunknown <kostja@bodhi.(none)>2007-07-18 16:22:05 +0400
commitc0277a1192d0526ea76968196584e7d2b5a51203 (patch)
treeb466bc7711e501c6d5524277532edd0291bca016 /mysql-test/r/create.result
parent5f462f96266c193ea13bd2aa0a13c181c1d0919c (diff)
downloadmariadb-git-c0277a1192d0526ea76968196584e7d2b5a51203.tar.gz
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
Diffstat (limited to 'mysql-test/r/create.result')
-rw-r--r--mysql-test/r/create.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index e692dbf3938..a1843573794 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -1503,4 +1503,20 @@ t1 CREATE TABLE `t1` (
`c17` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+
+Bug #26104 Bug on foreign key class constructor
+
+Check that ref_columns is initalized correctly in the constructor
+and semantic checks in mysql_prepare_table work.
+
+We do not need a storage engine that supports foreign keys
+for this test, as the checks are purely syntax-based, and the
+syntax is supported for all engines.
+
+drop table if exists t1,t2;
+create table t1(a int not null, b int not null, primary key (a, b));
+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));
+ERROR 42000: Incorrect foreign key definition for 'fk_bug26104': Key reference and table reference don't match
+drop table t1;
End of 5.0 tests