diff options
author | monty@donna.mysql.com <> | 2001-02-18 00:03:37 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2001-02-18 00:03:37 +0200 |
commit | d218ebcc51f0016801fa61baea01190ca77062fd (patch) | |
tree | e430180603a3dd86bed056e15a90ce368911ca5a /sql/sql_base.cc | |
parent | ece13efde985355d0eb1df8875eabe3fd75cf007 (diff) | |
download | mariadb-git-d218ebcc51f0016801fa61baea01190ca77062fd.tar.gz |
Added locks needed for Innobase
Fixed mutex problem when doing automatic repair of MyISAM tables
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 97e6879a3a1..a293064f71e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -687,7 +687,7 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list) key_length=(uint) (strmov(strmov(key,db)+1,table_name)-key)+1; pthread_mutex_lock(&LOCK_open); - if (open_unireg_entry(thd, table, db, table_name, table_name,0) || + if (open_unireg_entry(thd, table, db, table_name, table_name, 1) || !(table->table_cache_key =memdup_root(&table->mem_root,(char*) key, key_length))) { @@ -1259,14 +1259,14 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db, if (error < 0) { if (!locked) - pthread_mutex_lock(&LOCK_open); + pthread_mutex_unlock(&LOCK_open); goto err; } if (wait_for_locked_table_names(thd,&table_list)) { unlock_table_name(thd,&table_list); if (!locked) - pthread_mutex_lock(&LOCK_open); + pthread_mutex_unlock(&LOCK_open); goto err; } } |