From ad25389eae2a3ce1cf48bea1863d9dcbd39049f9 Mon Sep 17 00:00:00 2001 From: vasil <> Date: Thu, 27 Mar 2008 06:49:05 +0000 Subject: [PATCH] branches/5.1: Check whether *trx->mysql_query_str is != NULL in addition to trx->mysql_query_str. This adds more safety. This may or may not fix Bug#35226 RBR event crashes slave. --- row/row0sel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/row/row0sel.c b/row/row0sel.c index 763cabb1c30..9d2e08e0929 100644 --- a/row/row0sel.c +++ b/row/row0sel.c @@ -3577,7 +3577,9 @@ shortcut_fails_too_big_rec: if (trx->isolation_level <= TRX_ISO_READ_COMMITTED && prebuilt->select_lock_type != LOCK_NONE - && trx->mysql_query_str && trx->mysql_thd) { + && trx->mysql_query_str != NULL + && *trx->mysql_query_str != NULL + && trx->mysql_thd != NULL) { /* Scan the MySQL query string; check if SELECT is the first word there */