---------- release buiild - no issues noticed provided *.cfg is copied as well - Followed https://dev.mysql.com/doc/refman/8.0/en/innodb-table-import.html rm -rf 107517/ bin/mysqld --no-defaults --initialize-insecure --basedir=$PWD --datadir=$PWD/107517 --log-error-verbosity=3 bin/mysqld_safe --no-defaults --basedir=$PWD --datadir=$PWD/107517 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/107517/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & Session1>create table itest (id int, str1 varchar(20), index(str1) ); Query OK, 0 rows affected (0.02 sec) Session1>insert into itest values (1, 'val1'); Query OK, 1 row affected (0.01 sec) Session1>alter table itest add column str2 varchar(20), algorithm=INSTANT; Query OK, 0 rows affected (0.01 sec) Records: 0 Duplicates: 0 Warnings: 0 Session1>insert into itest values (2,'val1', 'val2'); Query OK, 1 row affected (0.00 sec) Session2>create table itest2 like itest; Query OK, 0 rows affected (0.02 sec) Session2>alter table itest2 discard tablespace; Query OK, 0 rows affected (0.00 sec) Session1>FLUSH TABLES itest FOR EXPORT; Query OK, 0 rows affected (0.00 sec) Session1> # Copy the itest.ibd file and itest.cfg metadata file to itest2.ibd and itest2.cfg ls -l 107517/test total 132 -rw-r----- 1 umshastr common 908 Jun 23 17:10 itest.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:09 itest.ibd cp 107517/test/itest.ibd 107517/test/itest2.ibd cp 107517/test/itest.cfg 107517/test/itest2.cfg ls -l 107517/test total 264 -rw-r----- 1 umshastr common 908 Jun 23 17:13 itest2.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:12 itest2.ibd -rw-r----- 1 umshastr common 908 Jun 23 17:10 itest.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:09 itest.ibd -- use UNLOCK TABLES to release the locks acquired by the FLUSH TABLES ... FOR EXPORT statement Session1>UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) Session1> -- import the tablespace Session2>alter table itest2 import tablespace; Query OK, 0 rows affected (0.03 sec) Session2>select * from itest2; +------+------+------+ | id | str1 | str2 | +------+------+------+ | 1 | val1 | NULL | | 2 | val1 | val2 | +------+------+------+ 2 rows in set (0.00 sec) ---------- debug build (i) No issues noticed if .cfg is copied as well for itest2 (ii) If .cfg is not copied then assert noticed as reported - Followed https://dev.mysql.com/doc/refman/8.0/en/innodb-table-import.html rm -rf 107517/ bin/mysqld --no-defaults --initialize-insecure --basedir=$PWD --datadir=$PWD/107517 --log-error-verbosity=3 bin/mysqld_safe --no-defaults --mysqld-version=debug --basedir=$PWD --datadir=$PWD/107517 --core-file --socket=/tmp/mysql.sock --port=3306 --log-error=$PWD/107517/log.err --mysqlx-port=33330 --mysqlx-socket=/tmp/mysql_x_ushastry.sock --log-error-verbosity=3 --secure-file-priv="" --local-infile=1 2>&1 & bin/mysql -uroot -S /tmp/mysql.sock --prompt='Session1>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 8.0.29-debug MySQL Community Server - GPL - Debug Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. Session1>create database test; Query OK, 1 row affected (0.01 sec) Session1>use test Database changed Session1>create table itest (id int, str1 varchar(20), index(str1) ); Query OK, 0 rows affected (0.07 sec) Session1>insert into itest values (1, 'val1'); Query OK, 1 row affected (0.02 sec) Session1>alter table itest add column str2 varchar(20), algorithm=INSTANT; Query OK, 0 rows affected (0.06 sec) Records: 0 Duplicates: 0 Warnings: 0 Session1>insert into itest values (2,'val1', 'val2'); Query OK, 1 row affected (0.01 sec) Session1> Session2>use test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Session2>create table itest2 like itest; Query OK, 0 rows affected (0.07 sec) Session2>alter table itest2 discard tablespace; Query OK, 0 rows affected (0.02 sec) Session2> Session1>FLUSH TABLES itest FOR EXPORT; Query OK, 0 rows affected (0.00 sec) Session1> # Copy the itest.ibd file and itest.cfg metadata file to itest2.ibd and itest2.cfg ls -l 107517/test ls -l 107517/test total 132 -rw-r----- 1 umshastr common 908 Jun 23 17:23 itest.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:22 itest.ibd cp 107517/test/itest.ibd 107517/test/itest2.ibd cp 107517/test/itest.cfg 107517/test/itest2.cfg ls -l 107517/test total 264 -rw-r----- 1 umshastr common 908 Jun 23 17:25 itest2.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:25 itest2.ibd -rw-r----- 1 umshastr common 908 Jun 23 17:23 itest.cfg -rw-r----- 1 umshastr common 131072 Jun 23 17:22 itest.ibd (i) No issues noticed if .cfg is copied as well for itest2 -- use UNLOCK TABLES to release the locks acquired by the FLUSH TABLES ... FOR EXPORT statement Session1>UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) Session1> -- import the tablespace Session2>alter table itest2 import tablespace; Query OK, 0 rows affected (0.06 sec) Session2>select * from itest2; +------+------+------+ | id | str1 | str2 | +------+------+------+ | 1 | val1 | NULL | | 2 | val1 | val2 | +------+------+------+ 2 rows in set (0.00 sec) Session2> (ii) If .cfg is not copied then assert noticed as reported Session1>use test Database changed Session1>create table itest (id int, str1 varchar(20), index(str1) ); Query OK, 0 rows affected (0.06 sec) Session1>insert into itest values (1, 'val1'); Query OK, 1 row affected (0.01 sec) Session1>alter table itest add column str2 varchar(20), algorithm=INSTANT; Query OK, 0 rows affected (0.06 sec) Records: 0 Duplicates: 0 Warnings: 0 Session1>insert into itest values (2,'val1', 'val2'); Query OK, 1 row affected (0.01 sec) Session2>use test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed Session2>create table itest2 like itest; Query OK, 0 rows affected (0.07 sec) Session2>alter table itest2 discard tablespace; Query OK, 0 rows affected (0.02 sec) Session2> Session1> Session1>FLUSH TABLES itest FOR EXPORT; Query OK, 0 rows affected (0.00 sec) Session1> # Copy the itest.ibd file to itest2.ibd(don't copy over itest.cfg) cp 107517/test/itest.ibd 107517/test/itest2.ibd -- use UNLOCK TABLES to release the locks acquired by the FLUSH TABLES ... FOR EXPORT statement Session1>UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) Session1> -- import the tablespace - issue noticed as reported Session2>alter table itest2 import tablespace; ERROR 2013 (HY000): Lost connection to MySQL server during query No connection. Trying to reconnect... ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) ERROR: Can't connect to the server >bin/mysqld_safe: line 199: 21347 Aborted (core dumped) env MYSQLD_PARENT_PID=21110 nohup /export/home/tmp/ushastry/mysql-8.0.29/bin/mysqld-debug --no-defaults --basedir=/export/home/tmp/ushastry/mysql-8.0.29 - -bt (gdb) bt #0 0x00007f2476eb6aa1 in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000004795d5b in my_write_core(int) () #2 0x00000000033e3406 in handle_fatal_signal () #3 #4 0x00007f24750f3387 in raise () from /lib64/libc.so.6 #5 0x00007f24750f4a78 in abort () from /lib64/libc.so.6 #6 0x00000000033e357b in my_server_abort() () #7 0x000000000478cfec in my_abort() () #8 0x0000000004c080b4 in ut_dbg_assertion_failed(char const*, char const*, unsigned long) () #9 0x0000000004c272d8 in rec_init_null_and_len_comp () #10 0x0000000004c28c3a in rec_init_offsets_comp_ordinary(unsigned char const*, bool, dict_index_t const*, unsigned long*) () #11 0x0000000004c27957 in rec_init_offsets_new(unsigned char const*, dict_index_t const*, unsigned long*) () #12 0x0000000004c284e4 in rec_init_offsets(unsigned char const*, dict_index_t const*, unsigned long*) () #13 0x0000000004c28753 in rec_get_offsets_func(unsigned char const*, dict_index_t const*, unsigned long*, unsigned long, ut::Location, mem_block_info_t**) () #14 0x0000000004ab316d in PageConverter::update_records(buf_block_t*) () #15 0x0000000004ab33e9 in PageConverter::update_index_page(buf_block_t*) () #16 0x0000000004ab383f in PageConverter::update_page(buf_block_t*, unsigned long&) () #17 0x0000000004ab3fd1 in PageConverter::operator()(unsigned long, buf_block_t*) () #18 0x0000000004e18309 in fil_iterate(Fil_page_iterator const&, buf_block_t*, PageCallback&) () #19 0x0000000004e190e9 in fil_tablespace_iterate(dict_table_t*, unsigned long, Compression::Type, PageCallback&) () #20 0x0000000004ab923d in row_import_for_mysql(dict_table_t*, dd::Table*, row_prebuilt_t*) () #21 0x00000000048de2a6 in ha_innobase::discard_or_import_tablespace(bool, dd::Table*) () #22 0x000000000357c5e8 in handler::ha_discard_or_import_tablespace(bool, dd::Table*) () #23 0x00000000032c2b90 in Sql_cmd_discard_import_tablespace::mysql_discard_or_import_tablespace(THD*, TABLE_LIST*) () #24 0x00000000038ae712 in Sql_cmd_discard_import_tablespace::execute(THD*) () #25 0x00000000031f5106 in mysql_execute_command(THD*, bool) () #26 0x00000000031f721b in dispatch_sql_command(THD*, Parser_state*) () #27 0x00000000031ed4c2 in dispatch_command(THD*, COM_DATA const*, enum_server_command) () #28 0x00000000031eb4a2 in do_command(THD*) () #29 0x00000000033cdc5f in handle_connection () #30 0x000000000501c1cb in pfs_spawn_thread () #31 0x00007f2476eb1ea5 in start_thread () from /lib64/libpthread.so.0 #32 0x00007f24751bbb0d in clone () from /lib64/libc.so.6 (gdb)