diff options
author | unknown <kostja@bodhi.(none)> | 2007-07-14 05:22:24 +0400 |
---|---|---|
committer | unknown <kostja@bodhi.(none)> | 2007-07-14 05:22:24 +0400 |
commit | 393e0f654172bd90c2b079d79bc7ae381df7540a (patch) | |
tree | 69767c36c1bf087459fa815da3874567530e1497 /sql/sql_trigger.cc | |
parent | 9a52e13ccb92d6f30bbd4e92e73771b2a2662021 (diff) | |
download | mariadb-git-393e0f654172bd90c2b079d79bc7ae381df7540a.tar.gz |
Fix a compiler warning.
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r-- | sql/sql_trigger.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index b5165a29ab4..55eae2f5ea5 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1805,16 +1805,16 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db, bzero(&table, sizeof(table)); init_alloc_root(&table.mem_root, 8192, 0); - uchar key[MAX_DBKEY_LENGTH]; - uint key_length= (uint) (strmov(strmov((char*)&key[0], db)+1, - old_table)-(char*)&key[0])+1; - /* This method interfaces the mysql server code protected by either LOCK_open mutex or with an exclusive table name lock. In the future, only an exclusive table name lock will be enough. */ #ifndef DBUG_OFF + uchar key[MAX_DBKEY_LENGTH]; + uint key_length= (uint) (strmov(strmov((char*)&key[0], db)+1, + old_table)-(char*)&key[0])+1; + if (!is_table_name_exclusively_locked_by_this_thread(thd, key, key_length)) safe_mutex_assert_owner(&LOCK_open); #endif |