summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <istruewing@chilla.local>2006-12-08 12:28:21 +0100
committerunknown <istruewing@chilla.local>2006-12-08 12:28:21 +0100
commitc228c598ea7a350d2df8ff01a21acd88c8d9d797 (patch)
tree361ecd32f40214ee530ace9551611823defd6b49 /sql
parent1e8739c34810115c2b1e7478b08cfdfd52452ebe (diff)
parent5edee53165d8f60afe81b4f1c5cff04ba3a510eb (diff)
downloadmariadb-git-c228c598ea7a350d2df8ff01a21acd88c8d9d797.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into chilla.local:/home/mydev/mysql-5.0-axmrg
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_federated.cc11
-rw-r--r--sql/sql_insert.cc3
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
}