MXS-2266: Add test case

Extended the existing tests to cover MXS-2266.
This commit is contained in:
Markus Mäkelä 2019-01-16 11:30:52 +02:00
parent 317166540f
commit 68d33a3ae4
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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;
}