Description:
Current pull done this moring on 5.1-new.
Original Test: ndb_dd_backuprestore.test. Test has been waiting on Cluster Developer to review and okay to push so not in current code base. I was running test to update the result file with new SHOW CREATE TABLE for CDD tables since patch has been pushed for that will change the output generated.
Test Case has been broken down to exclude Disk Data and data inserts.
MySQLD core happens everytime the listed testcase is done.
MySQLD Back Trace:
#0 0x005d4402 in __kernel_vsyscall ()
#1 0x00a2855f in pthread_kill () from /lib/libpthread.so.0
#2 0x082ee12b in write_core (sig=23909) at stacktrace.c:220
#3 0x081d1642 in handle_segfault (sig=11) at mysqld.cc:2190
#4 <signal handler called>
#5 NdbDictionaryImpl::fix_blob_events (this=0xa675818, table=0x0, ev_name=0x0)
at NdbDictionaryImpl.cpp:4684
#6 0x08535ded in NdbDictionary::Dictionary::fix_blob_events (this=0x0, table=0x0, ev_name=0x0)
at NdbDictionary.cpp:1496
#7 0x08347c78 in ndbcluster_create_event_ops (share=0xa6ffc20, ndbtab=0xa6fde78,
event_name=0xa6f39a8 "REPL$test/t1") at ha_ndbcluster_binlog.cc:2024
#8 0x08348333 in ndbcluster_create_binlog_setup (ndb=0xa6e7bd8, key=0x631213 "./test/t1",
key_len=0, db=0xa72f2f4 "test", table_name=0xa72f3f1 "t1", share_may_exist=0 '\0')
at ha_ndbcluster_binlog.cc:1792
#9 0x08340666 in ha_ndbcluster::create (this=0xa72f210, name=0x631aa4 "./test/t1",
form=0x631374, info=0x631ca4) at ha_ndbcluster.cc:4211
#10 0x082a45e8 in ha_create_table_from_engine (thd=0xb76d8638, db=0xa6e5d40 "test",
name=0xa6e5d48 "t1") at handler.cc:2262
#11 0x0821c969 in open_unireg_entry (thd=0xb76d8638, entry=0xa7000c0, table_list=0xa6e5d70,
alias=0xa6e5d68 "t1", cache_key=0x632712 "test", cache_key_length=8, mem_root=0x0)
at sql_base.cc:427
#12 0x082200d8 in open_table (thd=0xb76d8638, table_list=0xa6e5d70, mem_root=0x6327e8,
refresh=0x63280b, flags=0) at sql_base.cc:1931
#13 0x08220781 in open_tables (thd=0xb76d8638, start=0x632864, counter=0x632844, flags=0)
at sql_base.cc:2763
#14 0x082209ba in open_and_lock_tables (thd=0xb76d8638, tables=0xa6e5d70) at sql_base.cc:3079
#15 0x081ee00d in mysql_execute_command (thd=0xb76d8638) at sql_parse.cc:2470
#16 0x081f4c54 in mysql_parse (thd=0xb76d8638, inBuf=0xa6e5bd0 "SELECT COUNT(*) FROM test.t1",
length=28) at sql_parse.cc:5699
#17 0x081f521d in dispatch_command (command=COM_QUERY, thd=0xb76d8638, packet=Variable "packet" is not available.
)
at sql_parse.cc:1764
#18 0x081f6fa7 in handle_one_connection (arg=0xb76d8638) at sql_parse.cc:1536
#19 0x00a25b80 in start_thread () from /lib/libpthread.so.0
#20 0x0097d9ce in clone () from /lib/libc.so.6
How to repeat:
1) Create a test file. (e.g. vi ./t/ndb_test_1.test)
2) Add the test case below and save.
3) Create dummy result file (e.g. touch ./r/ndb_test_1.result)
4) Run test using:
./mysql-test-run --do-test=ndb_test_1
#### TEST CASE #########
DROP TABLE IF EXISTS test.t1;
CREATE TABLE test.t1
(pk1 MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 TEXT NOT NULL, c3 INT NOT NULL, c4 BIT NOT NULL)ENGINE=NDB;
--exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
DROP TABLE test.t1;
# there is no neat way to find the backupid, this is a hack to find it...
--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > var/tmp.dat
CREATE TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; DELETE FROM test.backup_info;
LOAD DATA INFILE '../../var/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ',';
--replace_column 1 <the_backup_id>
SELECT @the_backup_id:=backup_id FROM test.backup_info;
let the_backup_id=`select @the_backup_id`;
DROP TABLE test.backup_info;
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -p 8 -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT
SELECT COUNT(*) FROM test.t1; SELECT pk1, c2, c3, hex(c4) FROM test.t1 ORDER BY pk1 LIMIT 5;
DROP TABLE test.t1;