Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.4.11, 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
-
Tested on Arch Linux and Ubuntu 18.04 with MariaDB repo
Description
After importing a tablespace (created with mariabackup --prepare --export or FLUSH TABLE ... FOR EXPORT), if the server is restarted before writing to the new table, reading the table crashes the server.
Started with empty datadir, nothing set in my.cnf.
mariadb> create database test;
|
Query OK, 1 row affected (0.001 sec)
|
mariadb> create database test2;
|
Query OK, 1 row affected (0.000 sec)
|
mariadb> create table test.foo(id int not null primary key);
|
Query OK, 0 rows affected (0.185 sec)
|
mariadb> create table test2.foo(id int not null primary key);
|
Query OK, 0 rows affected (0.143 sec)
|
mariadb> insert into test.foo values (1);
|
Query OK, 1 row affected (0.031 sec)
|
mariadb> alter table test2.foo discard tablespace;
|
Query OK, 0 rows affected (0.045 sec)
|
mariadb> flush table test.foo for export;
|
Query OK, 0 rows affected (0.001 sec)
|
-- Copy test/foo.cfg and test/foo.ibd to test2/
|
mariadb> unlock tables;
|
Query OK, 0 rows affected (0.000 sec)
|
mariadb> alter table test2.foo import tablespace;
|
Query OK, 0 rows affected (0.200 sec)
|
mariadb> select * from test2.foo;
|
+----+
|
| id |
|
+----+
|
| 1 |
|
+----+
|
1 row in set (0.001 sec)
|
mariadb> exit
|
-- Restart MariaDB server
|
mariadb> select * from test2.foo;
|
ERROR 2013 (HY000): Lost connection to MySQL server during query
|
The server log (attached) shows:
2019-12-30 9:12:54 0 [Note] /usr/bin/mysqld: ready for connections.
|
Version: '10.4.11-MariaDB' socket: '/run/mysqld/mysqld.sock' port: 3306 Arch Linux
|
2019-12-30 09:13:02 0x7f91f41ae700 InnoDB: Assertion failure in file /build/mariadb/src/mariadb-10.4.11/storage/innobase/btr/btr0btr.cc line 204
|
InnoDB: Failing assertion: mach_read_from_4(seg_header + FSEG_HDR_SPACE) == space
|
It seems like doing any write to the new table prevents the issue.
Attachments
Issue Links
- blocks
-
MDEV-18762 Support easy restore of partial backup
- Closed
- duplicates
-
MDEV-21422 InnoDB: Assertion failure in file /home/buildbot/buildbot/build/mariadb-10.4.11/storage/innobase/btr/btr0btr.cc
- Closed
- relates to
-
MDEV-21549 IMPORT TABLESPACE fails to adjust all tablespace ID in root pages
- Closed
-
MDEV-22431 IMPORT TABLESPACE, service restart
- Closed