fix the maria suite
sql/handler.h: not "unused" sql/sql_table.cc: move this check where it is in 10.0
This commit is contained in:
parent
8367241d5a
commit
7da16844ea
@ -17,7 +17,6 @@ test.t1 check status OK
|
|||||||
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
|
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
|
||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
|
@ -460,7 +460,7 @@ id f1
|
|||||||
1 test1
|
1 test1
|
||||||
2 test2
|
2 test2
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET SQL_MODE = 'TRADITIONAL';
|
SET SQL_MODE = '';
|
||||||
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
|
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
|
||||||
insert into t1 values(100, "a");
|
insert into t1 values(100, "a");
|
||||||
insert into t1 values(300, "b");
|
insert into t1 values(300, "b");
|
||||||
|
@ -364,7 +364,7 @@ INSERT IGNORE INTO t1 (f1) VALUES ("test1");
|
|||||||
INSERT IGNORE INTO t1 (f1) VALUES ("test2");
|
INSERT IGNORE INTO t1 (f1) VALUES ("test2");
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET SQL_MODE = 'TRADITIONAL';
|
SET SQL_MODE = '';
|
||||||
|
|
||||||
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
|
create table t1 (n int not null primary key auto_increment, c char(1), unique(c));
|
||||||
insert into t1 values(100, "a");
|
insert into t1 values(100, "a");
|
||||||
|
@ -401,7 +401,6 @@ enum legacy_db_type
|
|||||||
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,
|
ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT,
|
||||||
/** Unused. Reserved for future versions. */
|
|
||||||
ROW_TYPE_PAGE };
|
ROW_TYPE_PAGE };
|
||||||
|
|
||||||
/* Specifies data storage format for individual columns */
|
/* Specifies data storage format for individual columns */
|
||||||
|
@ -4023,6 +4023,18 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Give warnings for not supported table options */
|
||||||
|
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
||||||
|
extern handlerton *maria_hton;
|
||||||
|
if (file->ht != maria_hton)
|
||||||
|
#endif
|
||||||
|
if (create_info->transactional)
|
||||||
|
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
||||||
|
ER_ILLEGAL_HA_CREATE_OPTION,
|
||||||
|
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
||||||
|
file->engine_name()->str,
|
||||||
|
"TRANSACTIONAL=1");
|
||||||
|
|
||||||
if (parse_option_list(thd, &create_info->option_struct,
|
if (parse_option_list(thd, &create_info->option_struct,
|
||||||
create_info->option_list,
|
create_info->option_list,
|
||||||
file->partition_ht()->table_options, FALSE,
|
file->partition_ht()->table_options, FALSE,
|
||||||
@ -4506,18 +4518,6 @@ bool create_table_impl(THD *thd,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Give warnings for not supported table options */
|
|
||||||
#if defined(WITH_ARIA_STORAGE_ENGINE)
|
|
||||||
extern handlerton *maria_hton;
|
|
||||||
if (file->ht != maria_hton)
|
|
||||||
#endif
|
|
||||||
if (create_info->transactional)
|
|
||||||
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
|
|
||||||
ER_ILLEGAL_HA_CREATE_OPTION,
|
|
||||||
ER(ER_ILLEGAL_HA_CREATE_OPTION),
|
|
||||||
file->engine_name()->str,
|
|
||||||
"TRANSACTIONAL=1");
|
|
||||||
|
|
||||||
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
|
||||||
{
|
{
|
||||||
char frm_name[FN_REFLEN+1];
|
char frm_name[FN_REFLEN+1];
|
||||||
|
@ -2954,9 +2954,12 @@ void ha_maria::update_create_info(HA_CREATE_INFO *create_info)
|
|||||||
}
|
}
|
||||||
create_info->data_file_name= data_file_name;
|
create_info->data_file_name= data_file_name;
|
||||||
create_info->index_file_name= index_file_name;
|
create_info->index_file_name= index_file_name;
|
||||||
/* We need to restore the row type as Maria can change it */
|
/*
|
||||||
|
Keep user-specified row_type for ALTER,
|
||||||
|
but show the actually used one in SHOW
|
||||||
|
*/
|
||||||
if (create_info->row_type != ROW_TYPE_DEFAULT &&
|
if (create_info->row_type != ROW_TYPE_DEFAULT &&
|
||||||
!(create_info->used_fields & HA_CREATE_USED_ROW_FORMAT))
|
!(thd_sql_command(ha_thd()) == SQLCOM_ALTER_TABLE))
|
||||||
create_info->row_type= get_row_type();
|
create_info->row_type= get_row_type();
|
||||||
/*
|
/*
|
||||||
Show always page checksums, as this can be forced with
|
Show always page checksums, as this can be forced with
|
||||||
@ -3211,6 +3214,8 @@ bool ha_maria::check_if_incompatible_data(HA_CREATE_INFO *create_info,
|
|||||||
if (create_info->auto_increment_value != stats.auto_increment_value ||
|
if (create_info->auto_increment_value != stats.auto_increment_value ||
|
||||||
create_info->data_file_name != data_file_name ||
|
create_info->data_file_name != data_file_name ||
|
||||||
create_info->index_file_name != index_file_name ||
|
create_info->index_file_name != index_file_name ||
|
||||||
|
create_info->page_checksum != table->s->page_checksum ||
|
||||||
|
create_info->transactional != table->s->transactional ||
|
||||||
(maria_row_type(create_info) != data_file_type &&
|
(maria_row_type(create_info) != data_file_type &&
|
||||||
create_info->row_type != ROW_TYPE_DEFAULT) ||
|
create_info->row_type != ROW_TYPE_DEFAULT) ||
|
||||||
table_changes == IS_EQUAL_NO ||
|
table_changes == IS_EQUAL_NO ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user