Commit 6e74893a authored by unknown's avatar unknown

Introduce ROW_TYPE=REDUNDANT and ROW_TYPE=COMPACT for InnoDB table formats


sql/handler.cc:
  ha_row_type[]: Add REDUNDANT and COMPACT
sql/handler.h:
  enum row_type: Add ROW_TYPE_REDUNDANT and ROW_TYPE_COMPACT
sql/ha_innodb.cc:
  ha_innobase::create(): Detect ROW_TYPE=REDUNDANT
sql/lex.h:
  Add "COMPACT" (COMPACT_SYM) and "REDUNDANT" (REDUNDANT_SYM)
sql/sql_yacc.yy:
  row_types, keyword: Add COMPACT and REDUNDANT
parent b194c1c1
...@@ -3907,7 +3907,7 @@ ha_innobase::create( ...@@ -3907,7 +3907,7 @@ ha_innobase::create(
error = create_table_def(trx, form, norm_name, error = create_table_def(trx, form, norm_name,
create_info->options & HA_LEX_CREATE_TMP_TABLE ? name2 : NULL, create_info->options & HA_LEX_CREATE_TMP_TABLE ? name2 : NULL,
!(form->s->db_options_in_use & HA_OPTION_PACK_RECORD)); form->s->row_type != ROW_TYPE_REDUNDANT);
if (error) { if (error) {
innobase_commit_low(trx); innobase_commit_low(trx);
......
...@@ -101,7 +101,7 @@ struct show_table_type_st sys_table_types[]= ...@@ -101,7 +101,7 @@ struct show_table_type_st sys_table_types[]=
}; };
const char *ha_row_type[] = { const char *ha_row_type[] = {
"", "FIXED", "DYNAMIC", "COMPRESSED","?","?","?" "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "?","?","?"
}; };
const char *tx_isolation_names[] = const char *tx_isolation_names[] =
......
...@@ -167,7 +167,8 @@ struct show_table_type_st { ...@@ -167,7 +167,8 @@ struct show_table_type_st {
}; };
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED, enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED}; ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT };
/* struct to hold information about the table that should be created */ /* struct to hold information about the table that should be created */
......
...@@ -116,6 +116,7 @@ static SYMBOL symbols[] = { ...@@ -116,6 +116,7 @@ static SYMBOL symbols[] = {
{ "COMMENT", SYM(COMMENT_SYM)}, { "COMMENT", SYM(COMMENT_SYM)},
{ "COMMIT", SYM(COMMIT_SYM)}, { "COMMIT", SYM(COMMIT_SYM)},
{ "COMMITTED", SYM(COMMITTED_SYM)}, { "COMMITTED", SYM(COMMITTED_SYM)},
{ "COMPACT", SYM(COMPACT_SYM)},
{ "COMPRESSED", SYM(COMPRESSED_SYM)}, { "COMPRESSED", SYM(COMPRESSED_SYM)},
{ "CONCURRENT", SYM(CONCURRENT)}, { "CONCURRENT", SYM(CONCURRENT)},
{ "CONDITION", SYM(CONDITION_SYM)}, { "CONDITION", SYM(CONDITION_SYM)},
...@@ -378,6 +379,7 @@ static SYMBOL symbols[] = { ...@@ -378,6 +379,7 @@ static SYMBOL symbols[] = {
{ "READ", SYM(READ_SYM)}, { "READ", SYM(READ_SYM)},
{ "READS", SYM(READS_SYM)}, { "READS", SYM(READS_SYM)},
{ "REAL", SYM(REAL)}, { "REAL", SYM(REAL)},
{ "REDUNDANT", SYM(REDUNDANT_SYM)},
{ "REFERENCES", SYM(REFERENCES)}, { "REFERENCES", SYM(REFERENCES)},
{ "REGEXP", SYM(REGEXP)}, { "REGEXP", SYM(REGEXP)},
{ "RELAY_LOG_FILE", SYM(RELAY_LOG_FILE_SYM)}, { "RELAY_LOG_FILE", SYM(RELAY_LOG_FILE_SYM)},
......
...@@ -227,6 +227,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); ...@@ -227,6 +227,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token COLLATION_SYM %token COLLATION_SYM
%token COLUMNS %token COLUMNS
%token COLUMN_SYM %token COLUMN_SYM
%token COMPACT_SYM
%token CONCURRENT %token CONCURRENT
%token CONDITION_SYM %token CONDITION_SYM
%token CONNECTION_SYM %token CONNECTION_SYM
...@@ -381,6 +382,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); ...@@ -381,6 +382,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token READ_SYM %token READ_SYM
%token READS_SYM %token READS_SYM
%token REAL_NUM %token REAL_NUM
%token REDUNDANT_SYM
%token REFERENCES %token REFERENCES
%token REGEXP %token REGEXP
%token RELOAD %token RELOAD
...@@ -2628,7 +2630,9 @@ row_types: ...@@ -2628,7 +2630,9 @@ row_types:
DEFAULT { $$= ROW_TYPE_DEFAULT; } DEFAULT { $$= ROW_TYPE_DEFAULT; }
| FIXED_SYM { $$= ROW_TYPE_FIXED; } | FIXED_SYM { $$= ROW_TYPE_FIXED; }
| DYNAMIC_SYM { $$= ROW_TYPE_DYNAMIC; } | DYNAMIC_SYM { $$= ROW_TYPE_DYNAMIC; }
| COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }; | COMPRESSED_SYM { $$= ROW_TYPE_COMPRESSED; }
| REDUNDANT_SYM { $$= ROW_TYPE_REDUNDANT; }
| COMPACT_SYM { $$= ROW_TYPE_COMPACT; };
raid_types: raid_types:
RAID_STRIPED_SYM { $$= RAID_TYPE_0; } RAID_STRIPED_SYM { $$= RAID_TYPE_0; }
...@@ -6915,6 +6919,7 @@ keyword: ...@@ -6915,6 +6919,7 @@ keyword:
| COMMENT_SYM {} | COMMENT_SYM {}
| COMMITTED_SYM {} | COMMITTED_SYM {}
| COMMIT_SYM {} | COMMIT_SYM {}
| COMPACT_SYM {}
| COMPRESSED_SYM {} | COMPRESSED_SYM {}
| CONCURRENT {} | CONCURRENT {}
| CONSISTENT_SYM {} | CONSISTENT_SYM {}
...@@ -7046,6 +7051,7 @@ keyword: ...@@ -7046,6 +7051,7 @@ keyword:
| RAID_CHUNKSIZE {} | RAID_CHUNKSIZE {}
| RAID_STRIPED_SYM {} | RAID_STRIPED_SYM {}
| RAID_TYPE {} | RAID_TYPE {}
| REDUNDANT_SYM {}
| RELAY_LOG_FILE_SYM {} | RELAY_LOG_FILE_SYM {}
| RELAY_LOG_POS_SYM {} | RELAY_LOG_POS_SYM {}
| RELOAD {} | RELOAD {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment