Navigation Menu

Skip to content

Commit

Permalink
percona: support auto DB type fix
Browse files Browse the repository at this point in the history
It's occurred when you update from < 5.6.16 or < 5.7.10.
  • Loading branch information
kou committed Apr 11, 2018
1 parent ac0f985 commit acb347d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -1921,6 +1921,11 @@ mrn_fix_db_type_static_rocksdb_db_type()

THD *thd = current_thd;

handlerton *tokudb_hton = ha_resolve_by_legacy_type(thd, DB_TYPE_TOKUDB);
if (tokudb_hton) {
return;
}

handlerton *rocksdb_hton = ha_resolve_by_legacy_type(thd, DB_TYPE_ROCKSDB);
if (rocksdb_hton) {
return;
Expand Down Expand Up @@ -1970,7 +1975,10 @@ mrn_fix_db_type_static_rocksdb_db_type()
if (type != FRMTYPE_TABLE)
continue;

if (db_type != DB_TYPE_ROCKSDB)
bool is_target_frm =
((db_type == DB_TYPE_TOKUDB && !tokudb_hton) ||
(db_type == DB_TYPE_ROCKSDB && !rocksdb_hton));
if (!is_target_frm)
continue;

File frm_file = mysql_file_open(mrn_key_file_frm,
Expand Down

0 comments on commit acb347d

Please sign in to comment.