mirror of
https://github.com/MariaDB/server.git
synced 2026-04-20 23:35:32 +02:00
Added innodb_rollback_on_timeout option to restore the 4.1
InnoDB timeout behavior (Bug #24200) mysql-test/t/innodb_mysql-master.opt: Set --innodb-lock-wait-timeout=2, since test for bug #24200 times out. This *could* cause random test failures if some long-running transaction concurrency is being tested. However, such a test really should go in innodb-big or some other test file.
This commit is contained in:
parent
9d8c9e9d96
commit
47b0a0b089
13 changed files with 144 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue