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( ...@@ -600,7 +600,9 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */ cached binlog for this transaction */
thd_mark_transaction_to_rollback(thd, TRUE); if (thd) {
thd_mark_transaction_to_rollback(thd, TRUE);
}
return(HA_ERR_LOCK_DEADLOCK); return(HA_ERR_LOCK_DEADLOCK);
} else if (error == (int) DB_LOCK_WAIT_TIMEOUT) { } else if (error == (int) DB_LOCK_WAIT_TIMEOUT) {
...@@ -609,8 +611,10 @@ convert_error_code_to_mysql( ...@@ -609,8 +611,10 @@ convert_error_code_to_mysql(
latest SQL statement in a lock wait timeout. Previously, we latest SQL statement in a lock wait timeout. Previously, we
rolled back the whole transaction. */ rolled back the whole transaction. */
thd_mark_transaction_to_rollback(thd, if (thd) {
(bool)row_rollback_on_timeout); thd_mark_transaction_to_rollback(
thd, (bool)row_rollback_on_timeout);
}
return(HA_ERR_LOCK_WAIT_TIMEOUT); return(HA_ERR_LOCK_WAIT_TIMEOUT);
...@@ -662,7 +666,9 @@ convert_error_code_to_mysql( ...@@ -662,7 +666,9 @@ convert_error_code_to_mysql(
tell it also to MySQL so that MySQL knows to empty the tell it also to MySQL so that MySQL knows to empty the
cached binlog for this transaction */ cached binlog for this transaction */
thd_mark_transaction_to_rollback(thd, TRUE); if (thd) {
thd_mark_transaction_to_rollback(thd, TRUE);
}
return(HA_ERR_LOCK_TABLE_FULL); return(HA_ERR_LOCK_TABLE_FULL);
} else if (error == DB_TOO_MANY_CONCURRENT_TRXS) { } 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