summaryrefslogtreecommitdiff
path: root/sql/datadict.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-03-02 20:59:29 +0100
committerSergei Golubchik <serg@mariadb.org>2017-03-10 18:21:23 +0100
commit8eb66bc382295003e5da5ff50365d62def30f52d (patch)
treeba58e522d6e2a0e0e2629c74160d4c8ef2e50f6d /sql/datadict.h
parent1c8d2121ab0e9ca0d8a8fccdd85da1072ef30815 (diff)
downloadmariadb-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/datadict.h')
-rw-r--r--sql/datadict.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/datadict.h b/sql/datadict.h
index dd80942daca..9b180a882f9 100644
--- a/sql/datadict.h
+++ b/sql/datadict.h
@@ -35,12 +35,11 @@ enum frm_type_enum
Prefer to use ha_table_exists() instead.
To check whether it's an frm of a view, use dd_frm_is_view().
*/
-frm_type_enum dd_frm_type(THD *thd, char *path, enum legacy_db_type *dbt);
+frm_type_enum dd_frm_type(THD *thd, char *path, LEX_STRING *engine_name);
static inline bool dd_frm_is_view(THD *thd, char *path)
{
- enum legacy_db_type not_used;
- return dd_frm_type(thd, path, &not_used) == FRMTYPE_VIEW;
+ return dd_frm_type(thd, path, NULL) == FRMTYPE_VIEW;
}
bool dd_recreate_table(THD *thd, const char *db, const char *table_name,