diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_federated.cc | 11 | ||||
-rw-r--r-- | sql/sql_insert.cc | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index 9abfcdc61c6..ad144ed6118 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -1434,6 +1434,16 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked) /* Connect to foreign database mysql_real_connect() */ mysql= mysql_init(0); + + /* + BUG# 17044 Federated Storage Engine is not UTF8 clean + Add set names to whatever charset the table is at open + of table + */ + /* this sets the csname like 'set names utf8' */ + mysql_options(mysql,MYSQL_SET_CHARSET_NAME, + this->table->s->table_charset->csname); + if (!mysql || !mysql_real_connect(mysql, share->hostname, share->username, @@ -1450,6 +1460,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked) API silently reconnect. For future versions, we will need more logic to deal with transactions */ + mysql->reconnect= 1; ref_length= (table->s->primary_key != MAX_KEY ? diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2ce83caa369..53e93cdefc8 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1745,8 +1745,6 @@ void kill_delayed_threads(void) delayed_insert *tmp; while ((tmp=it++)) { - /* Ensure that the thread doesn't kill itself while we are looking at it */ - pthread_mutex_lock(&tmp->mutex); tmp->thd.killed= THD::KILL_CONNECTION; if (tmp->thd.mysys_var) { @@ -1765,7 +1763,6 @@ void kill_delayed_threads(void) } pthread_mutex_unlock(&tmp->thd.mysys_var->mutex); } - pthread_mutex_unlock(&tmp->mutex); } VOID(pthread_mutex_unlock(&LOCK_delayed_insert)); // For unlink from list } |