sql_parse.cc test for changing to auto_commit mode was backwards
ha_berkeley.cc bug fixes to make OPT_BEGIN work properly handler.cc bug fixes to make OPT_BEGIN work properly sql/handler.cc: bug fixes to make OPT_BEGIN work properly sql/ha_berkeley.cc: bug fixes to make OPT_BEGIN work properly sql/sql_parse.cc: test for changing to auto_commit mode was backwards
This commit is contained in:
parent
a948b3d66b
commit
c7fa60e542
@ -1370,8 +1370,8 @@ int ha_berkeley::external_lock(THD *thd, int lock_type)
|
|||||||
current_row.data=0;
|
current_row.data=0;
|
||||||
if (!--thd->transaction.bdb_lock_count)
|
if (!--thd->transaction.bdb_lock_count)
|
||||||
{
|
{
|
||||||
if (thd->transaction.bdb_tid && (thd->options &
|
if (thd->transaction.bdb_tid && (thd->options & OPTION_AUTO_COMMIT)
|
||||||
(OPTION_AUTO_COMMIT | OPTION_BEGIN)))
|
&& !(thd->options & OPTION_BEGIN))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
F_UNLOCK is done without a transaction commit / rollback. This
|
F_UNLOCK is done without a transaction commit / rollback. This
|
||||||
|
@ -178,7 +178,8 @@ int ha_autocommit_or_rollback(THD *thd, int error)
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("ha_autocommit_or_rollback");
|
DBUG_ENTER("ha_autocommit_or_rollback");
|
||||||
#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB)
|
#if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB)
|
||||||
if ((thd->options & OPTION_AUTO_COMMIT) && !thd->locked_tables)
|
if ((thd->options & OPTION_AUTO_COMMIT) && !(thd->options & OPTION_BEGIN)
|
||||||
|
&& !thd->locked_tables)
|
||||||
{
|
{
|
||||||
if (!error)
|
if (!error)
|
||||||
{
|
{
|
||||||
@ -195,7 +196,7 @@ int ha_autocommit_or_rollback(THD *thd, int error)
|
|||||||
int ha_commit(THD *thd)
|
int ha_commit(THD *thd)
|
||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
DBUG_ENTER("commit");
|
DBUG_ENTER("ha_commit");
|
||||||
#ifdef HAVE_BERKELEY_DB
|
#ifdef HAVE_BERKELEY_DB
|
||||||
if (thd->transaction.bdb_tid)
|
if (thd->transaction.bdb_tid)
|
||||||
{
|
{
|
||||||
@ -224,7 +225,7 @@ int ha_commit(THD *thd)
|
|||||||
int ha_rollback(THD *thd)
|
int ha_rollback(THD *thd)
|
||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
DBUG_ENTER("commit");
|
DBUG_ENTER("ha_rollback");
|
||||||
#ifdef HAVE_BERKELEY_DB
|
#ifdef HAVE_BERKELEY_DB
|
||||||
if (thd->transaction.bdb_tid)
|
if (thd->transaction.bdb_tid)
|
||||||
{
|
{
|
||||||
|
@ -1536,7 +1536,7 @@ mysql_execute_command(void)
|
|||||||
/* Check if auto_commit mode changed */
|
/* Check if auto_commit mode changed */
|
||||||
if ((org_options ^ lex->options) & OPTION_AUTO_COMMIT)
|
if ((org_options ^ lex->options) & OPTION_AUTO_COMMIT)
|
||||||
{
|
{
|
||||||
if (org_options & OPTION_AUTO_COMMIT)
|
if (!org_options & OPTION_AUTO_COMMIT)
|
||||||
{
|
{
|
||||||
/* We changed to auto_commit mode */
|
/* We changed to auto_commit mode */
|
||||||
thd->options&= ~OPTION_BEGIN;
|
thd->options&= ~OPTION_BEGIN;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user