1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
unknown
2005-11-03 16:10:11 +02:00
parent abd77bc563
commit 5af7ca80d9
9 changed files with 45 additions and 44 deletions

View File

@ -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, &not_used) == FRMTYPE_VIEW)
{
TABLE tab;// will not be used (because it's VIEW) but have to be passed
table= &tab;