Commit cac20a3a authored by marko's avatar marko

convert_error_code_to_mysql(): Do not call thd_mark_transaction_to_rollback()

when thd is NULL.
parent cd51e622
......@@ -600,7 +600,9 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */
if (thd) {
thd_mark_transaction_to_rollback(thd, TRUE);
}
return(HA_ERR_LOCK_DEADLOCK);
} else if (error == (int) DB_LOCK_WAIT_TIMEOUT) {
......@@ -609,8 +611,10 @@ convert_error_code_to_mysql(
latest SQL statement in a lock wait timeout. Previously, we
rolled back the whole transaction. */
thd_mark_transaction_to_rollback(thd,
(bool)row_rollback_on_timeout);
if (thd) {
thd_mark_transaction_to_rollback(
thd, (bool)row_rollback_on_timeout);
}
return(HA_ERR_LOCK_WAIT_TIMEOUT);
......@@ -662,7 +666,9 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */
if (thd) {
thd_mark_transaction_to_rollback(thd, TRUE);
}
return(HA_ERR_LOCK_TABLE_FULL);
} else if (error == DB_TOO_MANY_CONCURRENT_TRXS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment