diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-03-02 20:59:29 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-03-10 18:21:23 +0100 |
commit | 8eb66bc382295003e5da5ff50365d62def30f52d (patch) | |
tree | ba58e522d6e2a0e0e2629c74160d4c8ef2e50f6d /sql/sql_plugin.cc | |
parent | 1c8d2121ab0e9ca0d8a8fccdd85da1072ef30815 (diff) | |
download | mariadb-git-8eb66bc382295003e5da5ff50365d62def30f52d.tar.gz |
cleanup: change dd_frm_type() to return the engine name, not legacy_db_type
this simplifies the code and avoids unnecessary conversions back and forth.
and it works even if the engine is not installed.
Diffstat (limited to 'sql/sql_plugin.cc')
-rw-r--r-- | sql/sql_plugin.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index ed0721feb3b..4ba9b82cf47 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1646,10 +1646,11 @@ int plugin_init(int *argc, char **argv, int flags) { char path[FN_REFLEN + 1]; build_table_filename(path, sizeof(path) - 1, "mysql", "plugin", reg_ext, 0); - enum legacy_db_type db_type; - frm_type_enum frm_type= dd_frm_type(NULL, path, &db_type); + char engine_name_buf[NAME_CHAR_LEN + 1]; + LEX_STRING maybe_myisam= { engine_name_buf, 0 }; + frm_type_enum frm_type= dd_frm_type(NULL, path, &maybe_myisam); /* if mysql.plugin table is MyISAM - load it right away */ - if (frm_type == FRMTYPE_TABLE && db_type == DB_TYPE_MYISAM) + if (frm_type == FRMTYPE_TABLE && !strcasecmp(maybe_myisam.str, "MyISAM")) { plugin_load(&tmp_root); flags|= PLUGIN_INIT_SKIP_PLUGIN_TABLE; |