summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-01-29 19:10:33 +0200
committerunknown <monty@mashka.mysql.fi>2003-01-29 19:10:33 +0200
commit9c89ce7b3acc40fa9cd739b041611d79d43f55da (patch)
tree3f058e0d91899d6dc10b764ff6ad44cf7b42b84a /sql/sql_table.cc
parent0458a92197a8366450698b7f98c47046d49e328c (diff)
downloadmariadb-git-9c89ce7b3acc40fa9cd739b041611d79d43f55da.tar.gz
Fixed compilation error on windows
sql/sql_table.cc: Added comments
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc48
1 files changed, 43 insertions, 5 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index a4ba3617e67..e8857a7faeb 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -40,11 +40,28 @@ static int copy_data_between_tables(TABLE *from,TABLE *to,
ORDER *order,
ha_rows *copied,ha_rows *deleted);
-/*****************************************************************************
-** Remove all possbile tables and give a compact errormessage for all
-** wrong tables.
-** This will wait for all users to free the table before dropping it
-*****************************************************************************/
+/*
+ delete (drop) tables.
+
+ SYNOPSIS
+ mysql_rm_table()
+ thd Thread handle
+ tables List of tables to delete
+ if_exists If 1, don't give error if one table doesn't exists
+
+ NOTES
+ Will delete all tables that can be deleted and give a compact error
+ messages for tables that could not be deleted.
+ If a table is in use, we will wait for all users to free the table
+ before dropping it
+
+ Wait if global_read_lock (FLUSH TABLES WITH READ LOCK) is set.
+
+ RETURN
+ 0 ok. In this case ok packet is sent to user
+ -1 Error (Error message given but not sent to user)
+
+*/
int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
{
@@ -89,6 +106,26 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
DBUG_RETURN(0);
}
+
+/*
+ delete (drop) tables.
+
+ SYNOPSIS
+ mysql_rm_table_part2_with_lock()
+ thd Thread handle
+ tables List of tables to delete
+ if_exists If 1, don't give error if one table doesn't exists
+ dont_log_query Don't write query to log files
+
+ NOTES
+ Works like documented in mysql_rm_table(), but don't check
+ global_read_lock and don't send_ok packet to server.
+
+ RETURN
+ 0 ok
+ 1 error
+*/
+
int mysql_rm_table_part2_with_lock(THD *thd,
TABLE_LIST *tables, bool if_exists,
bool dont_log_query)
@@ -110,6 +147,7 @@ int mysql_rm_table_part2_with_lock(THD *thd,
return error;
}
+
/*
TODO:
When logging to the binary log, we should log