summaryrefslogtreecommitdiff
path: root/mysql-test/t/information_schema_inno.test
diff options
context:
space:
mode:
authorgluh@mysql.com/eagle.(none) <>2008-03-14 14:12:39 +0400
committergluh@mysql.com/eagle.(none) <>2008-03-14 14:12:39 +0400
commit2f719d02c93ce9070e33dec8a28944129826628b (patch)
treed500ff9d862cd59053063dc4858e6bdfbd0ccf67 /mysql-test/t/information_schema_inno.test
parenteac3a26efab4f3886ba68ed24cc1ddfc453dfa0e (diff)
downloadmariadb-git-2f719d02c93ce9070e33dec8a28944129826628b.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.
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;