summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema_inno.test
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/eagle.(none)>2008-03-14 14:12:39 +0400
committerunknown <gluh@mysql.com/eagle.(none)>2008-03-14 14:12:39 +0400
commit45b4d937c6bb7e1483c1fdbaf15bcb20a08ae683 (patch)
treed500ff9d862cd59053063dc4858e6bdfbd0ccf67 /mysql-test/t/information_schema_inno.test
parent269ebe54211cf96c4e64fa7268a1414588ca1de8 (diff)
downloadmariadb-git-45b4d937c6bb7e1483c1fdbaf15bcb20a08ae683.tar.gz
Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes
referenced_key_name field can be uninitialized in the case when referenced table is dropped. Added codition which allows to handle this situation. mysql-test/r/information_schema_inno.result: test result mysql-test/t/information_schema_inno.test: test result sql/sql_show.cc: referenced_key_name field can be uninitialized in the case when referenced table is dropped. Added codition which allows to handle this situation.
Diffstat (limited to 'mysql-test/t/information_schema_inno.test')
-rw-r--r--mysql-test/t/information_schema_inno.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/information_schema_inno.test b/mysql-test/t/information_schema_inno.test
index e73f4ba2792..1a537d740b7 100644
--- a/mysql-test/t/information_schema_inno.test
+++ b/mysql-test/t/information_schema_inno.test
@@ -76,3 +76,16 @@ select referenced_table_schema, referenced_table_name
from information_schema.key_column_usage
where constraint_schema = 'db-1';
drop database `db-1`;
+
+#
+# Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes
+#
+create table t1(id int primary key) engine = Innodb;
+create table t2(pid int, foreign key (pid) references t1(id)) engine = Innodb;
+set foreign_key_checks = 0;
+drop table t1;
+select UNIQUE_CONSTRAINT_NAME
+from information_schema.referential_constraints
+where constraint_schema = schema();
+drop table t2;
+set foreign_key_checks = 1;