summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-02-11 13:48:59 +0200
committerunknown <monty@hundin.mysql.fi>2002-02-11 13:48:59 +0200
commite0ccdc17a208abb21cf15e7fbbbc3b88b969e0ec (patch)
treeada172b5dc5dccd546e301548aac618812e19814 /sql/handler.cc
parentaf932b5db200407cb250d6e398383e8db387e680 (diff)
parent501650c5b16a4c7cf7b673b19f9a2ae9c319e24f (diff)
downloadmariadb-git-e0ccdc17a208abb21cf15e7fbbbc3b88b969e0ec.tar.gz
merge with 3.23.48
BUILD/FINISH.sh: Auto merged BUILD/SETUP.sh: Auto merged BUILD/compile-alpha: Auto merged BUILD/compile-pentium-gcov: Auto merged BUILD/compile-pentium-gprof: Auto merged BUILD/compile-pentium: Auto merged BitKeeper/deleted/.del-my_new.cc: Delete: mysys/my_new.cc Build-tools/Do-compile: Auto merged acconfig.h: Auto merged acinclude.m4: Auto merged Docs/manual.texi: Auto merged bdb/dist/configure.in: Auto merged client/Makefile.am: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/buf/buf0lru.c: Auto merged innobase/dict/dict0crea.c: Auto merged innobase/fil/fil0fil.c: Auto merged innobase/include/srv0srv.h: Auto merged innobase/rem/rem0cmp.c: Auto merged innobase/srv/srv0srv.c: Auto merged innobase/srv/srv0start.c: Auto merged innobase/trx/trx0purge.c: Auto merged myisam/myisampack.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/t/join.test: Auto merged mysys/Makefile.am: Auto merged scripts/Makefile.am: Auto merged sql/ha_innodb.h: Auto merged sql/handler.cc: Auto merged sql/my_lock.c: Auto merged sql/mysqld.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_table.cc: Auto merged support-files/my-huge.cnf.sh: Auto merged support-files/my-large.cnf.sh: Auto merged support-files/my-medium.cnf.sh: Auto merged support-files/my-small.cnf.sh: Auto merged configure.in: merge innobase/row/row0mysql.c: merge innobase/trx/trx0trx.c: merge mysql-test/r/innodb.result: merge mysql-test/r/join.result: merge sql/ha_innodb.cc: merge sql/slave.cc: merge
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc43
1 files changed, 23 insertions, 20 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 507b77c977b..8447797442c 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -222,28 +222,31 @@ int ha_autocommit_or_rollback(THD *thd, int error)
DBUG_RETURN(error);
}
-/* This function is called when MySQL writes the log segment of a transaction
-to the binlog. It is called when the LOCK_log mutex is reserved. Here we
-communicate to transactional table handlers whta binlog position corresponds
-to the current transaction. The handler can store it and in recovery print
-to the user, so that the user knows from what position in the binlog to
-start possible roll-forward, for example, if the crashed server was a slave
-in replication. This function also calls the commit of the table handler,
-because the order of trasnactions in the log of the table handler must be
-the same as in the binlog. */
-
-int ha_report_binlog_offset_and_commit(
- THD *thd, /* in: user thread */
- char *log_file_name, /* in: latest binlog file name */
- my_off_t end_offset) /* in: the offset in the binlog file
- up to which we wrote */
+/*
+ This function is called when MySQL writes the log segment of a
+ transaction to the binlog. It is called when the LOCK_log mutex is
+ reserved. Here we communicate to transactional table handlers whta
+ binlog position corresponds to the current transaction. The handler
+ can store it and in recovery print to the user, so that the user
+ knows from what position in the binlog to start possible
+ roll-forward, for example, if the crashed server was a slave in
+ replication. This function also calls the commit of the table
+ handler, because the order of trasnactions in the log of the table
+ handler must be the same as in the binlog.
+
+ arguments:
+ log_file_name: latest binlog file name
+ end_offset: the offset in the binlog file up to which we wrote
+*/
+
+int ha_report_binlog_offset_and_commit(THD *thd,
+ char *log_file_name,
+ my_off_t end_offset)
{
+ int error= 0;
+#ifdef HAVE_INNOBASE_DB
THD_TRANS *trans;
- int error = 0;
-
trans = &thd->transaction.all;
-
-#ifdef HAVE_INNOBASE_DB
if (trans->innobase_tid)
{
if ((error=innobase_report_binlog_offset_and_commit(thd,
@@ -257,10 +260,10 @@ int ha_report_binlog_offset_and_commit(
trans->innodb_active_trans=0;
}
#endif
-
return error;
}
+
int ha_commit_trans(THD *thd, THD_TRANS* trans)
{
int error=0;