summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2005-11-03 16:10:11 +0200
committerunknown <jani@ua141d10.elisa.omakaista.fi>2005-11-03 16:10:11 +0200
commit5af7ca80d98459b9c163328eaf8709abdf8c9883 (patch)
tree533bc3410929cad9d7bedd3ecdd6edd46725efa1 /sql/table.cc
parentabd77bc56397c1522f2b729334f877f9806dafd2 (diff)
downloadmariadb-git-5af7ca80d98459b9c163328eaf8709abdf8c9883.tar.gz
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.
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc23
1 files changed, 0 insertions, 23 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 722e4e4df25..777d8672ab3 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1693,29 +1693,6 @@ bool check_column_name(const char *name)
}
/*
-** Get type of table from .frm file
-*/
-
-db_type get_table_type(THD *thd, const char *name)
-{
- File file;
- uchar head[4];
- int error;
- DBUG_ENTER("get_table_type");
- DBUG_PRINT("enter",("name: '%s'",name));
-
- if ((file=my_open(name,O_RDONLY, MYF(0))) < 0)
- DBUG_RETURN(DB_TYPE_UNKNOWN);
- error=my_read(file,(byte*) head,4,MYF(MY_NABP));
- my_close(file,MYF(0));
- if (error || head[0] != (uchar) 254 || head[1] != 1 ||
- (head[2] != FRM_VER && head[2] != FRM_VER+1 &&
- (head[2] < FRM_VER+3 || head[2] > FRM_VER+4)))
- DBUG_RETURN(DB_TYPE_UNKNOWN);
- DBUG_RETURN(ha_checktype(thd,(enum db_type) (uint) *(head+3),0,0));
-}
-
-/*
Create Item_field for each column in the table.
SYNPOSIS