diff options
author | tsmith/tim@siva.hindu.god <> | 2006-12-19 16:57:51 -0700 |
---|---|---|
committer | tsmith/tim@siva.hindu.god <> | 2006-12-19 16:57:51 -0700 |
commit | 0d5dc51438463226da454808a4ef370d194ae65d (patch) | |
tree | 9d22a6e3d1f813ebfd932d958ebe02a7a5519099 /innobase | |
parent | 3cc1a4251aac06024f9f2346bbb411d90f7c4aa8 (diff) | |
download | mariadb-git-0d5dc51438463226da454808a4ef370d194ae65d.tar.gz |
Added innodb_rollback_on_timeout option to restore the 4.1
InnoDB timeout behavior (Bug #24200)
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/include/row0mysql.h | 2 | ||||
-rw-r--r-- | innobase/row/row0mysql.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index 7d8740db044..9e28fabe491 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -19,6 +19,8 @@ Created 9/17/2000 Heikki Tuuri #include "btr0pcur.h" #include "trx0types.h" +extern ibool row_rollback_on_timeout; + typedef struct row_prebuilt_struct row_prebuilt_t; /*********************************************************************** diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index efbb93ba9f5..4bc5f39359c 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -35,6 +35,9 @@ Created 9/17/2000 Heikki Tuuri /* A dummy variable used to fool the compiler */ ibool row_mysql_identically_false = FALSE; +/* Provide optional 4.x backwards compatibility for 5.0 and above */ +ibool row_rollback_on_timeout = FALSE; + /* List of tables we should drop in background. ALTER TABLE in MySQL requires that the table handler can drop the table in background when there are no queries to it any more. Protected by the kernel mutex. */ @@ -514,7 +517,9 @@ handle_new_error: return(TRUE); } else if (err == DB_DEADLOCK - || err == DB_LOCK_TABLE_FULL) { + || err == DB_LOCK_TABLE_FULL + || (err == DB_LOCK_WAIT_TIMEOUT + && row_rollback_on_timeout)) { /* Roll back the whole transaction; this resolution was added to version 3.23.43 */ @@ -522,6 +527,10 @@ handle_new_error: } else if (err == DB_OUT_OF_FILE_SPACE || err == DB_LOCK_WAIT_TIMEOUT) { + + ut_ad(!(err == DB_LOCK_WAIT_TIMEOUT + && row_rollback_on_timeout)); + if (savept) { /* Roll back the latest, possibly incomplete insertion or update */ |