Bug #41687 | Foreign keys: crash if varbinary or varchar or datetime or decimal | ||
---|---|---|---|
Submitted: | 23 Dec 2008 0:09 | Modified: | 23 Jan 2009 18:41 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 6.1.0-alpha-debug | OS: | Linux (SUSE 10.0 / 32-bit) |
Assigned to: | Dmitry Lenev | CPU Architecture: | Any |
[23 Dec 2008 0:09]
Peter Gulutzan
[23 Dec 2008 15:03]
MySQL Verification Team
Thank you for the bug report. Verified as described: mysql> use db5 Database changed mysql> create table t1 (s1 varchar(5) not null unique) engine=falcon; Query OK, 0 rows affected (0.01 sec) mysql> create table t2 (s1 varchar(5) references t1(s1)) engine=falcon; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1 values ('a'); Query OK, 1 row affected (0.01 sec) mysql> insert into t2 values ('a'); ERROR 2013 (HY000): Lost connection to MySQL server during query mysql> /* Crash */
[31 Dec 2008 12:12]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/62461 2694 Dmitry Lenev 2008-12-31 Tentative fix for bug #41687 "Foreign keys: crash if varbinary or varchar or datetime or decimal". In --foreign-key-all-engines mode attempts to insert values into table with foreign keys using these datatypes triggered assert about using values of fields which were not retrieved from storage engine. Since INSERT provides values for all fields for record this fix satisfies this assertion by simply marking all fields in child table as read when creating foreign key value for lookup in parent table (i.e. in the case when assertion was triggered). Question for reviewer is marked by QQ.
[23 Jan 2009 18:36]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/63925 2696 Dmitry Lenev 2009-01-23 Fix for bug #41687 "Foreign keys: crash if varbinary or varchar or datetime or decimal". In --foreign-key-all-engines mode attempts to insert values into table with foreign keys using these datatypes triggered assert about using values of fields which were not retrieved from storage engine. Since INSERT provides values for all fields for record this fix satisfies this assertion by simply marking all fields in child table as read when creating foreign key value for lookup in parent table (i.e. in the case when assertion was triggered).
[23 Jan 2009 18:41]
Dmitry Lenev
Patch fixing this problem was pushed into mysql-6.1-fk tree. Since the problem was reported against tree which is not publicly available yet I am simply closing this bug report.