mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
BUG#19140: Create index caused crash
mysql-test/r/ndb_partition_key.result: New test case to ensure path in code is tested mysql-test/r/partition.result: New test case for bug mysql-test/t/ndb_partition_key.test: New test case to ensure path in code is tested mysql-test/t/partition.test: New test case for bug sql/sql_partition.cc: Use stack variable, not variable on lex object, caused havoc when doing a create index. sql/sql_table.cc: Editorial changes + added a comment to a path in code I didn't remember myself what it was good for.
This commit is contained in:
@@ -3105,8 +3105,8 @@ bool mysql_create_table_internal(THD *thd,
|
||||
}
|
||||
DBUG_PRINT("info", ("db_type = %d",
|
||||
ha_legacy_type(part_info->default_engine_type)));
|
||||
if (part_info->check_partition_info( &engine_type, file,
|
||||
create_info->max_rows))
|
||||
if (part_info->check_partition_info(&engine_type, file,
|
||||
create_info->max_rows))
|
||||
goto err;
|
||||
part_info->default_engine_type= engine_type;
|
||||
|
||||
@@ -3165,6 +3165,12 @@ bool mysql_create_table_internal(THD *thd,
|
||||
}
|
||||
else if (create_info->db_type != engine_type)
|
||||
{
|
||||
/*
|
||||
We come here when we don't use a partitioned handler.
|
||||
Since we use a partitioned table it must be "native partitioned".
|
||||
We have switched engine from defaults, most likely only specified
|
||||
engines in partition clauses.
|
||||
*/
|
||||
delete file;
|
||||
if (!(file= get_new_handler((TABLE_SHARE*) 0, thd->mem_root, engine_type)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user