Bug #71312 | Weird warning for MERGE table while accessing I_S.REFERENTIAL_CONSTRAINTS | ||
---|---|---|---|
Submitted: | 7 Jan 2014 13:21 | Modified: | 8 Jan 2014 12:27 |
Reporter: | Valeriy Kravchuk | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Information schema | Severity: | S3 (Non-critical) |
Version: | 5.6.15 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | information_schema, merge, REFERENTIAL_CONSTRAINTS |
[7 Jan 2014 13:21]
Valeriy Kravchuk
[7 Jan 2014 13:35]
Valeriy Kravchuk
To better understand the impact, let me continue the test: mysql> create temporary table tref(t1 varchar(129), t2 varchar(129), -> key(t1) using btree, key(t2) using btree) engine=MEMORY; Query OK, 0 rows affected (0.01 sec) mysql> create table tpri(id int primary key) engine=InnoDB; Query OK, 0 rows affected (0.92 sec) mysql> create table tref(id int primary key, pri_id int, -> key(pri_id), foreign key(pri_id) references tpri(id)) engine=InnoDB; Query OK, 0 rows affected (0.96 sec) mysql> select * from information_schema.referential_constraints\G *************************** 1. row *************************** CONSTRAINT_CATALOG: def CONSTRAINT_SCHEMA: test CONSTRAINT_NAME: tref_ibfk_1 UNIQUE_CONSTRAINT_CATALOG: def UNIQUE_CONSTRAINT_SCHEMA: test UNIQUE_CONSTRAINT_NAME: PRIMARY MATCH_OPTION: NONE UPDATE_RULE: RESTRICT DELETE_RULE: RESTRICT TABLE_NAME: tref REFERENCED_TABLE_NAME: tpri 1 row in set, 1 warning (0.15 sec) mysql> select concat(constraint_schema, concat('.', table_name)) as t1, -> concat(unique_constraint_schema, concat('.', referenced_table_name)) as t 2 -> from information_schema.referential_constraints; +-----------+-----------+ | t1 | t2 | +-----------+-----------+ | test.tref | test.tpri | +-----------+-----------+ 1 row in set, 1 warning (0.15 sec) mysql> insert into tref -> select concat(constraint_schema, concat('.', table_name)) as t1, -> concat(unique_constraint_schema, concat('.', referenced_table_name)) as t2 -> from information_schema.referential_constraints; Query OK, 0 rows affected (0.16 sec) mysql> select version(), @@log_bin; +------------+-----------+ | version() | @@log_bin | +------------+-----------+ | 5.6.15-log | 1 | +------------+-----------+ 1 row in set (0.00 sec) mysql> select @@sql_mode; +----------------------------------------------------------------+ | @@sql_mode | +----------------------------------------------------------------+ | STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +----------------------------------------------------------------+ 1 row in set (0.00 sec) So, this warning leads to something that may be considered wrong results (row visible in SELECT can not be successfully inserted into MEMORY table with INSERT ... SELECT).
[8 Jan 2014 12:27]
MySQL Verification Team
Hello Valeriy, Thank you for the bug report. Verified as described. Thanks, Umesh