Description:
This query:
UPDATE `PP_G` SET `varchar_5` = 'c' WHERE ( `PP_G` . `varchar_5` > 'f' )
On an Innodb table, partitioned by RANGE COLUMN_LIST crashed as follows (partial output, full text attached as separate file)
This does *not* fail on MyISAM. I also could not duplicate this failure when I tried using 10 rows, but that is likely luck of the random numbers : )
091002 0:00:48 [Note] <path>/mysql-5.1/sql/mysqld: ready for connections.
Version: '5.4.3-beta-gcov-debug-log' socket: '<path>/mysql-5.1/mysql-test/var/tmp/master.sock' port: 19306 Source distribution
091002 0:01:06 InnoDB: Assertion failure in thread 1769970576 in file row/row0mysql.c line 1355
InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
091002 0:01:06 - mysqld got signal 6 ;
<snip>
# 17:01:09 Thread 1 (process 23956):
# 17:01:09 #0 0xb7fac430 in __kernel_vsyscall ()
# 17:01:09 #1 0xb7f8f1c8 in pthread_kill () from /lib/tls/i686/cmov/libpthread.so.0
# 17:01:09 #2 0x08de4e4f in my_write_core (sig=6) at stacktrace.c:310
# 17:01:09 #3 0x0840befc in handle_segfault (sig=6) at mysqld.cc:2569
# 17:01:09 #4 <signal handler called>
# 17:01:09 #5 0xb7fac430 in __kernel_vsyscall ()
# 17:01:09 #6 0xb7dd66d0 in raise () from /lib/tls/i686/cmov/libc.so.6
# 17:01:09 #7 0xb7dd8098 in abort () from /lib/tls/i686/cmov/libc.so.6
# 17:01:09 #8 0x08b10a36 in row_update_for_mysql (mysql_rec=0xd469c70 "\021?", prebuilt=0xd483170) at row/row0mysql.c:1355
# 17:01:09 #9 0x08a4d052 in ha_innobase::update_row (this=0xd480720, old_row=0xd469c70 "\021?", new_row=0xd469c28 "\021?") at handler/ha_innodb.cc:4663
# 17:01:09 #10 0x0878b533 in handler::ha_update_row (this=0xd480720, old_data=0xd469c70 "\021?", new_data=0xd469c28 "\021?") at handler.cc:4690
# 17:01:09 #11 0x087b0373 in ha_partition::update_row (this=0xd4695a0, old_data=0xd469c70 "\021?", new_data=0xd469c28 "\021?") at ha_partition.cc:3090
# 17:01:09 #12 0x0878b533 in handler::ha_update_row (this=0xd4695a0, old_data=0xd469c70 "\021?", new_data=0xd469c28 "\021?") at handler.cc:4690
# 17:01:09 #13 0x0863d305 in mysql_update (thd=0xd3ee750, table_list=0xd40c820, fields=@0xd3efb84, values=@0xd3efda0, conds=0xd40cc70, order_num=0, order=0x0,
# 17:01:09 limit=18446744073709551590, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x697f86a0, updated_return=0x697f8698) at sql_update.cc:649
# 17:01:09 #14 0x08448cd4 in mysql_execute_command (thd=0xd3ee750) at sql_parse.cc:3057
# 17:01:09 #15 0x0845f33f in mysql_parse (thd=0xd3ee750, inBuf=0xd40c708 "UPDATE `PP_G` SET `varchar_5` = 'c' WHERE ( `PP_G` . `varchar_5` > 'f' )", length=72,
# 17:01:09 found_semicolon=0x697f9054) at sql_parse.cc:6002
# 17:01:09 #16 0x08461ae4 in dispatch_command (command=COM_QUERY, thd=0xd3ee750,
# 17:01:09 packet=0xd400691 "UPDATE `PP_G` SET `varchar_5` = 'c' WHERE ( `PP_G` . `varchar_5` > 'f' )", packet_length=72) at sql_parse.cc:1222
# 17:01:09 #17 0x08465739 in do_command (thd=0xd3ee750) at sql_parse.cc:855
# 17:01:09 #18 0x0842a3bf in handle_one_connection (arg=0xd3ee750) at sql_connect.cc:1131
# 17:01:09 #19 0xb7f8a4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
# 17:01:09 #20 0xb7e8f49e in clone () from /lib/tls/i686/cmov/libc.so.6
# 17:01:09 The last 100 lines from <path>/mysql-5.0/mysql-test/var/master-data/../log/master.err :
CURRENT_TEST: alias
091002 0:00:52 [Warning] <path>/mysql-5.0/sql/mysqld: unknown variable 'loose-falcon-debug-mask=2'
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
091002 0:00:52 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
091002 0:00:52 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
091002 0:00:52 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
091002 0:00:53 InnoDB: Started; log sequence number 0 0
091002 0:00:53 [Note] <path>/mysql-5.0/sql/mysqld: ready for connections.
Version: '5.0.87-debug-log' socket: '<path>/mysql-5.0/mysql-test/var/tmp/master.sock' port: 19308 Source distribution
# 17:01:09 datadir is <path>/mysql-5.0/mysql-test/var/master-data/
# 17:01:09 Core file appears to be
"<path>/rqg/mysql-test/gentest/" is not a core dump: Is a directory
No stack.
# 17:01:09
"<path>/rqg/mysql-test/gentest/" is not a core dump: Is a directory
<path>/rqg/mysql-test/gentest/backtrace-all.gdb:1: Error in sourced command file:
No registers.
# 17:01:10
# 17:01:10 Test completed with failure status 101.
# 17:01:10 gentest.pl exited with exit status 101
Thu Oct 1 17:01:10 2009 [23794] ./runall.pl will exit with exit status 101
How to repeat:
MTR test case:
./mtr --mysqld=--loose-innodb --record <whatever_you_name_the_test>
My apologies for this being kind of messy. RQG query simplification was giving me troubles on this.
However, I have verified that you can observe the crash with this as a .test file.
I had to attach the test as a separate file due to length restrictions.
Suggested fix:
Ensure crash-free query processing.