diff options
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 973fbca12f5..b3072205514 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1193,10 +1193,11 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root, */ { char path[FN_REFLEN]; + db_type not_used; strxnmov(path, FN_REFLEN, mysql_data_home, "/", table_list->db, "/", table_list->table_name, reg_ext, NullS); (void) unpack_filename(path, path); - if (mysql_frm_type(path) == FRMTYPE_VIEW) + if (mysql_frm_type(thd, path, ¬_used) == FRMTYPE_VIEW) { TABLE tab;// will not be used (because it's VIEW) but have to be passed table= &tab; |