diff options
author | unknown <marko@hundin.mysql.fi> | 2005-01-07 16:43:27 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-01-07 16:43:27 +0200 |
commit | 6e74893a6a7da1dadf5ca8dcc18a05b2974078cc (patch) | |
tree | 14daf57169f266231e6b07412132813ef5e4a2b6 | |
parent | b194c1c1ce61c94c6a35d4825aefb024288b99d3 (diff) | |
download | mariadb-git-6e74893a6a7da1dadf5ca8dcc18a05b2974078cc.tar.gz |
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
-rw-r--r-- | sql/ha_innodb.cc | 2 | ||||
-rw-r--r-- | sql/handler.cc | 2 | ||||
-rw-r--r-- | sql/handler.h | 3 | ||||
-rw-r--r-- | sql/lex.h | 2 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 8 |
5 files changed, 13 insertions, 4 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 31b15f89806..0bca8c21715 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3907,7 +3907,7 @@ ha_innobase::create( error = create_table_def(trx, form, norm_name, 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) { innobase_commit_low(trx); diff --git a/sql/handler.cc b/sql/handler.cc index bbe01dd93d5..b1b741dfee9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -101,7 +101,7 @@ struct show_table_type_st sys_table_types[]= }; const char *ha_row_type[] = { - "", "FIXED", "DYNAMIC", "COMPRESSED","?","?","?" + "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "?","?","?" }; const char *tx_isolation_names[] = diff --git a/sql/handler.h b/sql/handler.h index b10e6bfe88c..e5a794ca1b2 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -167,7 +167,8 @@ struct show_table_type_st { }; 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 */ diff --git a/sql/lex.h b/sql/lex.h index 56d824b7bb8..871d1d99750 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -116,6 +116,7 @@ static SYMBOL symbols[] = { { "COMMENT", SYM(COMMENT_SYM)}, { "COMMIT", SYM(COMMIT_SYM)}, { "COMMITTED", SYM(COMMITTED_SYM)}, + { "COMPACT", SYM(COMPACT_SYM)}, { "COMPRESSED", SYM(COMPRESSED_SYM)}, { "CONCURRENT", SYM(CONCURRENT)}, { "CONDITION", SYM(CONDITION_SYM)}, @@ -378,6 +379,7 @@ static SYMBOL symbols[] = { { "READ", SYM(READ_SYM)}, { "READS", SYM(READS_SYM)}, { "REAL", SYM(REAL)}, + { "REDUNDANT", SYM(REDUNDANT_SYM)}, { "REFERENCES", SYM(REFERENCES)}, { "REGEXP", SYM(REGEXP)}, { "RELAY_LOG_FILE", SYM(RELAY_LOG_FILE_SYM)}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index fa23502ea93..6b1456dfbd3 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -227,6 +227,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token COLLATION_SYM %token COLUMNS %token COLUMN_SYM +%token COMPACT_SYM %token CONCURRENT %token CONDITION_SYM %token CONNECTION_SYM @@ -381,6 +382,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token READ_SYM %token READS_SYM %token REAL_NUM +%token REDUNDANT_SYM %token REFERENCES %token REGEXP %token RELOAD @@ -2628,7 +2630,9 @@ row_types: DEFAULT { $$= ROW_TYPE_DEFAULT; } | FIXED_SYM { $$= ROW_TYPE_FIXED; } | 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_STRIPED_SYM { $$= RAID_TYPE_0; } @@ -6915,6 +6919,7 @@ keyword: | COMMENT_SYM {} | COMMITTED_SYM {} | COMMIT_SYM {} + | COMPACT_SYM {} | COMPRESSED_SYM {} | CONCURRENT {} | CONSISTENT_SYM {} @@ -7046,6 +7051,7 @@ keyword: | RAID_CHUNKSIZE {} | RAID_STRIPED_SYM {} | RAID_TYPE {} + | REDUNDANT_SYM {} | RELAY_LOG_FILE_SYM {} | RELAY_LOG_POS_SYM {} | RELOAD {} |