[MDEV-18428] Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE Created: 2019-01-30  Updated: 2021-01-11  Resolved: 2019-01-31

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Memory
Affects Version/s: 10.3.11, 10.3.12
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Thomas Graungaard Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

Win10 Pro x64


Issue Links:
Duplicate
is duplicated by MDEV-17513 Impossible to optimize tables (TRANSA... Closed

 Description   

When you do not explicitly specify that TRANSACTIONAL=0 in your CREATE query, everything works fine:

CREATE TABLE table_a (col_1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(col_1)) ENGINE=MEMORY;
Query OK, 0 rows affected (0.018 sec)

ALTER TABLE table_a ADD COLUMN col_2 VARCHAR(255) AFTER col_1;
Query OK, 0 rows affected (0.022 sec)

If you do specify TRANSACTIONAL=0, CREATE TABLE throws a warning, and ALTER TABLE fails:

CREATE TABLE table_b (col_1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(col_1)) ENGINE=MEMORY TRANSACTIONAL=0;
Query OK, 0 rows affected, 1 warning (0.020 sec)

SHOW WARNINGS;

Warning 1478 Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=1'

ALTER TABLE table_b ADD COLUMN col_2 VARCHAR(255) AFTER col_1;
ERROR 1478 (HY000): Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=1'



 Comments   
Comment by Elena Stepanova [ 2019-01-31 ]

Thanks for the report.
The problem is not limited to MEMORY engine, we already have a similar bug report about it: MDEV-17513.

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