summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-11-18 02:15:06 +0200
committerunknown <monty@donna.mysql.com>2000-11-18 02:15:06 +0200
commit0ffa94682eb3ec86bd3c45fdee68f5ecda5e6ab7 (patch)
treee47c14103d1588f6a27c229783e07d73438c96d0 /sql/sql_table.cc
parent19fc413aa25290016069efbc9e25e2e79b3ea7c9 (diff)
downloadmariadb-git-0ffa94682eb3ec86bd3c45fdee68f5ecda5e6ab7.tar.gz
Portability fixes
Docs/manual.texi: Updated links and added more examples client/mysql.cc: Added --timeout + merge of Jani:s changes isam/_dynrec.c: Fixed bug when making big rows 1 byte smaller scripts/mysqlhotcopy.sh: Added regexp handling of filenames sql-bench/test-insert.sh: More order by tests sql/mf_iocache.cc: Cleanup sql/mysqld.cc: Moved my_delete() to before master thread died sql/sql_parse.cc: Fixed wrong comparison
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 7ae3b525609..173511083e4 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -48,6 +48,7 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
bool some_tables_deleted=0;
uint error;
db_type table_type;
+ TABLE_LIST *table;
DBUG_ENTER("mysql_rm_table");
/* mark for close and remove all cached entries */
@@ -59,22 +60,22 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
pthread_mutex_unlock(&thd->mysys_var->mutex);
if(global_read_lock)
+ {
+ if(thd->global_read_lock)
{
- if(thd->global_read_lock)
- {
- my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,MYF(0),
- tables->real_name);
- error = 1;
- goto err;
- }
- while (global_read_lock && ! thd->killed)
- {
- (void) pthread_cond_wait(&COND_refresh,&LOCK_open);
- }
-
+ my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,MYF(0),
+ tables->real_name);
+ error = 1;
+ goto err;
}
+ while (global_read_lock && ! thd->killed)
+ {
+ (void) pthread_cond_wait(&COND_refresh,&LOCK_open);
+ }
+
+ }
- for (TABLE_LIST *table=tables ; table ; table=table->next)
+ for (table=tables ; table ; table=table->next)
{
char *db=table->db ? table->db : thd->db;
if (!close_temporary_table(thd, db, table->real_name))