Bug #37549 Assertion failure when replicating multi-federated table rename in slave
Submitted: 20 Jun 2008 16:16 Modified: 9 Aug 2008 11:59
Reporter: Michael Bacarella Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Replication Severity:S1 (Critical)
Version:5.1.25-rc OS:Linux (CentOS 5 64-bit)
Assigned to: CPU Architecture:Any
Tags: 5.1., 5.1.25, federated, rc, rename, replication

[20 Jun 2008 16:16] Michael Bacarella
Description:
080619 10:24:33 [Note] Slave SQL thread initialized, starting replication in log 'mysql-repl.000065' at position 216784749, relay log '/var/lib/mysql/venus-relay-bin.000201' position: 216784895
mysqld: sql_class.cc:411: void Diagnostics_area::set_ok_status(THD*, ha_rows, ulonglong, const char*): Assertion `! is_set()' failed.
080620  7:50:08 - 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=1048576000
read_buffer_size=4194304
max_used_connections=3
max_threads=300
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 21916646 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x9bca500
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...
/usr/libexec/mysqld(print_stacktrace+0x23) [0x6dd3e1]
/usr/libexec/mysqld(handle_segfault+0x23e) [0x5915ea]
/lib64/libpthread.so.0 [0x3dc300de70]
/lib64/libc.so.6(gsignal+0x35) [0x3dc2830055]
/lib64/libc.so.6(abort+0x110) [0x3dc2831af0]
/lib64/libc.so.6(__assert_fail+0xf6) [0x3dc2829756]
/usr/libexec/mysqld(Diagnostics_area::set_ok_status(THD*, unsigned long, unsigned long long, char const*)+0x26) [0x57d054]
/usr/libexec/mysqld(mysql_rename_tables(THD*, TABLE_LIST*, bool)+0x330) [0x69ce8c]
/usr/libexec/mysqld(mysql_execute_command(THD*)+0x1819) [0x5a12a1]
/usr/libexec/mysqld(mysql_parse(THD*, char const*, unsigned int, char const**)+0x15f) [0x5a67c7]
/usr/libexec/mysqld(Query_log_event::do_apply_event(Relay_log_info const*, char const*, unsigned int)+0x58c) [0x65ab72]
/usr/libexec/mysqld(Query_log_event::do_apply_event(Relay_log_info const*)+0x10) [0x65b28e]
/usr/libexec/mysqld(apply_event_and_update_pos(Log_event*, THD*, Relay_log_info*, bool)+0x1c5) [0x6c69e9]
/usr/libexec/mysqld [0x6cedd8]
/usr/libexec/mysqld(handle_slave_sql+0x5c2) [0x6cf422]
/lib64/libpthread.so.0 [0x3dc30062f7]
/lib64/libc.so.6(clone+0x6d) [0x3dc28ce85d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x9c094a2 = RENAME TABLE RetailerInventory TO RetailerInventory_kodos, RetailerInventory_kang TO RetailerInventory
thd->thread_id=4
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
Set up four servers:

1) Master
2) Slave
3) Kang
4) Kodos

Create two tables on Kang and Kodos called ProductInstance and RetailerInventory of MyISAM table type.  Create options for each are:
ENGINE=MyISAM DEFAULT CHARSET=utf8 MAX_ROWS=2431504384 AVG_ROW_LENGTH=50 ROW_FORMAT=DYNAMIC

On Master create ProductInstance and RetailerInventory FEDERATED tables which reference its counterparts on Kodos.

Create on Master ProductInstance_kang and RetailerInventory_kang which reference counterparts on Kang.

Execute on Master:

RENAME TABLE RetailerInventory TO RetailerInventory_kodos, RetailerInventory_kang TO RetailerInventory

Query completes successfully on master.  On slave causes the assertion failure in description.

We actually have two slave servers which both assert-fail on this statement.

Suggested fix:
Figure out why the assertion condition is failing and fix the underlying problem. ;)
[9 Jul 2008 11:59] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior.

Please provide output of SHOW CREATE TABLE RetailerInventory
[9 Aug 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".