diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-10-07 17:02:26 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2021-10-20 15:15:21 +0300 |
commit | caebe151c18a3415466cca88dbdacb8ec9597a29 (patch) | |
tree | 0c2fd1d2c43969b16e190cfe71700d1edb682d54 /sql/sql_handler.cc | |
parent | 1811fd51fbae9e6c1f06ce93faef2bf1279cd3b6 (diff) | |
download | mariadb-git-caebe151c18a3415466cca88dbdacb8ec9597a29.tar.gz |
MDEV-22445 Crash on HANDLER READ NEXT after XA PREPARE
The assertion is absolutely correct since no data access is possible after
XA PREPARE.
The check is added in mysql_ha_read.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 7c2122b6a0a..ec3756eceba 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -697,6 +697,9 @@ retry: if (!(handler= mysql_ha_find_handler(thd, tables->alias))) goto err0; + if (thd->transaction.xid_state.check_has_uncommitted_xa()) + goto err0; + table= handler->table; tables->table= table; // This is used by fix_fields table->pos_in_table_list= tables; |