Commit 10be9160 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4466 Partitioned Aria table created by a previous version is recognized as TEST_SQL_DISCOVERY

Partitioning didn't store the name of default storage engine for partitions
in the frm file - it only store the typecode. Typecodes aren't stable, and
might vary depending on the order in which storage engines are loaded (can
be changed even from my.cnf without recompilation).

As a temporary workaround for 5.5, we hard-code Aria's typecode, to make sure it
never changes.
parent 04aeaaa0
......@@ -356,7 +356,8 @@ enum legacy_db_type
DB_TYPE_MARIA,
/** Performance schema engine. */
DB_TYPE_PERFORMANCE_SCHEMA,
DB_TYPE_FIRST_DYNAMIC=42,
DB_TYPE_ARIA=42,
DB_TYPE_FIRST_DYNAMIC=43,
DB_TYPE_DEFAULT=127 // Must be last
};
/*
......
......@@ -802,6 +802,11 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
share->frm_version= FRM_VER_TRUE_VARCHAR;
#ifdef WITH_PARTITION_STORAGE_ENGINE
/*
Yuck! Double-bad. Doesn't work with dynamic engine codes.
And doesn't lock the plugin. Fixed in 10.0.4
*/
compile_time_assert(MYSQL_VERSION_ID < 100000);
if (*(head+61) &&
!(share->default_part_db_type=
ha_checktype(thd, (enum legacy_db_type) (uint) *(head+61), 1, 0)))
......
......@@ -3471,7 +3471,7 @@ static int ha_maria_init(void *p)
maria_hton= (handlerton *)p;
maria_hton->state= SHOW_OPTION_YES;
maria_hton->db_type= DB_TYPE_UNKNOWN;
maria_hton->db_type= DB_TYPE_ARIA;
maria_hton->create= maria_create_handler;
maria_hton->panic= maria_hton_panic;
maria_hton->commit= maria_commit;
......
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