[MDEV-32987] CREATE TABLE ... LIKE is not documented completely Created: 2023-12-11  Updated: 2024-01-18  Resolved: 2024-01-16

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Create Table, Documentation
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: documentation
Environment:

Linux n.a.


Issue Links:
Blocks
blocks MDEV-7268 Column of table cannot be converted f... Closed

 Description   

CREATE TABLE ... LIKE creates the new table in a specific non expected way:

"The copy is created using the same version of the table storage format as the original table. "
https://dev.mysql.com/doc/refman/8.0/en/create-table-like.html

This can also be seen in the comment from Elena dated 2014-12-09 18:07
https://jira.mariadb.org/browse/MDEV-7268

This means that if the original table is in an old format with old data types the old format remains and now new data types are used.

This is IMHO fundamentally important to know as an administrator. Please add this documentation here:
https://mariadb.com/kb/en/create-table/#create-table-like

I have the impression that ALTER TABLE ... FORCE behaves the same but I did not investigate further...


Generated at Thu Feb 08 10:35:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.