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 */