[MDEV-13900] Testing for MDEV-11369 (instant ADD COLUMN) Created: 2017-09-22  Updated: 2019-07-07  Resolved: 2019-07-07

Status: Closed
Project: MariaDB Server
Component/s: Tests
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Fixed Votes: 0
Labels: None

Attachments: File t23.dmp.gz     File t23_1.sql     File t23_2.sql    
Issue Links:
Blocks
is blocked by MDEV-11071 Assertion `thd->transaction.stmt.is_e... Closed
is blocked by MDEV-12827 Assertion failure when reporting dupl... Closed
is blocked by MDEV-13923 Assertion `!is_set() || (m_status == ... Closed
Relates
relates to MDEV-13918 Race condition between INFORMATION_SC... Closed
relates to MDEV-14396 Assertion `(ha_alter_info->handler_fl... Closed
relates to MDEV-13261 rpl.rpl_gtid_errorhandling failed in ... Closed
relates to MDEV-14660 Assertion failure in lock_move_rec_li... Closed

 Description   

Development tree: bb-10.3-marko

The feature is not ready for testing yet, but some regression testing and sanity checks on already implemented changes can be performed. There is no point creating a bug report for every problem, because it is an unstable frequently changed development tree, so I will collect failures here, one per comment, with numeration for easier reference.



 Comments   
Comment by Elena Stepanova [ 2017-09-22 ]

#1 - Crash in rec_is_default_row (Instant ADD COLUMN disabled)

5c9cedaf5c621efa6bd6931707fd53920bec470f

#3  <signal handler called>
#4  0x00005606180ca841 in rec_is_default_row (rec=0x7f11c4984070 "supremum", index=0x0) at /home/elenst/git/bb-10.3-marko/storage/innobase/include/rem0rec.h:781
#5  0x0000560618138523 in sel_restore_position_for_mysql (same_user_rec=0x7f11c412a260, latch_mode=1, pcur=0x7f116801e3a0, moves_up=1, mtr=0x7f11c412ae20) at /home/elenst/git/bb-10.3-marko/storage/innobase/row/row0sel.cc:3616
#6  0x000056061813d695 in row_search_mvcc (buf=0x7f116801dd78 "\375\001", mode=PAGE_CUR_G, prebuilt=0x7f116801e1d8, match_mode=0, direction=1) at /home/elenst/git/bb-10.3-marko/storage/innobase/row/row0sel.cc:5672
#7  0x0000560617fa2b51 in ha_innobase::general_fetch (this=0x7f116801d588, buf=0x7f116801dd78 "\375\001", direction=1, match_mode=0) at /home/elenst/git/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:10024
#8  0x0000560617fa3145 in ha_innobase::rnd_next (this=0x7f116801d588, buf=0x7f116801dd78 "\375\001") at /home/elenst/git/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:10237
#9  0x0000560617d7fc2e in handler::ha_rnd_next (this=0x7f116801d588, buf=0x7f116801dd78 "\375\001") at /home/elenst/git/bb-10.3-marko/sql/handler.cc:2593
#10 0x0000560617ef100e in rr_sequential (info=0x7f11680150f8) at /home/elenst/git/bb-10.3-marko/sql/records.cc:485
#11 0x0000560617a3255f in READ_RECORD::read_record (this=0x7f11680150f8) at /home/elenst/git/bb-10.3-marko/sql/records.h:73
#12 0x0000560617b2c477 in sub_select (join=0x7f1168013f38, join_tab=0x7f1168015030, end_of_records=false) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:18889
#13 0x0000560617b2b91b in do_select (join=0x7f1168013f38, procedure=0x0) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:18410
#14 0x0000560617b048ea in JOIN::exec_inner (this=0x7f1168013f38) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:3547
#15 0x0000560617b03d84 in JOIN::exec (this=0x7f1168013f38) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:3342
#16 0x0000560617b04f5c in mysql_select (thd=0x7f1168000b00, tables=0x7f1168013838, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1168013f18, unit=0x7f11680047c0, select_lex=0x7f1168004ef8) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:3742
#17 0x0000560617af950b in handle_select (thd=0x7f1168000b00, lex=0x7f11680046f8, result=0x7f1168013f18, setup_tables_done_option=0) at /home/elenst/git/bb-10.3-marko/sql/sql_select.cc:378
#18 0x0000560617ac49d4 in execute_sqlcom_select (thd=0x7f1168000b00, all_tables=0x7f1168013838) at /home/elenst/git/bb-10.3-marko/sql/sql_parse.cc:6466
#19 0x0000560617abac66 in mysql_execute_command (thd=0x7f1168000b00) at /home/elenst/git/bb-10.3-marko/sql/sql_parse.cc:3731
#20 0x0000560617ac82a2 in mysql_parse (thd=0x7f1168000b00, rawbuf=0x7f1168013638 "SELECT * FROM t1 FOR UPDATE", length=27, parser_state=0x7f11c412c610, is_com_multi=false, is_next_command=false) at /home/elenst/git/bb-10.3-marko/sql/sql_parse.cc:7920
#21 0x0000560617ab577c in dispatch_command (command=COM_QUERY, thd=0x7f1168000b00, packet=0x7f116800af01 "", packet_length=27, is_com_multi=false, is_next_command=false) at /home/elenst/git/bb-10.3-marko/sql/sql_parse.cc:1819
#22 0x0000560617ab41d7 in do_command (thd=0x7f1168000b00) at /home/elenst/git/bb-10.3-marko/sql/sql_parse.cc:1370
#23 0x0000560617c0a7b5 in do_handle_one_connection (connect=0x56061b3e8ee0) at /home/elenst/git/bb-10.3-marko/sql/sql_connect.cc:1418
#24 0x0000560617c0a535 in handle_one_connection (arg=0x56061b3e8ee0) at /home/elenst/git/bb-10.3-marko/sql/sql_connect.cc:1324
#25 0x00005606184ece2b in pfs_spawn_thread (arg=0x56061b48a4b0) at /home/elenst/git/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#26 0x00007f11ca8606ba in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#27 0x00007f11c9cf582d in clone () from /lib/x86_64-linux-gnu/libc.so.6

The test case mostly fails for me, but it is non-deterministic, so run with --repeat=N.

Test case

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); 
LOCK TABLE t1 WRITE;
 
--connect (con1,localhost,root,,test)
BEGIN;
--send 
  INSERT INTO t1 VALUES (2);
 
--connect (con2,localhost,root,,test)
--send
  SELECT * FROM t1 FOR UPDATE;
 
--connection default
UNLOCK TABLES;
 
--connection con1
--reap
ROLLBACK;
 
--connection con2
--reap
 
# Cleanup
 
--disconnect con2
--disconnect con1
--connection default
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-22 ]

#2 - Assertion `fil_page_get_type(page) == 18' (Instant ADD COLUMN disabled)

5c9cedaf5c621efa6bd6931707fd53920bec470f

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/page0page.ic:1137: void page_set_instant(ib_page_t*, unsigned int, mtr_t*): Assertion `fil_page_get_type(page) == 18' failed.
170922  4:53:31 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f9acd5d9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055bdd39e1aa3 in page_set_instant (page=0x7f9ac2c0c000 "A\025\016\265", n=9, mtr=0x7f9ac806b540) at /data/src/bb-10.3-marko/storage/innobase/include/page0page.ic:1137
#9  0x000055bdd3be8eee in btr_root_raise_and_insert (flags=0, cursor=0x7f9ac806b120, offsets=0x7f9ac806b0b8, heap=0x7f9ac806b0b0, tuple=0x7f9a7c112e08, n_ext=0, mtr=0x7f9ac806b540) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0btr.cc:2055
#10 0x000055bdd3c0e3fa in btr_cur_pessimistic_insert (flags=0, cursor=0x7f9ac806b120, offsets=0x7f9ac806b0b8, heap=0x7f9ac806b0b0, entry=0x7f9a7c112e08, rec=0x7f9ac806b0c0, big_rec=0x7f9ac806b0a8, n_ext=0, thr=0x7f9a7c1186b0, mtr=0x7f9ac806b540) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:3350
#11 0x000055bdd3ad5352 in row_ins_clust_index_entry_low (flags=0, mode=33, index=0x55bdd705e2e8, n_uniq=2, entry=0x7f9a7c112e08, n_ext=0, thr=0x7f9a7c1186b0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2752
#12 0x000055bdd3ad6b3c in row_ins_clust_index_entry (index=0x55bdd705e2e8, entry=0x7f9a7c112e08, thr=0x7f9a7c1186b0, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3243
#13 0x000055bdd3ad6e84 in row_ins_index_entry (index=0x55bdd705e2e8, entry=0x7f9a7c112e08, thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3339
#14 0x000055bdd3ad7432 in row_ins_index_entry_step (node=0x7f9a7c118ed0, thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3489
#15 0x000055bdd3ad780d in row_ins (node=0x7f9a7c118ed0, thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3631
#16 0x000055bdd3ad8062 in row_ins_step (thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3835
#17 0x000055bdd3a9ff11 in que_thr_step (thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1033
#18 0x000055bdd3aa0281 in que_run_threads_low (thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1116
#19 0x000055bdd3aa0463 in que_run_threads (thr=0x7f9a7c1186b0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1156
#20 0x000055bdd3afaa5b in row_create_index_for_mysql (index=0x7f9a7c1181d8, trx=0x7f9ac33feca8, field_lengths=0x7f9a7c11b7b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:2611
#21 0x000055bdd39bcdd7 in create_index (trx=0x7f9ac33feca8, form=0x7f9ac806c480, flags=33, table_name=0x7f9ac806bfb0 "test/t32", key_num=3) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:11813
#22 0x000055bdd39a82b3 in create_table_info_t::create_table (this=0x7f9ac806bf60) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:12973
#23 0x000055bdd39a8c02 in ha_innobase::create (this=0x7f9a7c146f88, name=0x7f9ac806ed10 "./test/t32", form=0x7f9ac806c480, create_info=0x7f9ac806f0c0) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:13192
#24 0x000055bdd367f462 in handler::ha_create (this=0x7f9a7c146f88, name=0x7f9ac806ed10 "./test/t32", form=0x7f9ac806c480, info_arg=0x7f9ac806f0c0) at /data/src/bb-10.3-marko/sql/handler.cc:4392
#25 0x000055bdd3680495 in ha_create_table (thd=0x7f9a7c000b00, path=0x7f9ac806ed10 "./test/t32", db=0x7f9a7c0150e8 "test", table_name=0x7f9a7c014aa0 "t32", create_info=0x7f9ac806f0c0, frm=0x7f9ac806ed00) at /data/src/bb-10.3-marko/sql/handler.cc:4763
#26 0x000055bdd34d5eab in rea_create_table (thd=0x7f9a7c000b00, frm=0x7f9ac806ed00, path=0x7f9ac806ed10 "./test/t32", db=0x7f9a7c0150e8 "test", table_name=0x7f9a7c014aa0 "t32", create_info=0x7f9ac806f0c0, file=0x7f9a7c016490, no_ha_create_table=false) at /data/src/bb-10.3-marko/sql/unireg.cc:419
#27 0x000055bdd3480c02 in create_table_impl (thd=0x7f9a7c000b00, orig_db=0x7f9a7c0150e8 "test", orig_table_name=0x7f9a7c014aa0 "t32", db=0x7f9a7c0150e8 "test", table_name=0x7f9a7c014aa0 "t32", path=0x7f9ac806ed10 "./test/t32", options=..., create_info=0x7f9ac806f0c0, alter_info=0x7f9ac806f010, create_table_mode=0, is_trans=0x7f9ac806ef64, key_info=0x7f9ac806ecf0, key_count=0x7f9ac806ece4, frm=0x7f9ac806ed00) at /data/src/bb-10.3-marko/sql/sql_table.cc:4750
#28 0x000055bdd3481202 in mysql_create_table_no_lock (thd=0x7f9a7c000b00, db=0x7f9a7c0150e8 "test", table_name=0x7f9a7c014aa0 "t32", create_info=0x7f9ac806f0c0, alter_info=0x7f9ac806f010, is_trans=0x7f9ac806ef64, create_table_mode=0, table_list=0x7f9a7c014ad8) at /data/src/bb-10.3-marko/sql/sql_table.cc:4862
#29 0x000055bdd34826ae in mysql_create_like_table (thd=0x7f9a7c000b00, table=0x7f9a7c014ad8, src_table=0x7f9a7c015128, create_info=0x7f9ac8070820) at /data/src/bb-10.3-marko/sql/sql_table.cc:5328
#30 0x000055bdd33b6ea8 in mysql_execute_command (thd=0x7f9a7c000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4219
#31 0x000055bdd33c2e28 in mysql_parse (thd=0x7f9a7c000b00, rawbuf=0x7f9a7c0149f8 "CREATE TABLE t32 LIKE t1", length=24, parser_state=0x7f9ac8071610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#32 0x000055bdd33b05f0 in dispatch_command (command=COM_QUERY, thd=0x7f9a7c000b00, packet=0x7f9a7c08f661 "CREATE TABLE t32 LIKE t1", packet_length=24, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#33 0x000055bdd33af052 in do_command (thd=0x7f9a7c000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#34 0x000055bdd3505ade in do_handle_one_connection (connect=0x55bdd6ec03b0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#35 0x000055bdd350586b in handle_one_connection (arg=0x55bdd6ec03b0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#36 0x000055bdd397cc1c in pfs_spawn_thread (arg=0x55bdd6ec8cf0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#37 0x00007f9acf51e494 in start_thread (arg=0x7f9ac8072700) at pthread_create.c:333
#38 0x00007f9acd69693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The test case seems deterministic (at least on my machine), but fragile, it seems to depend on the number of tables, number of columns/keys, and length of column names.

--source include/have_innodb.inc
 
CREATE TABLE t1 (
  pk INT AUTO_INCREMENT,
  int_column INT,
  date_column DATE,
  time_column TIME,
  datetime_column DATETIME,
  varchar_column VARCHAR(1),
  PRIMARY KEY (pk),
  KEY (int_column),
  KEY (date_column),
  KEY (time_column),
  KEY (datetime_column),
  KEY (varchar_column,int_column)
) ENGINE=InnoDB;
 
CREATE TABLE t2 LIKE t1;
CREATE TABLE t3 LIKE t1;
CREATE TABLE t4 LIKE t1;
CREATE TABLE t5 LIKE t1;
CREATE TABLE t6 LIKE t1;
CREATE TABLE t7 LIKE t1;
CREATE TABLE t8 LIKE t1;
CREATE TABLE t9 LIKE t1;
CREATE TABLE t10 LIKE t1;
CREATE TABLE t11 LIKE t1;
CREATE TABLE t12 LIKE t1;
CREATE TABLE t13 LIKE t1;
CREATE TABLE t14 LIKE t1;
CREATE TABLE t15 LIKE t1;
CREATE TABLE t16 LIKE t1;
CREATE TABLE t17 LIKE t1;
CREATE TABLE t18 LIKE t1;
CREATE TABLE t19 LIKE t1;
CREATE TABLE t20 LIKE t1;
CREATE TABLE t21 LIKE t1;
CREATE TABLE t22 LIKE t1;
CREATE TABLE t23 LIKE t1;
CREATE TABLE t24 LIKE t1;
CREATE TABLE t25 LIKE t1;
CREATE TABLE t26 LIKE t1;
CREATE TABLE t27 LIKE t1;
CREATE TABLE t28 LIKE t1;
CREATE TABLE t29 LIKE t1;
CREATE TABLE t30 LIKE t1;
CREATE TABLE t31 LIKE t1;
CREATE TABLE t32 LIKE t1;
 
# Cleanup
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,
t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32;

Comment by Marko Mäkelä [ 2017-09-22 ]

Thank you!
#1 is an error in this commit (we should not invoke rec_is_default_row(rec, index=NULL)):

commit 5c9cedaf5c621efa6bd6931707fd53920bec470f
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date:   Thu Sep 21 21:43:51 2017 +0300
 
    Skip the 'default row' pseudo-record where needed

#2 is clearly caused by this, which I will revert for compatibility reasons:

commit d198f961e56bb3f610b55eb0615b7d2ac80c77e7
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date:   Wed Sep 20 14:46:58 2017 +0300
 
    Bootstrap SYS_INDEXES as an 'instant ADD COLUMN' table
    
    The column SYS_INDEXES.MERGE_THRESHOLD was added in MySQL 5.7.
    This makes the system table the very first one where
    instant ADD COLUMN has been used.

Comment by Elena Stepanova [ 2017-09-22 ]

#3 - Assertion `rec_get_deleted_flag(rec, dict_table_is_comp(cursor->index->table))' (Instant ADD COLUMN enabled)

0f6ef54270df98 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:349: dberr_t row_ins_clust_index_entry_by_modify(btr_pcur_t*, ulint, ulint, ulint**, mem_heap_t**, mem_heap_t*, const dtuple_t*, que_thr_t*, mtr_t*): Assertion `rec_get_deleted_flag(rec, dict_table_is_comp(cursor->index->table))' failed.
170923  2:32:14 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f3bc7288ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055f5a9a359d1 in row_ins_clust_index_entry_by_modify (pcur=0x7f3bc00b31a0, flags=0, mode=2, offsets=0x7f3bc00b3138, offsets_heap=0x7f3bc00b3130, heap=0x7f3b78036930, entry=0x7f3b7800d918, thr=0x7f3b781501b8, mtr=0x7f3bc00b35c0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:348
#9  0x000055f5a9a3b8bd in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f3b7800e4b8, n_uniq=1, entry=0x7f3b7800d918, n_ext=0, thr=0x7f3b781501b8, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2714
#10 0x000055f5a9a3d1f8 in row_ins_clust_index_entry (index=0x7f3b7800e4b8, entry=0x7f3b7800d918, thr=0x7f3b781501b8, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3228
#11 0x000055f5a9a3d625 in row_ins_index_entry (index=0x7f3b7800e4b8, entry=0x7f3b7800d918, thr=0x7f3b781501b8) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3340
#12 0x000055f5a9a3dbd3 in row_ins_index_entry_step (node=0x7f3b7814ff40, thr=0x7f3b781501b8) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3490
#13 0x000055f5a9a3dfae in row_ins (node=0x7f3b7814ff40, thr=0x7f3b781501b8) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3632
#14 0x000055f5a9a3e803 in row_ins_step (thr=0x7f3b781501b8) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3836
#15 0x000055f5a9a5dfce in row_insert_for_mysql (mysql_rec=0x7f3b78154e78 "\375", prebuilt=0x7f3b7814f9e8) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:1489
#16 0x000055f5a9904b32 in ha_innobase::write_row (this=0x7f3b780396b8, record=0x7f3b78154e78 "\375") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:8443
#17 0x000055f5a95e9811 in handler::ha_write_row (this=0x7f3b780396b8, buf=0x7f3b78154e78 "\375") at /data/src/bb-10.3-marko/sql/handler.cc:6022
#18 0x000055f5a92ed791 in write_record (thd=0x7f3b78000b00, table=0x7f3b78038a90, info=0x7f3bc00b43c0) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1929
#19 0x000055f5a92eb116 in mysql_insert (thd=0x7f3b78000b00, table_list=0x7f3b78014ae0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1057
#20 0x000055f5a931e5ff in mysql_execute_command (thd=0x7f3b78000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4683
#21 0x000055f5a9328e28 in mysql_parse (thd=0x7f3b78000b00, rawbuf=0x7f3b780149f8 "INSERT INTO t1 (c) VALUES (1)", length=29, parser_state=0x7f3bc00b5610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#22 0x000055f5a93165f0 in dispatch_command (command=COM_QUERY, thd=0x7f3b78000b00, packet=0x7f3b7808f411 "INSERT INTO t1 (c) VALUES (1)", packet_length=29, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#23 0x000055f5a9315052 in do_command (thd=0x7f3b78000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#24 0x000055f5a946bade in do_handle_one_connection (connect=0x55f5ad88f3b0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#25 0x000055f5a946b86b in handle_one_connection (arg=0x55f5ad88f3b0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#26 0x000055f5a98e2c1c in pfs_spawn_thread (arg=0x55f5ad897cf0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#27 0x00007f3bc91cd494 in start_thread (arg=0x7f3bc00b6700) at pthread_create.c:333
#28 0x00007f3bc734593f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
CREATE OR REPLACE TABLE t1 (pk INT DEFAULT 0 KEY) ENGINE=InnoDB;
ALTER TABLE t1 ADD c INT;
INSERT INTO t1 (c) VALUES (1);
 
# Cleanup
DROP TABLE t1;

Not reproducible with disabled instant ALTER COLUMN.

Comment by Elena Stepanova [ 2017-09-23 ]

#4 - Assertion `__builtin_expect(!(((offsets + 4)[1 + n] & (REC_OFFS_DEFAULT | REC_OFFS_SQL_NULL | REC_OFFS_EXTERNAL)) & (((offsets + 4)[1 + n] & (REC_OFFS_DEFAULT | REC_OFFS_SQL_NULL | REC_OFFS_EXTERNAL)) - 1)), (1))' (Instant ADD COLUMN enabled)

0f6ef54270df98 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/rem0rec.h:696: ulint rec_offs_nth_flag(const ulint*, ulint, ulint): Assertion `__builtin_expect(!(((offsets + 4)[1 + n] & (REC_OFFS_DEFAULT | REC_OFFS_SQL_NULL | REC_OFFS_EXTERNAL)) & (((offsets + 4)[1 + n] & (REC_OFFS_DEFAULT | REC_OFFS_SQL_NULL | REC_OFFS_EXTERNAL)) - 1)), (1))' failed.
170923  3:08:23 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fcd435efee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055b42cae20ef in rec_offs_nth_flag (offsets=0x7fcce80945b8, n=4, flag=4611686018427387904) at /data/src/bb-10.3-marko/storage/innobase/include/rem0rec.h:693
#9  0x000055b42cae213c in rec_offs_nth_extern (offsets=0x7fcce80945b8, n=4) at /data/src/bb-10.3-marko/storage/innobase/include/rem0rec.h:733
#10 0x000055b42cc24d6a in row_build_low (type=2, index=0x7fcce800df38, rec=0x7fcd3d1dc087 "", offsets=0x7fcce80945b8, col_table=0x7fcce8152a08, add_cols=0x0, add_v=0x0, col_map=0x7fcce81527d8, ext=0x7fcd3c213278, heap=0x7fcce8094530) at /data/src/bb-10.3-marko/storage/innobase/row/row0row.cc:520
#11 0x000055b42cc24fb5 in row_build_w_add_vcol (type=2, index=0x7fcce800df38, rec=0x7fcd3d1dc087 "", offsets=0x7fcce80945b8, col_table=0x7fcce8152a08, add_cols=0x0, add_v=0x0, col_map=0x7fcce81527d8, ext=0x7fcd3c213278, heap=0x7fcce8094530) at /data/src/bb-10.3-marko/storage/innobase/row/row0row.cc:649
#12 0x000055b42cbe651f in row_merge_read_clustered_index (trx=0x7fcd3d51b878, table=0x7fcce8151160, old_table=0x7fcce8154f78, new_table=0x7fcce8152a08, online=true, index=0x7fcce8152788, fts_sort_idx=0x0, psort_info=0x0, files=0x7fcce81863f0, key_numbers=0x7fcce8152790, n_index=1, add_cols=0x0, add_v=0x0, col_map=0x7fcce81527d8, add_autoinc=18446744073709551615, sequence=..., block=0x7fcd344f9000 <error: Cannot access memory at address 0x7fcd344f9000>, skip_pk_sort=true, tmpfd=0x7fcd3c213d38, stage=0x7fcce818c790, pct_cost=50, crypt_block=0x0, eval_table=0x7fcce8151160) at /data/src/bb-10.3-marko/storage/innobase/row/row0merge.cc:2189
#13 0x000055b42cbedd72 in row_merge_build_indexes (trx=0x7fcd3d51b878, old_table=0x7fcce8154f78, new_table=0x7fcce8152a08, online=true, indexes=0x7fcce8152788, key_numbers=0x7fcce8152790, n_indexes=1, table=0x7fcce8151160, add_cols=0x0, col_map=0x7fcce81527d8, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7fcce818c790, add_v=0x0, eval_table=0x7fcce8151160) at /data/src/bb-10.3-marko/storage/innobase/row/row0merge.cc:4813
#14 0x000055b42cadaa6a in ha_innobase::inplace_alter_table (this=0x7fcce8037e48, altered_table=0x7fcce8151160, ha_alter_info=0x7fcd3c214530) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:6925
#15 0x000055b42c59017d in handler::ha_inplace_alter_table (this=0x7fcce8037e48, altered_table=0x7fcce8151160, ha_alter_info=0x7fcd3c214530) at /data/src/bb-10.3-marko/sql/handler.h:3826
#16 0x000055b42c587202 in mysql_inplace_alter_table (thd=0x7fcce8000b00, table_list=0x7fcce8014ad0, table=0x7fcce8037220, altered_table=0x7fcce8151160, ha_alter_info=0x7fcd3c214530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fcd3c2145a0, alter_ctx=0x7fcd3c215160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7203
#17 0x000055b42c58c60e in mysql_alter_table (thd=0x7fcce8000b00, new_db=0x7fcce80150e0 "test", new_name=0x0, create_info=0x7fcd3c215d70, table_list=0x7fcce8014ad0, alter_info=0x7fcd3c215cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#18 0x000055b42c60af73 in Sql_cmd_alter_table::execute (this=0x7fcce80150e8, thd=0x7fcce8000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#19 0x000055b42c4be57f in mysql_execute_command (thd=0x7fcce8000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#20 0x000055b42c4c2e28 in mysql_parse (thd=0x7fcce8000b00, rawbuf=0x7fcce80149f8 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7fcd3c217610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#21 0x000055b42c4b05f0 in dispatch_command (command=COM_QUERY, thd=0x7fcce8000b00, packet=0x7fcce808f411 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#22 0x000055b42c4af052 in do_command (thd=0x7fcce8000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#23 0x000055b42c605ade in do_handle_one_connection (connect=0x55b430704130) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#24 0x000055b42c60586b in handle_one_connection (arg=0x55b430704130) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#25 0x000055b42ca7cc1c in pfs_spawn_thread (arg=0x55b43070ca70) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#26 0x00007fcd45534494 in start_thread (arg=0x7fcd3c218700) at pthread_create.c:333
#27 0x00007fcd436ac93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 VALUES (NULL);
ALTER TABLE t1 ADD c CHAR(3);
ALTER TABLE t1 FORCE;

Not reproducible with disabled instant ALTER COLUMN.

Comment by Elena Stepanova [ 2017-09-23 ]

#5 - Assertion `!clust_index->is_instant()' (Instant ADD COLUMN enabled)

0f6ef54270df98 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/row/row0merge.cc:1864: dberr_t row_merge_read_clustered_index(trx_t*, TABLE*, const dict_table_t*, const dict_table_t*, bool, dict_index_t**, dict_index_t*, fts_psort_t*, merge_file_t*, const ulint*, ulint, const dtuple_t*, const dict_add_v_col_t*, const ulint*, ulint, ib_sequence_t&, row_merge_block_t*, bool, int*, ut_stage_alter_t*, double, row_merge_block_t*, TABLE*): Assertion `!clust_index->is_instant()' failed.
170923  3:31:28 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f76a6a9bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000563d7407f76d in row_merge_read_clustered_index (trx=0x7f76a09c7878, table=0x7f764c03a550, old_table=0x7f764c154f78, new_table=0x7f764c03bfe8, online=true, index=0x7f764c03bae8, fts_sort_idx=0x0, psort_info=0x0, files=0x7f764c03e9b0, key_numbers=0x7f764c03baf0, n_index=1, add_cols=0x0, add_v=0x0, col_map=0x7f764c03bb38, add_autoinc=18446744073709551615, sequence=..., block=0x7f76982f4000 "", skip_pk_sort=true, tmpfd=0x7f76a00c5d38, stage=0x7f764c15f050, pct_cost=50, crypt_block=0x0, eval_table=0x7f764c03a550) at /data/src/bb-10.3-marko/storage/innobase/row/row0merge.cc:1864
#9  0x0000563d74087d72 in row_merge_build_indexes (trx=0x7f76a09c7878, old_table=0x7f764c154f78, new_table=0x7f764c03bfe8, online=true, indexes=0x7f764c03bae8, key_numbers=0x7f764c03baf0, n_indexes=1, table=0x7f764c03a550, add_cols=0x0, col_map=0x7f764c03bb38, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7f764c15f050, add_v=0x0, eval_table=0x7f764c03a550) at /data/src/bb-10.3-marko/storage/innobase/row/row0merge.cc:4813
#10 0x0000563d73f74a6a in ha_innobase::inplace_alter_table (this=0x7f764c14f9e8, altered_table=0x7f764c03a550, ha_alter_info=0x7f76a00c6530) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:6925
#11 0x0000563d73a2a17d in handler::ha_inplace_alter_table (this=0x7f764c14f9e8, altered_table=0x7f764c03a550, ha_alter_info=0x7f76a00c6530) at /data/src/bb-10.3-marko/sql/handler.h:3826
#12 0x0000563d73a21202 in mysql_inplace_alter_table (thd=0x7f764c000b00, table_list=0x7f764c014ad0, table=0x7f764c037220, altered_table=0x7f764c03a550, ha_alter_info=0x7f76a00c6530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f76a00c65a0, alter_ctx=0x7f76a00c7160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7203
#13 0x0000563d73a2660e in mysql_alter_table (thd=0x7f764c000b00, new_db=0x7f764c0150e0 "test", new_name=0x0, create_info=0x7f76a00c7d70, table_list=0x7f764c014ad0, alter_info=0x7f76a00c7cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#14 0x0000563d73aa4f73 in Sql_cmd_alter_table::execute (this=0x7f764c0150e8, thd=0x7f764c000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#15 0x0000563d7395857f in mysql_execute_command (thd=0x7f764c000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#16 0x0000563d7395ce28 in mysql_parse (thd=0x7f764c000b00, rawbuf=0x7f764c0149f8 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7f76a00c9610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#17 0x0000563d7394a5f0 in dispatch_command (command=COM_QUERY, thd=0x7f764c000b00, packet=0x7f764c08f411 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#18 0x0000563d73949052 in do_command (thd=0x7f764c000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#19 0x0000563d73a9fade in do_handle_one_connection (connect=0x563d771b3130) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#20 0x0000563d73a9f86b in handle_one_connection (arg=0x563d771b3130) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#21 0x0000563d73f16c1c in pfs_spawn_thread (arg=0x563d771bba70) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#22 0x00007f76a89e0494 in start_thread (arg=0x7f76a00ca700) at pthread_create.c:333
#23 0x00007f76a6b5893f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD c INT;
TRUNCATE TABLE t1;
ALTER TABLE t1 FORCE;

Comment by Elena Stepanova [ 2017-09-24 ]

#6 - Assertion `!col->is_instant()' (Instant ADD COLUMN enabled)

bb=10.3-marko 00410cd8d8f17 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4210: bool innobase_add_instant_try(Alter_inplace_info*, const TABLE*, const TABLE*, trx_t*): Assertion `!col->is_instant()' failed.
170924 17:05:49 [ERROR] mysqld got signal 6 ;
 
#7  0x00007faa5ffa9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055c4ae903291 in innobase_add_instant_try (ha_alter_info=0x7faa583cd530, altered_table=0x7faa04142bf0, table=0x7faa0400d980, trx=0x7faa59ed5ca8) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4210
#9  0x000055c4ae916638 in commit_try_norebuild (ha_alter_info=0x7faa583cd530, ctx=0x7faa04017af8, altered_table=0x7faa04142bf0, old_table=0x7faa0400d980, trx=0x7faa59ed5ca8, table_name=0x7faa04093a8d "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8543
#10 0x000055c4ae90f7b1 in ha_innobase::commit_inplace_alter_table (this=0x7faa0413bab8, altered_table=0x7faa04142bf0, ha_alter_info=0x7faa583cd530, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9065
#11 0x000055c4ae5aefa8 in handler::ha_commit_inplace_alter_table (this=0x7faa0413bab8, altered_table=0x7faa04142bf0, ha_alter_info=0x7faa583cd530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#12 0x000055c4aed3660f in ha_partition::commit_inplace_alter_table (this=0x7faa0400e5a8, altered_table=0x7faa04142bf0, ha_alter_info=0x7faa583cd530, commit=true) at /data/src/bb-10.3-marko/sql/ha_partition.cc:8381
#13 0x000055c4ae5aefa8 in handler::ha_commit_inplace_alter_table (this=0x7faa0400e5a8, altered_table=0x7faa04142bf0, ha_alter_info=0x7faa583cd530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#14 0x000055c4ae3b6dfe in mysql_inplace_alter_table (thd=0x7faa04000b00, table_list=0x7faa04014ae0, table=0x7faa0400d980, altered_table=0x7faa04142bf0, ha_alter_info=0x7faa583cd530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7faa583cd5a0, alter_ctx=0x7faa583ce160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#15 0x000055c4ae3bc0e2 in mysql_alter_table (thd=0x7faa04000b00, new_db=0x7faa040150f0 "test", new_name=0x0, create_info=0x7faa583ced70, table_list=0x7faa04014ae0, alter_info=0x7faa583cecc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#16 0x000055c4ae43aa47 in Sql_cmd_alter_table::execute (this=0x7faa04015200, thd=0x7faa04000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#17 0x000055c4ae2ee053 in mysql_execute_command (thd=0x7faa04000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#18 0x000055c4ae2f28fc in mysql_parse (thd=0x7faa04000b00, rawbuf=0x7faa040149f8 "ALTER TABLE t1 ADD COLUMN i INT", length=31, parser_state=0x7faa583d0610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#19 0x000055c4ae2e00c4 in dispatch_command (command=COM_QUERY, thd=0x7faa04000b00, packet=0x7faa0408f4e1 "ALTER TABLE t1 ADD COLUMN i INT", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#20 0x000055c4ae2deb26 in do_command (thd=0x7faa04000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#21 0x000055c4ae4355b2 in do_handle_one_connection (connect=0x55c4b10ad5f0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#22 0x000055c4ae43533f in handle_one_connection (arg=0x55c4b10ad5f0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#23 0x000055c4ae8ad7ae in pfs_spawn_thread (arg=0x55c4b10b5f30) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#24 0x00007faa61eee494 in start_thread (arg=0x7faa583d1700) at pthread_create.c:333
#25 0x00007faa6006693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
--source include/have_partition.inc
 
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB PARTITION BY KEY() PARTITIONS 2;
ALTER TABLE t1 ADD COLUMN i INT;
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-24 ]

#7 - Assertion `dlen == 0xFFFFFFFF' (Instant ADD COLUMN enabled)

bb-10.3-marko 00410cd8d8f171792 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:389: void rec_init_offsets_comp_ordinary(const rec_t*, const dict_index_t*, ulint*, rec_leaf_format): Assertion `dlen == 0xFFFFFFFF' failed.
170924 19:02:13 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f192cb58ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000564de66b303e in rec_init_offsets_comp_ordinary (rec=0x7f19227300f2 "", index=0x7f18d403a818, offsets=0x7f191875c6a0, format=REC_LEAF_ORDINARY) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:389
#9  0x0000564de66b3d97 in rec_init_offsets (rec=0x7f19227300f2 "", index=0x7f18d403a818, leaf=true, offsets=0x7f191875c6a0) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:626
#10 0x0000564de66b48cc in rec_get_offsets_func (rec=0x7f19227300f2 "", index=0x7f18d403a818, offsets=0x7f191875c6a0, leaf=true, n_fields=5, file=0x564de6cdf228 "/data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc", line=114, heap=0x7f191875c670) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:877
#11 0x0000564de667892f in page_cur_try_search_shortcut (block=0x7f1922246900, index=0x7f18d403a818, tuple=0x7f18d40385f8, iup_matched_fields=0x7f191875d3a0, ilow_matched_fields=0x7f191875d3b0, cursor=0x7f191875e518) at /data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc:114
#12 0x0000564de6679285 in page_cur_search_with_match (block=0x7f1922246900, index=0x7f18d403a818, tuple=0x7f18d40385f8, mode=PAGE_CUR_LE, iup_matched_fields=0x7f191875d3a0, ilow_matched_fields=0x7f191875d3b0, cursor=0x7f191875e518, rtr_info=0x0) at /data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc:370
#13 0x0000564de680f97b in btr_cur_search_to_nth_level (index=0x7f18d403a818, level=0, tuple=0x7f18d40385f8, mode=PAGE_CUR_LE, latch_mode=33, cursor=0x7f191875e510, has_search_latch=0, file=0x564de6d01bb8 "/data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc", line=2615, mtr=0x7f191875e930, autoinc=0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:1605
#14 0x0000564de66d539a in btr_pcur_open_low (index=0x7f18d403a818, level=0, tuple=0x7f18d40385f8, mode=PAGE_CUR_LE, latch_mode=33, cursor=0x7f191875e510, file=0x564de6d01bb8 "/data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc", line=2615, autoinc=0, mtr=0x7f191875e930) at /data/src/bb-10.3-marko/storage/innobase/include/btr0pcur.ic:459
#15 0x0000564de66dbdd4 in row_ins_clust_index_entry_low (flags=2, mode=33, index=0x7f18d403a818, n_uniq=1, entry=0x7f18d40385f8, n_ext=0, thr=0x7f18d4143560, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2615
#16 0x0000564de65d9fbc in innobase_add_instant_try (ha_alter_info=0x7f1918760530, altered_table=0x7f18d4151ff0, table=0x7f18d414d9a0, trx=0x7f1922a72ca8) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4401
#17 0x0000564de65ec638 in commit_try_norebuild (ha_alter_info=0x7f1918760530, ctx=0x7f18d4016050, altered_table=0x7f18d4151ff0, old_table=0x7f18d414d9a0, trx=0x7f1922a72ca8, table_name=0x7f18d4093a8d "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8543
#18 0x0000564de65e57b1 in ha_innobase::commit_inplace_alter_table (this=0x7f18d414e5c8, altered_table=0x7f18d4151ff0, ha_alter_info=0x7f1918760530, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9065
#19 0x0000564de6284fa8 in handler::ha_commit_inplace_alter_table (this=0x7f18d414e5c8, altered_table=0x7f18d4151ff0, ha_alter_info=0x7f1918760530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#20 0x0000564de608cdfe in mysql_inplace_alter_table (thd=0x7f18d4000b00, table_list=0x7f18d4014af0, table=0x7f18d414d9a0, altered_table=0x7f18d4151ff0, ha_alter_info=0x7f1918760530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f19187605a0, alter_ctx=0x7f1918761160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#21 0x0000564de60920e2 in mysql_alter_table (thd=0x7f18d4000b00, new_db=0x7f18d4015100 "test", new_name=0x0, create_info=0x7f1918761d70, table_list=0x7f18d4014af0, alter_info=0x7f1918761cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#22 0x0000564de6110a47 in Sql_cmd_alter_table::execute (this=0x7f18d40152d0, thd=0x7f18d4000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#23 0x0000564de5fc4053 in mysql_execute_command (thd=0x7f18d4000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#24 0x0000564de5fc88fc in mysql_parse (thd=0x7f18d4000b00, rawbuf=0x7f18d40149f8 "ALTER TABLE t1 ADD t TEXT DEFAULT ''", length=36, parser_state=0x7f1918763610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#25 0x0000564de5fb60c4 in dispatch_command (command=COM_QUERY, thd=0x7f18d4000b00, packet=0x7f18d408f4e1 "ALTER TABLE t1 ADD t TEXT DEFAULT ''", packet_length=36, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#26 0x0000564de5fb4b26 in do_command (thd=0x7f18d4000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#27 0x0000564de610b5b2 in do_handle_one_connection (connect=0x564dea3103d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#28 0x0000564de610b33f in handle_one_connection (arg=0x564dea3103d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#29 0x0000564de65837ae in pfs_spawn_thread (arg=0x564dea318d10) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#30 0x00007f192ea9d494 in start_thread (arg=0x7f1918764700) at pthread_create.c:333
#31 0x00007f192cc1593f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 ADD t TEXT DEFAULT '';
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-24 ]

#8 - Assertion `fil_page_get_type(page_align(rec)) == 17855' (Instant ADD COLUMN enabled)

bb-10.3-marko 00410cd8d8f1 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:1000: void row_log_table_low(const rec_t*, const dtuple_t*, const dtuple_t*, dict_index_t*, const ulint*, bool, const dtuple_t*): Assertion `fil_page_get_type(page_align(rec)) == 17855' failed.
170924 20:09:33 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fb563b74ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000556478f1494c in row_log_table_low (rec=0x7fb55d760099 "", ventry=0x7fb50801f4c8, o_ventry=0x0, index=0x7fb51400dea8, offsets=0x7fb5547172a0, insert=true, old_pk=0x0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:1000
#9  0x0000556478f15fa9 in row_log_table_insert (rec=0x7fb55d760099 "", ventry=0x7fb50801f4c8, index=0x7fb51400dea8, offsets=0x7fb5547172a0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:1442
#10 0x0000556478ede6c3 in row_ins_clust_index_entry_low (flags=0, mode=16386, index=0x7fb51400dea8, n_uniq=0, entry=0x7fb50801f4c8, n_ext=0, thr=0x7fb50801e9a0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2776
#11 0x0000556478edfcb0 in row_ins_clust_index_entry (index=0x7fb51400dea8, entry=0x7fb50801f4c8, thr=0x7fb50801e9a0, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3227
#12 0x0000556478ee00dd in row_ins_index_entry (index=0x7fb51400dea8, entry=0x7fb50801f4c8, thr=0x7fb50801e9a0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3339
#13 0x0000556478ee068b in row_ins_index_entry_step (node=0x7fb50801e728, thr=0x7fb50801e9a0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3489
#14 0x0000556478ee0a66 in row_ins (node=0x7fb50801e728, thr=0x7fb50801e9a0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3631
#15 0x0000556478ee12bb in row_ins_step (thr=0x7fb50801e9a0) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3835
#16 0x0000556478f00a6c in row_insert_for_mysql (mysql_rec=0x7fb50801dd78 "\377", prebuilt=0x7fb50801e1d8) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:1489
#17 0x0000556478da768a in ha_innobase::write_row (this=0x7fb50801d588, record=0x7fb50801dd78 "\377") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:8443
#18 0x0000556478a8b731 in handler::ha_write_row (this=0x7fb50801d588, buf=0x7fb50801dd78 "\377") at /data/src/bb-10.3-marko/sql/handler.cc:6022
#19 0x000055647878f265 in write_record (thd=0x7fb508000b00, table=0x7fb50801c960, info=0x7fb5547183c0) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1929
#20 0x000055647878cbea in mysql_insert (thd=0x7fb508000b00, table_list=0x7fb508013720, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1057
#21 0x00005564787c00d3 in mysql_execute_command (thd=0x7fb508000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4683
#22 0x00005564787ca8fc in mysql_parse (thd=0x7fb508000b00, rawbuf=0x7fb508013638 "INSERT INTO t1 () VALUES (),()", length=30, parser_state=0x7fb554719610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#23 0x00005564787b80c4 in dispatch_command (command=COM_QUERY, thd=0x7fb508000b00, packet=0x7fb50800af01 "INSERT INTO t1 () VALUES (),()", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#24 0x00005564787b6b26 in do_command (thd=0x7fb508000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#25 0x000055647890d5b2 in do_handle_one_connection (connect=0x55647cad13d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#26 0x000055647890d33f in handle_one_connection (arg=0x55647cad13d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#27 0x0000556478d857ae in pfs_spawn_thread (arg=0x55647cada0c0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#28 0x00007fb565ab9494 in start_thread (arg=0x7fb55471a700) at pthread_create.c:333
#29 0x00007fb563c3193f in clone () from /lib/x86_64-linux-gnu/libc.so.6

# Run with --repeat=N
 
--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN a INT;
--send
  OPTIMIZE TABLE t1;
 
--connect (con1,localhost,root,,test)
INSERT INTO t1 () VALUES (),();
 
--connection default
--reap
 
# Cleanup
--disconnect con1
--connection default
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-24 ]

#9 - Assertion `same_metadata(old, add)' (Instant ADD COLUMN enabled)

bb-10.3-marko 00410cd8d8f171 with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/dict0mem.h:1107: void dict_index_t::prepare_instant_copy(const dict_index_t&, bool): Assertion `same_metadata(old, add)' failed.
170924 22:43:29 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f3044c30ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00005652b4de5188 in dict_index_t::prepare_instant_copy (this=0x7f2fec03f398, old=..., add=false) at /data/src/bb-10.3-marko/storage/innobase/include/dict0mem.h:1107
#9  0x00005652b4de6f36 in ha_innobase_inplace_ctx::prepare_instant (this=0x7f2fec016270) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:292
#10 0x00005652b4dd9e63 in prepare_inplace_alter_table_dict (ha_alter_info=0x7f3040051530, altered_table=0x7f2fec151ee0, old_table=0x7f2fec037f30, table_name=0x7f2fec00d88d "t1", flags=33, flags2=80, fts_doc_id_col=18446744073709551615, add_fts_doc_id=false, add_fts_doc_id_idx=false) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:5347
#11 0x00005652b4dddb99 in ha_innobase::prepare_inplace_alter_table (this=0x7f2fec13bab8, altered_table=0x7f2fec151ee0, ha_alter_info=0x7f3040051530) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:6698
#12 0x00005652b4a81e77 in handler::ha_prepare_inplace_alter_table (this=0x7f2fec13bab8, altered_table=0x7f2fec151ee0, ha_alter_info=0x7f3040051530) at /data/src/bb-10.3-marko/sql/handler.cc:4231
#13 0x00005652b4889b33 in mysql_inplace_alter_table (thd=0x7f2fec000b00, table_list=0x7f2fec014ae8, table=0x7f2fec037f30, altered_table=0x7f2fec151ee0, ha_alter_info=0x7f3040051530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f30400515a0, alter_ctx=0x7f3040052160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7170
#14 0x00005652b488f0e2 in mysql_alter_table (thd=0x7f2fec000b00, new_db=0x7f2fec0150f8 "test", new_name=0x0, create_info=0x7f3040052d70, table_list=0x7f2fec014ae8, alter_info=0x7f3040052cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#15 0x00005652b490da47 in Sql_cmd_alter_table::execute (this=0x7f2fec015208, thd=0x7f2fec000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#16 0x00005652b47c1053 in mysql_execute_command (thd=0x7f2fec000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#17 0x00005652b47c58fc in mysql_parse (thd=0x7f2fec000b00, rawbuf=0x7f2fec0149f8 "ALTER TABLE t1 ADD COLUMN i2 INT", length=32, parser_state=0x7f3040054610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#18 0x00005652b47b30c4 in dispatch_command (command=COM_QUERY, thd=0x7f2fec000b00, packet=0x7f2fec08f4e1 "ALTER TABLE t1 ADD COLUMN i2 INT", packet_length=32, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#19 0x00005652b47b1b26 in do_command (thd=0x7f2fec000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#20 0x00005652b49085b2 in do_handle_one_connection (connect=0x5652b6fcd3d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#21 0x00005652b490833f in handle_one_connection (arg=0x5652b6fcd3d0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#22 0x00005652b4d807ae in pfs_spawn_thread (arg=0x5652b6fd5d10) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#23 0x00007f3046b75494 in start_thread (arg=0x7f3040055700) at pthread_create.c:333
#24 0x00007f3044ced93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
ALTER TABLE t1 ADD UNIQUE ui(i);
ALTER TABLE t1 ADD COLUMN i2 INT;
 
# Cleanup
DROP TABLE t1;

Comment by Marko Mäkelä [ 2017-09-25 ]

I believe that I have fixed all but #9, #6.
My highest next priority is fixing ROLLBACK and restarting.
Partitioning (#6) would be among the last, even together with issues related to FULLTEXT indexes (at least the hidden FTS_DOC_ID column).
Failure #9 occurs because the sorting of indexes is not being taken into account: we are comparing KEY i to UNIQUE KEY ui.
My consolidated test of the fixed cases is below:

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 ADD t TEXT DEFAULT '';
DROP TABLE t1;
CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 VALUES (NULL);
ALTER TABLE t1 ADD c CHAR(3);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
--send
ALTER TABLE t1 FORCE;
connect (dml,localhost,root,,);
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
INSERT INTO t1 () VALUES ();
SET DEBUG_SYNC='now SIGNAL dml';
disconnect dml;
connection default;
reap;
DROP TABLE t1;
CREATE TABLE t1 (pk INT DEFAULT 0 KEY) ENGINE=InnoDB;
ALTER TABLE t1 ADD c INT;
INSERT INTO t1 (c) VALUES (1);
TRUNCATE TABLE t1;
ALTER TABLE t1 FORCE;
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-25 ]

#10 - Assertion `rec_size == rec_offs_size(ins_offs)' (Instant ADD COLUMN enabled)

bb-10.3-marko with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc:883: void page_cur_insert_rec_write_log(rec_t*, ulint, rec_t*, dict_index_t*, mtr_t*): Assertion `rec_size == rec_offs_size(ins_offs)' failed.
170925 20:19:46 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f893953eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055eefb472665 in page_cur_insert_rec_write_log (insert_rec=0x7f892f0b007d "", rec_size=32, cursor_rec=0x7f892f0b0063 "infimum", index=0x7f88e000df08, mtr=0x7f892c13e5c0) at /data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc:883
#9  0x000055eefb4741db in page_cur_insert_rec_low (current_rec=0x7f892f0b0063 "infimum", index=0x7f88e000df08, rec=0x7f88e003744d "", offsets=0x7f892c13e2a0, mtr=0x7f892c13e5c0) at /data/src/bb-10.3-marko/storage/innobase/page/page0cur.cc:1430
#10 0x000055eefb601f45 in page_cur_tuple_insert (cursor=0x7f892c13e1a8, tuple=0x7f88e00371a8, index=0x7f88e000df08, offsets=0x7f892c13e138, heap=0x7f892c13e130, n_ext=0, mtr=0x7f892c13e5c0, use_cache=false) at /data/src/bb-10.3-marko/storage/innobase/include/page0cur.ic:292
#11 0x000055eefb60c4d1 in btr_cur_optimistic_insert (flags=0, cursor=0x7f892c13e1a0, offsets=0x7f892c13e138, heap=0x7f892c13e130, entry=0x7f88e00371a8, rec=0x7f892c13e140, big_rec=0x7f892c13e128, n_ext=0, thr=0x7f88e0151a60, mtr=0x7f892c13e5c0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:3146
#12 0x000055eefb4d4415 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f88e000df08, n_uniq=0, entry=0x7f88e00371a8, n_ext=0, thr=0x7f88e0151a60, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2734
#13 0x000055eefb4d5c25 in row_ins_clust_index_entry (index=0x7f88e000df08, entry=0x7f88e00371a8, thr=0x7f88e0151a60, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3230
#14 0x000055eefb4d6052 in row_ins_index_entry (index=0x7f88e000df08, entry=0x7f88e00371a8, thr=0x7f88e0151a60) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3342
#15 0x000055eefb4d6600 in row_ins_index_entry_step (node=0x7f88e01517e8, thr=0x7f88e0151a60) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3492
#16 0x000055eefb4d69db in row_ins (node=0x7f88e01517e8, thr=0x7f88e0151a60) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3634
#17 0x000055eefb4d7230 in row_ins_step (thr=0x7f88e0151a60) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3838
#18 0x000055eefb4f69e0 in row_insert_for_mysql (mysql_rec=0x7f88e000a478 "\375\001", prebuilt=0x7f88e0151298) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:1489
#19 0x000055eefb39d68a in ha_innobase::write_row (this=0x7f88e0150aa8, record=0x7f88e000a478 "\375\001") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:8443
#20 0x000055eefb081731 in handler::ha_write_row (this=0x7f88e0150aa8, buf=0x7f88e000a478 "\375\001") at /data/src/bb-10.3-marko/sql/handler.cc:6022
#21 0x000055eefad85265 in write_record (thd=0x7f88e0000b00, table=0x7f88e014fe80, info=0x7f892c13f3c0) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1929
#22 0x000055eefad82bea in mysql_insert (thd=0x7f88e0000b00, table_list=0x7f88e0014ae0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1057
#23 0x000055eefadb60d3 in mysql_execute_command (thd=0x7f88e0000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4683
#24 0x000055eefadc08fc in mysql_parse (thd=0x7f88e0000b00, rawbuf=0x7f88e00149f8 "INSERT INTO t1 VALUES (1,2)", length=27, parser_state=0x7f892c140610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#25 0x000055eefadae0c4 in dispatch_command (command=COM_QUERY, thd=0x7f88e0000b00, packet=0x7f88e008f421 "INSERT INTO t1 VALUES (1,2)", packet_length=27, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#26 0x000055eefadacb26 in do_command (thd=0x7f88e0000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#27 0x000055eefaf035b2 in do_handle_one_connection (connect=0x55eefee88a10) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#28 0x000055eefaf0333f in handle_one_connection (arg=0x55eefee88a10) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#29 0x000055eefb37b7ae in pfs_spawn_thread (arg=0x55eefee91350) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#30 0x00007f893b483494 in start_thread (arg=0x7f892c141700) at pthread_create.c:333
#31 0x00007f89395fb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN j INT;
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES (1,2);
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-25 ]

#11 - Crash in rec_init_offsets_comp_ordinary (Instant ADD COLUMN enabled)

Note: might be related to MDEV-13898, test case is similar, but not crashing without instant ADD

bb=10.3-marko f13fafe8f8fac957ada with enabled instant ADD COLUMN

#3  <signal handler called>
#4  0x000055883ea6312b in rec_init_offsets_comp_ordinary (rec=0x7f2fb80e8004 "\200", index=0x7f2f7014ff78, offsets=0x7f2f70041490, format=REC_LEAF_ORDINARY) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:422
#5  0x000055883ea67420 in rec_init_offsets_temp (rec=0x7f2fb80e8004 "\200", index=0x7f2f7014ff78, offsets=0x7f2f70041490) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:1803
#6  0x000055883eac79a1 in row_log_table_apply_op (thr=0x7f2f70145090, new_trx_id_col=1, dup=0x7f2fb8276310, error=0x7f2fb82760bc, offsets_heap=0x7f2f700487e0, heap=0x7f2f70044750, mrec=0x7f2fb80e8004 "\200", mrec_end=0x7f2fb80e803a "", offsets=0x7f2f70041490) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:2500
#7  0x000055883eac9e2e in row_log_table_apply_ops (thr=0x7f2f70145090, dup=0x7f2fb8276310, stage=0x7f2f7011d0f0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:3117
#8  0x000055883eaca3ed in row_log_table_apply (thr=0x7f2f70145090, old_table=0x7f2f7000e568, table=0x7f2f70141cb0, stage=0x7f2f7011d0f0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:3216
#9  0x000055883e99b6c1 in commit_try_rebuild (ha_alter_info=0x7f2fb82772c0, ctx=0x7f2f70017358, altered_table=0x7f2f70141cb0, old_table=0x7f2f7003f760, trx=0x7f2fb9d7fca8, table_name=0x7f2f7015fb9d "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8224
#10 0x000055883e995772 in ha_innobase::commit_inplace_alter_table (this=0x7f2f701511a8, altered_table=0x7f2f70141cb0, ha_alter_info=0x7f2fb82772c0, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9061
#11 0x000055883e634fa8 in handler::ha_commit_inplace_alter_table (this=0x7f2f701511a8, altered_table=0x7f2f70141cb0, ha_alter_info=0x7f2fb82772c0, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#12 0x000055883e43cdfe in mysql_inplace_alter_table (thd=0x7f2f70000b00, table_list=0x7f2f70014ac8, table=0x7f2f7003f760, altered_table=0x7f2f70141cb0, ha_alter_info=0x7f2fb82772c0, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f2fb8277330, alter_ctx=0x7f2fb8277ef0) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#13 0x000055883e4420e2 in mysql_alter_table (thd=0x7f2f70000b00, new_db=0x0, new_name=0x0, create_info=0x7f2fb8278af0, table_list=0x7f2f70014ac8, alter_info=0x7f2fb8278a40, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#14 0x000055883e444922 in mysql_recreate_table (thd=0x7f2f70000b00, table_list=0x7f2f70014ac8, table_copy=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9984
#15 0x000055883e4cb742 in admin_recreate_table (thd=0x7f2f70000b00, table_list=0x7f2f70014ac8) at /data/src/bb-10.3-marko/sql/sql_admin.cc:59
#16 0x000055883e4cea21 in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7f2f70000b00, tables=0x7f2f70014ac8, check_opt=0x7f2f70005698, operator_name=0x55883eebdce8 "optimize", lock_type=TL_WRITE, open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55883e6349f0 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /data/src/bb-10.3-marko/sql/sql_admin.cc:1027
#17 0x000055883e4cfd37 in Sql_cmd_optimize_table::execute (this=0x7f2f700150e0, thd=0x7f2f70000b00) at /data/src/bb-10.3-marko/sql/sql_admin.cc:1367
#18 0x000055883e374053 in mysql_execute_command (thd=0x7f2f70000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#19 0x000055883e3788fc in mysql_parse (thd=0x7f2f70000b00, rawbuf=0x7f2f700149f8 "OPTIMIZE TABLE t1", length=17, parser_state=0x7f2fb827a610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#20 0x000055883e3660c4 in dispatch_command (command=COM_QUERY, thd=0x7f2f70000b00, packet=0x7f2f7008f421 "", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#21 0x000055883e364b26 in do_command (thd=0x7f2f70000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#22 0x000055883e4bb5b2 in do_handle_one_connection (connect=0x558840e30790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#23 0x000055883e4bb33f in handle_one_connection (arg=0x558840e30790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#24 0x000055883e9337ae in pfs_spawn_thread (arg=0x558840e390d0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#25 0x00007f2fc1d98494 in start_thread (arg=0x7f2fb827b700) at pthread_create.c:333
#26 0x00007f2fbff1093f in clone () from /lib/x86_64-linux-gnu/libc.so.6

# Run with --repeat=N if it does not crash right away
 
--source include/have_innodb.inc
 
CREATE TABLE t1 (
 pk INT AUTO_INCREMENT PRIMARY KEY,
 c1 BIGINT UNSIGNED,
 c2 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
 c3 BIGINT,
 c4 VARCHAR(257) CHARACTER SET utf8,
 c5 TINYINT UNSIGNED,
 c6 TINYINT,
 c7 VARCHAR(257) CHARACTER SET latin1,
 c8 VARCHAR(257) CHARACTER SET binary
) ENGINE=InnoDB;
 
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS t TIMESTAMP NULL KEY;
--send
  OPTIMIZE TABLE t1;
 
--connect (con17,localhost,root,,test)
INSERT INTO t1 () VALUES (),();
--disconnect con17
--connection default
--reap
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-25 ]

#12 - Assertion `field->len != (0xFFFFFFFF - 1)' (Instant ADD COLUMN enabled)

Note: See also #11 – same test case, just different table structure.

bb-10.3-marko f13fafe8f8fac957ada with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/data0data.ic:97: ulint dfield_get_len(const dfield_t*): Assertion `field->len != (0xFFFFFFFF - 1)' failed.
170925 23:08:02 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fb8c9ae6ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000564677313942 in dfield_get_len (field=0x7fb87005fee8) at /data/src/bb-10.3-marko/storage/innobase/include/data0data.ic:97
#9  0x00005646773151f2 in dtuple_validate (tuple=0x7fb87005fe88) at /data/src/bb-10.3-marko/storage/innobase/data/data0data.cc:216
#10 0x00005646771aafa2 in row_log_table_apply_insert_low (thr=0x7fb870153210, row=0x7fb87005fe88, offsets_heap=0x7fb870063e90, heap=0x7fb87005fe00, dup=0x7fb8bc6f8310) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:1719
#11 0x00005646771ab46a in row_log_table_apply_insert (thr=0x7fb870153210, mrec=0x7fb8bc56a003 "\200", offsets=0x7fb87003b0d0, offsets_heap=0x7fb870063e90, heap=0x7fb87005fe00, dup=0x7fb8bc6f8310) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:1816
#12 0x00005646771ada7d in row_log_table_apply_op (thr=0x7fb870153210, new_trx_id_col=1, dup=0x7fb8bc6f8310, error=0x7fb8bc6f80bc, offsets_heap=0x7fb870063e90, heap=0x7fb87005fe00, mrec=0x7fb8bc56a003 "\200", mrec_end=0x7fb8bc56a018 "", offsets=0x7fb87003b0d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:2517
#13 0x00005646771afe2e in row_log_table_apply_ops (thr=0x7fb870153210, dup=0x7fb8bc6f8310, stage=0x7fb87006a9d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:3117
#14 0x00005646771b03ed in row_log_table_apply (thr=0x7fb870153210, old_table=0x7fb870093eb8, table=0x7fb870150db0, stage=0x7fb87006a9d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0log.cc:3216
#15 0x00005646770816c1 in commit_try_rebuild (ha_alter_info=0x7fb8bc6f92c0, ctx=0x7fb870016318, altered_table=0x7fb870150db0, old_table=0x7fb870039de0, trx=0x7fb8c4213ca8, table_name=0x7fb870038ced "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8224
#16 0x000056467707b772 in ha_innobase::commit_inplace_alter_table (this=0x7fb8701403e8, altered_table=0x7fb870150db0, ha_alter_info=0x7fb8bc6f92c0, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9061
#17 0x0000564676d1afa8 in handler::ha_commit_inplace_alter_table (this=0x7fb8701403e8, altered_table=0x7fb870150db0, ha_alter_info=0x7fb8bc6f92c0, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#18 0x0000564676b22dfe in mysql_inplace_alter_table (thd=0x7fb870000b00, table_list=0x7fb870014ac8, table=0x7fb870039de0, altered_table=0x7fb870150db0, ha_alter_info=0x7fb8bc6f92c0, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fb8bc6f9330, alter_ctx=0x7fb8bc6f9ef0) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#19 0x0000564676b280e2 in mysql_alter_table (thd=0x7fb870000b00, new_db=0x0, new_name=0x0, create_info=0x7fb8bc6faaf0, table_list=0x7fb870014ac8, alter_info=0x7fb8bc6faa40, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#20 0x0000564676b2a922 in mysql_recreate_table (thd=0x7fb870000b00, table_list=0x7fb870014ac8, table_copy=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9984
#21 0x0000564676bb1742 in admin_recreate_table (thd=0x7fb870000b00, table_list=0x7fb870014ac8) at /data/src/bb-10.3-marko/sql/sql_admin.cc:59
#22 0x0000564676bb4a21 in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7fb870000b00, tables=0x7fb870014ac8, check_opt=0x7fb870005698, operator_name=0x5646775a3ce8 "optimize", lock_type=TL_WRITE, open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x564676d1a9f0 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /data/src/bb-10.3-marko/sql/sql_admin.cc:1027
#23 0x0000564676bb5d37 in Sql_cmd_optimize_table::execute (this=0x7fb8700150e0, thd=0x7fb870000b00) at /data/src/bb-10.3-marko/sql/sql_admin.cc:1367
#24 0x0000564676a5a053 in mysql_execute_command (thd=0x7fb870000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#25 0x0000564676a5e8fc in mysql_parse (thd=0x7fb870000b00, rawbuf=0x7fb8700149f8 "OPTIMIZE TABLE t1", length=17, parser_state=0x7fb8bc6fc610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#26 0x0000564676a4c0c4 in dispatch_command (command=COM_QUERY, thd=0x7fb870000b00, packet=0x7fb87008f421 "", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#27 0x0000564676a4ab26 in do_command (thd=0x7fb870000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#28 0x0000564676ba15b2 in do_handle_one_connection (connect=0x56467a341790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#29 0x0000564676ba133f in handle_one_connection (arg=0x56467a341790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#30 0x00005646770197ae in pfs_spawn_thread (arg=0x56467a34a0d0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#31 0x00007fb8cba2b494 in start_thread (arg=0x7fb8bc6fd700) at pthread_create.c:333
#32 0x00007fb8c9ba393f in clone () from /lib/x86_64-linux-gnu/libc.so.6

# Run with --repeat=N if it does not fail right away
 
--source include/have_innodb.inc
 
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS t TIMESTAMP NULL KEY;
--send
  OPTIMIZE TABLE t1;
 
--connect (con1,localhost,root,,test)
INSERT INTO t1 () VALUES ();
--disconnect con1
--connection default
--reap
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-25 ]

#13 - Assertion `index->is_instant()' (Instant ADD COLUMN enabled)

bb-10.3-marko f13fafe8f8fac957ada with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:348: void rec_init_offsets_comp_ordinary(const rec_t*, const dict_index_t*, ulint*, rec_leaf_format): Assertion `index->is_instant()' failed.
170926  2:23:00 [ERROR] mysqld got signal 6 ;
 
#7  0x00007ffacad43ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000562280037d33 in rec_init_offsets_comp_ordinary (rec=0x7ffac49d81db "", index=0x7ffa7c197fe8, offsets=0x7ffa700fbf98, format=REC_LEAF_COLUMNS_ADDED) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:348
#9  0x0000562280038d05 in rec_init_offsets (rec=0x7ffac49d81db "", index=0x7ffa7c197fe8, leaf=true, offsets=0x7ffa700fbf98) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:620
#10 0x00005622800398a7 in rec_get_offsets_func (rec=0x7ffac49d81db "", index=0x7ffa7c197fe8, offsets=0x7ffa700fbf98, leaf=true, n_fields=1, file=0x562280707358 "/data/src/bb-10.3-marko/storage/innobase/btr/btr0sea.cc", line=1236, heap=0x7ffac4120998) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:877
#11 0x00005622801b7271 in btr_search_drop_page_hash_index (block=0x7ffac444bee0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0sea.cc:1236
#12 0x0000562280171c30 in btr_free_root (block=0x7ffac444bee0, mtr=0x7ffac4120c60) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0btr.cc:1047
#13 0x00005622801728c1 in btr_free_if_exists (page_id=..., page_size=..., index_id=253, mtr=0x7ffac4120c60) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0btr.cc:1376
#14 0x000056228020f155 in dict_drop_index_tree (rec=0x7ffac45f2676 "", pcur=0x7ffac4121178, mtr=0x7ffac4120c60) at /data/src/bb-10.3-marko/storage/innobase/dict/dict0crea.cc:1047
#15 0x00005622800cb738 in DropIndex::operator() (this=0x7ffac41212f0, mtr=0x7ffac4120c60, pcur=0x7ffac4121178) at /data/src/bb-10.3-marko/storage/innobase/row/row0trunc.cc:949
#16 0x00005622800d38fb in IndexIterator::for_each<DropIndex> (this=0x7ffac4120c60, callback=...) at /data/src/bb-10.3-marko/storage/innobase/row/row0trunc.cc:110
#17 0x00005622800d1e49 in SysIndexIterator::for_each<DropIndex> (this=0x7ffac41212b8, callback=...) at /data/src/bb-10.3-marko/storage/innobase/row/row0trunc.cc:168
#18 0x00005622800cd7db in row_truncate_table_for_mysql (table=0x7ffa7c1ace08, trx=0x7ffac4c700d8) at /data/src/bb-10.3-marko/storage/innobase/row/row0trunc.cc:1963
#19 0x000056227ff3504f in ha_innobase::truncate (this=0x7ffa70102118) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:13381
#20 0x000056227fc09949 in handler::ha_truncate (this=0x7ffa70102118) at /data/src/bb-10.3-marko/sql/handler.cc:4101
#21 0x000056227fddd610 in Sql_cmd_truncate_table::handler_truncate (this=0x7ffa70013d20, thd=0x7ffa70000b00, table_ref=0x7ffa70013708, is_tmp_table=false) at /data/src/bb-10.3-marko/sql/sql_truncate.cc:246
#22 0x000056227fdddcda in Sql_cmd_truncate_table::truncate_table (this=0x7ffa70013d20, thd=0x7ffa70000b00, table_ref=0x7ffa70013708) at /data/src/bb-10.3-marko/sql/sql_truncate.cc:445
#23 0x000056227fddde4c in Sql_cmd_truncate_table::execute (this=0x7ffa70013d20, thd=0x7ffa70000b00) at /data/src/bb-10.3-marko/sql/sql_truncate.cc:502
#24 0x000056227f949053 in mysql_execute_command (thd=0x7ffa70000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#25 0x000056227f94d8fc in mysql_parse (thd=0x7ffa70000b00, rawbuf=0x7ffa70013638 "TRUNCATE TABLE t1", length=17, parser_state=0x7ffac4122610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#26 0x000056227f93b0c4 in dispatch_command (command=COM_QUERY, thd=0x7ffa70000b00, packet=0x7ffa7000af01 "TRUNCATE TABLE t1", packet_length=17, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#27 0x000056227f939b26 in do_command (thd=0x7ffa70000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#28 0x000056227fa905b2 in do_handle_one_connection (connect=0x562282e28790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#29 0x000056227fa9033f in handle_one_connection (arg=0x562282e28790) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#30 0x000056227ff087ae in pfs_spawn_thread (arg=0x562282e31480) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#31 0x00007ffaccc88494 in start_thread (arg=0x7ffac4123700) at pthread_create.c:333
#32 0x00007ffacae0093f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Note: it is a very bad test case, parts of it don't make any sense, and it requires high value of repeat=N (for me 50 is enough, but it can be different on different builds). I just don't see much point trying to improve it further at this stage, as the failure will most likely be gone after other fixes anyway.

--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB;
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 VALUES (5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5);
 
--connect (con1,localhost,root,,test)
INSERT INTO v1 VALUES (2);
--send
  UPDATE v1 SET i = 7;
 
--connect (con2,localhost,root,,test)
--error ER_NO_SUCH_TABLE
INSERT INTO t1 SELECT c FROM t19;
BEGIN;
--error ER_BAD_FIELD_ERROR
INSERT INTO v1 SELECT c FROM t1;
SELECT 1 AS c FROM t1 WHERE i <> 7;
SELECT i FROM v1 WHERE i < i;
--error ER_NO_SUCH_TABLE
UPDATE t2 SET i = 6;
SELECT i FROM t1;
BEGIN;
UPDATE t1 SET i = 4;
ALTER TABLE t1 ADD COLUMN col INT DEFAULT 2;
TRUNCATE TABLE t1;
 
# Cleanup
 
--connection con1
--reap
--disconnect con1
--disconnect con2
 
--connection default
DROP VIEW IF EXISTS v1;
DROP TABLE IF EXISTS t1;

Comment by Marko Mäkelä [ 2017-09-26 ]

The following test now passes. I believe we should have fixed #6, #11. Also #13 could have been fixed, or at least replaced with another assertion.
So, #9, #10, #12 are probably open.
There were several problems with online table-rebuilding ALTER (such as DROP COLUMN with concurrent DML) that should now work. Note that it matters whether the ROW_FORMAT of the source table is REDUNDANT.

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_partition.inc
CREATE TABLE t1 (i INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN j INT;
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES (1,2);
DROP TABLE t1;
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB PARTITION BY KEY() PARTITIONS 2;
ALTER TABLE t1 ADD COLUMN i INT;
DROP TABLE t1;
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 ADD t TEXT DEFAULT '';
DROP TABLE t1;
CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 VALUES (NULL);
ALTER TABLE t1 ADD c CHAR(3);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
--send
ALTER TABLE t1 FORCE;
connect (dml,localhost,root,,);
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
BEGIN;
INSERT INTO t1 SET i=1;
UPDATE t1 SET i=ISNULL(i);
ROLLBACK;
SET DEBUG_SYNC='now SIGNAL dml';
connection default;
reap;
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
CREATE TABLE t1 (
 pk INT AUTO_INCREMENT PRIMARY KEY,
 c1 BIGINT UNSIGNED,
 c2 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
 c3 BIGINT,
 c4 VARCHAR(257) CHARACTER SET utf8,
 c5 TINYINT UNSIGNED,
 c6 TINYINT,
 c7 VARCHAR(257) CHARACTER SET latin1,
 c8 VARCHAR(257) CHARACTER SET binary
) ENGINE=InnoDB;
INSERT INTO t1 () VALUES ();
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS t TIMESTAMP NULL KEY;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
--send
OPTIMIZE TABLE t1;
connection dml;
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
BEGIN;
INSERT INTO t1 () VALUES (),();
UPDATE t1 SET t=current_timestamp();
ROLLBACK;
SET DEBUG_SYNC='now SIGNAL dml';
connection default;
reap;
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
disconnect dml;
CREATE TABLE t1 (pk INT DEFAULT 0 KEY) ENGINE=InnoDB;
ALTER TABLE t1 ADD c INT;
INSERT INTO t1 (c) VALUES (1);
TRUNCATE TABLE t1;
ALTER TABLE t1 FORCE;
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-26 ]

bb-10.3-marko 18fc6274028c7fb : #9, 13 are still reproducible with the same test cases. Could not reproduce other listed ones.

I am also getting another failure as below, but it's a rare event, and I don't have any reasonably reproducible test case for it yet. I'll look more into it.

mysqld: /home/elenst/git/bb-10.3-marko-instant-column/storage/innobase/handler/handler0alter.cc:8295: bool commit_try_rebuild(Alter_inplace_info*, ha_innobase_inplace_ctx*, TABLE*, const TABLE*, trx_t*, const char*): Assertion `user_table->get_ref_count() == 1' failed.
 
# 2017-09-26T23:28:33 [42660] #7  0x00007f94999b3c82 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
# 2017-09-26T23:28:33 [42660] #8  0x000055eaca1bd5b8 in commit_try_rebuild (ha_alter_info=0x7f947c18eb30, ctx=0x7f9408102a60, altered_table=0x7f94081078c0, old_table=0x7f9410067b80, trx=0x7f9498d86a48, table_name=0x7f94140aabfd "A") at /home/elenst/git/bb-10.3-marko-instant-column/storage/innobase/handler/handler0alter.cc:8295
# 2017-09-26T23:28:33 [42660] #9  0x000055eaca1b720f in ha_innobase::commit_inplace_alter_table (this=0x7f94100600e8, altered_table=0x7f94081078c0, ha_alter_info=0x7f947c18eb30, commit=true) at /home/elenst/git/bb-10.3-marko-instant-column/storage/innobase/handler/handler0alter.cc:9061
# 2017-09-26T23:28:33 [42660] #10 0x000055eac9f5a8a0 in handler::ha_commit_inplace_alter_table (this=0x7f94100600e8, altered_table=0x7f94081078c0, ha_alter_info=0x7f947c18eb30, commit=true) at /home/elenst/git/bb-10.3-marko-instant-column/sql/handler.cc:4251
# 2017-09-26T23:28:33 [42660] #11 0x000055eaca6ec1af in ha_partition::commit_inplace_alter_table (this=0x7f94100687a8, altered_table=0x7f94081078c0, ha_alter_info=0x7f947c18eb30, commit=true) at /home/elenst/git/bb-10.3-marko-instant-column/sql/ha_partition.cc:8381
# 2017-09-26T23:28:33 [42660] #12 0x000055eac9f5a8a0 in handler::ha_commit_inplace_alter_table (this=0x7f94100687a8, altered_table=0x7f94081078c0, ha_alter_info=0x7f947c18eb30, commit=true) at /home/elenst/git/bb-10.3-marko-instant-column/sql/handler.cc:4251
# 2017-09-26T23:28:33 [42660] #13 0x000055eac9d61368 in mysql_inplace_alter_table (thd=0x7f9408000b00, table_list=0x7f94080137d8, table=0x7f9410067b80, altered_table=0x7f94081078c0, ha_alter_info=0x7f947c18eb30, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f947c18eba0, alter_ctx=0x7f947c18f760) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_table.cc:7229
# 2017-09-26T23:28:33 [42660] #14 0x000055eac9d66626 in mysql_alter_table (thd=0x7f9408000b00, new_db=0x0, new_name=0x0, create_info=0x7f947c190360, table_list=0x7f94080137d8, alter_info=0x7f947c1902b0, order_num=0, order=0x0, ignore=false) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_table.cc:9203
# 2017-09-26T23:28:33 [42660] #15 0x000055eac9d68e72 in mysql_recreate_table (thd=0x7f9408000b00, table_list=0x7f94080137d8, table_copy=false) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_table.cc:9984
# 2017-09-26T23:28:33 [42660] #16 0x000055eac9deff39 in admin_recreate_table (thd=0x7f9408000b00, table_list=0x7f94080137d8) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_admin.cc:59
# 2017-09-26T23:28:33 [42660] #17 0x000055eac9df322d in mysql_admin_table(THD *, TABLE_LIST *, HA_CHECK_OPT *, const char *, thr_lock_type, bool, bool, uint, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *), struct {...}, int (*)(THD *, TABLE_LIST *, HA_CHECK_OPT *)) (thd=0x7f9408000b00, tables=0x7f94080137d8, check_opt=0x7f9408005698, operator_name=0x55eaca7ee770 "optimize", lock_type=TL_WRITE, open_for_modify=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(handler * const, THD *, HA_CHECK_OPT *)) 0x55eac9f5a2e8 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_admin.cc:1027
# 2017-09-26T23:28:33 [42660] #18 0x000055eac9df455d in Sql_cmd_optimize_table::execute (this=0x7f9408013df0, thd=0x7f9408000b00) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_admin.cc:1367
# 2017-09-26T23:28:33 [42660] #19 0x000055eac9c989d1 in mysql_execute_command (thd=0x7f9408000b00) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_parse.cc:6235
# 2017-09-26T23:28:33 [42660] #20 0x000055eac9c9d51e in mysql_parse (thd=0x7f9408000b00, rawbuf=0x7f94080136c8 "OPTIMIZE TABLE `A` /* QNO 387 CON_ID 20 */", length=42, parser_state=0x7f947c191660, is_com_multi=false, is_next_command=false) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_parse.cc:7920
# 2017-09-26T23:28:33 [42660] #21 0x000055eac9c8a9f8 in dispatch_command (command=COM_QUERY, thd=0x7f9408000b00, packet=0x7f940800af01 "", packet_length=43, is_com_multi=false, is_next_command=false) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_parse.cc:1819
# 2017-09-26T23:28:33 [42660] #22 0x000055eac9c89453 in do_command (thd=0x7f9408000b00) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_parse.cc:1370
# 2017-09-26T23:28:33 [42660] #23 0x000055eac9ddfcdb in do_handle_one_connection (connect=0x55eacd7c5540) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_connect.cc:1418
# 2017-09-26T23:28:33 [42660] #24 0x000055eac9ddfa5b in handle_one_connection (arg=0x55eacd7c5540) at /home/elenst/git/bb-10.3-marko-instant-column/sql/sql_connect.cc:1324
# 2017-09-26T23:28:33 [42660] #25 0x00007f949a5f76ba in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
# 2017-09-26T23:28:33 [42660] #26 0x00007f9499a8c82d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Comment by Marko Mäkelä [ 2017-09-27 ]

I fixed #9, and also fixed ADD COLUMN, DROP INDEX.
I filed MDEV-13918 for the assertion failure in commit_try_rebuild(). It is a race condition between INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS and DDL, introduced in 5.7.10 and 10.2.2.

Comment by Marko Mäkelä [ 2017-09-27 ]

Issue #13 was caused by invoking dict_index_t::remove_instant() too early in TRUNCATE, before the pages were freed (and possible adaptive hash index entries dropped).

Comment by Elena Stepanova [ 2017-09-27 ]

#14 - Assertion `index->same(*old_index, true)' (Instant ADD COLUMN enabled)

bb-10.3-marko 0009bb265c5c with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4184: bool innobase_add_instant_try(Alter_inplace_info*, ha_innobase_inplace_ctx*, const TABLE*, const TABLE*, trx_t*): Assertion `index->same(*old_index, true)' failed.
170927 18:48:34 [ERROR] mysqld got signal 6 ;
 
#7  0x00007ff9b7c06ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055c44c9d73bf in innobase_add_instant_try (ha_alter_info=0x7ff9a87f4530, ctx=0x7ff968016110, altered_table=0x7ff968065fd0, table=0x7ff968063c20, trx=0x7ff9b1b32ca8) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4184
#9  0x000055c44c9eaef1 in commit_try_norebuild (ha_alter_info=0x7ff9a87f4530, ctx=0x7ff968016110, altered_table=0x7ff968065fd0, old_table=0x7ff968063c20, trx=0x7ff9b1b32ca8, table_name=0x7ff96803329d "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8558
#10 0x000055c44c9e3e4f in ha_innobase::commit_inplace_alter_table (this=0x7ff968064848, altered_table=0x7ff968065fd0, ha_alter_info=0x7ff9a87f4530, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9080
#11 0x000055c44c683222 in handler::ha_commit_inplace_alter_table (this=0x7ff968064848, altered_table=0x7ff968065fd0, ha_alter_info=0x7ff9a87f4530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#12 0x000055c44c48a622 in mysql_inplace_alter_table (thd=0x7ff968000b00, table_list=0x7ff968014ae0, table=0x7ff968063c20, altered_table=0x7ff968065fd0, ha_alter_info=0x7ff9a87f4530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7ff9a87f45a0, alter_ctx=0x7ff9a87f5160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#13 0x000055c44c48f906 in mysql_alter_table (thd=0x7ff968000b00, new_db=0x7ff9680150f0 "test", new_name=0x0, create_info=0x7ff9a87f5d70, table_list=0x7ff968014ae0, alter_info=0x7ff9a87f5cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#14 0x000055c44c50e485 in Sql_cmd_alter_table::execute (this=0x7ff968015200, thd=0x7ff968000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#15 0x000055c44c3c17e7 in mysql_execute_command (thd=0x7ff968000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#16 0x000055c44c3c6090 in mysql_parse (thd=0x7ff968000b00, rawbuf=0x7ff9680149f8 "ALTER TABLE t1 ADD COLUMN c INT", length=31, parser_state=0x7ff9a87f7610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#17 0x000055c44c3b3858 in dispatch_command (command=COM_QUERY, thd=0x7ff968000b00, packet=0x7ff96808f4e1 "ALTER TABLE t1 ADD COLUMN c INT", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#18 0x000055c44c3b22ba in do_command (thd=0x7ff968000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#19 0x000055c44c508ff0 in do_handle_one_connection (connect=0x55c44ef123c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#20 0x000055c44c508d7d in handle_one_connection (arg=0x55c44ef123c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#21 0x000055c44c981e3c in pfs_spawn_thread (arg=0x55c44ef1ad00) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#22 0x00007ff9b9b4b494 in start_thread (arg=0x7ff9a87f8700) at pthread_create.c:333
#23 0x00007ff9b7cc393f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The failure is reasonably reproducible, although the test case is non-deterministic (N=5 is usually enough for me).

# Run with --repeat=N
 
--source include/have_innodb.inc
 
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 ADD COLUMN b INT;
--send
	ALTER TABLE t1 ADD COLUMN c INT;
 
--connect (con1,localhost,root,,test)
DELETE FROM t1;
--disconnect con1
 
--connection default
--reap
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-27 ]

#15 - Assertion `!rec_is_default_row(rec, index)' (Instant ADD COLUMN enabled)

bb-10.3-marko 0009bb265c5c with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/lock/lock0lock.cc:417: bool lock_clust_rec_cons_read_sees(const rec_t*, dict_index_t*, const ulint*, ReadView*): Assertion `!rec_is_default_row(rec, index)' failed.
170928  2:25:58 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f2e40c2aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055de9126a0d4 in lock_clust_rec_cons_read_sees (rec=0x7f2e3673007f "\200", index=0x7f2de800e438, offsets=0x7f2e3c04c190, view=0x55de93872cb0) at /data/src/bb-10.3-marko/storage/innobase/lock/lock0lock.cc:417
#9  0x000055de91387793 in row_sel_try_search_shortcut_for_mysql (out_rec=0x7f2e3c04b988, prebuilt=0x7f2de814fe98, offsets=0x7f2e3c04b9b8, heap=0x7f2e3c04b9b0, mtr=0x7f2e3c04c4b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:3927
#10 0x000055de91388a90 in row_search_mvcc (buf=0x7f2de8033728 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f2de814fe98, match_mode=1, direction=0) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:4349
#11 0x000055de911f2a1c in ha_innobase::index_read (this=0x7f2de814e5a8, buf=0x7f2de8033728 "\377", key_ptr=0x7f2de801a778 "", key_len=4, find_flag=HA_READ_KEY_EXACT) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:9695
#12 0x000055de90ed53f2 in handler::index_read_map (this=0x7f2de814e5a8, buf=0x7f2de8033728 "\377", key=0x7f2de801a778 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/bb-10.3-marko/sql/handler.h:3174
#13 0x000055de90ecaddc in handler::ha_index_read_map (this=0x7f2de814e5a8, buf=0x7f2de8033728 "\377", key=0x7f2de801a778 "", keypart_map=1, find_flag=HA_READ_KEY_EXACT) at /data/src/bb-10.3-marko/sql/handler.cc:2643
#14 0x000055de90c77db3 in join_read_key2 (thd=0x7f2de8000b00, tab=0x7f2de80473d8, table=0x7f2de814d980, table_ref=0x7f2de8047618) at /data/src/bb-10.3-marko/sql/sql_select.cc:19542
#15 0x000055de90c77bcf in join_read_key (tab=0x7f2de80473d8) at /data/src/bb-10.3-marko/sql/sql_select.cc:19489
#16 0x000055de90c765ed in sub_select (join=0x7f2de8017dd0, join_tab=0x7f2de80473d8, end_of_records=false) at /data/src/bb-10.3-marko/sql/sql_select.cc:18867
#17 0x000055de90c76d38 in evaluate_join_record (join=0x7f2de8017dd0, join_tab=0x7f2de8047028, error=0) at /data/src/bb-10.3-marko/sql/sql_select.cc:19090
#18 0x000055de90c767dc in sub_select (join=0x7f2de8017dd0, join_tab=0x7f2de8047028, end_of_records=false) at /data/src/bb-10.3-marko/sql/sql_select.cc:18909
#19 0x000055de90c75bb8 in do_select (join=0x7f2de8017dd0, procedure=0x0) at /data/src/bb-10.3-marko/sql/sql_select.cc:18410
#20 0x000055de90c4e6b4 in JOIN::exec_inner (this=0x7f2de8017dd0) at /data/src/bb-10.3-marko/sql/sql_select.cc:3547
#21 0x000055de90c4db4c in JOIN::exec (this=0x7f2de8017dd0) at /data/src/bb-10.3-marko/sql/sql_select.cc:3342
#22 0x000055de90c4ed2d in mysql_select (thd=0x7f2de8000b00, tables=0x7f2de8014c70, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x7f2de8017db0, unit=0x7f2de80047c0, select_lex=0x7f2de8004ef8) at /data/src/bb-10.3-marko/sql/sql_select.cc:3742
#23 0x000055de90c4326c in handle_select (thd=0x7f2de8000b00, lex=0x7f2de80046f8, result=0x7f2de8017db0, setup_tables_done_option=0) at /data/src/bb-10.3-marko/sql/sql_select.cc:378
#24 0x000055de90c0e778 in execute_sqlcom_select (thd=0x7f2de8000b00, all_tables=0x7f2de8014c70) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6466
#25 0x000055de90c04d07 in mysql_execute_command (thd=0x7f2de8000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:3731
#26 0x000055de90c12090 in mysql_parse (thd=0x7f2de8000b00, rawbuf=0x7f2de80149f8 "SELECT * FROM INFORMATION_SCHEMA.COLUMNS LEFT JOIN t1 ON ( NUMERIC_SCALE = pk )", length=79, parser_state=0x7f2e3c04e610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#27 0x000055de90bff858 in dispatch_command (command=COM_QUERY, thd=0x7f2de8000b00, packet=0x7f2de808f421 "", packet_length=79, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#28 0x000055de90bfe2ba in do_command (thd=0x7f2de8000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#29 0x000055de90d54ff0 in do_handle_one_connection (connect=0x55de936e3a00) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#30 0x000055de90d54d7d in handle_one_connection (arg=0x55de936e3a00) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#31 0x000055de911cde3c in pfs_spawn_thread (arg=0x55de936ec340) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#32 0x00007f2e42b6f494 in start_thread (arg=0x7f2e3c04f700) at pthread_create.c:333
#33 0x00007f2e40ce793f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
ALTER TABLE t1 ADD COLUMN c INT;
SELECT * FROM INFORMATION_SCHEMA.COLUMNS LEFT JOIN t1 ON ( NUMERIC_SCALE = pk );
 
# Cleanup
DROP TABLE t1;

Comment by Marko Mäkelä [ 2017-09-28 ]

Issue #14 looks like it was introduced by my changes yesterday that would remove the ‘instantness’ of a table when the table becomes empty. Here is a reliable test case:

SET @save_frequency= @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency=1;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
ALTER TABLE t1 ADD COLUMN b INT;
SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL enter WAIT_FOR delete';
--send
ALTER TABLE t1 ADD COLUMN c INT;
connect (dml,localhost,root,,);
SET DEBUG_SYNC='now WAIT_FOR enter';
DELETE FROM t1;
--source include/wait_all_purged.inc
SET DEBUG_SYNC='now SIGNAL delete';
connection default;
reap;
DROP TABLE t1;
SET DEBUG_SYNC='RESET';
disconnect dml;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency;

Here, the previous 'instant-add-ness' of the table was removed while executing a subsequent instant ADD COLUMN operation. We must correctly merge the 'instant ADD' status of the two index objects. Also, if the table is empty at the time we commit the operation, we should call dict_index_t::remove_instant() instead of inserting the ‘default row’ record.

Issue #15 is an older problem that was caught by the debug assertions that I added yesterday, to catch any high-level access to the ‘default row’ pseudo-record. I forgot to copy the logic from row_sel_try_search_shortcut() to row_sel_try_search_shortcut_for_mysql().

Comment by Elena Stepanova [ 2017-09-28 ]

#16 - Assertion `ptr' (Instant ADD COLUMN disabled)

bb-10.3-marko f6be3a0024b

mysqld: /data/src/bb-10.3-marko-vanilla/storage/innobase/include/ut0byte.ic:109: void* ut_align_down(const void*, ulint): Assertion `ptr' failed.
170928 20:05:08 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f633a277ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00005609edd30420 in ut_align_down (ptr=0x0, align_no=16384) at /data/src/bb-10.3-marko-vanilla/storage/innobase/include/ut0byte.ic:109
#9  0x00005609edd5fa39 in page_align (ptr=0x0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/include/page0page.h:213
#10 0x00005609edd8853c in page_rec_is_comp (rec=0x0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/include/page0page.h:284
#11 0x00005609eddd78e5 in page_rec_is_default_row (rec=0x0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/include/page0page.h:296
#12 0x00005609eddce911 in lock_rec_print (file=0x5609f0b449b0, lock=0x5609f04fc8e0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:5638
#13 0x00005609eddd5eb2 in DeadlockChecker::print (lock=0x5609f04fc8e0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:8112
#14 0x00005609eddd658a in DeadlockChecker::notify (this=0x7f63340c08f0, lock=0x5609f04fc8e0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:8252
#15 0x00005609eddd6c68 in DeadlockChecker::search (this=0x7f63340c08f0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:8374
#16 0x00005609eddd71bc in DeadlockChecker::check_and_resolve (lock=0x5609f04fcb90, trx=0x7f63341a3ca8) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:8523
#17 0x00005609eddc400d in RecLock::deadlock_check (this=0x7f63340c0a30, lock=0x5609f04fcb90) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:2158
#18 0x00005609eddc48f2 in RecLock::add_to_waitq (this=0x7f63340c0a30, wait_for=0x5609f04fe260, prdt=0x0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:2282
#19 0x00005609eddc5d29 in lock_rec_lock_slow (impl=0, mode=3, block=0x7f632f7d4900, heap_no=2, index=0x7f62e000e1d8, thr=0x7f62e401c3b0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:2578
#20 0x00005609eddc613b in lock_rec_lock (impl=false, mode=3, block=0x7f632f7d4900, heap_no=2, index=0x7f62e000e1d8, thr=0x7f62e401c3b0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:2647
#21 0x00005609eddd39c5 in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f632f7d4900, rec=0x7f632fcc007e "", index=0x7f62e000e1d8, offsets=0x7f63340c1570, mode=LOCK_X, gap_mode=0, thr=0x7f62e401c3b0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:7224
#22 0x00005609eded5f85 in sel_set_rec_lock (pcur=0x7f62e401be60, rec=0x7f632fcc007e "", index=0x7f62e000e1d8, offsets=0x7f63340c1570, mode=3, type=0, thr=0x7f62e401c3b0, mtr=0x7f63340c1890) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0sel.cc:1247
#23 0x00005609ededef78 in row_search_mvcc (buf=0x7f62e4006728 "\377", ' ' <repeats 12 times>, mode=PAGE_CUR_G, prebuilt=0x7f62e401bc98, match_mode=0, direction=0) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0sel.cc:4991
#24 0x00005609edd46a1c in ha_innobase::index_read (this=0x7f62e401b4a8, buf=0x7f62e4006728 "\377", ' ' <repeats 12 times>, key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at /data/src/bb-10.3-marko-vanilla/storage/innobase/handler/ha_innodb.cc:9695
#25 0x00005609edd47e36 in ha_innobase::index_first (this=0x7f62e401b4a8, buf=0x7f62e4006728 "\377", ' ' <repeats 12 times>) at /data/src/bb-10.3-marko-vanilla/storage/innobase/handler/ha_innodb.cc:10133
#26 0x00005609edd480b6 in ha_innobase::rnd_next (this=0x7f62e401b4a8, buf=0x7f62e4006728 "\377", ' ' <repeats 12 times>) at /data/src/bb-10.3-marko-vanilla/storage/innobase/handler/ha_innodb.cc:10229
#27 0x00005609eda1e78a in handler::ha_rnd_next (this=0x7f62e401b4a8, buf=0x7f62e4006728 "\377", ' ' <repeats 12 times>) at /data/src/bb-10.3-marko-vanilla/sql/handler.cc:2593
#28 0x00005609edb90f08 in rr_sequential (info=0x7f63340c21e0) at /data/src/bb-10.3-marko-vanilla/sql/records.cc:485
#29 0x00005609ed6d04dd in READ_RECORD::read_record (this=0x7f63340c21e0) at /data/src/bb-10.3-marko-vanilla/sql/records.h:73
#30 0x00005609ed849392 in mysql_update (thd=0x7f62e4000b00, table_list=0x7f62e4013710, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f63340c2770, updated_return=0x7f63340c2820) at /data/src/bb-10.3-marko-vanilla/sql/sql_update.cc:735
#31 0x00005609ed75b1d4 in mysql_execute_command (thd=0x7f62e4000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:4538
#32 0x00005609ed766090 in mysql_parse (thd=0x7f62e4000b00, rawbuf=0x7f62e4013638 "UPDATE t1 SET i = 1", length=19, parser_state=0x7f63340c3610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:7920
#33 0x00005609ed753858 in dispatch_command (command=COM_QUERY, thd=0x7f62e4000b00, packet=0x7f62e400af01 "UPDATE t1 SET i = 1", packet_length=19, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:1819
#34 0x00005609ed7522ba in do_command (thd=0x7f62e4000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:1370
#35 0x00005609ed8a8ff0 in do_handle_one_connection (connect=0x5609f09fe4c0) at /data/src/bb-10.3-marko-vanilla/sql/sql_connect.cc:1418
#36 0x00005609ed8a8d7d in handle_one_connection (arg=0x5609f09fe4c0) at /data/src/bb-10.3-marko-vanilla/sql/sql_connect.cc:1324
#37 0x00005609edd21e3c in pfs_spawn_thread (arg=0x5609f0a071b0) at /data/src/bb-10.3-marko-vanilla/storage/perfschema/pfs.cc:1862
#38 0x00007f633c1bc494 in start_thread (arg=0x7f63340c4700) at pthread_create.c:333
#39 0x00007f633a33493f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The test case is non-deterministic, but fails for me reasonably well, usually within 5 attempts. Run also with --force-restart.

# Run with --repeat=N --force-restart
 
--source include/have_innodb.inc
 
CREATE TABLE t1 (c CHAR(12), i INT, KEY(c)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL,NULL),(NULL,NULL);
 
CREATE TABLE t2 (f INT) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1),(2);
 
--connect (con1,localhost,root,,test)
BEGIN;
 
--connection default
SET innodb_lock_wait_timeout= 2, lock_wait_timeout= 3;
--send
	DELETE FROM t1;
 
--connection con1
--send
	SELECT c FROM t1 LOCK IN SHARE MODE;
 
--connection default
--error 0,ER_LOCK_WAIT_TIMEOUT
--reap
 
--connect (con2,localhost,root,,test)
--send
	INSERT IGNORE INTO t1 (i) SELECT f FROM t2;
 
--connection con1
--reap
--error ER_NO_SUCH_TABLE
DELETE FROM non_existing_table;
UPDATE t1 SET i = 1;
 
# Cleanup
 
--disconnect con1
 
--connection con2
--error 0,ER_LOCK_DEADLOCK
--reap
--disconnect con2
--connection default
DROP TABLE t1, t2;

Comment by Elena Stepanova [ 2017-09-28 ]

#17 - Assertion `n_fields == index.n_fields'(Instant ADD COLUMN enabled)

bb-10.3-marko f6be3a0024b with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/data/data0data.cc:54: void dtuple_t::trim(const dict_index_t&): Assertion `n_fields == index.n_fields' failed.
170928 22:34:45 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f6e0b8f9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055a8f14d705a in dtuple_t::trim (this=0x7f6db40383b8, index=...) at /data/src/bb-10.3-marko/storage/innobase/data/data0data.cc:54
#9  0x000055a8f13337c9 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f6db400e308, n_uniq=1, entry=0x7f6db40383b8, n_ext=0, thr=0x7f6db41509d0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2666
#10 0x000055a8f1335307 in row_ins_clust_index_entry (index=0x7f6db400e308, entry=0x7f6db40383b8, thr=0x7f6db41509d0, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3241
#11 0x000055a8f13ba997 in row_upd_clust_rec_by_insert (node=0x7f6db41506a0, index=0x7f6db400e308, thr=0x7f6db41509d0, referenced=0, foreign=0, mtr=0x7f6e0451f7b0) at /data/src/bb-10.3-marko/storage/innobase/row/row0upd.cc:2784
#12 0x000055a8f13bbf05 in row_upd_clust_step (node=0x7f6db41506a0, thr=0x7f6db41509d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0upd.cc:3207
#13 0x000055a8f13bc22b in row_upd (node=0x7f6db41506a0, thr=0x7f6db41509d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0upd.cc:3278
#14 0x000055a8f13bc722 in row_upd_step (thr=0x7f6db41509d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0upd.cc:3422
#15 0x000055a8f13574b0 in row_update_for_mysql (prebuilt=0x7f6db414feb8) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:1949
#16 0x000055a8f11fcb02 in ha_innobase::update_row (this=0x7f6db414e5c8, old_row=0x7f6db400a488 "\377\001", new_row=0x7f6db400a478 "\377") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:9226
#17 0x000055a8f0edecf4 in handler::ha_update_row (this=0x7f6db414e5c8, old_data=0x7f6db400a488 "\377\001", new_data=0x7f6db400a478 "\377") at /data/src/bb-10.3-marko/sql/handler.cc:6054
#18 0x000055a8f0d00042 in mysql_update (thd=0x7f6db4000b00, table_list=0x7f6db4014ae0, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f6e04520770, updated_return=0x7f6e04520820) at /data/src/bb-10.3-marko/sql/sql_update.cc:809
#19 0x000055a8f0c121d4 in mysql_execute_command (thd=0x7f6db4000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4538
#20 0x000055a8f0c1d090 in mysql_parse (thd=0x7f6db4000b00, rawbuf=0x7f6db40149f8 "UPDATE t1 SET pk = DEFAULT", length=26, parser_state=0x7f6e04521610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#21 0x000055a8f0c0a858 in dispatch_command (command=COM_QUERY, thd=0x7f6db4000b00, packet=0x7f6db408f4e1 "UPDATE t1 SET pk = DEFAULT", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#22 0x000055a8f0c092ba in do_command (thd=0x7f6db4000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#23 0x000055a8f0d5fff0 in do_handle_one_connection (connect=0x55a8f45203c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#24 0x000055a8f0d5fd7d in handle_one_connection (arg=0x55a8f45203c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#25 0x000055a8f11d8e3c in pfs_spawn_thread (arg=0x55a8f4528d00) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#26 0x00007f6e0d83e494 in start_thread (arg=0x7f6e04522700) at pthread_create.c:333
#27 0x00007f6e0b9b693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 () VALUES ();
ALTER TABLE t1 ADD COLUMN f INT;
UPDATE t1 SET pk = DEFAULT;
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-28 ]

#18 - Assertion `node->pcur.btr_cur.low_match == node->ref->n_fields' (Instant ADD COLUMN enabled)

bb-10.3-marko f6be3a0024b with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/row/row0umod.cc:1179: void row_undo_mod_parse_undo_rec(undo_node_t*, ulint): Assertion `node->pcur.btr_cur.low_match == node->ref->n_fields' failed.
170929  0:34:49 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fe7696b0ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000556f8df74710 in row_undo_mod_parse_undo_rec (node=0x7fe710151da8, dict_locked=0) at /data/src/bb-10.3-marko/storage/innobase/row/row0umod.cc:1179
#9  0x0000556f8df7496f in row_undo_mod (node=0x7fe710151da8, thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/row/row0umod.cc:1214
#10 0x0000556f8dd5d1a2 in row_undo (node=0x7fe710151da8, thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/row/row0undo.cc:305
#11 0x0000556f8dd5d2ce in row_undo_step (thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/row/row0undo.cc:346
#12 0x0000556f8dcadfa2 in que_thr_step (thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1052
#13 0x0000556f8dcae1e9 in que_run_threads_low (thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1116
#14 0x0000556f8dcae3cb in que_run_threads (thr=0x7fe710038910) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1156
#15 0x0000556f8ddc30cf in trx_rollback_to_savepoint_low (trx=0x7fe75f3fe878, savept=0x0) at /data/src/bb-10.3-marko/storage/innobase/trx/trx0roll.cc:118
#16 0x0000556f8ddc344e in trx_rollback_for_mysql_low (trx=0x7fe75f3fe878) at /data/src/bb-10.3-marko/storage/innobase/trx/trx0roll.cc:180
#17 0x0000556f8ddc3819 in trx_rollback_low (trx=0x7fe75f3fe878) at /data/src/bb-10.3-marko/storage/innobase/trx/trx0roll.cc:212
#18 0x0000556f8ddc3d0f in trx_rollback_for_mysql (trx=0x7fe75f3fe878) at /data/src/bb-10.3-marko/storage/innobase/trx/trx0roll.cc:291
#19 0x0000556f8dba125e in innobase_rollback (hton=0x556f9062bc00, thd=0x7fe710000b00, rollback_trx=true) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:4734
#20 0x0000556f8d881b56 in ha_rollback_trans (thd=0x7fe710000b00, all=true) at /data/src/bb-10.3-marko/sql/handler.cc:1679
#21 0x0000556f8d724e23 in trans_rollback (thd=0x7fe710000b00) at /data/src/bb-10.3-marko/sql/transaction.cc:415
#22 0x0000556f8d5c5d16 in mysql_execute_command (thd=0x7fe710000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:5789
#23 0x0000556f8d5cc090 in mysql_parse (thd=0x7fe710000b00, rawbuf=0x7fe7100149f8 "ROLLBACK", length=8, parser_state=0x7fe764148610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#24 0x0000556f8d5b9858 in dispatch_command (command=COM_QUERY, thd=0x7fe710000b00, packet=0x7fe71008f4e1 "ROLLBACK", packet_length=8, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#25 0x0000556f8d5b82ba in do_command (thd=0x7fe710000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#26 0x0000556f8d70eff0 in do_handle_one_connection (connect=0x556f90c363c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#27 0x0000556f8d70ed7d in handle_one_connection (arg=0x556f90c363c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#28 0x0000556f8db87e3c in pfs_spawn_thread (arg=0x556f90c3ed00) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#29 0x00007fe76b5f5494 in start_thread (arg=0x7fe764149700) at pthread_create.c:333
#30 0x00007fe76976d93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (-1,1);
SET AUTOCOMMIT=OFF;
ALTER TABLE t1 ADD COLUMN s CHAR(8);
DELETE FROM t1 LIMIT 5;
ROLLBACK;
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-28 ]

#19 - Assertion `!buf_block' (Instant ADD COLUMN enabled)

bb-10.3-marko f6be3a0024b with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/mem/mem0mem.cc:414: void mem_heap_block_free(mem_heap_t*, mem_block_t*): Assertion `!buf_block' failed.
170929  1:14:56 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f44c5736ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00005602ac4cbf5b in mem_heap_block_free (heap=0x7f4470093e90, block=0x7f4470093e90) at /data/src/bb-10.3-marko/storage/innobase/mem/mem0mem.cc:414
#9  0x00005602ac541c91 in mem_heap_free (heap=0x7f4470093e90) at /data/src/bb-10.3-marko/storage/innobase/include/mem0mem.ic:535
#10 0x00005602ac54cd38 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f447014f428, n_uniq=1, entry=0x7f4470150ed8, n_ext=0, thr=0x7f447003ea38, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:2797
#11 0x00005602ac54e307 in row_ins_clust_index_entry (index=0x7f447014f428, entry=0x7f4470150ed8, thr=0x7f447003ea38, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3241
#12 0x00005602ac54e746 in row_ins_index_entry (index=0x7f447014f428, entry=0x7f4470150ed8, thr=0x7f447003ea38) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3356
#13 0x00005602ac54ecf4 in row_ins_index_entry_step (node=0x7f447003e3f0, thr=0x7f447003ea38) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3506
#14 0x00005602ac54f0cf in row_ins (node=0x7f447003e3f0, thr=0x7f447003ea38) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3648
#15 0x00005602ac54f924 in row_ins_step (thr=0x7f447003ea38) at /data/src/bb-10.3-marko/storage/innobase/row/row0ins.cc:3852
#16 0x00005602ac56f0a6 in row_insert_for_mysql (mysql_rec=0x7f4470152f78 "\277\377\002", prebuilt=0x7f447003dd18) at /data/src/bb-10.3-marko/storage/innobase/row/row0mysql.cc:1489
#17 0x00005602ac413cf6 in ha_innobase::write_row (this=0x7f447000bfc8, record=0x7f4470152f78 "\277\377\002") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:8443
#18 0x00005602ac0f79ab in handler::ha_write_row (this=0x7f447000bfc8, buf=0x7f4470152f78 "\277\377\002") at /data/src/bb-10.3-marko/sql/handler.cc:6022
#19 0x00005602abdfa923 in write_record (thd=0x7f4470000b00, table=0x7f4470152350, info=0x7f44b83443c0) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1654
#20 0x00005602abdf837e in mysql_insert (thd=0x7f4470000b00, table_list=0x7f4470014af0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_REPLACE, ignore=false) at /data/src/bb-10.3-marko/sql/sql_insert.cc:1057
#21 0x00005602abe2b867 in mysql_execute_command (thd=0x7f4470000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4683
#22 0x00005602abe36090 in mysql_parse (thd=0x7f4470000b00, rawbuf=0x7f44700149f8 "REPLACE INTO t1 (c7) VALUES ('bar')", length=35, parser_state=0x7f44b8345610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#23 0x00005602abe23858 in dispatch_command (command=COM_QUERY, thd=0x7f4470000b00, packet=0x7f447008f4e1 "REPLACE INTO t1 (c7) VALUES ('bar')", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#24 0x00005602abe222ba in do_command (thd=0x7f4470000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#25 0x00005602abf78ff0 in do_handle_one_connection (connect=0x5602af4933c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#26 0x00005602abf78d7d in handle_one_connection (arg=0x5602af4933c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#27 0x00005602ac3f1e3c in pfs_spawn_thread (arg=0x5602af49bd00) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#28 0x00007f44c767b494 in start_thread (arg=0x7f44b8346700) at pthread_create.c:333
#29 0x00007f44c57f393f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
CREATE TABLE t1 (
 pk INT AUTO_INCREMENT PRIMARY KEY,
 c1 INT,
 c2 VARCHAR(255),
 c3 VARCHAR(255),
 c4 INT,
 c5 INT,
 c6 INT,
 c7 VARCHAR(255),
 c8 TIMESTAMP NULL
) ENGINE=InnoDB;
 
INSERT INTO t1 VALUES (NULL,1,NULL,'foo',NULL,1,NULL,NULL,'2011-11-11 00:00:00');
ALTER TABLE t1 ADD COLUMN f INT;
REPLACE INTO t1 (c7) VALUES ('bar');
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-29 ]

#20 - Failing assertion: !other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE) (Instant ADD COLUMN disabled)

bb-10.3-marko f6be3a0024b9

2017-09-29 18:57:48 0x7f03200f7700  InnoDB: Assertion failure in file /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc line 6394
InnoDB: Failing assertion: !other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE)
 
#5  0x00007f032d5613fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
#6  0x000055d4e6edfb52 in ut_dbg_assertion_failed (expr=0x55d4e73cd2e0 "!other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE)", file=0x55d4e73cae70 "/data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc", line=6394) at /data/src/bb-10.3-marko-vanilla/storage/innobase/ut/ut0dbg.cc:61
#7  0x000055d4e6d306d7 in lock_rec_queue_validate (locked_lock_trx_sys=0, block=0x7f0322bd2900, rec=0x7f03230bc07d "\200", index=0x7f02dc00e368, offsets=0x7f03200f1f00) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:6392
#8  0x000055d4e6d33a9d in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f0322bd2900, rec=0x7f03230bc07d "\200", index=0x7f02dc00e368, offsets=0x7f03200f1f00, mode=LOCK_S, gap_mode=0, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/lock/lock0lock.cc:7230
#9  0x000055d4e6dd9416 in row_ins_set_shared_rec_lock (type=0, block=0x7f0322bd2900, rec=0x7f03230bc07d "\200", index=0x7f02dc00e368, offsets=0x7f03200f1f00, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:1520
#10 0x000055d4e6ddb07c in row_ins_duplicate_error_in_clust (flags=0, cursor=0x7f03200f2300, entry=0x7f02d00344a8, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:2356
#11 0x000055d4e6ddc105 in row_ins_clust_index_entry_low (flags=0, mode=2, index=0x7f02dc00e368, n_uniq=1, entry=0x7f02d00344a8, n_ext=0, thr=0x7f02d0033468, dup_chk_only=false) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:2699
#12 0x000055d4e6dddb15 in row_ins_clust_index_entry (index=0x7f02dc00e368, entry=0x7f02d00344a8, thr=0x7f02d0033468, n_ext=0, dup_chk_only=false) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:3241
#13 0x000055d4e6dddf54 in row_ins_index_entry (index=0x7f02dc00e368, entry=0x7f02d00344a8, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:3356
#14 0x000055d4e6dde502 in row_ins_index_entry_step (node=0x7f02d00331f0, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:3506
#15 0x000055d4e6dde8dd in row_ins (node=0x7f02d00331f0, thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:3648
#16 0x000055d4e6ddf132 in row_ins_step (thr=0x7f02d0033468) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0ins.cc:3852
#17 0x000055d4e6dfe8b4 in row_insert_for_mysql (mysql_rec=0x7f02d0032838 "\377", prebuilt=0x7f02d0032c98) at /data/src/bb-10.3-marko-vanilla/storage/innobase/row/row0mysql.cc:1489
#18 0x000055d4e6ca3cf6 in ha_innobase::write_row (this=0x7f02d0032048, record=0x7f02d0032838 "\377") at /data/src/bb-10.3-marko-vanilla/storage/innobase/handler/ha_innodb.cc:8443
#19 0x000055d4e69879ab in handler::ha_write_row (this=0x7f02d0032048, buf=0x7f02d0032838 "\377") at /data/src/bb-10.3-marko-vanilla/sql/handler.cc:6022
#20 0x000055d4e668a9f9 in write_record (thd=0x7f02d0000b00, table=0x7f02d0031420, info=0x7f03200f3520) at /data/src/bb-10.3-marko-vanilla/sql/sql_insert.cc:1929
#21 0x000055d4e668837e in mysql_insert (thd=0x7f02d0000b00, table_list=0x7f02d001f1d8, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-marko-vanilla/sql/sql_insert.cc:1057
#22 0x000055d4e66bb867 in mysql_execute_command (thd=0x7f02d0000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:4683
#23 0x000055d4e6b0147e in sp_instr_stmt::exec_core (this=0x7f02d001c8d0, thd=0x7f02d0000b00, nextp=0x7f03200f47e4) at /data/src/bb-10.3-marko-vanilla/sql/sp_head.cc:3362
#24 0x000055d4e6b00878 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f02d001c918, thd=0x7f02d0000b00, nextp=0x7f03200f47e4, open_tables=false, instr=0x7f02d001c8d0) at /data/src/bb-10.3-marko-vanilla/sql/sp_head.cc:3077
#25 0x000055d4e6b0103e in sp_instr_stmt::execute (this=0x7f02d001c8d0, thd=0x7f02d0000b00, nextp=0x7f03200f47e4) at /data/src/bb-10.3-marko-vanilla/sql/sp_head.cc:3265
#26 0x000055d4e6afb38b in sp_head::execute (this=0x7f02d001ac08, thd=0x7f02d0000b00, merge_da_on_success=true) at /data/src/bb-10.3-marko-vanilla/sql/sp_head.cc:1195
#27 0x000055d4e6afd806 in sp_head::execute_procedure (this=0x7f02d001ac08, thd=0x7f02d0000b00, args=0x7f02d00054c0) at /data/src/bb-10.3-marko-vanilla/sql/sp_head.cc:2053
#28 0x000055d4e66b675f in do_execute_sp (thd=0x7f02d0000b00, sp=0x7f02d001ac08) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:2914
#29 0x000055d4e66b72ba in Sql_cmd_call::execute (this=0x7f02d0013700, thd=0x7f02d0000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:3156
#30 0x000055d4e66c17e7 in mysql_execute_command (thd=0x7f02d0000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:6235
#31 0x000055d4e66c6090 in mysql_parse (thd=0x7f02d0000b00, rawbuf=0x7f02d0013638 "CALL pr(1000)", length=13, parser_state=0x7f03200f6610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:7920
#32 0x000055d4e66b3858 in dispatch_command (command=COM_QUERY, thd=0x7f02d0000b00, packet=0x7f02d000af01 "CALL pr(1000)", packet_length=13, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:1819
#33 0x000055d4e66b22ba in do_command (thd=0x7f02d0000b00) at /data/src/bb-10.3-marko-vanilla/sql/sql_parse.cc:1370
#34 0x000055d4e6808ff0 in do_handle_one_connection (connect=0x55d4e97c8260) at /data/src/bb-10.3-marko-vanilla/sql/sql_connect.cc:1418
#35 0x000055d4e6808d7d in handle_one_connection (arg=0x55d4e97c8260) at /data/src/bb-10.3-marko-vanilla/sql/sql_connect.cc:1324
#36 0x000055d4e6c81e3c in pfs_spawn_thread (arg=0x55d4e97d0f50) at /data/src/bb-10.3-marko-vanilla/storage/perfschema/pfs.cc:1862
#37 0x00007f032f49d494 in start_thread (arg=0x7f03200f7700) at pthread_create.c:333
#38 0x00007f032d61593f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The test case below already has a loop, so there should be no need for --repeat. $loop variable can be adjusted, but it shouldn't be needed – currently for me the full test, e.g. on 10.3 main, takes ~2 minutes; but if it fails, it fails within ~10 seconds from the start and a first 1-2 dozen of iterations.

--source include/have_innodb.inc
 
--let $loop= 1000
 
SET sql_mode='';
 
 CREATE TABLE IF NOT EXISTS t1 (
  pk INT NOT NULL PRIMARY KEY,
  t TIMESTAMP DEFAULT '2012-12-12 00:00:00'
) ENGINE=InnoDB;
 
--delimiter $$
CREATE PROCEDURE pr(n INT)
BEGIN
  DECLARE i INT DEFAULT 0;
  DECLARE CONTINUE HANDLER FOR 1062 BEGIN END;
  WHILE i < n DO
    INSERT INTO t1 () VALUES (),(),();
    SET i= i+1;
  END WHILE;
END $$
--delimiter ;
 
--connect (con1,localhost,root,,)
--send
  eval CALL pr($loop);
  
--connection default
--disable_abort_on_error
--let $n= $loop
while ($n)
{
  INSERT INTO t1 () VALUES (),(),(); 
  START TRANSACTION;
  --dec $n
}
--enable_abort_on_error
 
# Cleanup
 
--connection con1
--reap
--disconnect con1
--connection default
DROP TABLE t1;
DROP PROCEDURE pr;

Comment by Marko Mäkelä [ 2017-09-29 ]

I probably introduced some new regression yesterday or today. I just noticed one bug when running my uncommitted test. I plan to include it in the branch as soon as instant ADD COLUMN can be disabled (after the orphan file creation has been removed and the shutdown resource leaks have been fixed).
Which ones are still reproducible? I hope none before #16.
I noticed and just fixed regression in online table-rebuilding ALTER after instant ADD COLUMN. I think it must have been introduced yesterday. Please try the latest.

Comment by Elena Stepanova [ 2017-09-29 ]

#21 - Assertion `len * templ->mbmaxlen >= templ->mysql_col_len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0)' (Instant ADD COLUMN enabled)

bb-10.3-marko 006f934206bb with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:2932: void row_sel_field_store_in_mysql_format_func(byte*, const mysql_row_templ_t*, const dict_index_t*, ulint, const byte*, ulint): Assertion `len * templ->mbmaxlen >= templ->mysql_col_len || (field_no == templ->icp_rec_field_no && field->prefix_len > 0)' failed.
170929 22:56:00 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f9c331aaee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055a11356fe1b in row_sel_field_store_in_mysql_format_func (dest=0x7f9bdc155386 "   ", templ=0x7f9bdc053d80, index=0x7f9bdc039738, field_no=20, data=0x7f9c2cd940dc " \001", len=0) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:2930
#9  0x000055a1135707d5 in row_sel_store_mysql_field_func (mysql_rec=0x7f9bdc155348 "\377\377\357\377\377\377\377", prebuilt=0x7f9bdc14fa58, rec=0x7f9c2cd940c9 "", index=0x7f9bdc039738, offsets=0x7f9c245a65d0, field_no=20, templ=0x7f9bdc053d80) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:3124
#10 0x000055a113570d33 in row_sel_store_mysql_rec (mysql_rec=0x7f9bdc155348 "\377\377\357\377\377\377\377", prebuilt=0x7f9bdc14fa58, rec=0x7f9c2cd940c9 "", vrow=0x0, rec_clust=false, index=0x7f9bdc039738, offsets=0x7f9c245a65d0) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:3254
#11 0x000055a1135767d7 in row_search_mvcc (buf=0x7f9bdc155348 "\377\377\357\377\377\377\377", mode=PAGE_CUR_G, prebuilt=0x7f9bdc14fa58, match_mode=0, direction=1) at /data/src/bb-10.3-marko/storage/innobase/row/row0sel.cc:5500
#12 0x000055a1133dcaf7 in ha_innobase::general_fetch (this=0x7f9bdc00b798, buf=0x7f9bdc155348 "\377\377\357\377\377\377\377", direction=1, match_mode=0) at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:10024
#13 0x000055a1133dd0ed in ha_innobase::rnd_next (this=0x7f9bdc00b798, buf=0x7f9bdc155348 "\377\377\357\377\377\377\377") at /data/src/bb-10.3-marko/storage/innobase/handler/ha_innodb.cc:10237
#14 0x000055a1130b378a in handler::ha_rnd_next (this=0x7f9bdc00b798, buf=0x7f9bdc155348 "\377\377\357\377\377\377\377") at /data/src/bb-10.3-marko/sql/handler.cc:2593
#15 0x000055a113225f08 in rr_sequential (info=0x7f9c245a71e0) at /data/src/bb-10.3-marko/sql/records.cc:485
#16 0x000055a112d654dd in READ_RECORD::read_record (this=0x7f9c245a71e0) at /data/src/bb-10.3-marko/sql/records.h:73
#17 0x000055a112ede392 in mysql_update (thd=0x7f9bdc000b00, table_list=0x7f9bdc014ad0, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551614, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f9c245a7770, updated_return=0x7f9c245a7820) at /data/src/bb-10.3-marko/sql/sql_update.cc:735
#18 0x000055a112df01d4 in mysql_execute_command (thd=0x7f9bdc000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:4538
#19 0x000055a112dfb090 in mysql_parse (thd=0x7f9bdc000b00, rawbuf=0x7f9bdc0149f8 "UPDATE t1 SET c22 = 1", length=21, parser_state=0x7f9c245a8610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#20 0x000055a112de8858 in dispatch_command (command=COM_QUERY, thd=0x7f9bdc000b00, packet=0x7f9bdc08f4e1 "UPDATE t1 SET c22 = 1", packet_length=21, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#21 0x000055a112de72ba in do_command (thd=0x7f9bdc000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#22 0x000055a112f3dff0 in do_handle_one_connection (connect=0x55a1165c03c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#23 0x000055a112f3dd7d in handle_one_connection (arg=0x55a1165c03c0) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#24 0x000055a1133b6e3c in pfs_spawn_thread (arg=0x55a1165c8d00) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#25 0x00007f9c350ef494 in start_thread (arg=0x7f9c245a9700) at pthread_create.c:333
#26 0x00007f9c3326793f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Reproducible on some previous builds, too

--source include/have_innodb.inc
CREATE TABLE t1 (
 c01 enum('a','b'),
 c02 bit,
 c03 blob,
 c04 enum('c','d'),
 c05 blob,
 c06 decimal,
 c07 char(1),
 c08 int,
 c09 char(1),
 c10 set('e','f'),
 c11 char(1),
 c12 float,
 c13 bit,
 c14 char(1),
 c15 int,
 c16 float,
 c17 decimal,
 c18 char(1) CHARACTER SET utf8 not null default '',
 c19 float,
 c20 set('g','h'),
 c21 char(1),
 c22 int,
 c23 int,
 c24 int,
 c25 set('i','j'),
 c26 decimal,
 c27 float,
 c28 char(1),
 c29 int,
 c30 enum('k','l'),
 c31 decimal,
 c32 char(1),
 c33 decimal,
 c34 bit,
 c35 enum('m','n'),
 c36 set('o','p'),
 c37 enum('q','r'),
 c38 blob,
 c39 decimal,
 c40 blob not null default '',
 c41 char(1),
 c42 int,
 c43 float,
 c44 float,
 c45 enum('s','t'),
 c46 decimal,
 c47 set('u','v'),
 c48 enum('w','x'),
 c49 set('y','z'),
 c50 float
) ENGINE=InnoDB;
INSERT INTO t1 () VALUES  ();
ALTER TABLE t1 ADD COLUMN f INT;
INSERT INTO t1 () VALUES ();
UPDATE t1 SET c22 = 1;
 
# Cleanup
DROP TABLE t1;

Comment by Elena Stepanova [ 2017-09-29 ]

marko,

Which ones are still reproducible? I hope none before #16.

I've rechecked all on 006f934206bb. #1-#15 are not reproducible anymore with the provided test cases (although I suspect that #12 is still there, I had the same assertion failure last night, but apparently it needs a new test case). All of #16-#21 are reproducible.

Comment by Elena Stepanova [ 2017-09-30 ]

#22 - Assertion `flags == BTR_NO_LOCKING_FLAG' (Instant ADD COLUMN enabled)

bb-10.3-marko 006f934206bb with enabled instant ADD COLUMN

mysqld: /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:4208: dberr_t btr_cur_optimistic_update(ulint, btr_cur_t*, ulint**, mem_heap_t**, const upd_t*, ulint, que_thr_t*, trx_id_t, mtr_t*): Assertion `flags == BTR_NO_LOCKING_FLAG' failed.
170930 16:24:22 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fe305c09ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000560538b49644 in btr_cur_optimistic_update (flags=34, cursor=0x7fe300096ea0, offsets=0x7fe300096dd0, heap=0x7fe300096dd8, update=0x7fe2b004cf70, cmpl_info=1, thr=0x7fe2b004d220, trx_id=3079, mtr=0x7fe300096fc0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:4208
#9  0x0000560538b49f20 in btr_cur_pessimistic_update (flags=2, cursor=0x7fe300096ea0, offsets=0x7fe300096dd0, offsets_heap=0x7fe300096dd8, entry_heap=0x7fe2b01552c0, big_rec=0x7fe300096de0, update=0x7fe2b004cf70, cmpl_info=1, thr=0x7fe2b004d220, trx_id=3079, mtr=0x7fe300096fc0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:4383
#10 0x000056053890885f in innobase_add_instant_try (ha_alter_info=0x7fe300098530, ctx=0x7fe2b0018338, altered_table=0x7fe2b00486a0, table=0x7fe2b0054010, trx=0x7fe300336ca8) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:4448
#11 0x000056053891bf0f in commit_try_norebuild (ha_alter_info=0x7fe300098530, ctx=0x7fe2b0018338, altered_table=0x7fe2b00486a0, old_table=0x7fe2b0054010, trx=0x7fe300336ca8, table_name=0x7fe2b000c26d "t1") at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:8648
#12 0x0000560538914509 in ha_innobase::commit_inplace_alter_table (this=0x7fe2b0042b28, altered_table=0x7fe2b00486a0, ha_alter_info=0x7fe300098530, commit=true) at /data/src/bb-10.3-marko/storage/innobase/handler/handler0alter.cc:9170
#13 0x00005605385b2222 in handler::ha_commit_inplace_alter_table (this=0x7fe2b0042b28, altered_table=0x7fe2b00486a0, ha_alter_info=0x7fe300098530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#14 0x0000560538d3eec3 in ha_partition::commit_inplace_alter_table (this=0x7fe2b000e4a8, altered_table=0x7fe2b00486a0, ha_alter_info=0x7fe300098530, commit=true) at /data/src/bb-10.3-marko/sql/ha_partition.cc:8381
#15 0x00005605385b2222 in handler::ha_commit_inplace_alter_table (this=0x7fe2b000e4a8, altered_table=0x7fe2b00486a0, ha_alter_info=0x7fe300098530, commit=true) at /data/src/bb-10.3-marko/sql/handler.cc:4251
#16 0x00005605383b9622 in mysql_inplace_alter_table (thd=0x7fe2b0000b00, table_list=0x7fe2b0014ae0, table=0x7fe2b0054010, altered_table=0x7fe2b00486a0, ha_alter_info=0x7fe300098530, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fe3000985a0, alter_ctx=0x7fe300099160) at /data/src/bb-10.3-marko/sql/sql_table.cc:7229
#17 0x00005605383be906 in mysql_alter_table (thd=0x7fe2b0000b00, new_db=0x7fe2b00150f0 "test", new_name=0x0, create_info=0x7fe300099d70, table_list=0x7fe2b0014ae0, alter_info=0x7fe300099cc0, order_num=0, order=0x0, ignore=false) at /data/src/bb-10.3-marko/sql/sql_table.cc:9205
#18 0x000056053843d485 in Sql_cmd_alter_table::execute (this=0x7fe2b0015200, thd=0x7fe2b0000b00) at /data/src/bb-10.3-marko/sql/sql_alter.cc:331
#19 0x00005605382f07e7 in mysql_execute_command (thd=0x7fe2b0000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:6235
#20 0x00005605382f5090 in mysql_parse (thd=0x7fe2b0000b00, rawbuf=0x7fe2b00149f8 "ALTER TABLE t1 ADD COLUMN k INT", length=31, parser_state=0x7fe30009b610, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:7920
#21 0x00005605382e2858 in dispatch_command (command=COM_QUERY, thd=0x7fe2b0000b00, packet=0x7fe2b008f4e1 "ALTER TABLE t1 ADD COLUMN k INT", packet_length=31, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1819
#22 0x00005605382e12ba in do_command (thd=0x7fe2b0000b00) at /data/src/bb-10.3-marko/sql/sql_parse.cc:1370
#23 0x0000560538437ff0 in do_handle_one_connection (connect=0x56053c8d6360) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1418
#24 0x0000560538437d7d in handle_one_connection (arg=0x56053c8d6360) at /data/src/bb-10.3-marko/sql/sql_connect.cc:1324
#25 0x00005605388b0e3c in pfs_spawn_thread (arg=0x56053c8deca0) at /data/src/bb-10.3-marko/storage/perfschema/pfs.cc:1862
#26 0x00007fe307b4e494 in start_thread (arg=0x7fe30009c700) at pthread_create.c:333
#27 0x00007fe305cc693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
--source include/have_partition.inc
 
CREATE TABLE t1 (
  pk INT NOT NULL PRIMARY KEY,
  i INT,
  d DATE,
  t TIME,
  c VARCHAR(1)
) ENGINE=InnoDB;
 
INSERT INTO t1 VALUES (113,6,'2012-07-20','07:19:58','t');
INSERT INTO t1 VALUES (114,7,'1900-01-01','12:50:41','b');
INSERT INTO t1 VALUES (115,7,'1978-09-13','04:38:11','h');
INSERT INTO t1 VALUES (116,6,'1998-08-17','20:25:46','x');
INSERT INTO t1 VALUES (117,9,'2011-11-01','00:00:00','x');
INSERT INTO t1 VALUES (118,5,'1988-12-08','10:53:24','x');
INSERT INTO t1 VALUES (119,1,'1999-07-05','06:16:28','x');
INSERT INTO t1 VALUES (120,0,'2017-03-25','13:41:03','o');
INSERT INTO t1 VALUES (121,6,'2008-09-27','08:14:06','x');
INSERT INTO t1 VALUES (122,6,'1976-08-26','07:22:25','r');
INSERT INTO t1 VALUES (123,0,'1900-01-01','16:02:31','z');
INSERT INTO t1 VALUES (124,1,'2005-01-20','11:46:57','q');
INSERT INTO t1 VALUES (125,9,'2030-07-25','12:31:54','e');
INSERT INTO t1 VALUES (126,4,'2023-01-08','22:17:31','x');
INSERT INTO t1 VALUES (127,3,'1900-01-01','12:45:11','r');
INSERT INTO t1 VALUES (128,4,'1978-03-20','08:56:28','s');
INSERT INTO t1 VALUES (129,2,'1990-03-11','00:00:00','t');
INSERT INTO t1 VALUES (130,0,'1978-06-08','01:34:16','g');
INSERT INTO t1 VALUES (131,3,'1987-03-23','00:00:00','m');
INSERT INTO t1 VALUES (132,1,'2030-03-03','12:55:39','y');
INSERT INTO t1 VALUES (133,5,'1900-01-01','06:52:09','u');
INSERT INTO t1 VALUES (134,7,'2034-04-16','23:58:21','x');
INSERT INTO t1 VALUES (135,9,'2006-05-04','09:56:19','x');
INSERT INTO t1 VALUES (136,3,'2015-07-22','09:47:26','x');
INSERT INTO t1 VALUES (137,6,'2001-08-09','04:57:44','j');
INSERT INTO t1 VALUES (138,0,'2019-03-17','07:11:41','s');
INSERT INTO t1 VALUES (139,5,'2024-03-17','00:00:00','m');
INSERT INTO t1 VALUES (140,1,'2030-05-12','05:44:22','e');
INSERT INTO t1 VALUES (141,7,'1989-02-17','00:00:00','g');
INSERT INTO t1 VALUES (142,8,'1997-09-23','22:22:44','y');
INSERT INTO t1 VALUES (143,2,'2007-09-03','02:09:22','j');
INSERT INTO t1 VALUES (144,1,'2023-12-06','07:12:40','w');
INSERT INTO t1 VALUES (145,1,'1994-07-20','20:09:41','y');
INSERT INTO t1 VALUES (146,2,'1971-02-20','08:34:44','x');
INSERT INTO t1 VALUES (147,8,'2011-08-08','00:00:00','z');
INSERT INTO t1 VALUES (148,9,'2011-07-10','22:32:37','x');
INSERT INTO t1 VALUES (149,8,'2015-09-23','00:00:00','i');
INSERT INTO t1 VALUES (150,2,'1984-05-28','12:08:24','d');
INSERT INTO t1 VALUES (151,2,'1978-04-11','22:27:11','q');
INSERT INTO t1 VALUES (152,6,'1979-12-18','00:00:00','a');
INSERT INTO t1 VALUES (153,2,'1989-12-15','06:04:40','b');
INSERT INTO t1 VALUES (154,8,'2008-03-17','02:01:19','t');
INSERT INTO t1 VALUES (155,2,'2030-01-03','10:04:44','z');
INSERT INTO t1 VALUES (156,8,'2025-10-05','03:15:39','l');
INSERT INTO t1 VALUES (157,1,'2013-02-14','11:40:07','j');
INSERT INTO t1 VALUES (158,3,'1973-12-03','05:40:58','t');
INSERT INTO t1 VALUES (159,2,'1999-11-05','08:23:12','z');
INSERT INTO t1 VALUES (160,6,'1987-06-19','22:47:51','l');
INSERT INTO t1 VALUES (161,1,'2018-11-24','14:00:38','i');
INSERT INTO t1 VALUES (162,1,'2004-10-06','16:03:33','a');
INSERT INTO t1 VALUES (163,2,'2000-07-11','07:58:14','w');
INSERT INTO t1 VALUES (164,8,'2011-11-01','00:00:00','p');
INSERT INTO t1 VALUES (165,2,'1986-05-18','12:35:20','b');
INSERT INTO t1 VALUES (166,2,'2006-09-05','00:55:03','x');
INSERT INTO t1 VALUES (167,4,'1975-12-19','22:25:07','p');
INSERT INTO t1 VALUES (168,2,'1991-10-18','18:20:08','y');
INSERT INTO t1 VALUES (169,1,'2011-11-01','08:27:30','x');
INSERT INTO t1 VALUES (170,8,'1996-10-15','03:38:24','m');
INSERT INTO t1 VALUES (171,9,'1900-01-01','05:01:46','l');
INSERT INTO t1 VALUES (172,4,'2020-04-14','02:57:15','b');
INSERT INTO t1 VALUES (173,2,'1995-11-07','00:44:12','x');
INSERT INTO t1 VALUES (174,9,'1988-02-28','20:35:31','x');
INSERT INTO t1 VALUES (175,1,'1975-12-16','15:27:50','j');
INSERT INTO t1 VALUES (176,8,'2012-10-18','00:00:00','h');
INSERT INTO t1 VALUES (177,7,'1985-09-19','18:47:56','x');
INSERT INTO t1 VALUES (178,3,'2032-04-21','20:06:48','x');
INSERT INTO t1 VALUES (179,5,'2033-09-19','16:48:51','y');
INSERT INTO t1 VALUES (180,1,'2017-04-11','00:00:00','f');
INSERT INTO t1 VALUES (181,4,'2010-08-16','16:28:15','m');
INSERT INTO t1 VALUES (182,2,'2030-02-10','00:00:00','d');
INSERT INTO t1 VALUES (183,4,'1973-01-03','00:00:00','b');
INSERT INTO t1 VALUES (184,4,'1984-11-07','00:00:00','z');
INSERT INTO t1 VALUES (185,3,'2024-09-27','09:36:30','u');
INSERT INTO t1 VALUES (186,3,'1986-11-02','00:00:00','b');
INSERT INTO t1 VALUES (187,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (188,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (189,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (190,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (191,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (192,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (193,3,'2033-02-04','15:27:50','t');
INSERT INTO t1 VALUES (194,7,'1988-05-19','03:55:07','n');
INSERT INTO t1 VALUES (195,4,'1900-01-01','11:18:36','x');
INSERT INTO t1 VALUES (196,9,'1991-08-22','22:04:46','b');
INSERT INTO t1 VALUES (197,7,'1900-01-01','19:56:30','m');
INSERT INTO t1 VALUES (198,4,'2003-03-03','18:53:08','x');
INSERT INTO t1 VALUES (199,2,'2019-09-21','00:00:00','j');
INSERT INTO t1 VALUES (200,3,'1982-12-04','08:43:37','w');
INSERT INTO t1 VALUES (201,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (202,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (203,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (204,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (205,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (206,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (207,9,'2010-12-03','06:10:18','o');
INSERT INTO t1 VALUES (208,3,'2006-10-03','00:00:00','y');
INSERT INTO t1 VALUES (209,5,'1982-01-08','00:00:00','d');
INSERT INTO t1 VALUES (210,7,'2015-10-20','23:45:21','b');
INSERT INTO t1 VALUES (211,6,'1991-10-17','05:00:38','u');
INSERT INTO t1 VALUES (212,8,'1976-11-16','16:06:03','d');
INSERT INTO t1 VALUES (213,7,'2014-08-12','21:11:55','w');
INSERT INTO t1 VALUES (214,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (215,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (216,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (217,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (218,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (219,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (220,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (221,1,'1900-01-01','11:40:08','z');
INSERT INTO t1 VALUES (222,1,'2012-10-16','03:38:20','y');
INSERT INTO t1 VALUES (223,2,'2011-11-01','03:17:35','t');
INSERT INTO t1 VALUES (224,6,'2011-11-01','03:43:10','a');
INSERT INTO t1 VALUES (225,2,'1972-09-19','00:00:00','y');
INSERT INTO t1 VALUES (226,0,'1996-08-05','20:14:28','p');
INSERT INTO t1 VALUES (227,3,'1987-01-16','19:55:14','r');
INSERT INTO t1 VALUES (228,0,'1990-12-26','18:10:27','n');
INSERT INTO t1 VALUES (229,6,'2007-09-14','00:00:00','v');
INSERT INTO t1 VALUES (230,4,'2007-06-21','14:25:27','u');
INSERT INTO t1 VALUES (231,4,'2022-11-26','19:45:18','w');
INSERT INTO t1 VALUES (232,8,'2026-03-23','10:58:03','x');
INSERT INTO t1 VALUES (233,8,'2018-05-18','16:57:06','d');
INSERT INTO t1 VALUES (234,7,'2019-01-17','13:02:51','m');
INSERT INTO t1 VALUES (235,9,'2009-04-07','11:28:23','z');
INSERT INTO t1 VALUES (236,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (237,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (238,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (239,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (240,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (241,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (242,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (243,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (244,4,'1973-03-21','00:00:00','s');
INSERT INTO t1 VALUES (252,3,'2007-11-15','22:07:09','b');
INSERT INTO t1 VALUES (253,6,'2011-11-01','12:37:47','w');
INSERT INTO t1 VALUES (254,7,'2002-04-23','00:00:00','w');
INSERT INTO t1 VALUES (255,1,'2011-11-01','00:00:00','w');
INSERT INTO t1 VALUES (256,8,'2011-11-01','00:43:31','c');
INSERT INTO t1 VALUES (257,0,'1997-01-18','02:03:25','a');
INSERT INTO t1 VALUES (258,6,'2011-04-04','08:38:34','o');
INSERT INTO t1 VALUES (259,7,'2011-05-25','03:34:51','h');
INSERT INTO t1 VALUES (260,8,'1991-09-09','13:21:14','d');
INSERT INTO t1 VALUES (261,0,'2013-03-18','00:00:00','a');
INSERT INTO t1 VALUES (262,0,'1996-06-27','00:48:34','j');
INSERT INTO t1 VALUES (263,3,'1985-01-14','12:10:42','w');
INSERT INTO t1 VALUES (264,2,'2011-11-01','02:28:23','k');
INSERT INTO t1 VALUES (265,8,'2035-02-15','15:00:50','j');
INSERT INTO t1 VALUES (266,6,'2011-11-01','08:57:46','h');
INSERT INTO t1 VALUES (267,4,'1978-08-23','00:00:00','r');
INSERT INTO t1 VALUES (268,4,'1982-11-24','12:31:32','f');
INSERT INTO t1 VALUES (269,1,'2011-11-01','02:17:53','e');
INSERT INTO t1 VALUES (270,1,'1979-01-01','00:00:00','h');
INSERT INTO t1 VALUES (271,2,'2030-06-08','03:07:22','r');
INSERT INTO t1 VALUES (272,2,'2014-03-07','11:36:34','u');
INSERT INTO t1 VALUES (273,0,'1989-10-19','14:36:51','x');
INSERT INTO t1 VALUES (274,1,'2018-02-09','00:00:00','d');
INSERT INTO t1 VALUES (275,0,'1979-05-06','13:26:21','m');
INSERT INTO t1 VALUES (276,9,'2007-05-22','14:34:58','w');
INSERT INTO t1 VALUES (277,8,'2006-12-28','12:36:29','a');
INSERT INTO t1 VALUES (278,9,'2024-06-09','15:18:04','g');
INSERT INTO t1 VALUES (279,2,'1983-02-01','01:44:07','g');
INSERT INTO t1 VALUES (280,1,'1985-05-01','10:58:10','b');
INSERT INTO t1 VALUES (281,2,'1990-01-08','20:53:12','x');
INSERT INTO t1 VALUES (282,6,'2035-05-04','20:58:07','u');
INSERT INTO t1 VALUES (283,2,'2006-08-16','00:27:48','l');
INSERT INTO t1 VALUES (284,1,'1900-01-01','16:22:16','x');
INSERT INTO t1 VALUES (285,7,'1988-10-05','02:53:27','q');
INSERT INTO t1 VALUES (286,0,'2009-07-12','11:18:33','m');
INSERT INTO t1 VALUES (287,5,'2016-09-15','02:26:37','s');
INSERT INTO t1 VALUES (288,3,'2013-04-12','03:55:19','j');
INSERT INTO t1 VALUES (289,2,'2018-12-10','11:53:57','l');
INSERT INTO t1 VALUES (290,5,'2003-12-17','00:00:00','z');
INSERT INTO t1 VALUES (291,0,'2000-12-08','13:13:53','g');
INSERT INTO t1 VALUES (292,2,'1971-07-11','01:52:16','h');
INSERT INTO t1 VALUES (293,1,'2021-01-14','13:40:04','c');
INSERT INTO t1 VALUES (294,0,'2027-08-10','19:27:42','y');
INSERT INTO t1 VALUES (295,1,'2010-03-06','00:00:00','e');
INSERT INTO t1 VALUES (296,5,'2014-03-19','04:48:49','n');
INSERT INTO t1 VALUES (297,5,'1982-03-07','01:11:43','q');
INSERT INTO t1 VALUES (298,2,'2011-11-01','20:59:44','i');
INSERT INTO t1 VALUES (299,4,'1996-02-04','03:02:18','f');
INSERT INTO t1 VALUES (300,2,'2002-01-21','14:12:47','q');
INSERT INTO t1 VALUES (301,5,'1900-01-01','05:45:50','r');
INSERT INTO t1 VALUES (302,4,'2008-10-16','17:16:43','x');
INSERT INTO t1 VALUES (303,3,'2017-06-08','09:19:46','a');
INSERT INTO t1 VALUES (304,1,'2011-11-01','09:18:01','u');
INSERT INTO t1 VALUES (305,2,'2011-11-01','16:17:42','l');
INSERT INTO t1 VALUES (306,1,'1996-12-19','12:32:23','e');
INSERT INTO t1 VALUES (307,1,'2014-12-06','01:41:25','w');
INSERT INTO t1 VALUES (308,7,'1900-01-01','11:53:34','l');
INSERT INTO t1 VALUES (309,3,'2007-09-14','00:00:00','s');
INSERT INTO t1 VALUES (310,3,'2011-11-01','00:00:00','x');
INSERT INTO t1 VALUES (311,5,'1989-07-18','09:20:59','n');
INSERT INTO t1 VALUES (312,3,'2002-05-19','14:44:58','c');
INSERT INTO t1 VALUES (313,7,'2011-11-01','09:59:58','s');
INSERT INTO t1 VALUES (314,3,'1999-03-13','23:46:32','w');
INSERT INTO t1 VALUES (315,7,'2031-09-26','05:37:58','h');
INSERT INTO t1 VALUES (316,4,'2011-11-01','00:00:00','v');
INSERT INTO t1 VALUES (317,3,'1988-07-10','00:05:54','q');
INSERT INTO t1 VALUES (318,4,'2006-04-27','18:53:46','k');
INSERT INTO t1 VALUES (319,5,'1900-01-01','00:00:00','x');
INSERT INTO t1 VALUES (320,1,'1994-02-11','00:00:00','c');
INSERT INTO t1 VALUES (321,0,'1989-07-18','14:08:42','d');
INSERT INTO t1 VALUES (322,2,'2001-06-11','19:56:40','h');
INSERT INTO t1 VALUES (323,5,'1976-08-23','00:00:00','v');
INSERT INTO t1 VALUES (324,7,'2005-01-08','16:24:26','u');
INSERT INTO t1 VALUES (325,6,'2031-04-18','10:59:44','x');
INSERT INTO t1 VALUES (326,7,'1978-09-20','00:00:00','w');
INSERT INTO t1 VALUES (327,3,'2011-11-01','00:00:00','k');
INSERT INTO t1 VALUES (328,5,'2019-12-24','15:39:26','b');
INSERT INTO t1 VALUES (329,0,'1974-01-16','16:06:45','s');
INSERT INTO t1 VALUES (330,4,'1988-10-25','15:54:08','u');
INSERT INTO t1 VALUES (331,6,'1992-06-01','03:46:38','r');
INSERT INTO t1 VALUES (332,1,'2000-05-02','05:43:51','s');
INSERT INTO t1 VALUES (333,4,'1900-01-01','12:22:14','x');
INSERT INTO t1 VALUES (334,8,'2010-08-28','05:12:03','v');
INSERT INTO t1 VALUES (335,9,'2010-02-20','08:07:08','f');
INSERT INTO t1 VALUES (336,4,'1984-09-01','01:00:16','s');
INSERT INTO t1 VALUES (337,9,'2002-03-27','00:23:44','z');
INSERT INTO t1 VALUES (338,1,'2011-11-01','04:52:28','c');
INSERT INTO t1 VALUES (339,7,'1900-01-01','07:18:26','w');
INSERT INTO t1 VALUES (340,3,'1989-05-07','03:52:16','k');
INSERT INTO t1 VALUES (341,1,'1971-06-15','13:20:39','l');
INSERT INTO t1 VALUES (342,1,'2011-02-19','16:52:16','f');
INSERT INTO t1 VALUES (343,6,'2021-09-02','17:08:53','s');
INSERT INTO t1 VALUES (344,8,'1900-01-01','23:52:11','k');
INSERT INTO t1 VALUES (345,6,'2009-09-16','13:09:13','y');
INSERT INTO t1 VALUES (346,4,'2011-08-04','16:04:58','m');
INSERT INTO t1 VALUES (347,3,'1994-05-11','01:32:41','w');
INSERT INTO t1 VALUES (348,4,'1986-10-22','09:41:14','x');
INSERT INTO t1 VALUES (349,9,'1986-08-28','10:30:35','i');
INSERT INTO t1 VALUES (350,3,'2021-02-02','15:39:35','z');
INSERT INTO t1 VALUES (351,5,'1996-12-09','11:39:58','f');
INSERT INTO t1 VALUES (352,7,'2009-11-21','09:40:20','c');
INSERT INTO t1 VALUES (353,7,'1994-01-19','00:00:00','p');
INSERT INTO t1 VALUES (354,3,'1994-07-01','04:32:34','x');
INSERT INTO t1 VALUES (355,5,'1900-01-01','03:03:29','g');
INSERT INTO t1 VALUES (356,1,'1999-06-02','15:26:29','h');
INSERT INTO t1 VALUES (357,3,'2011-11-01','11:05:51','w');
INSERT INTO t1 VALUES (358,2,'1900-01-01','00:03:44','h');
INSERT INTO t1 VALUES (359,1,'2003-04-25','16:43:48','r');
INSERT INTO t1 VALUES (360,2,'2024-08-05','20:25:08','v');
INSERT INTO t1 VALUES (361,2,'1995-01-22','18:56:19','v');
INSERT INTO t1 VALUES (362,4,'2011-11-01','09:51:00','f');
INSERT INTO t1 VALUES (363,5,'2019-10-23','08:16:04','j');
INSERT INTO t1 VALUES (364,4,'1995-03-15','07:33:15','x');
INSERT INTO t1 VALUES (365,3,'2020-02-21','22:18:07','n');
INSERT INTO t1 VALUES (366,0,'1900-01-01','04:58:26','g');
INSERT INTO t1 VALUES (367,9,'1983-04-15','09:46:09','n');
INSERT INTO t1 VALUES (368,2,'2009-03-06','05:55:16','k');
INSERT INTO t1 VALUES (369,4,'1971-05-14','15:52:54','t');
INSERT INTO t1 VALUES (370,1,'2023-03-08','17:00:05','w');
INSERT INTO t1 VALUES (371,1,'1972-12-09','06:27:23','q');
INSERT INTO t1 VALUES (372,2,'1978-07-14','00:20:46','z');
INSERT INTO t1 VALUES (373,4,'1900-01-01','18:30:14','z');
INSERT INTO t1 VALUES (374,8,'2017-01-27','00:00:00','z');
INSERT INTO t1 VALUES (375,1,'1984-08-23','11:24:08','u');
INSERT INTO t1 VALUES (376,9,'2027-01-05','19:38:37','p');
INSERT INTO t1 VALUES (377,4,'2029-07-24','21:55:15','v');
INSERT INTO t1 VALUES (378,2,'2011-11-01','09:43:23','a');
INSERT INTO t1 VALUES (379,3,'2002-09-19','00:00:00','d');
INSERT INTO t1 VALUES (380,9,'1900-01-01','13:26:00','a');
INSERT INTO t1 VALUES (381,6,'2023-08-13','13:10:48','k');
INSERT INTO t1 VALUES (382,5,'1900-01-01','13:58:12','j');
INSERT INTO t1 VALUES (383,9,'2034-05-26','00:00:00','s');
INSERT INTO t1 VALUES (384,2,'2015-06-02','12:03:52','w');
INSERT INTO t1 VALUES (385,0,'1973-04-20','19:12:21','k');
INSERT INTO t1 VALUES (386,3,'1993-06-11','00:00:00','n');
INSERT INTO t1 VALUES (387,9,'2010-09-21','01:03:07','o');
INSERT INTO t1 VALUES (388,2,'2017-04-20','09:02:08','z');
INSERT INTO t1 VALUES (389,8,'1971-07-11','00:00:00','u');
INSERT INTO t1 VALUES (390,3,'2003-09-12','23:59:50','v');
INSERT INTO t1 VALUES (391,0,'1996-02-04','00:00:00','h');
INSERT INTO t1 VALUES (392,3,'1900-01-01','23:50:10','o');
INSERT INTO t1 VALUES (393,7,'1988-03-26','00:00:00','x');
INSERT INTO t1 VALUES (394,7,'1992-11-19','16:01:04','w');
INSERT INTO t1 VALUES (395,1,'1988-03-06','00:00:00','w');
INSERT INTO t1 VALUES (396,5,'2011-11-01','19:30:06','l');
INSERT INTO t1 VALUES (397,7,'2014-09-03','05:02:52','s');
INSERT INTO t1 VALUES (398,9,'1980-01-16','16:53:44','i');
INSERT INTO t1 VALUES (399,7,'1987-04-03','15:57:21','x');
INSERT INTO t1 VALUES (400,0,'2018-03-03','00:00:00','s');
INSERT INTO t1 VALUES (401,3,'1976-09-08','07:55:18','m');
INSERT INTO t1 VALUES (402,3,'2004-05-05','17:59:45','b');
INSERT INTO t1 VALUES (403,8,'2011-11-01','00:00:00','o');
INSERT INTO t1 VALUES (404,1,'2025-04-08','23:20:45','a');
INSERT INTO t1 VALUES (405,4,'2004-07-14','15:56:31','g');
INSERT INTO t1 VALUES (406,9,'2030-10-24','05:14:36','o');
INSERT INTO t1 VALUES (407,5,'2009-06-20','16:49:08','y');
INSERT INTO t1 VALUES (408,0,'1900-01-01','00:00:00','w');
INSERT INTO t1 VALUES (409,0,'2034-10-10','19:08:35','i');
INSERT INTO t1 VALUES (410,2,'1900-01-01','07:22:36','f');
INSERT INTO t1 VALUES (411,1,'2030-05-26','02:14:32','x');
INSERT INTO t1 VALUES (412,0,'1997-03-17','12:36:08','y');
INSERT INTO t1 VALUES (413,3,'1997-01-14','09:14:08','f');
INSERT INTO t1 VALUES (414,1,'1977-09-08','21:48:45','g');
INSERT INTO t1 VALUES (415,3,'2005-03-13','00:00:00','d');
INSERT INTO t1 VALUES (416,5,'2011-11-01','03:53:40','m');
INSERT INTO t1 VALUES (417,8,'2021-08-05','10:39:51','b');
INSERT INTO t1 VALUES (418,5,'1971-09-07','00:00:00','r');
INSERT INTO t1 VALUES (419,1,'1900-01-01','19:38:44','u');
INSERT INTO t1 VALUES (420,7,'2011-11-01','00:00:00','u');
INSERT INTO t1 VALUES (421,6,'1985-11-03','09:43:13','n');
INSERT INTO t1 VALUES (422,0,'2035-01-23','00:00:00','b');
INSERT INTO t1 VALUES (423,5,'2034-05-15','00:00:00','b');
INSERT INTO t1 VALUES (424,0,'1998-05-20','20:33:51','d');
INSERT INTO t1 VALUES (425,6,'1900-01-01','00:00:00','x');
INSERT INTO t1 VALUES (426,8,'2018-04-01','15:55:06','d');
INSERT INTO t1 VALUES (427,6,'1998-01-05','00:00:00','e');
INSERT INTO t1 VALUES (428,1,'1975-10-22','00:00:00','i');
INSERT INTO t1 VALUES (429,4,'2017-03-10','06:21:20','i');
INSERT INTO t1 VALUES (430,5,'1900-01-01','16:24:00','s');
INSERT INTO t1 VALUES (431,6,'1977-03-01','17:39:17','x');
INSERT INTO t1 VALUES (432,7,'2031-08-21','00:00:00','g');
INSERT INTO t1 VALUES (433,5,'2005-04-07','21:41:53','j');
INSERT INTO t1 VALUES (434,9,'1985-06-02','05:36:23','z');
INSERT INTO t1 VALUES (435,3,'2026-08-24','15:21:53','v');
INSERT INTO t1 VALUES (436,8,'2011-04-20','05:45:04','v');
INSERT INTO t1 VALUES (437,5,'1900-01-01','09:50:07','m');
INSERT INTO t1 VALUES (438,5,'2011-11-01','01:08:11','s');
INSERT INTO t1 VALUES (439,3,'1974-12-17','20:13:41','f');
INSERT INTO t1 VALUES (440,1,'1999-01-12','00:00:00','m');
INSERT INTO t1 VALUES (441,7,'1978-04-24','21:08:35','j');
INSERT INTO t1 VALUES (442,1,'2007-07-06','11:12:35','x');
INSERT INTO t1 VALUES (443,4,'2025-12-25','23:37:35','f');
INSERT INTO t1 VALUES (444,2,'1993-08-08','06:16:07','n');
INSERT INTO t1 VALUES (445,4,'2013-03-15','07:09:49','q');
INSERT INTO t1 VALUES (446,2,'2011-11-01','03:21:04','w');
INSERT INTO t1 VALUES (447,8,'2001-11-05','17:39:52','s');
INSERT INTO t1 VALUES (448,5,'1982-11-18','12:04:58','i');
INSERT INTO t1 VALUES (449,8,'2029-07-09','00:00:00','y');
INSERT INTO t1 VALUES (450,3,'2025-09-11','12:13:25','e');
INSERT INTO t1 VALUES (451,5,'2026-07-28','07:03:44','j');
INSERT INTO t1 VALUES (452,8,'2032-02-12','07:38:56','k');
INSERT INTO t1 VALUES (453,7,'1984-08-17','22:13:22','x');
INSERT INTO t1 VALUES (454,9,'1980-06-05','08:57:29','n');
INSERT INTO t1 VALUES (455,7,'2011-11-01','07:46:38','k');
INSERT INTO t1 VALUES (456,2,'1900-01-01','09:12:49','t');
INSERT INTO t1 VALUES (457,9,'2011-11-01','00:00:00','j');
INSERT INTO t1 VALUES (458,9,'1984-10-04','20:52:50','f');
INSERT INTO t1 VALUES (459,9,'2000-06-07','00:00:00','b');
INSERT INTO t1 VALUES (460,7,'2011-11-01','09:57:48','a');
INSERT INTO t1 VALUES (461,3,'1900-01-01','15:08:15','s');
INSERT INTO t1 VALUES (462,1,'2013-01-08','08:17:54','f');
INSERT INTO t1 VALUES (463,4,'2028-09-26','14:48:01','i');
INSERT INTO t1 VALUES (464,9,'1974-11-06','00:00:00','t');
INSERT INTO t1 VALUES (465,3,'1900-01-01','00:00:00','p');
INSERT INTO t1 VALUES (466,0,'1972-09-14','16:17:13','j');
INSERT INTO t1 VALUES (467,2,'2026-11-13','08:38:50','f');
INSERT INTO t1 VALUES (468,9,'1999-06-10','13:30:27','r');
INSERT INTO t1 VALUES (469,9,'2011-11-01','23:27:20','r');
INSERT INTO t1 VALUES (470,1,'2001-04-05','10:03:25','x');
INSERT INTO t1 VALUES (471,6,'1978-01-16','04:49:53','r');
INSERT INTO t1 VALUES (472,0,'1979-12-26','08:12:18','p');
INSERT INTO t1 VALUES (473,0,'1973-01-16','15:43:06','r');
INSERT INTO t1 VALUES (474,2,'1983-08-27','05:28:25','t');
INSERT INTO t1 VALUES (475,1,'2027-04-15','00:00:00','t');
INSERT INTO t1 VALUES (476,7,'1994-10-08','23:35:37','x');
INSERT INTO t1 VALUES (477,2,'2023-06-01','08:13:56','p');
INSERT INTO t1 VALUES (478,0,'1980-05-12','05:09:15','k');
INSERT INTO t1 VALUES (479,2,'1974-02-28','01:55:07','r');
INSERT INTO t1 VALUES (480,7,'2010-05-15','15:54:45','e');
INSERT INTO t1 VALUES (481,2,'1975-10-07','15:27:01','n');
INSERT INTO t1 VALUES (482,4,'2015-08-17','23:15:28','s');
INSERT INTO t1 VALUES (483,6,'1900-01-01','00:00:00','u');
INSERT INTO t1 VALUES (484,0,'1900-01-01','08:44:06','c');
INSERT INTO t1 VALUES (485,3,'2005-08-13','01:06:35','j');
INSERT INTO t1 VALUES (486,9,'2016-07-28','05:29:11','l');
INSERT INTO t1 VALUES (487,9,'1999-08-13','23:18:43','a');
INSERT INTO t1 VALUES (488,7,'1980-02-12','03:26:39','k');
INSERT INTO t1 VALUES (489,7,'1988-05-20','02:53:34','x');
INSERT INTO t1 VALUES (490,9,'2009-07-04','23:01:20','c');
INSERT INTO t1 VALUES (491,5,'1995-07-13','08:11:25','v');
INSERT INTO t1 VALUES (492,2,'1974-11-28','22:53:10','i');
INSERT INTO t1 VALUES (493,8,'2004-09-07','02:54:46','x');
INSERT INTO t1 VALUES (494,5,'2025-08-19','19:01:43','x');
INSERT INTO t1 VALUES (495,6,'2015-12-18','00:00:00','t');
INSERT INTO t1 VALUES (496,2,'2021-12-23','01:56:39','x');
INSERT INTO t1 VALUES (497,7,'2023-05-26','16:35:30','v');
INSERT INTO t1 VALUES (498,0,'2008-01-13','13:32:09','w');
INSERT INTO t1 VALUES (499,4,'1992-04-18','04:16:09','b');
INSERT INTO t1 VALUES (500,5,'2011-11-01','23:22:44','q');
INSERT INTO t1 VALUES (501,3,'2014-04-07','11:35:28','c');
INSERT INTO t1 VALUES (502,3,'2026-09-16','15:48:10','n');
INSERT INTO t1 VALUES (503,2,'2008-11-20','17:00:59','p');
INSERT INTO t1 VALUES (504,1,'2010-05-06','03:37:51','e');
INSERT INTO t1 VALUES (505,3,'2009-02-20','12:38:17','i');
INSERT INTO t1 VALUES (506,2,'1980-03-22','01:25:56','x');
INSERT INTO t1 VALUES (507,6,'2003-01-08','03:11:55','j');
INSERT INTO t1 VALUES (508,8,'2003-10-28','09:28:14','f');
INSERT INTO t1 VALUES (509,8,'1993-12-01','21:46:15','h');
INSERT INTO t1 VALUES (510,1,'2011-11-01','11:39:31','b');
INSERT INTO t1 VALUES (511,7,'2019-02-19','00:00:00','x');
INSERT INTO t1 VALUES (512,6,'1984-10-11','20:47:22','x');
INSERT INTO t1 VALUES (513,8,'2025-10-16','20:50:53','b');
INSERT INTO t1 VALUES (514,9,'1900-01-01','08:37:33','r');
INSERT INTO t1 VALUES (515,4,'2035-02-28','23:46:16','o');
INSERT INTO t1 VALUES (516,9,'2002-12-13','00:00:00','h');
INSERT INTO t1 VALUES (517,2,'2007-08-23','06:15:57','y');
INSERT INTO t1 VALUES (518,9,'2025-07-21','10:09:02','m');
INSERT INTO t1 VALUES (519,2,'1980-09-14','23:09:10','r');
INSERT INTO t1 VALUES (520,9,'1983-06-22','15:51:45','v');
INSERT INTO t1 VALUES (521,9,'1997-10-14','20:36:56','x');
INSERT INTO t1 VALUES (522,2,'1975-03-22','22:21:30','x');
INSERT INTO t1 VALUES (523,2,'2011-11-01','00:11:31','t');
INSERT INTO t1 VALUES (524,2,'2007-08-18','11:16:01','k');
INSERT INTO t1 VALUES (525,7,'2011-11-01','00:00:00','x');
INSERT INTO t1 VALUES (526,4,'1900-01-01','00:00:00','x');
INSERT INTO t1 VALUES (527,4,'1981-11-26','00:00:00','z');
INSERT INTO t1 VALUES (528,2,'1989-10-18','00:00:00','a');
INSERT INTO t1 VALUES (529,7,'1977-05-16','21:20:31','x');
INSERT INTO t1 VALUES (530,0,'1990-06-21','21:55:51','c');
INSERT INTO t1 VALUES (531,4,'1983-03-01','11:10:28','y');
INSERT INTO t1 VALUES (532,1,'1973-10-10','10:13:49','p');
INSERT INTO t1 VALUES (533,6,'2023-11-03','15:41:59','p');
INSERT INTO t1 VALUES (534,7,'2035-04-08','04:34:06','t');
INSERT INTO t1 VALUES (535,4,'1900-01-01','00:00:00','j');
INSERT INTO t1 VALUES (536,9,'2011-07-08','00:00:00','c');
INSERT INTO t1 VALUES (537,7,'2012-02-17','19:13:19','p');
INSERT INTO t1 VALUES (538,8,'1900-01-01','02:26:43','c');
INSERT INTO t1 VALUES (539,2,'2034-02-24','15:32:10','b');
INSERT INTO t1 VALUES (540,0,'2011-04-21','04:02:38','x');
INSERT INTO t1 VALUES (541,1,'2011-11-01','03:16:07','y');
INSERT INTO t1 VALUES (542,2,'1973-02-26','00:00:00','h');
INSERT INTO t1 VALUES (543,1,'2011-11-01','15:17:05','g');
INSERT INTO t1 VALUES (544,0,'1997-11-10','00:20:42','t');
INSERT INTO t1 VALUES (545,0,'2025-11-22','19:58:08','v');
INSERT INTO t1 VALUES (546,7,'1973-03-27','09:21:43','x');
INSERT INTO t1 VALUES (547,3,'1979-03-08','18:09:14','j');
INSERT INTO t1 VALUES (548,0,'2000-06-03','23:38:59','g');
INSERT INTO t1 VALUES (549,8,'1900-01-01','00:00:00','x');
INSERT INTO t1 VALUES (550,3,'2011-11-01','03:51:20','n');
INSERT INTO t1 VALUES (551,7,'2017-07-11','00:42:15','f');
INSERT INTO t1 VALUES (552,0,'1999-11-25','13:23:02','i');
INSERT INTO t1 VALUES (553,4,'1992-09-12','04:26:24','v');
INSERT INTO t1 VALUES (554,2,'2003-01-11','07:00:20','z');
INSERT INTO t1 VALUES (555,6,'1900-01-01','14:13:48','b');
INSERT INTO t1 VALUES (556,3,'2022-12-06','17:00:36','t');
INSERT INTO t1 VALUES (557,7,'2006-05-12','06:26:21','x');
INSERT INTO t1 VALUES (558,1,'2017-07-07','04:59:39','x');
INSERT INTO t1 VALUES (559,6,'2012-04-26','04:49:44','x');
INSERT INTO t1 VALUES (560,2,'1981-12-02','08:10:39','h');
INSERT INTO t1 VALUES (561,7,'2018-04-11','06:55:19','w');
INSERT INTO t1 VALUES (562,9,'1987-04-01','11:21:42','c');
INSERT INTO t1 VALUES (563,0,'2023-04-12','03:53:32','r');
INSERT INTO t1 VALUES (564,5,'2023-06-17','04:21:34','e');
INSERT INTO t1 VALUES (565,1,'1900-01-01','11:34:06','j');
INSERT INTO t1 VALUES (566,2,'1900-01-01','12:16:23','x');
INSERT INTO t1 VALUES (567,3,'1983-07-16','00:00:00','m');
INSERT INTO t1 VALUES (568,9,'2021-07-16','06:17:47','a');
INSERT INTO t1 VALUES (569,1,'1994-11-06','18:01:27','z');
INSERT INTO t1 VALUES (570,5,'2018-04-16','00:43:36','x');
INSERT INTO t1 VALUES (571,6,'1987-08-14','18:08:29','z');
INSERT INTO t1 VALUES (572,0,'1900-01-01','18:05:26','i');
INSERT INTO t1 VALUES (573,1,'2032-12-04','15:12:21','a');
INSERT INTO t1 VALUES (574,4,'2006-03-19','04:02:48','d');
INSERT INTO t1 VALUES (575,1,'1987-04-14','19:32:38','v');
INSERT INTO t1 VALUES (576,2,'1900-01-01','03:43:19','k');
INSERT INTO t1 VALUES (577,1,'1900-01-01','00:00:00','l');
INSERT INTO t1 VALUES (578,2,'1999-11-26','15:49:50','t');
INSERT INTO t1 VALUES (579,4,'2016-05-16','00:26:32','x');
INSERT INTO t1 VALUES (580,6,'1985-03-09','15:22:51','m');
INSERT INTO t1 VALUES (581,2,'1978-10-26','15:32:12','a');
INSERT INTO t1 VALUES (582,9,'2015-07-23','14:37:24','x');
INSERT INTO t1 VALUES (583,6,'2029-04-04','13:12:48','a');
INSERT INTO t1 VALUES (584,9,'2011-11-01','00:00:00','v');
INSERT INTO t1 VALUES (585,3,'2016-01-12','19:12:44','g');
INSERT INTO t1 VALUES (586,8,'1998-05-08','18:19:40','w');
INSERT INTO t1 VALUES (587,1,'2000-03-24','18:20:33','w');
INSERT INTO t1 VALUES (588,2,'1900-01-01','09:44:18','x');
INSERT INTO t1 VALUES (589,6,'1990-06-17','00:00:00','u');
INSERT INTO t1 VALUES (590,4,'2011-11-01','09:46:31','f');
INSERT INTO t1 VALUES (591,0,'2001-03-11','07:19:37','m');
INSERT INTO t1 VALUES (592,4,'1900-01-01','12:04:20','s');
INSERT INTO t1 VALUES (593,1,'2014-05-09','00:00:00','x');
INSERT INTO t1 VALUES (594,4,'2018-02-23','10:02:29','o');
INSERT INTO t1 VALUES (595,9,'2020-09-02','07:35:46','m');
INSERT INTO t1 VALUES (596,1,'1990-09-24','22:47:35','x');
INSERT INTO t1 VALUES (597,0,'1986-08-27','00:00:00','r');
INSERT INTO t1 VALUES (598,1,'2002-05-20','13:31:48','r');
INSERT INTO t1 VALUES (599,5,'1900-01-01','23:43:58','i');
INSERT INTO t1 VALUES (600,5,'2028-02-02','21:47:50','x');
INSERT INTO t1 VALUES (601,8,'1978-01-03','02:01:19','p');
INSERT INTO t1 VALUES (602,6,'1975-05-02','00:00:00','n');
INSERT INTO t1 VALUES (603,3,'1978-01-20','12:25:19','l');
INSERT INTO t1 VALUES (604,6,'2028-07-13','03:27:51','y');
INSERT INTO t1 VALUES (605,9,'1900-01-01','22:58:10','i');
INSERT INTO t1 VALUES (606,7,'2004-06-16','05:42:21','q');
INSERT INTO t1 VALUES (607,7,'2004-06-25','22:13:18','t');
INSERT INTO t1 VALUES (608,0,'2024-03-09','01:07:52','k');
INSERT INTO t1 VALUES (609,9,'1983-04-23','12:45:29','r');
INSERT INTO t1 VALUES (610,5,'2011-11-01','00:00:00','x');
INSERT INTO t1 VALUES (611,0,'2009-06-27','14:56:01','p');
INSERT INTO t1 VALUES (612,9,'1990-09-05','00:00:00','n');
INSERT INTO t1 VALUES (613,0,'1980-03-11','12:15:49','j');
INSERT INTO t1 VALUES (614,4,'1993-06-03','23:48:47','k');
INSERT INTO t1 VALUES (615,6,'2011-11-01','12:10:51','a');
INSERT INTO t1 VALUES (616,1,'2031-04-04','00:00:00','z');
INSERT INTO t1 VALUES (617,0,'2003-03-13','20:38:31','l');
INSERT INTO t1 VALUES (618,9,'2033-09-10','13:36:38','f');
INSERT INTO t1 VALUES (619,1,'1980-04-02','04:33:46','x');
INSERT INTO t1 VALUES (620,7,'1986-12-10','00:00:00','x');
INSERT INTO t1 VALUES (621,9,'1983-07-05','14:11:44','h');
INSERT INTO t1 VALUES (622,6,'2028-08-26','03:22:20','x');
INSERT INTO t1 VALUES (623,3,'2016-10-09','04:13:39','y');
INSERT INTO t1 VALUES (624,5,'1998-12-13','00:00:00','c');
INSERT INTO t1 VALUES (625,3,'2011-11-01','15:05:05','j');
INSERT INTO t1 VALUES (626,2,'1900-01-01','00:00:00','b');
INSERT INTO t1 VALUES (627,7,'1993-06-09','21:19:05','s');
INSERT INTO t1 VALUES (628,5,'2003-06-07','17:33:46','p');
INSERT INTO t1 VALUES (629,8,'2011-11-01','00:00:00','s');
INSERT INTO t1 VALUES (630,2,'1900-01-01','20:36:42','j');
INSERT INTO t1 VALUES (631,6,'1987-05-26','23:52:04','q');
INSERT INTO t1 VALUES (632,5,'2007-02-24','16:08:55','b');
INSERT INTO t1 VALUES (633,0,'2011-11-01','00:00:00','g');
INSERT INTO t1 VALUES (634,9,'2010-06-28','05:31:34','b');
INSERT INTO t1 VALUES (635,9,'1988-11-10','09:32:37','x');
INSERT INTO t1 VALUES (636,5,'2032-03-03','10:20:13','q');
INSERT INTO t1 VALUES (637,8,'1990-11-04','00:00:00','o');
INSERT INTO t1 VALUES (638,3,'2009-10-18','10:17:31','d');
INSERT INTO t1 VALUES (639,8,'1997-04-03','01:14:35','z');
INSERT INTO t1 VALUES (640,7,'2035-11-02','07:52:11','s');
INSERT INTO t1 VALUES (641,4,'1984-04-01','23:45:50','w');
INSERT INTO t1 VALUES (642,0,'1989-01-20','12:51:05','s');
INSERT INTO t1 VALUES (643,2,'1900-01-01','02:15:43','q');
INSERT INTO t1 VALUES (644,1,'1989-12-02','03:46:21','a');
INSERT INTO t1 VALUES (645,4,'1900-01-01','00:00:00','x');
INSERT INTO t1 VALUES (646,0,'2002-10-15','00:00:00','d');
INSERT INTO t1 VALUES (647,3,'1990-12-07','12:35:15','u');
INSERT INTO t1 VALUES (648,3,'1900-01-01','09:26:17','h');
INSERT INTO t1 VALUES (649,2,'2029-08-04','11:13:24','t');
INSERT INTO t1 VALUES (650,2,'2016-05-23','13:34:32','l');
INSERT INTO t1 VALUES (651,2,'2011-11-01','21:44:00','x');
INSERT INTO t1 VALUES (652,0,'1900-01-01','08:16:02','i');
INSERT INTO t1 VALUES (653,9,'1900-01-01','22:22:25','i');
INSERT INTO t1 VALUES (654,1,'1987-07-07','06:51:45','a');
INSERT INTO t1 VALUES (655,4,'2020-12-25','04:18:51','g');
INSERT INTO t1 VALUES (656,7,'1971-06-28','03:34:42','g');
INSERT INTO t1 VALUES (657,8,'1900-01-01','12:18:55','o');
INSERT INTO t1 VALUES (658,7,'2020-07-16','00:26:40','x');
INSERT INTO t1 VALUES (659,1,'2003-09-23','23:00:58','d');
INSERT INTO t1 VALUES (660,1,'2031-07-13','10:20:36','u');
INSERT INTO t1 VALUES (661,9,'1988-07-07','10:58:16','e');
INSERT INTO t1 VALUES (662,4,'1900-01-01','05:45:43','q');
INSERT INTO t1 VALUES (663,9,'2025-06-15','18:19:26','y');
INSERT INTO t1 VALUES (664,5,'1977-05-22','17:56:58','x');
INSERT INTO t1 VALUES (665,5,'1975-08-18','15:06:12','l');
INSERT INTO t1 VALUES (666,3,'2011-11-01','18:12:52','t');
INSERT INTO t1 VALUES (667,9,'2027-08-03','05:17:37','x');
INSERT INTO t1 VALUES (668,6,'1981-10-02','10:38:48','z');
INSERT INTO t1 VALUES (669,2,'2032-01-14','20:21:23','u');
INSERT INTO t1 VALUES (670,6,'2013-02-27','22:53:17','q');
INSERT INTO t1 VALUES (671,2,'1998-04-13','21:12:48','y');
INSERT INTO t1 VALUES (672,5,'2025-07-04','12:27:33','k');
INSERT INTO t1 VALUES (673,3,'2023-09-12','20:59:24','v');
INSERT INTO t1 VALUES (674,0,'2013-06-16','00:00:00','x');
INSERT INTO t1 VALUES (675,0,'1971-03-26','20:25:41','i');
INSERT INTO t1 VALUES (676,1,'2027-01-23','00:00:00','a');
INSERT INTO t1 VALUES (677,7,'1900-01-01','12:40:43','d');
INSERT INTO t1 VALUES (678,7,'2019-12-21','00:00:00','x');
INSERT INTO t1 VALUES (679,3,'2004-11-10','04:17:19','a');
INSERT INTO t1 VALUES (680,3,'2011-11-01','22:12:35','p');
INSERT INTO t1 VALUES (681,2,'1971-04-05','10:49:21','z');
INSERT INTO t1 VALUES (682,2,'1999-07-13','10:57:27','p');
INSERT INTO t1 VALUES (683,8,'1986-08-05','10:19:53','n');
INSERT INTO t1 VALUES (684,5,'1981-11-01','22:56:53','t');
INSERT INTO t1 VALUES (685,2,'1900-01-01','17:08:37','m');
INSERT INTO t1 VALUES (686,1,'1993-11-23','21:42:12','x');
INSERT INTO t1 VALUES (687,0,'1900-01-01','09:28:11','f');
INSERT INTO t1 VALUES (688,2,'1974-02-11','02:55:19','r');
INSERT INTO t1 VALUES (689,8,'2035-07-13','14:09:38','v');
INSERT INTO t1 VALUES (690,5,'2011-11-01','17:44:47','z');
INSERT INTO t1 VALUES (691,0,'2023-08-22','20:45:28','g');
INSERT INTO t1 VALUES (692,2,'1998-08-28','21:09:46','f');
INSERT INTO t1 VALUES (693,7,'2014-01-05','23:47:54','j');
INSERT INTO t1 VALUES (694,6,'2025-06-17','00:00:00','s');
INSERT INTO t1 VALUES (695,8,'2031-01-22','13:32:14','p');
INSERT INTO t1 VALUES (696,5,'1999-10-19','14:38:29','p');
INSERT INTO t1 VALUES (697,8,'2006-08-05','06:56:36','m');
INSERT INTO t1 VALUES (698,7,'2035-02-07','04:12:03','g');
INSERT INTO t1 VALUES (699,0,'1900-01-01','17:58:26','s');
INSERT INTO t1 VALUES (700,3,'1976-10-09','04:15:39','s');
INSERT INTO t1 VALUES (701,2,'2011-11-01','21:39:03','f');
INSERT INTO t1 VALUES (702,1,'1983-10-22','12:00:56','o');
INSERT INTO t1 VALUES (703,0,'1980-07-17','07:10:45','y');
INSERT INTO t1 VALUES (704,1,'1980-03-10','18:20:45','t');
INSERT INTO t1 VALUES (705,5,'2013-02-28','23:50:17','x');
INSERT INTO t1 VALUES (706,5,'1985-10-23','19:33:57','v');
INSERT INTO t1 VALUES (707,7,'1973-02-22','22:05:37','x');
INSERT INTO t1 VALUES (708,9,'2011-11-01','15:01:08','x');
INSERT INTO t1 VALUES (709,2,'1984-01-04','00:45:32','x');
INSERT INTO t1 VALUES (710,7,'2014-03-02','14:36:14','b');
INSERT INTO t1 VALUES (711,6,'2000-07-08','21:32:47','s');
INSERT INTO t1 VALUES (712,6,'2025-10-01','16:08:26','o');
INSERT INTO t1 VALUES (713,1,'1999-07-05','09:30:05','t');
INSERT INTO t1 VALUES (714,7,'1985-11-19','05:13:57','g');
INSERT INTO t1 VALUES (715,6,'2035-11-11','00:00:00','k');
INSERT INTO t1 VALUES (716,8,'2006-05-23','00:00:00','f');
INSERT INTO t1 VALUES (717,0,'2011-11-01','12:51:38','x');
INSERT INTO t1 VALUES (718,9,'2028-12-23','11:11:03','v');
INSERT INTO t1 VALUES (719,8,'2013-01-16','20:45:16','l');
INSERT INTO t1 VALUES (720,4,'1983-06-26','06:24:21','c');
INSERT INTO t1 VALUES (721,6,'2001-06-23','00:00:00','z');
INSERT INTO t1 VALUES (722,7,'1997-08-11','07:33:06','h');
INSERT INTO t1 VALUES (723,1,'1978-12-23','07:29:56','x');
INSERT INTO t1 VALUES (724,1,'2027-04-26','08:35:52','p');
INSERT INTO t1 VALUES (725,0,'1979-04-23','23:59:57','v');
INSERT INTO t1 VALUES (726,1,'1993-11-05','17:31:44','z');
INSERT INTO t1 VALUES (727,4,'2011-11-01','05:35:32','x');
INSERT INTO t1 VALUES (728,2,'1976-02-21','13:42:03','m');
INSERT INTO t1 VALUES (729,2,'1900-01-01','11:21:22','d');
INSERT INTO t1 VALUES (730,4,'1991-05-03','20:34:40','x');
INSERT INTO t1 VALUES (731,5,'2025-05-11','12:09:46','z');
INSERT INTO t1 VALUES (732,7,'2017-05-07','14:04:15','s');
INSERT INTO t1 VALUES (733,2,'1996-07-10','03:51:05','c');
INSERT INTO t1 VALUES (734,2,'2029-04-05','11:38:09','v');
INSERT INTO t1 VALUES (735,5,'1972-03-16','18:23:44','g');
INSERT INTO t1 VALUES (736,7,'2035-11-09','22:31:55','m');
INSERT INTO t1 VALUES (737,3,'2014-05-26','12:03:48','p');
INSERT INTO t1 VALUES (738,9,'1900-01-01','08:26:08','v');
INSERT INTO t1 VALUES (739,4,'2011-11-01','04:03:21','c');
INSERT INTO t1 VALUES (740,4,'2000-09-20','17:00:00','i');
INSERT INTO t1 VALUES (741,1,'1988-03-21','00:00:00','f');
INSERT INTO t1 VALUES (742,2,'2016-07-06','15:23:59','u');
INSERT INTO t1 VALUES (743,8,'1982-03-12','06:55:07','f');
INSERT INTO t1 VALUES (744,8,'2013-04-03','06:44:45','o');
INSERT INTO t1 VALUES (745,7,'2009-07-27','00:00:00','p');
INSERT INTO t1 VALUES (746,3,'1994-11-10','19:42:39','c');
INSERT INTO t1 VALUES (747,7,'1988-12-21','17:55:47','n');
INSERT INTO t1 VALUES (748,4,'2011-11-01','23:07:42','v');
INSERT INTO t1 VALUES (749,4,'1980-11-25','12:02:43','x');
INSERT INTO t1 VALUES (750,1,'2011-11-01','20:22:28','w');
INSERT INTO t1 VALUES (751,3,'1900-01-01','00:00:00','u');
INSERT INTO t1 VALUES (752,4,'2011-11-01','00:00:00','k');
INSERT INTO t1 VALUES (753,1,'2013-09-25','09:22:38','b');
INSERT INTO t1 VALUES (754,6,'2027-05-26','00:00:00','q');
INSERT INTO t1 VALUES (755,9,'2011-11-01','16:54:40','i');
INSERT INTO t1 VALUES (756,8,'1978-03-07','08:17:10','c');
INSERT INTO t1 VALUES (757,9,'2026-05-23','03:50:53','i');
INSERT INTO t1 VALUES (758,7,'2020-03-03','00:00:00','s');
INSERT INTO t1 VALUES (759,6,'2033-09-10','18:27:10','g');
INSERT INTO t1 VALUES (760,5,'2011-11-01','10:19:22','h');
INSERT INTO t1 VALUES (761,3,'2024-06-10','00:00:00','p');
INSERT INTO t1 VALUES (762,9,'2020-10-23','23:17:47','i');
INSERT INTO t1 VALUES (763,4,'1900-01-01','00:06:59','a');
INSERT INTO t1 VALUES (764,2,'1988-04-19','03:28:44','x');
INSERT INTO t1 VALUES (765,6,'2032-11-08','20:04:11','s');
INSERT INTO t1 VALUES (766,8,'1975-11-09','20:38:25','p');
INSERT INTO t1 VALUES (767,1,'1982-02-26','00:00:00','o');
INSERT INTO t1 VALUES (768,3,'1998-04-13','07:51:02','x');
INSERT INTO t1 VALUES (769,1,'2018-08-14','08:22:04','t');
INSERT INTO t1 VALUES (770,1,'2011-11-01','19:59:37','x');
INSERT INTO t1 VALUES (771,8,'1997-01-21','12:07:24','x');
INSERT INTO t1 VALUES (772,3,'2011-11-01','03:07:48','f');
INSERT INTO t1 VALUES (773,1,'1989-02-01','00:40:57','a');
INSERT INTO t1 VALUES (774,6,'2009-05-13','13:44:34','c');
INSERT INTO t1 VALUES (775,3,'2009-11-05','02:29:52','i');
INSERT INTO t1 VALUES (776,6,'2011-11-01','07:59:25','i');
INSERT INTO t1 VALUES (777,3,'2025-06-21','00:00:00','h');
INSERT INTO t1 VALUES (778,0,'1979-02-10','00:00:00','e');
INSERT INTO t1 VALUES (779,4,'1992-01-09','00:00:00','v');
INSERT INTO t1 VALUES (780,7,'2011-11-01','20:55:31','g');
INSERT INTO t1 VALUES (781,6,'1999-07-13','02:17:44','x');
INSERT INTO t1 VALUES (782,0,'2011-11-01','01:09:15','v');
INSERT INTO t1 VALUES (783,2,'1971-12-18','00:00:00','f');
INSERT INTO t1 VALUES (784,4,'1995-04-09','00:00:00','w');
INSERT INTO t1 VALUES (785,0,'1976-08-09','20:39:11','p');
INSERT INTO t1 VALUES (786,2,'1993-09-08','05:34:10','j');
INSERT INTO t1 VALUES (787,4,'2015-12-15','07:12:20','x');
INSERT INTO t1 VALUES (788,0,'2011-12-16','17:11:29','p');
INSERT INTO t1 VALUES (789,0,'2016-01-15','03:52:44','j');
INSERT INTO t1 VALUES (790,2,'2019-10-25','12:29:45','n');
INSERT INTO t1 VALUES (791,5,'2002-05-03','00:00:00','y');
INSERT INTO t1 VALUES (792,2,'2018-06-07','02:35:04','w');
INSERT INTO t1 VALUES (793,9,'1996-07-23','23:34:40','w');
INSERT INTO t1 VALUES (794,5,'2028-11-18','00:00:00','e');
INSERT INTO t1 VALUES (795,6,'1900-01-01','01:40:52','a');
INSERT INTO t1 VALUES (796,3,'2005-09-17','01:29:32','k');
INSERT INTO t1 VALUES (797,2,'1976-02-06','03:47:43','h');
INSERT INTO t1 VALUES (798,3,'1999-02-28','18:45:49','w');
INSERT INTO t1 VALUES (799,3,'2011-11-01','16:24:28','s');
INSERT INTO t1 VALUES (800,2,'2029-01-13','00:29:56','k');
INSERT INTO t1 VALUES (801,6,'2011-11-01','00:00:00','g');
INSERT INTO t1 VALUES (802,4,'1974-09-26','04:43:37','s');
INSERT INTO t1 VALUES (803,5,'1992-02-02','12:36:40','f');
INSERT INTO t1 VALUES (804,2,'1900-01-01','13:15:02','l');
INSERT INTO t1 VALUES (805,8,'2023-05-17','07:27:56','o');
INSERT INTO t1 VALUES (806,7,'1900-01-01','07:53:37','h');
INSERT INTO t1 VALUES (807,6,'2011-11-01','11:44:58','l');
INSERT INTO t1 VALUES (808,2,'1991-05-22','17:41:58','n');
INSERT INTO t1 VALUES (809,1,'2003-02-05','18:56:32','i');
INSERT INTO t1 VALUES (810,2,'2011-11-01','09:48:05','u');
INSERT INTO t1 VALUES (811,7,'1975-12-06','06:10:12','g');
INSERT INTO t1 VALUES (812,2,'2004-07-07','12:43:56','s');
INSERT INTO t1 VALUES (813,7,'2011-11-01','05:46:10','w');
INSERT INTO t1 VALUES (814,3,'2012-06-28','00:00:00','k');
INSERT INTO t1 VALUES (815,8,'2009-09-24','23:27:15','d');
INSERT INTO t1 VALUES (816,2,'1900-01-01','00:00:00','n');
INSERT INTO t1 VALUES (817,0,'2028-02-10','02:37:51','m');
INSERT INTO t1 VALUES (818,2,'1988-01-10','20:57:08','i');
INSERT INTO t1 VALUES (819,3,'2028-05-07','04:12:42','m');
INSERT INTO t1 VALUES (820,2,'2022-01-07','18:46:35','o');
INSERT INTO t1 VALUES (821,2,'1986-09-15','19:51:10','x');
INSERT INTO t1 VALUES (822,5,'2011-11-01','21:35:53','q');
INSERT INTO t1 VALUES (823,6,'2035-09-11','11:11:43','r');
INSERT INTO t1 VALUES (824,9,'2013-06-06','17:18:54','w');
INSERT INTO t1 VALUES (825,1,'2011-11-01','16:59:18','h');
INSERT INTO t1 VALUES (826,3,'2023-10-18','15:28:29','a');
INSERT INTO t1 VALUES (827,1,'2002-08-06','00:00:00','d');
INSERT INTO t1 VALUES (828,0,'1900-01-01','00:00:00','d');
INSERT INTO t1 VALUES (829,9,'1988-01-15','00:00:00','z');
INSERT INTO t1 VALUES (830,4,'1900-01-01','11:46:50','n');
INSERT INTO t1 VALUES (831,6,'1997-12-06','11:58:35','p');
INSERT INTO t1 VALUES (832,7,'2031-02-11','00:00:00','h');
INSERT INTO t1 VALUES (833,3,'1900-01-01','00:00:00','q');
INSERT INTO t1 VALUES (834,8,'2029-01-13','00:00:00','x');
INSERT INTO t1 VALUES (835,1,'2007-07-25','03:41:18','j');
INSERT INTO t1 VALUES (836,7,'2009-01-01','20:36:54','n');
INSERT INTO t1 VALUES (837,8,'2032-09-20','09:41:08','h');
INSERT INTO t1 VALUES (838,6,'1975-02-25','01:05:23','k');
INSERT INTO t1 VALUES (839,2,'1900-01-01','06:08:49','i');
INSERT INTO t1 VALUES (840,6,'2017-01-14','00:00:00','k');
INSERT INTO t1 VALUES (841,3,'1978-02-23','12:32:58','p');
INSERT INTO t1 VALUES (842,5,'2004-11-06','05:41:38','x');
INSERT INTO t1 VALUES (843,2,'2002-04-15','20:59:28','v');
INSERT INTO t1 VALUES (844,7,'2007-01-01','17:04:00','f');
INSERT INTO t1 VALUES (845,0,'1977-03-21','00:00:00','k');
INSERT INTO t1 VALUES (846,6,'1978-04-17','02:19:46','o');
INSERT INTO t1 VALUES (847,4,'1992-11-15','06:16:12','m');
INSERT INTO t1 VALUES (848,2,'2011-11-01','02:45:25','k');
INSERT INTO t1 VALUES (849,9,'2011-11-01','15:23:48','s');
INSERT INTO t1 VALUES (850,2,'1900-01-01','00:00:00','a');
INSERT INTO t1 VALUES (851,5,'2001-03-13','00:00:00','r');
INSERT INTO t1 VALUES (852,7,'2003-03-02','00:34:05','f');
INSERT INTO t1 VALUES (853,0,'2011-11-01','12:28:12','o');
INSERT INTO t1 VALUES (854,5,'2015-07-06','00:00:00','x');
INSERT INTO t1 VALUES (855,8,'2008-01-12','11:04:06','v');
INSERT INTO t1 VALUES (856,8,'1900-01-01','16:36:23','n');
INSERT INTO t1 VALUES (857,6,'2034-09-04','22:01:08','c');
INSERT INTO t1 VALUES (858,7,'2001-09-26','18:18:59','k');
INSERT INTO t1 VALUES (859,2,'1993-05-23','00:00:00','h');
INSERT INTO t1 VALUES (860,7,'1996-07-13','00:00:00','x');
INSERT INTO t1 VALUES (861,4,'2011-11-01','14:46:17','j');
INSERT INTO t1 VALUES (862,2,'1900-01-01','07:59:32','g');
INSERT INTO t1 VALUES (863,1,'2009-11-02','00:00:00','g');
INSERT INTO t1 VALUES (864,2,'1980-07-07','05:20:51','o');
INSERT INTO t1 VALUES (865,5,'2030-12-07','09:45:41','v');
INSERT INTO t1 VALUES (866,8,'1989-12-22','03:08:20','r');
INSERT INTO t1 VALUES (867,2,'1978-02-27','11:18:06','d');
INSERT INTO t1 VALUES (868,8,'2021-09-03','22:58:15','j');
INSERT INTO t1 VALUES (869,5,'1985-02-22','17:11:39','b');
INSERT INTO t1 VALUES (870,2,'2011-11-01','11:57:52','x');
INSERT INTO t1 VALUES (871,2,'2011-11-01','19:58:40','g');
INSERT INTO t1 VALUES (872,7,'1982-02-03','10:09:14','x');
INSERT INTO t1 VALUES (873,2,'2004-11-23','13:20:18','m');
INSERT INTO t1 VALUES (874,8,'2015-08-23','01:04:24','x');
INSERT INTO t1 VALUES (875,5,'1985-10-19','09:31:55','o');
INSERT INTO t1 VALUES (876,0,'1996-03-06','18:50:55','c');
INSERT INTO t1 VALUES (877,9,'2028-08-26','14:38:41','x');
INSERT INTO t1 VALUES (878,9,'1973-05-04','22:07:25','c');
INSERT INTO t1 VALUES (879,1,'2011-11-01','08:10:49','w');
INSERT INTO t1 VALUES (880,1,'1992-06-03','19:22:35','z');
INSERT INTO t1 VALUES (881,1,'2030-09-11','00:00:00','t');
INSERT INTO t1 VALUES (882,7,'2001-03-12','04:12:20','i');
INSERT INTO t1 VALUES (883,3,'1994-10-19','09:19:38','m');
INSERT INTO t1 VALUES (884,6,'2024-01-04','20:56:09','x');
INSERT INTO t1 VALUES (885,1,'2011-11-01','05:48:23','r');
INSERT INTO t1 VALUES (886,5,'1984-08-22','11:00:11','x');
INSERT INTO t1 VALUES (887,5,'1900-01-01','00:55:47','o');
INSERT INTO t1 VALUES (888,9,'1976-11-01','00:00:00','h');
INSERT INTO t1 VALUES (889,9,'2017-12-24','00:00:00','t');
INSERT INTO t1 VALUES (890,7,'2031-10-16','17:03:22','n');
INSERT INTO t1 VALUES (891,8,'1900-01-01','15:05:46','f');
INSERT INTO t1 VALUES (892,9,'1985-10-04','00:00:00','p');
INSERT INTO t1 VALUES (893,9,'2023-05-28','10:27:05','t');
INSERT INTO t1 VALUES (894,7,'2018-02-11','00:00:00','a');
INSERT INTO t1 VALUES (895,8,'2008-02-02','15:47:37','p');
INSERT INTO t1 VALUES (896,0,'2018-01-15','01:22:51','m');
INSERT INTO t1 VALUES (897,1,'1995-08-19','02:21:20','q');
INSERT INTO t1 VALUES (898,6,'1991-05-15','00:00:00','u');
INSERT INTO t1 VALUES (899,0,'2033-10-09','00:40:21','j');
INSERT INTO t1 VALUES (900,8,'2011-11-01','09:40:53','m');
INSERT INTO t1 VALUES (901,6,'1980-10-28','13:41:28','s');
INSERT INTO t1 VALUES (902,4,'2011-11-01','06:36:11','p');
INSERT INTO t1 VALUES (903,2,'1900-01-01','00:00:00','k');
INSERT INTO t1 VALUES (904,8,'2011-11-01','01:19:14','q');
INSERT INTO t1 VALUES (905,9,'2019-10-16','23:46:43','r');
INSERT INTO t1 VALUES (906,8,'1900-01-01','01:10:17','x');
INSERT INTO t1 VALUES (907,6,'1986-12-01','20:07:04','u');
INSERT INTO t1 VALUES (908,7,'1982-06-06','12:25:47','l');
INSERT INTO t1 VALUES (909,7,'1979-09-01','07:33:01','x');
INSERT INTO t1 VALUES (910,2,'2008-06-26','14:03:42','l');
INSERT INTO t1 VALUES (911,1,'1974-06-03','20:19:58','x');
INSERT INTO t1 VALUES (912,5,'1997-05-08','00:38:55','m');
INSERT INTO t1 VALUES (913,2,'1980-02-10','08:13:52','z');
INSERT INTO t1 VALUES (914,1,'2021-08-04','21:38:08','t');
INSERT INTO t1 VALUES (915,9,'1973-12-15','15:07:13','x');
INSERT INTO t1 VALUES (916,5,'2000-04-15','01:00:31','r');
INSERT INTO t1 VALUES (917,9,'2018-09-12','14:20:08','t');
INSERT INTO t1 VALUES (918,7,'2015-07-28','17:05:03','y');
INSERT INTO t1 VALUES (919,5,'1974-08-07','00:00:00','k');
INSERT INTO t1 VALUES (920,9,'2026-01-25','01:30:45','r');
INSERT INTO t1 VALUES (921,5,'1900-01-01','02:27:49','l');
INSERT INTO t1 VALUES (922,0,'2003-08-10','19:11:59','p');
INSERT INTO t1 VALUES (923,2,'2010-02-08','00:00:00','v');
INSERT INTO t1 VALUES (924,9,'1985-03-28','07:23:53','r');
INSERT INTO t1 VALUES (925,5,'1973-09-18','19:03:45','j');
INSERT INTO t1 VALUES (926,2,'1992-06-13','00:00:00','k');
INSERT INTO t1 VALUES (927,7,'2028-11-21','09:44:43','u');
INSERT INTO t1 VALUES (928,1,'2016-09-15','23:10:03','g');
INSERT INTO t1 VALUES (929,2,'2011-11-01','00:00:00','x');
INSERT INTO t1 VALUES (930,4,'1971-04-06','06:11:01','c');
INSERT INTO t1 VALUES (931,8,'1987-01-02','00:00:00','j');
INSERT INTO t1 VALUES (932,9,'2001-09-02','01:27:12','w');
INSERT INTO t1 VALUES (933,5,'1900-01-01','05:59:08','p');
INSERT INTO t1 VALUES (934,3,'2011-11-01','04:23:34','i');
INSERT INTO t1 VALUES (935,5,'2005-03-08','14:35:17','s');
INSERT INTO t1 VALUES (936,4,'1981-10-02','00:00:00','o');
INSERT INTO t1 VALUES (937,6,'1986-03-01','00:00:00','x');
INSERT INTO t1 VALUES (938,3,'1900-01-01','09:14:02','t');
INSERT INTO t1 VALUES (939,7,'1983-01-01','23:05:59','p');
INSERT INTO t1 VALUES (940,0,'2019-02-11','00:00:00','z');
INSERT INTO t1 VALUES (941,4,'2002-09-21','01:17:20','c');
INSERT INTO t1 VALUES (942,9,'2020-07-06','00:00:00','x');
INSERT INTO t1 VALUES (943,1,'2029-03-24','11:42:11','s');
INSERT INTO t1 VALUES (944,4,'1980-04-23','06:54:13','l');
INSERT INTO t1 VALUES (945,3,'2018-05-22','00:00:00','i');
INSERT INTO t1 VALUES (946,4,'2005-06-16','00:00:00','f');
INSERT INTO t1 VALUES (947,0,'1989-05-16','02:36:31','c');
INSERT INTO t1 VALUES (948,0,'2004-12-16','00:00:00','s');
INSERT INTO t1 VALUES (949,4,'2011-11-01','12:52:31','i');
INSERT INTO t1 VALUES (950,0,'1989-09-09','11:29:47','s');
INSERT INTO t1 VALUES (951,9,'1972-12-12','16:14:07','r');
INSERT INTO t1 VALUES (952,7,'2005-02-10','20:30:56','d');
INSERT INTO t1 VALUES (953,1,'1997-02-16','22:26:31','i');
INSERT INTO t1 VALUES (954,4,'2031-04-07','01:23:20','x');
INSERT INTO t1 VALUES (955,7,'2017-05-15','23:21:19','x');
INSERT INTO t1 VALUES (956,6,'2003-01-12','22:02:32','v');
INSERT INTO t1 VALUES (957,4,'1900-01-01','00:00:00','v');
INSERT INTO t1 VALUES (958,8,'2019-05-09','01:18:48','i');
INSERT INTO t1 VALUES (959,5,'1900-01-01','00:00:00','o');
INSERT INTO t1 VALUES (960,3,'2007-04-10','14:27:22','c');
INSERT INTO t1 VALUES (961,3,'2011-11-01','00:00:00','p');
INSERT INTO t1 VALUES (962,3,'1994-06-18','02:52:45','z');
INSERT INTO t1 VALUES (963,4,'1987-01-22','03:23:17','r');
INSERT INTO t1 VALUES (964,4,'2002-07-28','00:00:00','g');
INSERT INTO t1 VALUES (965,5,'1976-08-21','19:07:36','z');
INSERT INTO t1 VALUES (966,5,'2015-10-10','07:50:55','s');
INSERT INTO t1 VALUES (967,9,'1973-08-02','23:55:16','o');
INSERT INTO t1 VALUES (968,6,'1997-01-18','08:04:32','o');
INSERT INTO t1 VALUES (969,5,'2026-11-14','00:00:00','m');
INSERT INTO t1 VALUES (970,2,'1993-12-27','04:26:38','s');
INSERT INTO t1 VALUES (971,5,'2022-04-03','00:00:00','v');
INSERT INTO t1 VALUES (972,7,'2002-04-23','16:01:55','h');
INSERT INTO t1 VALUES (973,4,'1980-06-06','10:12:12','n');
INSERT INTO t1 VALUES (974,9,'1971-09-22','00:00:00','f');
INSERT INTO t1 VALUES (975,2,'2001-02-07','12:11:06','s');
INSERT INTO t1 VALUES (976,3,'1986-05-10','01:11:45','o');
INSERT INTO t1 VALUES (977,5,'2015-12-23','05:49:25','i');
INSERT INTO t1 VALUES (978,1,'2011-11-01','15:12:52','t');
INSERT INTO t1 VALUES (979,5,'2028-07-25','00:55:50','s');
INSERT INTO t1 VALUES (980,2,'2024-09-14','16:07:36','x');
INSERT INTO t1 VALUES (981,1,'2011-11-01','04:51:03','m');
INSERT INTO t1 VALUES (982,4,'2003-08-02','00:00:00','n');
INSERT INTO t1 VALUES (983,2,'1900-01-01','19:53:15','h');
INSERT INTO t1 VALUES (984,8,'2015-12-16','14:49:28','l');
INSERT INTO t1 VALUES (985,4,'1989-07-16','21:38:43','y');
INSERT INTO t1 VALUES (986,5,'2009-07-22','00:00:00','s');
INSERT INTO t1 VALUES (987,4,'2011-11-01','07:10:22','u');
INSERT INTO t1 VALUES (988,7,'2007-12-11','05:27:29','r');
INSERT INTO t1 VALUES (989,9,'1996-10-01','16:25:56','s');
INSERT INTO t1 VALUES (990,4,'2011-11-01','14:20:56','z');
INSERT INTO t1 VALUES (991,4,'2032-06-03','08:20:32','w');
INSERT INTO t1 VALUES (992,4,'2021-04-16','17:02:34','j');
INSERT INTO t1 VALUES (993,6,'2028-04-20','19:32:57','p');
INSERT INTO t1 VALUES (994,5,'1900-01-01','07:13:26','l');
INSERT INTO t1 VALUES (995,2,'1900-01-01','00:00:00','u');
INSERT INTO t1 VALUES (996,7,'1900-01-01','11:20:49','f');
INSERT INTO t1 VALUES (997,3,'1900-01-01','11:45:16','m');
INSERT INTO t1 VALUES (998,7,'2004-12-02','14:09:40','j');
INSERT INTO t1 VALUES (999,3,'1974-11-08','16:29:24','t');
 
ALTER TABLE t1 PARTITION BY KEY() PARTITIONS 2;
ALTER TABLE t1 ADD COLUMN w INT;
ALTER TABLE t1 ADD COLUMN k INT;
 
# Cleanup
DROP TABLE t1;

Comment by Marko Mäkelä [ 2017-10-01 ]

elenst, #12 was a bug in row_log_table_apply_convert_mrec().
Issue #16 is caused by initializing the root page when the table becomes empty. At the time of the crash, there was a LOCK_X|LOCK_REC on the secondary index c. At least btr_cur_optimistic_delete() forgot to call lock_update_delete() in this case.

Comment by Marko Mäkelä [ 2017-10-01 ]

I think I have now fixed all the issues that were reported so far.
For reference, here is my current combined test. It is missing some of the test cases, partly because I accidentally deleted the file and had to restore parts of it from earlier comments.

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
CREATE TABLE t1 (
 pk INT AUTO_INCREMENT PRIMARY KEY,
 c1 INT,
 c2 VARCHAR(255),
 c3 VARCHAR(255),
 c4 INT,
 c5 INT,
 c6 INT,
 c7 VARCHAR(255),
 c8 TIMESTAMP NULL
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (NULL,1,NULL,'foo',NULL,1,NULL,NULL,'2011-11-11 00:00:00');
ALTER TABLE t1 ADD COLUMN f INT;
REPLACE INTO t1 (c7) VALUES ('bar');
DROP TABLE t1;
 
CREATE TABLE t1 (i INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (-1),(1);
ALTER TABLE t1 ADD COLUMN j INT;
BEGIN;
DELETE FROM t1;
ROLLBACK;
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES (1,2);
DROP TABLE t1;
 
CREATE TABLE t1 (pk INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 () VALUES ();
ALTER TABLE t1 ADD COLUMN f INT;
UPDATE t1 SET pk = DEFAULT;
SELECT * FROM t1;
DROP TABLE t1;
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
ALTER TABLE t1 ADD t TEXT DEFAULT '';
DROP TABLE t1;
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
INSERT INTO t1 VALUES (NULL);
ALTER TABLE t1 ADD c CHAR(3);
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
--send
ALTER TABLE t1 FORCE;
connect (dml,localhost,root,,);
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
BEGIN;
INSERT INTO t1 SET i=1;
UPDATE t1 SET i=ISNULL(i);
ROLLBACK;
SET DEBUG_SYNC='now SIGNAL dml';
connection default;
reap;
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
 
CREATE TABLE t1 (
 pk INT AUTO_INCREMENT PRIMARY KEY,
 c1 BIGINT UNSIGNED,
 c2 TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
 c3 BIGINT,
 c4 VARCHAR(257) CHARACTER SET utf8,
 c5 TINYINT UNSIGNED,
 c6 TINYINT,
 c7 VARCHAR(257) CHARACTER SET latin1,
 c8 VARCHAR(257) CHARACTER SET binary
) ENGINE=InnoDB;
INSERT INTO t1 () VALUES ();
ALTER TABLE t1 ADD COLUMN IF NOT EXISTS t TIMESTAMP NULL KEY;
SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml';
--send
OPTIMIZE TABLE t1;
connection dml;
SET DEBUG_SYNC='now WAIT_FOR rebuilt';
BEGIN;
INSERT INTO t1 () VALUES (),();
UPDATE t1 SET t=current_timestamp();
ROLLBACK;
SET DEBUG_SYNC='now SIGNAL dml';
disconnect dml;
connection default;
reap;
SET DEBUG_SYNC='RESET';
DROP TABLE t1;
 
CREATE TABLE t1 (pk INT DEFAULT 0 KEY) ENGINE=InnoDB;
INSERT INTO t1 (pk) VALUES (1);
ALTER TABLE t1 ADD c INT;
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES (1,1),(2,2);
ALTER TABLE t1 FORCE;
DROP TABLE t1;
 
CREATE TABLE t1 (
 c01 enum('a','b'),
 c02 bit,
 c03 blob,
 c04 enum('c','d'),
 c05 blob,
 c06 decimal,
 c07 char(1),
 c08 int,
 c09 char(1),
 c10 set('e','f'),
 c11 char(1),
 c12 float,
 c13 bit,
 c14 char(1),
 c15 int,
 c16 float,
 c17 decimal,
 c18 char(1) CHARACTER SET utf8 not null default '',
 c19 float,
 c20 set('g','h'),
 c21 char(1),
 c22 int,
 c23 int,
 c24 int,
 c25 set('i','j'),
 c26 decimal,
 c27 float,
 c28 char(1),
 c29 int,
 c30 enum('k','l'),
 c31 decimal,
 c32 char(1),
 c33 decimal,
 c34 bit,
 c35 enum('m','n'),
 c36 set('o','p'),
 c37 enum('q','r'),
 c38 blob,
 c39 decimal,
 c40 blob not null default '',
 c41 char(1),
 c42 int,
 c43 float,
 c44 float,
 c45 enum('s','t'),
 c46 decimal,
 c47 set('u','v'),
 c48 enum('w','x'),
 c49 set('y','z'),
 c50 float
) ENGINE=InnoDB;
INSERT INTO t1 () VALUES  ();
ALTER TABLE t1 ADD COLUMN f INT;
INSERT INTO t1 () VALUES ();
UPDATE t1 SET c22 = 1;
DROP TABLE t1;

Comment by Marko Mäkelä [ 2017-10-03 ]

I added a bunch of tests in my newest push to bb-10.3-marko.

innodb.instant_alter_debug is the combined test mentioned in my comments. (I did not accidentally delete it; I had renamed it from a temporary name.)

innodb.instant_alter is a non-debug, non-restarting test.
innodb.instant_alter_rollback is a non-debug test that kills the server, with some DML to be recovered and rolled back after instant ADD COLUMN.

innodb.instant_alter_crash uses DEBUG_SYNC to hold back instant ADD COLUMN, and then kill the server. It should prove that DDL crash recovery now works.

innodb.instant_alter_inject uses DBUG_EXECUTE_IF to trigger rollback during instant ADD COLUMN of a partitioned table. There is a known failure case, which is commented out. The fix to that would require a few more days. (During the rollback, we are using the old version of the table, which is missing the instantly added columns.)

Comment by Elena Stepanova [ 2017-10-04 ]

Since now instant ADD is enabled by default, I'm not mentioning it specifically

#23 - Assertion `is_dummy || col->is_instant()'

bb-10.3-marko 3b229393ca7d8

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/dict0mem.h:1053: unsigned int dict_index_t::get_n_nullable(ulint) const: Assertion `is_dummy || col->is_instant()' failed.
171004 15:16:11 [ERROR] mysqld got signal 6 ;
 
#7  0x00007f2c49cb4ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00005578b1619137 in dict_index_t::get_n_nullable (this=0x7f2c20016688, n_prefix=86) at /data/src/bb-10.3-marko/storage/innobase/include/dict0mem.h:1053
#9  0x00005578b166cf2e in rec_init_offsets_comp_ordinary (rec=0x7f2c3f66c08a "", index=0x7f2c20016688, offsets=0x7f2c20015a88, format=REC_LEAF_COLUMNS_ADDED) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:356
#10 0x00005578b166ddf3 in rec_init_offsets (rec=0x7f2c3f66c08a "", index=0x7f2c20016688, leaf=true, offsets=0x7f2c20015a88) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:618
#11 0x00005578b166e995 in rec_get_offsets_func (rec=0x7f2c3f66c08a "", index=0x7f2c20016688, offsets=0x7f2c20015a88, leaf=true, n_fields=18446744073709551615, file=0x5578b1d38a60 "/data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc", line=475, heap=0x7f2c267fa270) at /data/src/bb-10.3-marko/storage/innobase/rem/rem0rec.cc:875
#12 0x00005578b17c86f3 in btr_cur_instant_init_low (index=0x7f2c20016688, mtr=0x7f2c267fa4e0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:474
#13 0x00005578b17c8b6e in btr_cur_instant_init (table=0x7f2c20013378) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:541
#14 0x00005578b1872b0f in dict_load_table_one (name=..., cached=true, ignore_err=DICT_ERR_IGNORE_NONE, fk_tables=std::deque with 0 elements) at /data/src/bb-10.3-marko/storage/innobase/dict/dict0load.cc:3056
#15 0x00005578b1871d3c in dict_load_table (name=0x7f2c2000b158 "test/table100_innodb", cached=true, ignore_err=DICT_ERR_IGNORE_NONE) at /data/src/bb-10.3-marko/storage/innobase/dict/dict0load.cc:2807
#16 0x00005578b18733cc in dict_load_table_on_id (table_id=22, ignore_err=DICT_ERR_IGNORE_NONE) at /data/src/bb-10.3-marko/storage/innobase/dict/dict0load.cc:3222
#17 0x00005578b1850607 in dict_table_open_on_id_low (table_id=22, ignore_err=DICT_ERR_IGNORE_NONE, open_only_if_in_cache=0) at /data/src/bb-10.3-marko/storage/innobase/include/dict0priv.ic:90
#18 0x00005578b1852ca0 in dict_table_open_on_id (table_id=22, dict_locked=0, table_op=DICT_TABLE_OP_NORMAL) at /data/src/bb-10.3-marko/storage/innobase/dict/dict0dict.cc:1018
#19 0x00005578b16dee3f in row_purge_parse_undo_rec (node=0x5578b3dce518, undo_rec=0x7f2c140325a0 "!Y\016\001\026", updated_extern=0x7f2c267fbdde, thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:931
#20 0x00005578b16df607 in row_purge (node=0x5578b3dce518, undo_rec=0x7f2c140325a0 "!Y\016\001\026", thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:1102
#21 0x00005578b16df8b7 in row_purge_step (thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:1184
#22 0x00005578b1661cbe in que_thr_step (thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1054
#23 0x00005578b1661ee9 in que_run_threads_low (thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1116
#24 0x00005578b16620cb in que_run_threads (thr=0x5578b3dce360) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1156
#25 0x00005578b1731dbb in srv_task_execute () at /data/src/bb-10.3-marko/storage/innobase/srv/srv0srv.cc:2580
#26 0x00005578b1731f0c in srv_worker_thread (arg=0x0) at /data/src/bb-10.3-marko/storage/innobase/srv/srv0srv.cc:2627
#27 0x00007f2c4bbf9494 in start_thread (arg=0x7f2c267fc700) at pthread_create.c:333
#28 0x00007f2c49d7193f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The test case runs some DDL/DML, then restarts server (normally), runs some more, restarts again, fails. It uses extra files:
t23.dmp.gz data dump, it's separate because it contains blobs
t23_1.sql - a bunch of DDL/DML statements to execute before first restart
t23_2.sql - a smaller bunch of DDL/DML statements to execute after first restart.

For now, the test seems to fail reliably for me.
Sets of SQL statements don't make any sense, most of the queries fail due to missing tables, etc. But whenever I try to remove anything, it stops failing or becomes highly sporadic.

Adjust $file_location in the test to point at the files.

--source include/have_innodb.inc
--source include/have_partition.inc
 
--disable_abort_on_error
 
--let $file_location= /data/bug
 
--exec $MYSQL test --force < $file_location/t23.dmp
--exec $MYSQL test --force < $file_location/t23_1.sql
 
--sleep 2
--source include/restart_mysqld.inc
--sleep 2
 
--exec $MYSQL test --force < $file_location/t23_2.sql
 
--sleep 2
--source include/restart_mysqld.inc
--sleep 2
 
--echo # All done

Comment by Elena Stepanova [ 2017-10-05 ]

#24 - Assertion `ptr'

bb-10.3-marko b90cf031019b

mysqld: /data/src/bb-10.3-marko/storage/innobase/include/ut0byte.ic:109: void* ut_align_down(const void*, ulint): Assertion `ptr' failed.
171005  4:28:52 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fa6b052eee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000561f60636530 in ut_align_down (ptr=0x0, align_no=16384) at /data/src/bb-10.3-marko/storage/innobase/include/ut0byte.ic:109
#9  0x0000561f60665b45 in page_align (ptr=0x0) at /data/src/bb-10.3-marko/storage/innobase/include/page0page.h:213
#10 0x0000561f60672d58 in page_rec_check (rec=0x0) at /data/src/bb-10.3-marko/storage/innobase/include/page0page.ic:564
#11 0x0000561f6069026e in page_rec_is_supremum (rec=0x0) at /data/src/bb-10.3-marko/storage/innobase/include/page0page.ic:323
#12 0x0000561f608dc258 in btr_search_check_guess (cursor=0x561f6420a230, can_only_compare_to_cursor_rec=0, tuple=0x7fa68000b018, mode=4, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0sea.cc:829
#13 0x0000561f608dc927 in btr_search_guess_on_hash (index=0x7fa65800de18, info=0x7fa65800e218, tuple=0x7fa68000b018, mode=4, latch_mode=2, cursor=0x561f6420a230, has_search_latch=0, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0sea.cc:1030
#14 0x0000561f608b83e5 in btr_cur_search_to_nth_level (index=0x7fa65800de18, level=0, tuple=0x7fa68000b018, mode=PAGE_CUR_LE, latch_mode=2, cursor=0x561f6420a230, has_search_latch=0, file=0x561f60dd3558 "/data/src/bb-10.3-marko/storage/innobase/row/row0row.cc", line=1030, mtr=0x7fa694ff8300, autoinc=0) at /data/src/bb-10.3-marko/storage/innobase/btr/btr0cur.cc:1136
#15 0x0000561f607d3121 in btr_pcur_open_low (index=0x7fa65800de18, level=0, tuple=0x7fa68000b018, mode=PAGE_CUR_LE, latch_mode=2, cursor=0x561f6420a230, file=0x561f60dd3558 "/data/src/bb-10.3-marko/storage/innobase/row/row0row.cc", line=1030, autoinc=0, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/include/btr0pcur.ic:459
#16 0x0000561f607d5af5 in row_search_on_row_ref (pcur=0x561f6420a230, mode=2, table=0x7fa65800bf88, ref=0x7fa68000b018, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/row/row0row.cc:1030
#17 0x0000561f607cab11 in row_purge_reposition_pcur (mode=2, node=0x561f6420a198, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:104
#18 0x0000561f607cc185 in row_purge_reset_trx_id (node=0x561f6420a198, mtr=0x7fa694ff8300) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:678
#19 0x0000561f607ccd3a in row_purge_upd_exist_or_extern_func (thr=0x561f64209ce0, node=0x561f6420a198, undo_rec=0x561f6420ad68 "\002\361\034\002\023\020") at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:866
#20 0x0000561f607cd4b3 in row_purge_record_func (node=0x561f6420a198, undo_rec=0x561f6420ad68 "\002\361\034\002\023\020", thr=0x561f64209ce0, updated_extern=false) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:1061
#21 0x0000561f607cd64e in row_purge (node=0x561f6420a198, undo_rec=0x561f6420ad68 "\002\361\034\002\023\020", thr=0x561f64209ce0) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:1105
#22 0x0000561f607cd94f in row_purge_step (thr=0x561f64209ce0) at /data/src/bb-10.3-marko/storage/innobase/row/row0purge.cc:1184
#23 0x0000561f6074fd56 in que_thr_step (thr=0x561f64209ce0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1054
#24 0x0000561f6074ff81 in que_run_threads_low (thr=0x561f64209ce0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1116
#25 0x0000561f60750163 in que_run_threads (thr=0x561f64209ce0) at /data/src/bb-10.3-marko/storage/innobase/que/que0que.cc:1156
#26 0x0000561f6081fe53 in srv_task_execute () at /data/src/bb-10.3-marko/storage/innobase/srv/srv0srv.cc:2580
#27 0x0000561f6081ffa4 in srv_worker_thread (arg=0x0) at /data/src/bb-10.3-marko/storage/innobase/srv/srv0srv.cc:2627
#28 0x00007fa6b2473494 in start_thread (arg=0x7fa694ff9700) at pthread_create.c:333
#29 0x00007fa6b05eb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6

It seems reproducible for now, but if does not happen right away, try to run with --repeat=N

--source include/have_innodb.inc
 
CREATE TABLE t1 (
  `pk` int(11) NOT NULL AUTO_INCREMENT,
  `i` int(11) DEFAULT NULL,
  `c` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`pk`),
  KEY `i` (`i`)
) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES (1,7,'t');
INSERT INTO t1 VALUES (2,4,'h');
INSERT INTO t1 VALUES (306,1,'e');
INSERT INTO t1 VALUES (307,1,'w');
INSERT INTO t1 VALUES (308,7,'l');
INSERT INTO t1 VALUES (309,3,'s');
INSERT INTO t1 VALUES (310,3,NULL);
INSERT INTO t1 VALUES (311,5,'n');
INSERT INTO t1 VALUES (313,7,'s');
INSERT INTO t1 VALUES (314,3,'w');
INSERT INTO t1 VALUES (315,7,'h');
INSERT INTO t1 VALUES (317,3,'q');
INSERT INTO t1 VALUES (318,4,'k');
INSERT INTO t1 VALUES (319,5,NULL);
INSERT INTO t1 VALUES (320,1,'c');
INSERT INTO t1 VALUES (321,0,'d');
INSERT INTO t1 VALUES (327,3,'k');
INSERT INTO t1 VALUES (328,5,'b');
INSERT INTO t1 VALUES (329,0,'s');
INSERT INTO t1 VALUES (330,4,'u');
INSERT INTO t1 VALUES (331,6,'r');
INSERT INTO t1 VALUES (332,1,'s');
INSERT INTO t1 VALUES (333,4,NULL);
INSERT INTO t1 VALUES (335,9,'f');
INSERT INTO t1 VALUES (336,4,'s');
INSERT INTO t1 VALUES (339,7,'w');
INSERT INTO t1 VALUES (340,3,'k');
INSERT INTO t1 VALUES (341,1,'l');
INSERT INTO t1 VALUES (342,1,'f');
INSERT INTO t1 VALUES (343,55,'s');
INSERT INTO t1 VALUES (344,8,'k');
INSERT INTO t1 VALUES (345,6,'y');
INSERT INTO t1 VALUES (346,4,'m');
INSERT INTO t1 VALUES (347,3,'w');
INSERT INTO t1 VALUES (348,4,'x');
INSERT INTO t1 VALUES (349,9,'i');
INSERT INTO t1 VALUES (350,221,'z');
INSERT INTO t1 VALUES (351,5,'f');
INSERT INTO t1 VALUES (352,7,'c');
INSERT INTO t1 VALUES (353,7,'p');
INSERT INTO t1 VALUES (354,3,NULL);
INSERT INTO t1 VALUES (355,5,'g');
INSERT INTO t1 VALUES (356,1,'h');
INSERT INTO t1 VALUES (357,3,'w');
INSERT INTO t1 VALUES (359,1,'r');
INSERT INTO t1 VALUES (361,24,'v');
INSERT INTO t1 VALUES (362,4,'f');
INSERT INTO t1 VALUES (363,5,'j');
INSERT INTO t1 VALUES (364,4,NULL);
INSERT INTO t1 VALUES (365,3,'n');
INSERT INTO t1 VALUES (366,0,'g');
INSERT INTO t1 VALUES (367,9,'n');
INSERT INTO t1 VALUES (369,4,'t');
INSERT INTO t1 VALUES (370,1,'w');
INSERT INTO t1 VALUES (371,1,'q');
INSERT INTO t1 VALUES (373,4,'z');
INSERT INTO t1 VALUES (374,81,'z');
INSERT INTO t1 VALUES (375,1,'u');
INSERT INTO t1 VALUES (376,9,'p');
INSERT INTO t1 VALUES (377,48,'v');
INSERT INTO t1 VALUES (379,3,'d');
INSERT INTO t1 VALUES (380,9,'a');
INSERT INTO t1 VALUES (390,3,'v');
INSERT INTO t1 VALUES (391,0,'h');
INSERT INTO t1 VALUES (392,3,'o');
INSERT INTO t1 VALUES (393,7,NULL);
INSERT INTO t1 VALUES (394,7,'w');
INSERT INTO t1 VALUES (395,1,'w');
INSERT INTO t1 VALUES (396,57,'l');
INSERT INTO t1 VALUES (397,7,'s');
INSERT INTO t1 VALUES (398,9,'i');
INSERT INTO t1 VALUES (399,7,NULL);
INSERT INTO t1 VALUES (400,0,'s');
INSERT INTO t1 VALUES (401,3,'m');
INSERT INTO t1 VALUES (403,8,'o');
INSERT INTO t1 VALUES (404,114,'a');
INSERT INTO t1 VALUES (405,40,'g');
INSERT INTO t1 VALUES (406,9,'o');
INSERT INTO t1 VALUES (407,5,'y');
INSERT INTO t1 VALUES (408,0,'w');
INSERT INTO t1 VALUES (409,0,'i');
INSERT INTO t1 VALUES (412,0,'y');
INSERT INTO t1 VALUES (413,3,'f');
INSERT INTO t1 VALUES (415,3,'d');
INSERT INTO t1 VALUES (416,5,'m');
INSERT INTO t1 VALUES (417,8,'b');
INSERT INTO t1 VALUES (424,0,'d');
INSERT INTO t1 VALUES (425,6,NULL);
INSERT INTO t1 VALUES (426,8,'d');
INSERT INTO t1 VALUES (427,6,'e');
INSERT INTO t1 VALUES (428,18,'i');
INSERT INTO t1 VALUES (431,6,NULL);
INSERT INTO t1 VALUES (432,7,'g');
INSERT INTO t1 VALUES (433,5,'j');
INSERT INTO t1 VALUES (434,9,'z');
INSERT INTO t1 VALUES (435,3,'v');
INSERT INTO t1 VALUES (436,8,'v');
INSERT INTO t1 VALUES (437,53,'m');
INSERT INTO t1 VALUES (438,5,'s');
INSERT INTO t1 VALUES (439,3,'f');
INSERT INTO t1 VALUES (440,134,'m');
INSERT INTO t1 VALUES (442,1,NULL);
INSERT INTO t1 VALUES (443,4,'f');
INSERT INTO t1 VALUES (447,8,'s');
INSERT INTO t1 VALUES (448,44,'i');
INSERT INTO t1 VALUES (449,NULL,'y');
INSERT INTO t1 VALUES (450,34,'e');
INSERT INTO t1 VALUES (451,5,'j');
INSERT INTO t1 VALUES (452,8,'k');
INSERT INTO t1 VALUES (453,7,NULL);
INSERT INTO t1 VALUES (454,9,'n');
COMMIT;
 
ALTER TABLE t1 ADD COLUMN dt DATETIME NULL DEFAULT CURRENT_TIMESTAMP;
SELECT * FROM t1 WHERE `i` <> 2 AND 'foo' = `c` LIMIT 2;
ALTER TABLE t1 ADD COLUMN t TIME NULL DEFAULT CURRENT_TIMESTAMP;
 
# Cleanup
DROP TABLE t1;

Comment by Marko Mäkelä [ 2017-10-06 ]

I believe that issue #24 was fixed by this commit: Avoid inserting the 'default row' into the adaptive hash index.
elenst, thank you for the excellent test cases. Per your recommendation, I have pushed MDEV-11369 into 10.3.
Because this is a very large task, I pushed the full history into a separate branch for future reference: 10.3-MDEV-11369.

Comment by Elena Stepanova [ 2017-10-06 ]

Since the code is now pushed into the main tree, further problems will be reported as JIRA items.

Comment by Elena Stepanova [ 2017-10-25 ]

MDEV-11071, while technically unrelated, very badly affects current auto tests.
MDEV-13923 is still not in 10.3 tree, and it causes numerous failures, but at least it can be worked around by disabling geometry in the tests.
MDEV-12827 also shows up regularly and spoils results. No viable workaround.


Nov 14th

  • MDEV-13201 appears a lot
  • MDEV-13820 appears regularly
  • MDEV-11071 still does too. Disabling temporary tables didn't help, it has other ways to fail.
  • [Warning] InnoDB: Table test/t1 contains 24 user defined columns in InnoDB, but 23 columns in MariaDB. Please check INFORMATION_SCHEMA.INNODB_SYS_COLUMNS and http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting.html for how to resolve the issue.}} shows a lot in tests involving crash recovery, but that's expected

  • 2017-11-15 10:44:21 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: ./test/#sql-62a8_10.ibd, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
    2017-11-15 10:44:21 0 [ERROR] InnoDB: Datafile './test/#sql-62a8_10.ibd' is corrupted. Cannot determine the space ID from the first 64 pages.

  • This I've only seen once so far:

    #5  0x00007fccad30a028 in __GI_abort () at abort.c:89
    #6  0x0000005591a321a2 in ut_dbg_assertion_failed (expr=0x0, file=0x5591f79828 "/home/travis/src/storage/innobase/log/log0recv.cc", line=1186) at /home/travis/src/storage/innobase/ut/ut0dbg.cc:61
    #7  0x00000055918a1c95 in recv_parse_or_apply_log_rec_body (type=MLOG_1BYTE, ptr=0x7fcc899d2318 "", end_ptr=0x7fcc899d231c "", space_id=144, page_no=0, apply=true, block=0x7fcc87b699b0, mtr=0x7fcc9497d550) at /home/travis/src/storage/innobase/log/log0recv.cc:1186
    #8  0x00000055918a4092 in recv_recover_page (just_read_in=true, block=0x7fcc87b699b0) at /home/travis/src/storage/innobase/log/log0recv.cc:1834
    #9  0x0000005591aa67fb in buf_page_io_complete (bpage=0x7fcc87b699b0, evict=false) at /home/travis/src/storage/innobase/buf/buf0buf.cc:6034
    #10 0x0000005591b3d073 in fil_aio_wait (segment=2) at /home/travis/src/storage/innobase/fil/fil0fil.cc:5359
    #11 0x00000055919cdbff in io_handler_thread (arg=0x55931a39f0 <n+16>) at /home/travis/src/storage/innobase/srv/srv0start.cc:340
    #12 0x00007fccadec1184 in start_thread (arg=0x7fcc9497e700) at pthread_create.c:312
    #13 0x00007fccad3cdffd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
    

Comment by Elena Stepanova [ 2017-11-28 ]

The test set currently consists of 48 test runs – 12 combinations of grammar/data, each is run in 4 variants: normal, normal with server restarts, replication, replication with master restarts.
Example of results from one nightly set:

PASSED   14
FAILED, total   29
  with MDEV-13201 20
  with MDEV-13820 3
  with MDEV-12827 1
  with MDEV-11071 1
  with global_status_var.global_memory_used == 0 1
  with replication errors 3
Test problems   5

Last three positions are difficult to analyze, because attempts to repeat them usually end up with one of the already known MDEVs.

Comment by Marko Mäkelä [ 2017-11-28 ]

I think that the assertion failure in recv_parse_or_apply_log_rec_body() is very similar to MDEV-13101.

Comment by Marko Mäkelä [ 2017-12-01 ]

There appears to be a problem that can occur when PRIMARY KEY columns are updated and similar PRIMARY KEY are inserted.
So far, it has only been reported in the MDEV-12894 branch (bb-10.3-temporal), for the test

./mtr --mem --mysqld=--versioning-{force,hide=full,alter-history=keep} innodb.instant_alter,16k

See tempesta-tech#366 for some analysis.
A work-around for this bug is in tempesta-tech#367.
Edit: Here is a simplified version of the test case:

--source include/have_innodb.inc
CREATE TABLE t2
(id INT primary key, c1 VARCHAR(4000),
 p GEOMETRY NOT NULL DEFAULT ST_GeomFromText('LINESTRING(0 0,0 1,1 1)'))
ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
 
INSERT INTO t2 (id,c1) VALUES (1, REPEAT('a', 4000)), (2, REPEAT('a', 4000));
ALTER TABLE t2 ADD COLUMN d1 INT;
BEGIN;
UPDATE t2 SET c1 = repeat(id, 4000);
ROLLBACK;
UPDATE t2 SET d1 = id;
DROP TABLE t2;

I converted this test case to reproduce the crash without using system versioning, and filed MDEV-14660.

Comment by Elena Stepanova [ 2019-07-07 ]

10.3 and 10.4 went GA, so feature testing time has finished.

Generated at Thu Feb 08 08:09:15 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.