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
This commit is contained in:
unknown 2005-01-07 16:43:27 +02:00
parent b194c1c1ce
commit 6e74893a6a
5 changed files with 13 additions and 4 deletions

View file

@ -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);

View file

@ -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[] =

View file

@ -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 */

View file

@ -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)},

View file

@ -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 {}