diff options
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 3d035359b6f..cb43bb77def 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -134,9 +134,9 @@ void lock_db_delete(const char *name, uint length) { my_dblock_t *opt; safe_mutex_assert_owner(&LOCK_lock_db); - opt= (my_dblock_t *)hash_search(&lock_db_cache, (const byte*) name, length); - DBUG_ASSERT(opt != NULL); - hash_delete(&lock_db_cache, (byte*) opt); + if (opt= (my_dblock_t *)hash_search(&lock_db_cache, + (const byte*) name, length)) + hash_delete(&lock_db_cache, (byte*) opt); } |