diff options
author | gluh@mysql.com/eagle.(none) <> | 2008-03-14 14:12:39 +0400 |
---|---|---|
committer | gluh@mysql.com/eagle.(none) <> | 2008-03-14 14:12:39 +0400 |
commit | 2f719d02c93ce9070e33dec8a28944129826628b (patch) | |
tree | d500ff9d862cd59053063dc4858e6bdfbd0ccf67 /mysql-test/t/information_schema_inno.test | |
parent | eac3a26efab4f3886ba68ed24cc1ddfc453dfa0e (diff) | |
download | mariadb-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.test | 13 |
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; |