summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/t/rename.test2
-rw-r--r--mysql-test/t/rpl000014.test1
-rw-r--r--mysql-test/t/show_check.test1
-rw-r--r--sql/handler.cc2
-rw-r--r--sql/sql_class.h5
5 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test
index 98b2e267677..2a9cf113a47 100644
--- a/mysql-test/t/rename.test
+++ b/mysql-test/t/rename.test
@@ -2,7 +2,7 @@
# Test of rename table
#
-drop table if exists t1,t2,t3,t4;
+drop table if exists t0,t1,t2,t3,t4;
create table t0 SELECT 1,"table 1";
create table t2 SELECT 2,"table 2";
create table t3 SELECT 3,"table 3";
diff --git a/mysql-test/t/rpl000014.test b/mysql-test/t/rpl000014.test
index 327dde5f5db..3ab5360d82d 100644
--- a/mysql-test/t/rpl000014.test
+++ b/mysql-test/t/rpl000014.test
@@ -15,6 +15,7 @@ change master to master_log_pos=173;
show slave status;
connection master;
show master status;
+create table if not exists foo(n int);
drop table if exists foo;
create table foo (n int);
insert into foo values (1),(2),(3);
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index d388a5403c7..aeb6d316fd8 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -1,6 +1,7 @@
#
# Test of some show commands
#
+drop table if exists t1,t2;
create table t1 (a int not null primary key, b int not null,c int not null, key(b,c));
insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
create table t2 type=isam select * from t1;
diff --git a/sql/handler.cc b/sql/handler.cc
index 08cc3db7628..affd9df8f87 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -241,7 +241,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
#endif
if (error && trans == &thd->transaction.all && mysql_bin_log.is_open())
sql_print_error("Error: Got error during commit; Binlog is not up to date!");
-#endif
+#endif // using transactions
DBUG_RETURN(error);
}
diff --git a/sql/sql_class.h b/sql/sql_class.h
index bd295be101c..46c37e1b57f 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -299,9 +299,14 @@ public:
}
inline bool active_transaction()
{
+#ifdef USING_TRANSACTIONS
return (transaction.all.bdb_tid != 0 ||
transaction.all.innobase_tid != 0 ||
transaction.all.gemini_tid != 0);
+#else
+ return 0;
+#endif
+
}
inline gptr alloc(unsigned int size) { return alloc_root(&mem_root,size); }
inline gptr calloc(unsigned int size)