-- env cat /etc/*release Oracle Linux Server release 7.9 NAME="Oracle Linux Server" VERSION="7.9" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.9" PRETTY_NAME="Oracle Linux Server 7.9" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:7:9:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/" ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7" ORACLE_BUGZILLA_PRODUCT_VERSION=7.9 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=7.9 Red Hat Enterprise Linux Server release 7.9 (Maipo) Oracle Linux Server release 7.9 -- build used cat docs/INFO_SRC commit: bf61dba743616af128896221f7395bddc37af3bc date: 2022-03-23 12:02:41 +0100 build-date: 2022-03-23 13:54:03 +0000 short: bf61dba7436 branch: mysql-8.0.29-release MySQL source 8.0.29 ## Release build not crashing 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 & -- Session 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 10 Server version: 8.0.29 MySQL Community Server - GPL 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>use test Database changed 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) -- Session 2 bin/mysql -uroot -S /tmp/mysql.sock --prompt='Session2>' Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 8.0.29 MySQL Community Server - GPL 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. Session2>use test Database changed 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.01 sec) -- On the Session1 instance, run FLUSH TABLES ... FOR EXPORT Session1>FLUSH TABLES itest FOR EXPORT; Query OK, 0 rows affected (0.01 sec) Session1> -- Copy the .ibd file and .cfg metadata file from the source instance to the destination instance (since .cfg exists hence just copied cp 107517/test/itest.ibd 107517/test/itest2.ibd) cp 107517/test/itest.ibd 107517/test/itest2.ibd Session1>UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) -- As expected Session2>alter table itest2 import tablespace; ERROR 1808 (HY000): Schema mismatch (Clustered index validation failed. Because the .cfg file is missing, table definition of the IBD file could be different. Or the data file itself is already corrupted.) Session2> Session2>alter table itest2 import tablespace; ERROR 1808 (HY000): Schema mismatch (Clustered index validation failed. Because the .cfg file is missing, table definition of the IBD file could be different. Or the data file itself is already corrupted.) #### Debug build affected - Followed above steps 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 & - Session2>alter table itest2 discard tablespace; Query OK, 0 rows affected (0.02 sec) 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 -bt gdb bin/mysqld-debug 107517/core.29597 GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.0.1.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /export/home/tmp/ushastry/mysql-8.0.29/bin/mysqld-debug...Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, or 4) [in module /export/home/tmp/ushastry/mysql-8.0.29/bin/mysqld-debug] (no debugging symbols found)...done. Illegal process-id: 107517/core.29597. [New LWP 29929] [New LWP 29608] [New LWP 29604] [New LWP 29602] [New LWP 29603] [New LWP 29605] [New LWP 29628] [New LWP 29610] [New LWP 29609] [New LWP 29597] [New LWP 29606] [New LWP 29615] [New LWP 29788] [New LWP 29601] [New LWP 29612] [New LWP 29641] [New LWP 29607] [New LWP 29640] [New LWP 29631] [New LWP 29629] [New LWP 29621] [New LWP 29638] [New LWP 29644] [New LWP 29616] [New LWP 29630] [New LWP 29646] [New LWP 29623] [New LWP 29613] [New LWP 29625] [New LWP 29637] [New LWP 29642] [New LWP 29643] [New LWP 29622] [New LWP 29639] [New LWP 29626] [New LWP 29611] [New LWP 29636] [New LWP 29627] [New LWP 29614] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Dwarf Error: wrong version in compilation unit header (is 0, should be 2, 3, or 4) [in module /export/home/tmp/ushastry/mysql-8.0.29/lib/plugin/debug/component_reference_cache.so] Core was generated by `/export/home/tmp/ushastry/mysql-8.0.29/bin/mysqld-debug --no-defaults --basedir'. Program terminated with signal 6, Aborted. #0 0x00007fb86adc0aa1 in pthread_kill () from /lib64/libpthread.so.0 Missing separate debuginfos, use: debuginfo-install glibc-2.17-325.0.1.el7_9.x86_64 libaio-0.3.109-13.el7.x86_64 libgcc-4.8.5-44.0.3.el7.x86_64 libstdc++-4.8.5-44.0.3.el7.x86_64 numactl-libs-2.0.12-5.0.3.el7.x86_64 (gdb) bt #0 0x00007fb86adc0aa1 in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000004795d5b in my_write_core(int) () #2 0x00000000033e3406 in handle_fatal_signal () #3 #4 0x00007fb868ffd387 in raise () from /lib64/libc.so.6 #5 0x00007fb868ffea78 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 0x00007fb86adbbea5 in start_thread () from /lib64/libpthread.so.0 #32 0x00007fb8690c5b0d in clone () from /lib64/libc.so.6 (gdb)