clustered index not passed for FK append

Bug #966950 reported by Teemu Ollakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Fix Released
Medium
Seppo Jaakola
5.1
Confirmed
Medium
Teemu Ollakka
5.5
Fix Released
Medium
Seppo Jaakola

Bug Description

Node crashed with following in error log:

120328 12:08:12 [ERROR] WSREP: clustered index not passed for FK append
InnoDB: unknown error code 11
120328 12:08:12 InnoDB: Assertion failure in thread 140671425816320 in file row0mysql.c line 649
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
09:08:12 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=6
max_threads=1024
thread_count=6
connection_count=6
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2238930 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x419c950
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7ff09e5d9e70 thread_stack 0x40000
/run/shm/galera/local1/mysql/sbin/mysqld(my_print_stacktrace+0x2e)[0x7c906e]
/run/shm/galera/local1/mysql/sbin/mysqld(handle_fatal_signal+0x376)[0x698c26]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10060)[0x7ff0abf7a060]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35)[0x7ff0abc013a5]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b)[0x7ff0abc04b0b]
/run/shm/galera/local1/mysql/sbin/mysqld[0x7f1fe2]
/run/shm/galera/local1/mysql/sbin/mysqld[0x7f304a]
/run/shm/galera/local1/mysql/sbin/mysqld[0x7df695]
/run/shm/galera/local1/mysql/sbin/mysqld(_ZN7handler12ha_write_rowEPh+0x68)[0x6a0168]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z12write_recordP3THDP5TABLEP12st_copy_info+0x6c)[0x578e6c]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z12mysql_insertP3THDP10TABLE_LISTR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xa78)[0x57b608]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3085)[0x591c45]
/run/shm/galera/local1/mysql/sbin/mysqld[0x595983]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2819)[0x5989d9]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z10do_commandP3THD+0x10d)[0x598b3d]
/run/shm/galera/local1/mysql/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x105)[0x638895]
/run/shm/galera/local1/mysql/sbin/mysqld(handle_one_connection+0x4c)[0x638aac]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7efc)[0x7ff0abf71efc]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff0abcac89d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (41d5dc0): INSERT INTO child VALUES (101, 1)
Connection ID (thread ID): 16
Status: NOT_KILLED

Statements to reproduce:

CREATE TABLE parent
(
    a INT PRIMARY KEY,
    b INT,
    INDEX idx_b(b)
) ENGINE=InnoDB

CREATE TABLE child
(
    c INT,
    d INT,
    INDEX idx_d(d),
    FOREIGN KEY (d) REFERENCES parent(b) ON DELETE CASCADE
) ENGINE=InnoDB

INSERT INTO parent VALUES (1, 1)
INSERT INTO child VALUES (101, 1)

Related branches

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :

Parent reference is not for primary key, and wsrep requires that. This PK requirement should be relaxed

Revision history for this message
Seppo Jaakola (seppo-jaakola) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.