mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
convert_error_code_to_mysql(): Do not call thd_mark_transaction_to_rollback()
when thd is NULL.
This commit is contained in:
parent
da72864792
commit
2883a914f3
1 changed files with 10 additions and 4 deletions
|
@ -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 */
|
||||
|
||||
thd_mark_transaction_to_rollback(thd, TRUE);
|
||||
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 */
|
||||
|
||||
thd_mark_transaction_to_rollback(thd, TRUE);
|
||||
if (thd) {
|
||||
thd_mark_transaction_to_rollback(thd, TRUE);
|
||||
}
|
||||
|
||||
return(HA_ERR_LOCK_TABLE_FULL);
|
||||
} else if (error == DB_TOO_MANY_CONCURRENT_TRXS) {
|
||||
|
|
Loading…
Reference in a new issue