Bug #60111 storage type for table not saved in .frm
Submitted: 11 Feb 2011 9:19 Modified: 27 Apr 2011 18:16
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.5.7 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[11 Feb 2011 9:19] Magnus Blåudd
Description:
CREATE TABLE allows from 5.1.6 to specify STORAGE [DEFAULT|DISK|MEMORY] when creating a table. The value is stored in create_info->storage_media but unfortunately never written to the .frm file. This leads to problem with for example CREATE TABLE LIKE where the new table will not have that option set.

How to repeat:
Patch from MySQL Cluster

Suggested fix:
1) Store the value of storage_media using bit 12 and 13 of the HA_CREATE_INFO::table_options.

2) Read the value back and put it into new TABLE_SHARE::default_storage_media type.

3) Extend SHOW CREATE TABLE with /*!50100 STORAGE [DISK|MEMORY] */ output if share->default_storage_media is DISK or MEMORY.
[11 Feb 2011 10:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/131111
[11 Feb 2011 10:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/131115
[27 Apr 2011 18:16] Paul DuBois
Noted in 5.5.12, 5.6.3 changelogs.

CREATE TABLE syntax permits specification of a STORAGE
{DEFAULT|DISK|MEMORY} option. However, this value was not written to
the .frm file, so that a subsequent CREATE TABLE ... LIKE for the
table did not include that option.

CHANGESET - http://lists.mysql.com/commits/133886