Bug #30065 COLUMN_FORMAT FIXED, COLUMN_FORMAT COMPRESSED Cause Syntax Error
Submitted: 26 Jul 2007 9:56 Modified: 26 Jul 2007 13:18
Reporter: Jon Stephens Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1-telco, 5.2-bk OS:Linux
Assigned to: CPU Architecture:Any
Tags: column_format, CREATE TABLE

[26 Jul 2007 9:56] Jon Stephens
Description:
According to WL#3627, the following column option should be available:

COLUMN_FORMAT {FIXED|STATIC|DYNAMIC|COMPRESSED}

However, STATIC and COMPRESSED produce errors - see "How to repeat".

How to repeat:
mysql> SELECT VERSION();
+------------------------+
| VERSION()              |
+------------------------+
| 5.1.20-ndb-6.3.2-debug |
+------------------------+
1 row in set (0.00 sec)

mysql> CREATE TABLE t1 (c1 INT NOT NULL STATIC);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STATIC)' at line 1
mysql> CREATE TABLE t1 (c1 INT NOT NULL COLUMN_FORMAT FIXED);
Query OK, 0 rows affected (0.05 sec)

mysql> CREATE TABLE t2 (c1 INT NOT NULL COLUMN_FORMAT DYNAMIC);
Query OK, 0 rows affected (0.08 sec)

mysql> CREATE TABLE t3 (c1 INT NOT NULL COLUMN_FORMAT COMPRESSED);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMPRESSED)' at line 1
mysql> CREATE TABLE t3 (c1 INT NOT NULL STORAGE DISK);
Query OK, 0 rows affected (0.06 sec)

mysql> CREATE TABLE t4 (c1 INT NOT NULL STORAGE MEMORY);
Query OK, 0 rows affected (0.07 sec)

mysql> CREATE TABLE t5 (c1 INT NOT NULL COLUMN_FORMAT COMPRESSED STORAGE DISK);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMPRESSED STORAGE DISK)' at line 1
mysql> CREATE TABLE t5 (c1 INT NOT NULL COLUMN_FORMAT DYNAMIC STORAGE DISK);
Query OK, 0 rows affected (0.06 sec)

mysql> CREATE TABLE t6 (c1 INT NOT NULL COLUMN_FORMAT COMPRESSED STORAGE MEMORY);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COMPRESSED STORAGE MEMORY)' at line 1
mysql> CREATE TABLE t6 (c1 INT NOT NULL COLUMN_FORMAT FIXED STORAGE MEMORY);
Query OK, 0 rows affected (0.06 sec)

etc.

Suggested fix:
Make sure that the STATIC and COMPRESSED keywords are accepted as valid syntax with COLUMN_FORMAT (or update the WL to indicate that these are not yet implemented).

Note that the syntax should be valid regardless of the storage engine specified for the table.
[26 Jul 2007 10:04] Jon Stephens
Additional observation: Since we allow an optional = sign for ROW_FORMAT, perhaps we ought to do so for COLUMN_FORMAT as well.
[26 Jul 2007 13:18] Jon Stephens
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Discussed with Tomas further - we decided this isn't a bug, and updated the WL entry accordingly.