Bug #19471 Drop db with large number of tables kills slave I/O with COM_REGISTER_SLAVE
Submitted: 2 May 2006 1:34 Modified: 4 May 2006 20:11
Reporter: Jonathan Miller Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Cluster: Replication Severity:S2 (Serious)
Version:5.1.10 OS:Linux (Linux 32 Bit OS)
Assigned to: CPU Architecture:Any

[2 May 2006 1:34] Jonathan Miller
I debated if this should be a P2 or a P3. I have a work around for it, but the work around is not yeat documented so I went with P2.

The issues seems to be a database that contains more then 35 tables will stop the I/O thread on the slave.

Slave_IO_Running: No
Slave_SQL_Running: Yes

But shows no errors in the slave status;
Last_Errno: 0

but if you issues "START SLAVE;" the test will complete.

In the slave error log the following error is found:
060502  4:11:01 [ERROR] Error on COM_REGISTER_SLAVE: 1159 ''
060502  4:11:01 [Note] Slave I/O thread exiting, read up to log 'master-bin.000001', position 4373

If the number of tables are 35 or less, then it passes without issue. I found this test using rpl_create_database.test. I have broken it down to a much simpler test cases for you.

I had thought that it might have to do with the length of that table name, but using a shorter database name did not seem to change the number at which the slave I/O Thread died.

How to repeat:
1) Create a test file $>vi ./t/rpl_ndb_1.test 
2) Add the following to it:
-- source include/master-slave.inc
connection master;
drop database if exists mysqltest1;
create database mysqltest1;
let $1=36;
while ($1)
  #eval create table mysqltest1.mysqltest_long_table_name$1 (n int);
  eval create table mysqltest1.mysqltest_name$1 (n int);
  dec $1;
DROP DATABASE mysqltest1;
stop slave;
3) $>touch ./r/rpl_ndb_1.results
4) ./mysql-test-run.pl --do-test=rpl_ndb_1 --mysqld=--default-storage-engine=ndb --force --with-ndbcluster-all

The test should hang. (if not just increate the $1 var some as it might be different on other systems). Once hung you should be able to do a show slave status on the slave and see that the I/O thread is stopped and that the error from above now is in the error log.

The testing was done from mysql-5.1-new pull and built using the comp-pent-debug-max today.

Note: This test passes on other engines.
[2 May 2006 12:32] Jonathan Miller
Need to correct where this test case originated from, it was rpl_drop_db.test and not from rpl_create_database.test.
[4 May 2006 20:11] Tomas Ulin
bug 19328