Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11
Description
Bug is sporadic.
SET @save_aria_checkpoint_log_activity=@@ARIA_CHECKPOINT_LOG_ACTIVITY;
|
SET @save_aria_group_commmit=@@ARIA_GROUP_COMMIT;
|
SET @save_aria_checkpoint_interval=@@ARIA_CHECKPOINT_INTERVAL;
|
SET @save_aria_group_commit_interval=@@ARIA_GROUP_COMMIT_INTERVAL;
|
|
SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=1;
|
SET GLOBAL ARIA_GROUP_COMMIT=HARD;
|
SET GLOBAL ARIA_CHECKPOINT_INTERVAL=1;
|
# Wait 4 seconds for other commits to join in group commit
|
SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=400000000;
|
CREATE TABLE t1 (a int) engine=aria transactional=1;
|
INSERT INTO t1 values(1);
|
DROP TABLE t1;
|
|
SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=@save_aria_checkpoint_log_activity;
|
SET GLOBAL ARIA_GROUP_COMMIT=@save_aria_group_commmit;
|
SET GLOBAL ARIA_CHECKPOINT_INTERVAL=@save_aria_checkpoint_interval;
|
SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=@save_aria_group_commit_interval;
|
Leads to:
6 0x00007f1b0ba6db1a in __assert_fail_base (fmt=0x7f1b0bbc0f58 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x187f7e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=file@entry=0x1879ec8 "/my/maria-10.3/storage/maria/ma_loghandler.c", line=line@entry=8006, function=function@entry=0x1881170 <__PRETTY_FUNCTION__.17860> "translog_flush_buffers") at assert.c:92
|
#7 0x00007f1b0ba6db92 in __GI___assert_fail (assertion=0x187f7e0 "log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)", file=0x1879ec8 "/my/maria-10.3/storage/maria/ma_loghandler.c", line=8006, function=0x1881170 <__PRETTY_FUNCTION__.17860> "translog_flush_buffers") at assert.c:101
|
#8 0x0000000001247097 in translog_flush_buffers (lsn=0x7f1b05c7f308, sent_to_disk=0x7f1b05c7f338, flush_horizon=0x7f1b05c7f330) at /my/maria-10.3/storage/maria/ma_loghandler.c:8005
|
#9 0x0000000001247862 in translog_flush (lsn=4294976120) at /my/maria-10.3/storage/maria/ma_loghandler.c:8174
|
#10 0x000000000126329b in ma_commit (trn=0x7f1af40af6f0) at /my/maria-10.3/storage/maria/ma_commit.c:66
|
#11 0x00000000012293e4 in ha_maria::implicit_commit (thd=0x7f1af4000d40, new_trn=false) at /my/maria-10.3/storage/maria/ha_maria.cc:2857
|
#12 0x00000000007b4ae6 in mysql_execute_command (thd=0x7f1af4000d40) at /my/maria-10.3/sql/sql_parse.cc:6103
|
#13 0x00000000007b9938 in mysql_parse (thd=0x7f1af4000d40, rawbuf=0x7f1af4012a68 "INSERT INTO t1 values(1)", length=24, parser_state=0x7f1b05c80570, is_com_multi=false, is_next_command=false) at /my/maria-10.3/sql/sql_parse.cc:7811
|
#14 0x00000000007a68ad in dispatch_command (command=COM_QUERY, thd=0x7f1af4000d40, packet=0x7f1af4008ec1 "INSERT INTO t1 values(1)", packet_length=24, is_com_multi=false, is_next_command=false) at /my/maria-10.3/sql/sql_parse.cc:1851
|
#15 0x00000000007a51ea in do_command (thd=0x7f1af4000d40) at /my/maria-10.3/sql/
|
Attachments
Issue Links
- relates to
-
MDEV-17225 Assertion `log_descriptor.bc.buffer->prev_last_lsn == ((LSN)0)' failed in translog_flush_buffers
-
- Open
-
-
MDEV-22883 Assertion `!parse_error || lex.sphead == 0' failed in Table_triggers_list::check_n_load | SIGSEGV in strxmov
-
- Stalled
-
-
MDEV-25533 Assertion `!((system_charset_info)->coll->strcasecmp((system_charset_info), (dict_table_get_col_name( ib_table, j)), (field->field_name.str)))' failed in innobase_build_v_templ
-
- Open
-
Activity
SET GLOBAL aria_group_commit_INTERVAL=1000000000; |
SET GLOBAL aria_group_commit=HARD; |
# Now attempt `mysqladmin shutdown`; it will hang (tested on 10.11 debug + optimized) |
Oddly, I saw the following stack:
10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Debug) |
mysqld: /test/10.11_dbg/sql/sql_class.cc:1533: void THD::cleanup(): Assertion `open_tables == __null' failed.
|
10.11.0 bc563f1a4b0b38de3b41fd0f0d3d8b7f1aacbd8b (Debug) |
Core was generated by `/test/MD190822-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
[Current thread is 1 (Thread 0x15175fec2940 (LWP 1589060))]
|
(gdb) bt
|
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
|
#1 0x000015176009b859 in __GI_abort () at abort.c:79
|
#2 0x000015176009b729 in __assert_fail_base (fmt=0x151760231588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557065fb93de "open_tables == __null", file=0x557065fb7090 "/test/10.11_dbg/sql/sql_class.cc", line=1533, function=<optimized out>) at assert.c:92
|
#3 0x00001517600acfd6 in __GI___assert_fail (assertion=assertion@entry=0x557065fb93de "open_tables == __null", file=file@entry=0x557065fb7090 "/test/10.11_dbg/sql/sql_class.cc", line=line@entry=1533, function=function@entry=0x557065fb920f "void THD::cleanup()") at assert.c:101
|
#4 0x000055706536d08c in THD::cleanup (this=this@entry=0x5570677d9418) at /test/10.11_dbg/sql/sql_class.cc:1533
|
#5 0x000055706536e143 in THD::free_connection (this=this@entry=0x5570677d9418) at /test/10.11_dbg/sql/sql_class.cc:1597
|
#6 0x000055706537621d in THD::~THD (this=0x5570677d9418, __in_chrg=<optimized out>) at /test/10.11_dbg/sql/sql_class.cc:1676
|
#7 0x00005570653766c5 in THD::~THD (this=0x5570677d9418, __in_chrg=<optimized out>) at /test/10.11_dbg/sql/sql_class.cc:1646
|
#8 0x000055706532b1ed in grant_init () at /test/10.11_dbg/sql/sql_acl.cc:7824
|
#9 0x00005570652ab25f in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/10.11_dbg/sql/mysqld.cc:5780
|
#10 0x000055706529eb76 in main (argc=<optimized out>, argv=<optimized out>) at /test/10.11_dbg/sql/main.cc:34
|
One time on 10.11 debug while executing this testcase from MDEV-28514:
CREATE TABLE t (f BIT,UNIQUE KEY(f) USING HASH) ENGINE=MyISAM; |
REPAIR TABLE t; |
Reruns simply resulted in the stack of MDEV-28514. The data dir was 100% clean/fresh when this happened.
This would seem to indicate the the issue can be seen semi-randomly at any time.
I would also not notice this in testing as the issue/stack is generally filtered out.
Executing
SET SESSION storage_engine=Aria; |
SET GLOBAL aria_group_commit=1; |
SET GLOBAL aria_group_commit_interval=1000000000; |
CREATE TABLE t (c INT); |
At the client, then exiting from the client, and running mysqladmin shutdown will hang the server with new client access blocked.
Executing
SET GLOBAL aria_group_commit=1;
|
INSTALL PLUGIN Spider SONAME 'ha_spider.so';
|
SET GLOBAL aria_group_commit_INTERVAL=100000000;
|
CREATE TABLE t (c INT,INDEX (c)) ENGINE=Spider COMMENT='TABLE "st"' PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT COMMENT='srv "d"' ENGINE=Spider);
|
Immediately locks up the client, with this rather strange looking full processlist (note row 12):
10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug) |
10.11.0-dbg>SHOW FULL PROCESSLIST \G
|
*************************** 1. row ***************************
|
Id: 4
|
User: root
|
Host: localhost
|
db: test
|
Command: Query
|
Time: 271
|
State: creating table
|
Info: CREATE TABLE t (c INT,INDEX (c)) ENGINE=Spider COMMENT='TABLE "st"' PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT COMMENT='srv "d"' ENGINE=Spider)
|
Progress: 0.000
|
*************************** 2. row ***************************
|
Id: 5
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 3. row ***************************
|
Id: 6
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 4. row ***************************
|
Id: 7
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 5. row ***************************
|
Id: 8
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 6. row ***************************
|
Id: 9
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 7. row ***************************
|
Id: 10
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 8. row ***************************
|
Id: 11
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 9. row ***************************
|
Id: 17
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 10. row ***************************
|
Id: 12
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 11. row ***************************
|
Id: 18
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 12. row ***************************
|
Id: 20
|
User: system user
|
Host:
|
db: NULL
|
Command: Query
|
Time: 171
|
State: Waiting on cond
|
Info: create procedure mysql.spider_fix_system_tables()begin select 'MariaDB' into @server_name; select substring_index(version(), '.', 1) into @server_major_version; select substring_index(substring_index(version(), '.', 2), '.', -1) into @server_minor_version; call mysql.spider_fix_one_table('spider_tables', 'server', 'alter table mysql.spider_tables add server char(64) default null, add scheme char(64) default null, add host char(64) default null, add port char(5) default null, add socket char(64) default null, add username char(64) default null, add password char(64) default null, add tgt_db_name char(64) default null, add tgt_table_name char(64) default null'); select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa' AND COLUMN_NAME = 'data'; if @col_type != 'binary(128)' then alter table mysql.spider_xa modify data binary(128) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa_member' AND COLUMN_NAME = 'data'; if @col_type != 'binary(128)' then alter table mysql.spider_xa_member modify data binary(128) not null default ''; end if; call mysql.spider_fix_one_table('spider_tables', 'link_id', 'alter table mysql.spider_tables add column link_id int not null default 0 after table_name, drop primary key, add primary key (db_name, table_name, link_id)'); call mysql.spider_fix_one_table('spider_tables', 'link_status', 'alter table mysql.spider_tables add column link_status tinyint not null default 1'); call mysql.spider_fix_one_table('spider_xa_member', 'ssl_ca', 'alter table mysql.spider_xa_member add column ssl_ca char(64) default null after password, add column ssl_capath char(64) default null after ssl_ca, add column ssl_cert char(64) default null after ssl_capath, add column ssl_cipher char(64) default null after ssl_cert, add column ssl_key char(64) default null after ssl_cipher, add column ssl_verify_server_cert tinyint not null default 0 after ssl_key, add column default_file char(64) default null after ssl_verify_server_cert, add column default_group char(64) default null after default_file'); call mysql.spider_fix_one_table('spider_tables', 'ssl_ca', 'alter table mysql.spider_tables add column ssl_ca char(64) default null after password, add column ssl_capath char(64) default null after ssl_ca, add column ssl_cert char(64) default null after ssl_capath, add column ssl_cipher char(64) default null after ssl_cert, add column ssl_key char(64) default null after ssl_cipher, add column ssl_verify_server_cert tinyint not null default 0 after ssl_key, add column default_file char(64) default null after ssl_verify_server_cert, add column default_group char(64) default null after default_file'); call mysql.spider_fix_one_table('spider_link_mon_servers', 'ssl_ca', 'alter table mysql.spider_link_mon_servers add column ssl_ca char(64) default null after password, add column ssl_capath char(64) default null after ssl_ca, add column ssl_cert char(64) default null after ssl_capath, add column ssl_cipher char(64) default null after ssl_cert, add column ssl_key char(64) default null after ssl_cipher, add column ssl_verify_server_cert tinyint not null default 0 after ssl_key, add column default_file char(64) default null after ssl_verify_server_cert, add column default_group char(64) default null after default_file'); select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_mon_servers' AND COLUMN_NAME = 'sid'; if @col_type != 'int(10) unsigned' then alter table mysql.spider_link_mon_servers modify sid int unsigned not null default 0; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa_member' AND COLUMN_NAME = 'socket'; if @col_type = 'char(64)' then alter table mysql.spider_xa_member drop primary key, add index idx1 (data, format_id, gtrid_length, host), modify socket text not null, modify ssl_ca text, modify ssl_capath text, modify ssl_cert text, modify ssl_key text, modify default_file text; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_tables' AND COLUMN_NAME = 'socket'; if @col_type = 'char(64)' then alter table mysql.spider_tables modify socket text, modify ssl_ca text, modify ssl_capath text, modify ssl_cert text, modify ssl_key text, modify default_file text; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_mon_servers' AND COLUMN_NAME = 'socket'; if @col_type = 'char(64)' then alter table mysql.spider_link_mon_servers modify socket text, modify ssl_ca text, modify ssl_capath text, modify ssl_cert text, modify ssl_key text, modify default_file text; end if; call mysql.spider_fix_one_table('spider_tables', 'monitoring_binlog_pos_at_failing', 'alter table mysql.spider_tables add monitoring_binlog_pos_at_failing tinyint not null default 0 after ssl_verify_server_cert'); call mysql.spider_fix_one_table('spider_tables', 'block_status', 'alter table mysql.spider_tables add column block_status tinyint not null default 0 after link_status'); call mysql.spider_fix_one_table('spider_tables', 'static_link_id', 'alter table mysql.spider_tables add column static_link_id char(64) default null after block_status, add unique index uidx1 (db_name, table_name, static_link_id)'); select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_mon_servers' AND COLUMN_NAME = 'link_id'; if @col_type != 'char(64)' then alter table mysql.spider_link_mon_servers modify link_id char(64) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_failed_log' AND COLUMN_NAME = 'link_id'; if @col_type != 'char(64)' then alter table mysql.spider_link_failed_log modify link_id char(64) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_tables' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_tables modify table_name char(199) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_mon_servers' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_link_mon_servers modify table_name char(199) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_failed_log' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_link_failed_log modify table_name char(199) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_position_for_recovery' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_table_position_for_recovery modify table_name char(199) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_sts' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_table_sts modify table_name char(199) not null default ''; end if; select COLUMN_TYPE INTO @col_type from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_crd' AND COLUMN_NAME = 'table_name'; if @col_type != 'char(199)' then alter table mysql.spider_table_crd modify table_name char(199) not null default ''; end if; call mysql.spider_fix_one_table('spider_table_sts', 'checksum', 'alter table mysql.spider_table_sts add column checksum bigint unsigned default null after update_time'); if @server_name = 'MariaDB' and ( @server_major_version > 10 or ( @server_major_version = 10 and @server_minor_version >= 4 ) ) then select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_failed_log'; if @engine_name != 'Aria' then alter table mysql.spider_link_failed_log engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_link_mon_servers'; if @engine_name != 'Aria' then alter table mysql.spider_link_mon_servers engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_crd'; if @engine_name != 'Aria' then alter table mysql.spider_table_crd engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_position_for_recovery'; if @engine_name != 'Aria' then alter table mysql.spider_table_position_for_recovery engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_table_sts'; if @engine_name != 'Aria' then alter table mysql.spider_table_sts engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_tables'; if @engine_name != 'Aria' then alter table mysql.spider_tables engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa'; if @engine_name != 'Aria' then alter table mysql.spider_xa engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa_failed_log'; if @engine_name != 'Aria' then alter table mysql.spider_xa_failed_log engine=Aria transactional=1; end if; select ENGINE INTO @engine_name from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'spider_xa_member'; if @engine_name != 'Aria' then alter table mysql.spider_xa_member engine=Aria transactional=1; end if; end if; if @server_name = 'MariaDB' and ( @server_major_version > 10 or ( @server_major_version = 10 and @server_minor_version >= 999 ) ) then /* table for ddl pushdown */ create table if not exists mysql.spider_rewrite_tables( table_id bigint unsigned not null auto_increment, db_name char(64) not null default '', table_name char(64) not null default '', primary key (table_id), unique uk1(db_name, table_name) ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin; create table if not exists mysql.spider_rewrite_table_tables( table_id bigint unsigned not null, partition_id bigint unsigned not null auto_increment, partition_method varchar(18) default '', partition_expression varchar(64) default '', subpartition_method varchar(12) default '', subpartition_expression varchar(64) default '', connection_str text not null default '', comment_str text not null default '', primary key (table_id, partition_id), unique uk1(table_id, partition_method, partition_expression, subpartition_method, subpartition_expression) ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin; create table if not exists mysql.spider_rewrite_table_partitions( table_id bigint unsigned not null, partition_id bigint unsigned not null, partition_ordinal_position bigint unsigned not null auto_increment, partition_name varchar(64) not null default '', partition_description varchar(64) not null default '', connection_str text not null default '', comment_str text not null default '', primary key (table_id, partition_id, partition_ordinal_position), unique key uk1 (table_id, partition_id, partition_name) ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin; create table if not exists mysql.spider_rewrite_table_subpartitions( table_id bigint unsigned not null, partition_id bigint unsigned not null, partition_ordinal_position bigint unsigned not null, subpartition_ordinal_position bigint unsigned not null auto_increment, subpartition_name varchar(64) not null default '', subpartition_description varchar(64) not null default '', connection_str text not null default '', comment_str text not null default '', primary key (table_id, partition_id, partition_ordinal_position, subpartition_ordinal_position), unique key uk1 (table_id, partition_id, partition_ordinal_position, subpartition_name) ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin; create table if not exists mysql.spider_rewritten_tables( db_name char(64) not null, table_name char(64) not null, table_id bigint unsigned not null, partition_id bigint unsigned not null, primary key (db_name, table_name, table_id, partition_id) ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin; end if; call mysql.spider_fix_one_table('spider_link_mon_servers', 'dsn', 'alter table mysql.spider_link_mon_servers add column dsn char(64) default null after default_group'); call mysql.spider_fix_one_table('spider_tables', 'dsn', 'alter table mysql.spider_tables add column dsn char(64) default null after default_group'); call mysql.spider_fix_one_table('spider_xa_failed_log', 'dsn', 'alter table mysql.spider_xa_failed_log add column dsn char(64) default null after default_group'); call mysql.spider_fix_one_table('spider_xa_member', 'dsn', 'alter table mysql.spider_xa_member add column dsn char(64) default null after default_group'); call mysql.spider_fix_one_table('spider_link_mon_servers', 'filedsn', 'alter table mysql.spider_link_mon_servers add column filedsn text default null after dsn'); call mysql.spider_fix_one_table('spider_tables', 'filedsn', 'alter table mysql.spider_tables add column filedsn text default null after dsn'); call mysql.spider_fix_one_table('spider_xa_failed_log', 'filedsn', 'alter table mysql.spider_xa_failed_log add column filedsn text default null after dsn'); call mysql.spider_fix_one_table('spider_xa_member', 'filedsn', 'alter table mysql.spider_xa_member add column filedsn text default null after dsn'); call mysql.spider_fix_one_table('spider_link_mon_servers', 'driver', 'alter table mysql.spider_link_mon_servers add column driver char(64) default null after filedsn'); call mysql.spider_fix_one_table('spider_tables', 'driver', 'alter table mysql.spider_tables add column driver char(64) default null after filedsn'); call mysql.spider_fix_one_table('spider_xa_failed_log', 'driver', 'alter table mysql.spider_xa_failed_log add column driver char(64) default null after filedsn'); call mysql.spider_fix_one_table('spider_xa_member', 'driver', 'alter table mysql.spider_xa_member add column driver char(64) default null after filedsn');end
|
Progress: 0.000
|
*************************** 13. row ***************************
|
Id: 22
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 14. row ***************************
|
Id: 14
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 15. row ***************************
|
Id: 13
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 16. row ***************************
|
Id: 16
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 17. row ***************************
|
Id: 15
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 18. row ***************************
|
Id: 21
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 19. row ***************************
|
Id: 19
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 20. row ***************************
|
Id: 23
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background statistics action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 21. row ***************************
|
Id: 24
|
User: system user
|
Host:
|
db: NULL
|
Command: Daemon
|
Time: NULL
|
State: Spider table background cardinality action handler
|
Info: NULL
|
Progress: 0.000
|
*************************** 22. row ***************************
|
Id: 25
|
User: root
|
Host: localhost
|
db: test
|
Command: Query
|
Time: 0
|
State: starting
|
Info: SHOW FULL PROCESSLIST
|
Progress: 0.000
|
22 rows in set (0.001 sec)
|
Attempting CTRL+c leaves the client hanging, after displaying
^CCtrl-C -- query killed. Continuing normally.
|
With this new processlist:
10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug) |
10.11.0-dbg>SHOW FULL PROCESSLIST;
|
+----+-------------+-----------+-------+---------+------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+-------------+-----------+-------+---------+------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
| 4 | root | localhost | test | Killed | 518 | creating table | CREATE TABLE t (c INT,INDEX (c)) ENGINE=Spider COMMENT='TABLE "st"' PARTITION BY LIST COLUMNS (c) (PARTITION p DEFAULT COMMENT='srv "d"' ENGINE=Spider) | 0.000 |
|
| 5 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 6 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 7 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 8 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 9 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 10 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 11 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 17 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 12 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 18 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 20 | system user | | mysql | Query | 218 | After create | alter table mysql.spider_link_mon_servers engine=Aria transactional=1 | 0.000 |
|
| 22 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 14 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 13 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 16 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 15 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 21 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 19 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 23 | system user | | NULL | Daemon | NULL | Spider table background statistics action handler | NULL | 0.000 |
|
| 24 | system user | | NULL | Daemon | NULL | Spider table background cardinality action handler | NULL | 0.000 |
|
| 27 | root | localhost | test | Query | 0 | starting | SHOW FULL PROCESSLIST | 0.000 |
|
+----+-------------+-----------+-------+---------+------+----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
22 rows in set (0.001 sec)
|
Another CTRL+c brings us back to the CLI however there are still Spider threads doing work.
nayuta-yanagisawa This does not look directly related to spider, but FYI.
It reproduces at the CLI:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Debug)
10.10.0-dbg>SET GLOBAL ARIA_CHECKPOINT_LOG_ACTIVITY=1;
Query OK, 0 rows affected (0.000 sec)
10.10.0-dbg>SET GLOBAL ARIA_GROUP_COMMIT=HARD;
Query OK, 0 rows affected (0.000 sec)
10.10.0-dbg>SET GLOBAL ARIA_CHECKPOINT_INTERVAL=1;
Query OK, 0 rows affected (0.004 sec)
10.10.0-dbg>SET GLOBAL ARIA_GROUP_COMMIT_INTERVAL=400000000;
Query OK, 0 rows affected (0.000 sec)
10.10.0-dbg>CREATE TABLE t1 (a INT) ENGINE=Aria TRANSACTIONAL=1;
Query OK, 0 rows affected (0.023 sec)
10.10.0-dbg>INSERT INTO t2 VALUES (1);
ERROR 1146 (42S02): Table 'test.t2' doesn't exist
10.10.0-dbg>DROP TABLE t1;
ERROR 2013 (HY000): Lost connection to server during query