Bug #17537 DD: Drop Tables seemed to be locked into cluster cache
Description:
Nikolay and I where starting stress testing for the weekend.
I had Nikolay run in the BANK_DD.SQL:
DELETE FROM cluster_replication.binlog_index;
DELETE FROM cluster_replication.apply_status;
DROP DATABASE IF EXISTS BANK;
CREATE DATABASE BANK;
USE BANK;
CREATE LOGFILE GROUP BANK
ADD UNDOFILE './BANK_LOG/undofile.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 4M
ENGINE=NDB;
ALTER LOGFILE GROUP BANK
ADD UNDOFILE './BANK_LOG/undofile02.dat'
INITIAL_SIZE = 16M
ENGINE=NDB;
CREATE TABLESPACE BANK_TS
ADD DATAFILE './BANK_DF/datafile.dat'
USE LOGFILE GROUP BANK
INITIAL_SIZE 1000M
ENGINE NDB;
ALTER TABLESPACE BANK_TS
ADD DATAFILE './BANK_DF/datafile02.dat'
INITIAL_SIZE = 1000M
ENGINE=NDB;
CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL,
ACCOUNT_TYPE INT UNSIGNED NOT NULL,
BALANCE INT UNSIGNED NOT NULL,
DEPOSIT_COUNT INT UNSIGNED NOT NULL,
DEPOSIT_SUM INT UNSIGNED NOT NULL,
WITHDRAWAL_COUNT INT UNSIGNED NOT NULL,
WITHDRAWAL_SUM INT UNSIGNED NOT NULL,
PURGED INT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE))
TABLESPACE BANK_TS STORAGE DISK
ENGINE = NDB;
CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL,
OWNER INT UNSIGNED NOT NULL,
BALANCE INT UNSIGNED NOT NULL,
ACCOUNT_TYPE INT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (ACCOUNT_ID))
TABLESPACE BANK_TS STORAGE DISK
ENGINE = NDB;
CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL,
ACCOUNT INT UNSIGNED NOT NULL,
ACCOUNT_TYPE INT UNSIGNED NOT NULL,
OTHER_ACCOUNT INT UNSIGNED NOT NULL,
TRANSACTION_TYPE INT UNSIGNED NOT NULL,
TIME BIGINT UNSIGNED NOT NULL,
AMOUNT INT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT))
TABLESPACE BANK_TS STORAGE DISK
ENGINE = NDB;
CREATE TABLE SYSTEM_VALUES (
SYSTEM_VALUES_ID INT UNSIGNED NOT NULL,
VALUE BIGINT UNSIGNED NOT NULL,
PRIMARY KEY USING HASH (SYSTEM_VALUES_ID))
TABLESPACE BANK_TS STORAGE DISK
ENGINE = NDB;
CREATE TABLE ACCOUNT_TYPES (
ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL,
DESCRIPTION CHAR(64) NOT NULL,
PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID))
TABLESPACE BANK_TS STORAGE DISK
ENGINE = NDB;
I then tried to run the bank creator from ndb15, but did not have enough APIs configured.
So I move to ndb13, but then got :
createTable GL
Different table with same name exists
NDBT_ProgramExit: 1 - Failed
So I tried to drop and recreate the tables:
mysql> source ~/jmiller/BANK_DD_DROP.TABLES
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
Query OK, 0 rows affected (0.54 sec)
Query OK, 0 rows affected (0.57 sec)
Query OK, 0 rows affected (0.56 sec)
Query OK, 0 rows affected (0.54 sec)
Query OK, 0 rows affected (0.55 sec)
mysql> source ~/jmiller/BANK_DD_CT.SQL
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Database changed
ERROR 1050 (42S01): Table 'GL' already exists
ERROR 1050 (42S01): Table 'ACCOUNT' already exists
ERROR 1050 (42S01): Table 'TRANSACTION' already exists
ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists
Query OK, 0 rows affected (0.74 sec)
mysql> USE BANK;
Database changed
mysql> show TABLES;
+----------------+
| Tables_in_BANK |
+----------------+
| ACCOUNT_TYPES |
+----------------+
1 row in set (0.00 sec)
mysql> DROP TABLE ACCOUNT_TYPES;
Query OK, 0 rows affected (0.66 sec)
mysql> source ~/jmiller/BANK_DD_CT.SQL
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Database changed
ERROR 1050 (42S01): Table 'GL' already exists
ERROR 1050 (42S01): Table 'ACCOUNT' already exists
ERROR 1050 (42S01): Table 'TRANSACTION' already exists
ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists
Query OK, 0 rows affected (0.79 sec)
mysql> DROP TABLE GL;
ERROR 1051 (42S02): Unknown table 'GL'
mysql> exit
Bye
[ndbdev@ndb15 jmiller]$ vi BANK_DD_DROP.TABLES
[ndbdev@ndb15 jmiller]$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12 to server version: 5.1.8-beta-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> source ~/jmiller/BANK_DD_CT.SQL
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
ERROR 1050 (42S01): Table 'GL' already exists
ERROR 1050 (42S01): Table 'ACCOUNT' already exists
ERROR 1050 (42S01): Table 'TRANSACTION' already exists
ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists
ERROR 1050 (42S01): Table 'ACCOUNT_TYPES' already exists
mysql>
How to repeat:
not sure, but the file system files are being saved off by Nikolay on a cluster crash from starting the load_tpcb.pl script. in bug 17536
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.053 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.
Description: Nikolay and I where starting stress testing for the weekend. I had Nikolay run in the BANK_DD.SQL: DELETE FROM cluster_replication.binlog_index; DELETE FROM cluster_replication.apply_status; DROP DATABASE IF EXISTS BANK; CREATE DATABASE BANK; USE BANK; CREATE LOGFILE GROUP BANK ADD UNDOFILE './BANK_LOG/undofile.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE = 4M ENGINE=NDB; ALTER LOGFILE GROUP BANK ADD UNDOFILE './BANK_LOG/undofile02.dat' INITIAL_SIZE = 16M ENGINE=NDB; CREATE TABLESPACE BANK_TS ADD DATAFILE './BANK_DF/datafile.dat' USE LOGFILE GROUP BANK INITIAL_SIZE 1000M ENGINE NDB; ALTER TABLESPACE BANK_TS ADD DATAFILE './BANK_DF/datafile02.dat' INITIAL_SIZE = 1000M ENGINE=NDB; CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, ACCOUNT_TYPE INT UNSIGNED NOT NULL, BALANCE INT UNSIGNED NOT NULL, DEPOSIT_COUNT INT UNSIGNED NOT NULL, DEPOSIT_SUM INT UNSIGNED NOT NULL, WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, WITHDRAWAL_SUM INT UNSIGNED NOT NULL, PURGED INT UNSIGNED NOT NULL, PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) TABLESPACE BANK_TS STORAGE DISK ENGINE = NDB; CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, OWNER INT UNSIGNED NOT NULL, BALANCE INT UNSIGNED NOT NULL, ACCOUNT_TYPE INT UNSIGNED NOT NULL, PRIMARY KEY USING HASH (ACCOUNT_ID)) TABLESPACE BANK_TS STORAGE DISK ENGINE = NDB; CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, ACCOUNT INT UNSIGNED NOT NULL, ACCOUNT_TYPE INT UNSIGNED NOT NULL, OTHER_ACCOUNT INT UNSIGNED NOT NULL, TRANSACTION_TYPE INT UNSIGNED NOT NULL, TIME BIGINT UNSIGNED NOT NULL, AMOUNT INT UNSIGNED NOT NULL, PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) TABLESPACE BANK_TS STORAGE DISK ENGINE = NDB; CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, VALUE BIGINT UNSIGNED NOT NULL, PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) TABLESPACE BANK_TS STORAGE DISK ENGINE = NDB; CREATE TABLE ACCOUNT_TYPES ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, DESCRIPTION CHAR(64) NOT NULL, PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) TABLESPACE BANK_TS STORAGE DISK ENGINE = NDB; I then tried to run the bank creator from ndb15, but did not have enough APIs configured. So I move to ndb13, but then got : createTable GL Different table with same name exists NDBT_ProgramExit: 1 - Failed So I tried to drop and recreate the tables: mysql> source ~/jmiller/BANK_DD_DROP.TABLES Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Query OK, 0 rows affected (0.54 sec) Query OK, 0 rows affected (0.57 sec) Query OK, 0 rows affected (0.56 sec) Query OK, 0 rows affected (0.54 sec) Query OK, 0 rows affected (0.55 sec) mysql> source ~/jmiller/BANK_DD_CT.SQL Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Database changed ERROR 1050 (42S01): Table 'GL' already exists ERROR 1050 (42S01): Table 'ACCOUNT' already exists ERROR 1050 (42S01): Table 'TRANSACTION' already exists ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists Query OK, 0 rows affected (0.74 sec) mysql> USE BANK; Database changed mysql> show TABLES; +----------------+ | Tables_in_BANK | +----------------+ | ACCOUNT_TYPES | +----------------+ 1 row in set (0.00 sec) mysql> DROP TABLE ACCOUNT_TYPES; Query OK, 0 rows affected (0.66 sec) mysql> source ~/jmiller/BANK_DD_CT.SQL Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Database changed ERROR 1050 (42S01): Table 'GL' already exists ERROR 1050 (42S01): Table 'ACCOUNT' already exists ERROR 1050 (42S01): Table 'TRANSACTION' already exists ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists Query OK, 0 rows affected (0.79 sec) mysql> DROP TABLE GL; ERROR 1051 (42S02): Unknown table 'GL' mysql> exit Bye [ndbdev@ndb15 jmiller]$ vi BANK_DD_DROP.TABLES [ndbdev@ndb15 jmiller]$ mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 12 to server version: 5.1.8-beta-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> source ~/jmiller/BANK_DD_CT.SQL Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.01 sec) Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed ERROR 1050 (42S01): Table 'GL' already exists ERROR 1050 (42S01): Table 'ACCOUNT' already exists ERROR 1050 (42S01): Table 'TRANSACTION' already exists ERROR 1050 (42S01): Table 'SYSTEM_VALUES' already exists ERROR 1050 (42S01): Table 'ACCOUNT_TYPES' already exists mysql> How to repeat: not sure, but the file system files are being saved off by Nikolay on a cluster crash from starting the load_tpcb.pl script. in bug 17536