[MDEV-23485] Modify Innodb storage engine to MyISAM_MRG will make data lost. Created: 2020-08-14  Updated: 2023-09-19

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Storage Engine - MyISAM
Affects Version/s: 10.5.5
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: jingbo zhao Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

centos 7.5



 Description   

When I create a Innodb storage engine table, and I change it to MRG_MYISAM engine, the table data will be lost.

MariaDB [zbdba]> show create table zbdba\G
*************************** 1. row ***************************
       Table: zbdba
Create Table: CREATE TABLE `zbdba` (
  `id` int(11) NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.000 sec)
 
MariaDB [zbdba]>
MariaDB [zbdba]>
MariaDB [zbdba]> insert into zbdba() values(1, 'aa');
Query OK, 1 row affected (0.001 sec)
 
MariaDB [zbdba]> insert into zbdba() values(2, 'bb');
Query OK, 1 row affected (0.001 sec)
 
MariaDB [zbdba]> insert into zbdba() values(3, 'cc');
Query OK, 1 row affected (0.001 sec)
 
MariaDB [zbdba]> select * from zbdba;
+----+------+
| id | name |
+----+------+
|  1 | aa   |
|  2 | bb   |
|  3 | cc   |
+----+------+
3 rows in set (0.001 sec)
 
MariaDB [zbdba]>
MariaDB [zbdba]>
MariaDB [zbdba]> ALTER TABLE zbdba ENGINE = MRG_MYISAM;
Query OK, 0 rows affected (0.005 sec)
Records: 0  Duplicates: 0  Warnings: 0
 
MariaDB [zbdba]> select * from zbdba;
Empty set (0.000 sec)
 



 Comments   
Comment by jingbo zhao [ 2020-08-14 ]

I have fixed this issues, the pull request is : https://github.com/MariaDB/server/pull/1651

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