From 2f719d02c93ce9070e33dec8a28944129826628b Mon Sep 17 00:00:00 2001 From: "gluh@mysql.com/eagle.(none)" <> Date: Fri, 14 Mar 2008 14:12:39 +0400 Subject: 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/t/information_schema_inno.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/t/information_schema_inno.test') 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; -- cgit v1.2.1