Bug #39033 Table disappear
Description:
two data node, two mysqlnode, I create a table and alter it. show tables during altering.
DROP TABLE if exists t2;
CREATE TABLE t2
(
page_id int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (page_id)
)
TABLESPACE ndtsp STORAGE DISK ENGINE= ndbcluster;
insert into t2 (page_id) values (1);
insert into t2 (page_id) values (2);
insert into t2 (page_id) values (3);
insert into t2 (page_id) values (4);
insert into t2 (page_id) values (5);
insert into t2 (page_id) values (6);
in mysql node1:
use test;
flush tables;
alter table t2 add test_column int(11) not null default '1';
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
show tables in mysqlnode1
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
then:
ERROR 1146 (42S02) at line 13: Table 'test.t2' doesn't exist
the table disappeared???!!!
error log:
080826 13:01:02 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:33:19 [Note] NDB_SHARE: trailing share ./test/t2(connect_count: 0) released after NSS_DROPPED check at connect_count: 0
080826 13:34:37 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:40 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:40 [Warning] NDB_SHARE: ./test/t2 already exists use_count=1. Moving away for safety, but possible memleak.
080826 13:34:43 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:46 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:49 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:53 [Note] NDB Binlog: RENAME Event: REPL$test/t2
080826 13:34:57 [Note] NDB Binlog: RENAME Event: REPL$test/t2
How to repeat:
DROP TABLE if exists t2;
CREATE TABLE t2
(
page_id int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (page_id)
)
TABLESPACE ndtsp STORAGE DISK ENGINE= ndbcluster;
insert into t2 (page_id) values (1);
insert into t2 (page_id) values (2);
insert into t2 (page_id) values (3);
insert into t2 (page_id) values (4);
insert into t2 (page_id) values (5);
insert into t2 (page_id) values (6);
in mysql node1:
use test;
flush tables;
alter table t2 add test_column int(11) not null default '1';
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
flush tables;
alter table t2 drop test_column;
alter table t2 drop key indx_page_def_test;
alter table t2 add test_column int(11) not null default '1';
alter table t2 drop test_column2;
alter table t2 add unique key indx_page_def_test (page_id, test_column);
alter table t2 add test_column2 int(11) not null default '1';
alter table t2 drop key indx_page_def_test;
alter table t2 add unique key indx_page_def_test (page_id, test_column, test_column2);
show tables in mysqlnode1
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
show tables;
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.