diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-21 12:14:34 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-21 12:14:34 +0300 |
commit | 08bcd2d8f67dcacd36abd2592fa2a59321abe7c2 (patch) | |
tree | 1a7e0403e8ed7b5ae817b8249812184027c9cd68 /sql/ha_ndbcluster_binlog.cc | |
parent | b6685d35dcc45e4fc8eca53fa8f6d3315f2e6b89 (diff) | |
parent | 8b7d5366ce40280d634bf56f342342fab9d90287 (diff) | |
download | mariadb-git-08bcd2d8f67dcacd36abd2592fa2a59321abe7c2.tar.gz |
Auto-merge from mysql-next-mr.
Diffstat (limited to 'sql/ha_ndbcluster_binlog.cc')
-rw-r--r-- | sql/ha_ndbcluster_binlog.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 25f8474feae..eb46958398a 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -306,6 +306,7 @@ static void run_query(THD *thd, char *buf, char *end, thd->transaction.all= save_thd_transaction_all; thd->transaction.stmt= save_thd_transaction_stmt; thd->net= save_thd_net; + thd->set_current_stmt_binlog_format_row(); if (thd == injector_thd) { @@ -1874,7 +1875,7 @@ static void ndb_binlog_query(THD *thd, Cluster_schema *schema) thd->db= schema->db; int errcode = query_error_code(thd, thd->killed == THD::NOT_KILLED); thd->binlog_query(THD::STMT_QUERY_TYPE, schema->query, - schema->query_length, FALSE, + schema->query_length, FALSE, TRUE, schema->name[0] == 0 || thd->db[0] == 0, errcode); thd->server_id= thd_server_id_save; @@ -3655,13 +3656,14 @@ pthread_handler_t ndb_binlog_thread_func(void *arg) thd= new THD; /* note that contructor of THD uses DBUG_ */ THD_CHECK_SENTRY(thd); + thd->set_current_stmt_binlog_format_row(); /* We need to set thd->thread_id before thd->store_globals, or it will set an invalid value for thd->variables.pseudo_thread_id. */ - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); thd->thread_id= thread_id++; - pthread_mutex_unlock(&LOCK_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); mysql_thread_set_psi_id(thd->thread_id); @@ -3697,9 +3699,9 @@ pthread_handler_t ndb_binlog_thread_func(void *arg) pthread_detach_this_thread(); thd->real_id= pthread_self(); - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); threads.append(thd); - pthread_mutex_unlock(&LOCK_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); thd->lex->start_transaction_opt= 0; if (!(s_ndb= new Ndb(g_ndb_cluster_connection, "")) || |