summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index cf7240e4dba..04de761aece 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -342,7 +342,9 @@ void THD::change_user(void)
void THD::cleanup(void)
{
DBUG_ENTER("THD::cleanup");
- ha_rollback(this);
+ /* TODO uncomment the line below when binlog will be able to prepare */
+ // if (transaction.xa_state != XA_PREPARED)
+ ha_rollback(this);
if (locked_tables)
{
lock=locked_tables; locked_tables=0;
@@ -384,17 +386,17 @@ THD::~THD()
add_to_status(&global_status_var, &status_var);
/* Close connection */
-#ifndef EMBEDDED_LIBRARY
+#ifndef EMBEDDED_LIBRARY
if (net.vio)
{
vio_delete(net.vio);
- net_end(&net);
+ net_end(&net);
}
#endif
if (!cleanup_done)
cleanup();
- ha_close_connection(this);
+ ha_close_connection(this);
sp_cache_clear(&sp_proc_cache);
sp_cache_clear(&sp_func_cache);