CREATE TABLE with unsupported table option keeps the option

Bug #425916 reported by Sergey Petrunia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
New
Low
Sergei Golubchik
5.2
New
Undecided
Unassigned

Bug Description

CREATE TABLE will produce a warning when table's storage engine doesn't support transactional=0|1 attribute but won't produce warnings for page_checksum or row_format attributes.

Moreover, the attributes will be kept (in .frm file?) and displayed by SHOW CREATE TABLE which creates an illusion that the storage engine actually supports them:

mysql> create table t1 (a int) transactional=0;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> create table t2 (a int) page_checksum=1;
Query OK, 0 rows affected (0.01 sec)

mysql> create table t3 (a int) row_format=page;
Query OK, 0 rows affected (0.01 sec)

mysql> show create table t3\G
*************************** 1. row ***************************
       Table: t3
Create Table: CREATE TABLE `t3` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=PAGE
1 row in set (0.00 sec)

mysql> show create table t2\G
*************************** 1. row ***************************
       Table: t2
Create Table: CREATE TABLE `t2` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
1 row in set (0.00 sec)

Suggested fix:
- Discard unapplicable attributes
- And produce a warning when doing that.

Changed in maria:
status: New → Confirmed
Revision history for this message
Oleksandr "Sanja" Byelkin (sanja-byelkin) wrote :

The behaviour can be changed/touched in https://askmonty.org/worklog/Server-BackLog/?tid=43

Changed in maria:
assignee: nobody → Oleksandr "Sanja" Byelkin (sanja-byelkin)
Changed in maria:
importance: Undecided → Medium
Changed in maria:
status: Confirmed → In Progress
Revision history for this message
Oleksandr "Sanja" Byelkin (sanja-byelkin) wrote :

Storing attributes (even if they are not used) is correct behaviour. The bug is in absence of warning about unused attributes.

Revision history for this message
Hakan Küçükyılmaz (hakan-askmonty) wrote :

Sanja,

do you have an update about this bug?

Thanks,

Hakan

Revision history for this message
Sergei Golubchik (sergii) wrote :

Additionally, the warning on TRANSACTIONAL uses an WARN_LEVEL_ERROR instead of WARN_LEVEL_WARN, as it should

Changed in maria:
importance: Medium → Low
Changed in maria:
milestone: none → 5.2
Changed in maria:
assignee: Oleksandr "Sanja" Byelkin (sanja-byelkin) → Sergei (sergii)
Changed in maria:
status: In Progress → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.