From 7181ea408328a590c2acf9b26a223cb1011bacab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 16 Jan 2019 11:30:52 +0200 Subject: [PATCH] MXS-2266: Add test case Extended the existing tests to cover MXS-2266. --- maxscale-system-test/CMakeLists.txt | 2 +- maxscale-system-test/binary_ps.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index da04de531..cfce1f6e3 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -455,7 +455,7 @@ add_test_executable(mxs359_read_only.cpp mxs359_read_only mxs359_read_only LABEL # Test master_failure_mode=error_on_write and master replacement add_test_executable(mxs359_error_on_write.cpp mxs359_error_on_write mxs359_error_on_write LABELS readwritesplit REPL_BACKEND) -# Binary protocol prepared statement tests +# Binary protocol prepared statement tests (also tests MXS-2266) add_test_executable(binary_ps.cpp binary_ps replication LABELS readwritesplit LIGHT REPL_BACKEND) add_test_executable(binary_ps_cursor.cpp binary_ps_cursor replication LABELS readwritesplit LIGHT REPL_BACKEND) diff --git a/maxscale-system-test/binary_ps.cpp b/maxscale-system-test/binary_ps.cpp index 137f903f9..bd513263e 100644 --- a/maxscale-system-test/binary_ps.cpp +++ b/maxscale-system-test/binary_ps.cpp @@ -46,6 +46,7 @@ int main(int argc, char** argv) test.add_result(strcmp(buffer, server_id[0]), "Expected server_id '%s', got '%s'", server_id[0], buffer); mysql_stmt_close(stmt); + stmt = mysql_stmt_init(test.maxscales->conn_rwsplit[0]); // Execute read, should return a slave server ID @@ -66,5 +67,8 @@ int main(int argc, char** argv) test.maxscales->close_maxscale_connections(0); + // MXS-2266: COM_STMT_CLOSE causes a warning to be logged + test.log_excludes(0, "Closing unknown prepared statement"); + return test.global_result; }