summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorAlfranio Correia <alfranio.correia@sun.com>2009-08-24 10:24:52 +0100
committerAlfranio Correia <alfranio.correia@sun.com>2009-08-24 10:24:52 +0100
commit9a632549da0292679d585580e10b956475c33740 (patch)
tree777fd03d38658bc11bd16e2d427b40cbd0858418 /sql/log_event.cc
parent8b0ec01448c908eaad3f2532b4bd72d56253e78d (diff)
parent78585a25ff19eb304185d50f864138e0b5f29106 (diff)
downloadmariadb-git-9a632549da0292679d585580e10b956475c33740.tar.gz
auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 444647d0de4..375f9cf1859 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -3169,7 +3169,7 @@ compare_errors:
/*
If we expected a non-zero error code, and we don't get the same error
- code, and none of them should be ignored.
+ code, and it should be ignored or is related to a concurrency issue.
*/
actual_error= thd->is_error() ? thd->main_da.sql_errno() : 0;
DBUG_PRINT("info",("expected_error: %d sql_errno: %d",
@@ -3192,7 +3192,8 @@ Default database: '%s'. Query: '%s'",
thd->is_slave_error= 1;
}
/*
- If we get the same error code as expected, or they should be ignored.
+ If we get the same error code as expected and it is not a concurrency
+ issue, or should be ignored.
*/
else if ((expected_error == actual_error &&
!concurrency_error_code(expected_error)) ||
@@ -3203,6 +3204,14 @@ Default database: '%s'. Query: '%s'",
thd->killed= THD::NOT_KILLED;
}
/*
+ If we expected a non-zero error code and get nothing and, it is a concurrency
+ issue or should be ignored.
+ */
+ else if (expected_error && !actual_error &&
+ (concurrency_error_code(expected_error) ||
+ ignored_error_code(expected_error)))
+ ha_autocommit_or_rollback(thd, TRUE);
+ /*
Other cases: mostly we expected no error and get one.
*/
else if (thd->is_slave_error || thd->is_fatal_error)