[MDEV-3676] LP:888165 - crash when updating tables with foreign keys Created: 2011-11-09  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Peter (Stig) Edwards (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug888165.xml    

 Description   

Because it is a crash I'll use this bug to get a bug id, to use in the file name I send to the FTP site mentioned in:
http://kb.askmonty.org/en/reporting-bugs#what-to-do-when-you-get-a-crash-after-installing-a-debug-binary



 Comments   
Comment by Peter (Stig) Edwards (Inactive) [ 2011-11-09 ]

Re: crash when updating tables with foreign keys
I uploaded the file bug_888165.test via FTP to ftp.askmonty.org/private/.
It's a small test that crashes when run with lp:maria (series 5.3). It also crashed using MariaDB 5.3.2 and MariaDB 5.3.0 built from src. It also crashed Oracle/MySQL's 5.1.48, I've not tested any other versions of yet. I will file a bug with mysql.com once I've confirmed it crashes the latest 5.1.X

The reproducer originates from a real application, the tables and query were produced by an ORM.

Sorry I didn't FTP a core or use the bug report tool, this is what the stack trace looks like for lp:maria (series 5.3)

stack_bottom = 0x7fcfb4575e58 thread_stack 0x48000
./mysqld(my_print_stacktrace+0x2e) [0xa566de]
./mysqld(handle_segfault+0x4fb) [0x62d0eb]
/lib64/libpthread.so.0() [0x3e1220f520]
./mysqld(key_unpack(String*, st_table*, unsigned int)+0x80) [0x610ef0]
./mysqld(handler::print_error(int, int)+0x252) [0x74c442]
./mysqld(mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool)+0x10d7) [0x6d81c7]
./mysqld(mysql_execute_command(THD*)+0xac4) [0x63c0d4]
./mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2c9) [0x640f99]
./mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0x949) [0x6418f9]
./mysqld(do_command(THD*)+0xf2) [0x642542]
./mysqld(handle_one_connection+0x2e8) [0x633438]
/lib64/libpthread.so.0() [0x3e122077e1]
/lib64/libc.so.6(clone+0x6d) [0x35b2ae68ed]

Thanks.

Comment by Peter (Stig) Edwards (Inactive) [ 2011-11-09 ]

Re: crash when updating tables with foreign keys
Here is the Oracle/MySQL.com bug:

http://bugs.mysql.com/bug.php?id=63166

It also crashed:

Server version: 5.5.17 MySQL Community Server (GPL) from mysql-5.5.17-linux2.6-x86_64.tar.gz

Comment by Peter (Stig) Edwards (Inactive) [ 2011-11-10 ]

Re: crash when updating tables with foreign keys
It does not crash when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max. It outputs:

ERROR 1217 (23000) at line 7: Cannot delete or update a parent row: a foreign key constraint fails

Comment by Peter (Stig) Edwards (Inactive) [ 2011-11-10 ]

Re: crash when updating tables with foreign keys
If run twice when run with --debug after having been rebuilt using BUILD/compile-pentium64-debug-max, it crashes on the 2nd run.

Comment by Peter (Stig) Edwards (Inactive) [ 2012-01-03 ]

Re: crash when updating tables with foreign keys
From comments in:
http://bugs.mysql.com/bug.php?id=63166
and
https://bugs.launchpad.net/percona-server/+bug/888446
it looks like this is fixed in MariaDB 5.2.10 and 5.3.3, from the changelogs:
Cherrypick into XtraDB: Bug#13002783 PARTIALLY UNINITIALIZED CASCADE UPDATE VECTOR
Thank you.

Comment by Rasmus Johansson (Inactive) [ 2012-01-03 ]

Launchpad bug id: 888165

Generated at Thu Feb 08 06:50:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.