summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/gen_lex_hash.cc4
-rw-r--r--sql/handler.cc14
2 files changed, 8 insertions, 10 deletions
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc
index 274445f7432..efaf7411c55 100644
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -472,7 +472,7 @@ int main(int argc,char **argv)
int error;
MY_INIT(argv[0]);
- start_value=5307411L; best_t1=4597287L; best_t2=3375760L; best_type=1; /* mode=4783 add=5 func_type: 0 */
+ start_value=4424889L; best_t1=3207460L; best_t2=481534L; best_type=0; /* mode=4451 add=8 type: 0 */
if (get_options(argc,(char **) argv))
exit(1);
@@ -539,7 +539,7 @@ printf("/* This code is generated by gen_lex_hash.cc that seeks for a perfect\nh
print_arrays();
- printf("/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d t ype: %d */\n\n",
+ printf("/* start_value=%ldL; best_t1=%ldL; best_t2=%ldL; best_type=%d; */ /* mode=%d add=%d type: %d */\n\n",
best_start_value, best_t1, best_t2, best_type,
best_mod, best_add, best_functype);
diff --git a/sql/handler.cc b/sql/handler.cc
index 930bfa2ed28..08cc3db7628 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -191,16 +191,13 @@ int ha_autocommit_or_rollback(THD *thd, int error)
{
DBUG_ENTER("ha_autocommit_or_rollback");
#ifdef USING_TRANSACTIONS
- if (!(thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)))
+ if (!error)
{
- if (!error)
- {
- if (ha_commit_stmt(thd))
- error=1;
- }
- else
- (void) ha_rollback_stmt(thd);
+ if (ha_commit_stmt(thd))
+ error=1;
}
+ else
+ (void) ha_rollback_stmt(thd);
#endif
DBUG_RETURN(error);
}
@@ -232,6 +229,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans)
}
#endif
#ifdef HAVE_INNOBASE_DB
+ if (trans->innobase_tid)
{
if ((error=innobase_commit(thd,trans->innobase_tid)))
{