diff --git a/query_classifier/qc_sqlite/qc_sqlite.cc b/query_classifier/qc_sqlite/qc_sqlite.cc index ad0b10bac..713586cdc 100644 --- a/query_classifier/qc_sqlite/qc_sqlite.cc +++ b/query_classifier/qc_sqlite/qc_sqlite.cc @@ -3544,6 +3544,7 @@ static bool parse_query(GWBUF* query, uint32_t collect) { MXS_ERROR("The provided buffer does not contain a COM_QUERY, but a %s.", STRPACKETTYPE(MYSQL_GET_COMMAND(data))); + ss_dassert(!true); } } else diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index 8917d77f7..a9d6890c9 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -834,10 +834,10 @@ handle_multi_temp_and_load(RWSplitSession *rses, GWBUF *querybuf, /** * Check if the query has anything to do with temporary tables. */ - if (rses->have_tmp_tables) + if (rses->have_tmp_tables && is_packet_a_query(packet_type)) { check_drop_tmp_table(rses, querybuf); - if (is_packet_a_query(packet_type) && is_read_tmp_table(rses, querybuf, *qtype)) + if (is_read_tmp_table(rses, querybuf, *qtype)) { *qtype |= QUERY_TYPE_MASTER_READ; }