diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lock.cc | 2 | ||||
-rw-r--r-- | sql/sql_repl.cc | 2 | ||||
-rw-r--r-- | sql/sql_table.cc | 5 |
3 files changed, 2 insertions, 7 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 29795415720..67a085ff708 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -495,7 +495,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list) { TABLE *table; char key[MAX_DBKEY_LENGTH]; - char *db= table_list->db ? table_list->db : (thd->db ? thd->db : (char*) ""); + char *db= table_list->db; uint key_length; DBUG_ENTER("lock_table_name"); safe_mutex_assert_owner(&LOCK_open); diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 8a5a9564d3e..32c5f0bfdab 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -662,8 +662,6 @@ err: int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) { int slave_errno= 0; - if (!thd) - thd = current_thd; int thread_mask; DBUG_ENTER("start_slave"); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 9d1855ef936..05d9a5f706f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -365,9 +365,6 @@ void check_duplicates_in_interval(const char *set_or_name, unsigned int old_count= typelib->count; const char **old_type_names= typelib->type_names; - if (typelib->count <= 1) - return; - old_count= typelib->count; old_type_names= typelib->type_names; const char **cur_value= typelib->type_names; @@ -377,7 +374,7 @@ void check_duplicates_in_interval(const char *set_or_name, typelib->count--; if (find_type((char*)*cur_value,typelib,1)) { - push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR, + push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_NOTE, ER_DUPLICATED_VALUE_IN_TYPE, ER(ER_DUPLICATED_VALUE_IN_TYPE), name,*cur_value,set_or_name); |