diff --git a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c index bd13c2701..df66e2b0d 100644 --- a/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/MySQLBackend/mysql_backend.c @@ -922,6 +922,12 @@ gw_read_and_write(DCB *dcb) !result_collected) { stmt = modutil_get_next_MySQL_packet(&read_buffer); + + if (!GWBUF_IS_CONTIGUOUS(stmt)) + { + // Make sure the buffer is contiguous + stmt = gwbuf_make_contiguous(stmt); + } } else {