summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_trigger.cc')
-rw-r--r--sql/sql_trigger.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 3de7aded51e..6e3a13c8e5f 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1985,9 +1985,7 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db,
*/
#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;
-
+ uint key_length= create_table_def_key((char *)key, db, old_table);
if (!is_table_name_exclusively_locked_by_this_thread(thd, key, key_length))
safe_mutex_assert_owner(&LOCK_open);
#endif