[Commits] 70a37f6: MDEV-10768: Galera segfault on transaction abort after failed wsrep_grant_mdl_exception()

Jan Lindström jan.lindstrom at mariadb.com
Fri Sep 9 13:58:42 EEST 2016


revision-id: 70a37f6ede8fd2220968661cae86946fa1f5bcc1 (mariadb-10.1.17-9-g70a37f6)
parent(s): 8494039757a2f6353cc161e7824aab4fe2312d2a
committer: Jan Lindström
timestamp: 2016-09-09 13:57:58 +0300
message:

MDEV-10768: Galera segfault on transaction abort after failed wsrep_grant_mdl_exception()

Protect against accessing NULL handlerton pointer.

---
 sql/handler.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sql/handler.cc b/sql/handler.cc
index 4e4c8fa..045b644 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -6117,7 +6117,7 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
   for (; ha_info; ha_info= ha_info_next)
   {
     handlerton *hton= ha_info->ht();
-    if (!hton->abort_transaction)
+    if (!hton || !hton->abort_transaction)
     {
       /* Skip warning for binlog & wsrep. */
       if (hton->db_type != DB_TYPE_BINLOG && hton != wsrep_hton)
@@ -6154,7 +6154,7 @@ void ha_fake_trx_id(THD *thd)
   for (; ha_info; ha_info= ha_info_next)
   {
     handlerton *hton= ha_info->ht();
-    if (hton->fake_trx_id)
+    if (hton && hton->fake_trx_id)
     {
       hton->fake_trx_id(hton, thd);
 


More information about the commits mailing list