mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Changes in get_table_type() and mysql_frm_type(). The main problem was
that in mysql_rm_table_part2_with_lock() previously we needed to open same file twice. Now once is enough. sql/mysql_priv.h: Merged functions get_table_type() and mysql_frm_type() into one, using the name from latter one. sql/sql_base.cc: Changed get_table_type() to mysql_frm_type() sql/sql_delete.cc: Changed get_table_type() to mysql_frm_type() sql/sql_rename.cc: Changed get_table_type() to mysql_frm_type() sql/sql_show.cc: Changed get_table_type() to mysql_frm_type() sql/sql_table.cc: Changed get_table_type() to mysql_frm_type() sql/sql_view.cc: Merged code from get_table_type() and mysql_frm_type() into the latter one. sql/sql_view.h: Function prototype changes. sql/table.cc: No longer needed.
This commit is contained in:
@@ -2003,6 +2003,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
Security_context *sctx= thd->security_ctx;
|
||||
uint derived_tables= lex->derived_tables;
|
||||
int error= 1;
|
||||
db_type not_used;
|
||||
Open_tables_state open_tables_state_backup;
|
||||
DBUG_ENTER("get_all_tables");
|
||||
|
||||
@@ -2114,7 +2115,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
||||
else
|
||||
{
|
||||
my_snprintf(end, len, "/%s%s", file_name, reg_ext);
|
||||
switch (mysql_frm_type(path)) {
|
||||
switch (mysql_frm_type(thd, path, ¬_used)) {
|
||||
case FRMTYPE_ERROR:
|
||||
table->field[3]->store("ERROR", 5, system_charset_info);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user