summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-08-21 20:54:11 +0300
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-08-21 20:54:11 +0300
commita8d94b4ab3826aeaa18d47ce862103591259e140 (patch)
treedcf70ef40dffb3324c019bae407db45de3749f9d /sql
parent4cf6756eb0f29618646e2eadbd62804d81ff6a79 (diff)
downloadmariadb-git-a8d94b4ab3826aeaa18d47ce862103591259e140.tar.gz
Fixes for bugs found by maria.test and event*tests:
Fixed bug when doing rnd_read followed by update. Don't duplicate error messages in log Initialize transaction object properly. Fixed failure in event*tests when running with maria mysql-test/mysql-test-run.pl: Removed warning when running with --external mysql-test/r/maria.result: Added back disabled test Verified that the result changes are correct mysql-test/t/maria.test: Added back disabled test sql/handler.cc: More debugging. Simple style change sql/sql_class.cc: Initialize transaction object properly. Fixed failure in event*tests when running with maria storage/maria/ha_maria.cc: More dbug info storage/maria/ma_blockrec.c: Removed not needed line storage/maria/ma_rrnd.c: Removed not used code Ensure that cur_row.lastpos is always set when reading record with rnd. (Fixes failure in maria.test) storage/maria/maria_def.h: Don't call maria_print_error() except with EXTRA_DEBUG (Removes duplicate error messages when somethings goes wrong)
Diffstat (limited to 'sql')
-rw-r--r--sql/handler.cc6
-rw-r--r--sql/sql_class.cc1
2 files changed, 4 insertions, 3 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 4b1938fe569..7d03599fe8b 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -2523,10 +2523,10 @@ int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt)
int ha_enable_transaction(THD *thd, bool on)
{
int error=0;
-
DBUG_ENTER("ha_enable_transaction");
- thd->transaction.on= on;
- if (on)
+ DBUG_PRINT("info", ("on: %d", (int) on));
+
+ if ((thd->transaction.on= on))
{
/*
Now all storage engines should have transaction handling enabled.
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 40b37ed7405..53651f92001 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -407,6 +407,7 @@ THD::THD()
cleanup_done= abort_on_warning= no_warnings_for_error= 0;
peer_port= 0; // For SHOW PROCESSLIST
transaction.m_pending_rows_event= 0;
+ transaction.on= 1;
#ifdef SIGNAL_WITH_VIO_CLOSE
active_vio = 0;
#endif