Bug #8674 CREATE DATABASE db DEFAULT ROW_FORMAT=...
Submitted: 22 Feb 2005 10:58 Modified: 4 Feb 2009 9:44
Reporter: Marko Mäkelä Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:5.0.3 OS:Any (all)
Assigned to: CPU Architecture:Any

[22 Feb 2005 10:58] Marko Mäkelä
Description:
MySQL 5.0.3 introduces another storage format for InnoDB tables, ROW_FORMAT=COMPACT, which is the default.

It would be nice to be override the default ROW_FORMAT on per-database basis for testing and benchmarking purposes.

How to repeat:
CREATE DATABASE test DEFAULT ROW_FORMAT=REDUNDANT;
-- returns ERROR 1064
CREATE DATABASE test ROW_FORMAT=REDUNDANT;
-- returns ERROR 1064
USE test;

Suggested fix:
The ROW_FORMAT for a CREATE TABLE statement would be interpreted as follows:
(1) if ROW_FORMAT=... is specified with CREATE TABLE, use it
(2) if ROW_FORMAT=... has been specified for the database, use it
(3) fall back to the default row format of the table handler

While you are at it, allow DEFAULT ENGINE=... as well. DEFAULT CHARACTER SET=... is already allowed.
[4 Feb 2009 9:44] Susanne Ebrecht
Many thanks for writing a feature request. We will discuss this.
[26 Mar 2011 3:58] bob j
This is a feature that I wish existed, it would save me a lot of hassle for an issue I'm having now. I basically need to restore a large database onto a server setup for table compression, with a disk size about 10% larger than the compressed tables are. However as I cannot instruct the restore to use compressed tables, I don't have enough space.

So, add one vote to this feature.
[1 Nov 2013 9:57] Vlad Safronov
row_format=dynamic is required for proper utf8mb4 support Django. I vote for this.
[19 May 2015 12:42] Andrii Nikitin
see also bug #77090