Fix test failures
Use larger BLOB type for mxs812_1, the inserted value exceeds the normal BLOB size. Add a baseline check into bulk_insert to verify that direct connections work (at the moment they don't, needs an investigation). Updated parameter names in failover_mysqlmon_mrm. Modified avro_alter to prevent data type conversion errors.
This commit is contained in:
@ -23,17 +23,23 @@ int main(int argc, char *argv[])
|
||||
test.set_timeout(120);
|
||||
test.repl->connect();
|
||||
|
||||
// Execute two events for each version of the schema
|
||||
execute_query_silent(test.repl->nodes[0], "DROP TABLE test.t1");
|
||||
execute_query(test.repl->nodes[0], "CREATE TABLE test.t1(id INT)");
|
||||
execute_query(test.repl->nodes[0], "INSERT INTO test.t1 VALUES (1)");
|
||||
execute_query(test.repl->nodes[0], "DELETE FROM test.t1");
|
||||
execute_query(test.repl->nodes[0], "ALTER TABLE test.t1 ADD COLUMN a VARCHAR(100)");
|
||||
execute_query(test.repl->nodes[0], "INSERT INTO test.t1 VALUES (2, \"a\")");
|
||||
execute_query(test.repl->nodes[0], "DELETE FROM test.t1");
|
||||
execute_query(test.repl->nodes[0], "ALTER TABLE test.t1 ADD COLUMN b FLOAT");
|
||||
execute_query(test.repl->nodes[0], "INSERT INTO test.t1 VALUES (3, \"b\", 3.0)");
|
||||
execute_query(test.repl->nodes[0], "DELETE FROM test.t1");
|
||||
execute_query(test.repl->nodes[0], "ALTER TABLE test.t1 CHANGE COLUMN b c DATETIME(3)");
|
||||
execute_query(test.repl->nodes[0], "INSERT INTO test.t1 VALUES (4, \"c\", NOW())");
|
||||
execute_query(test.repl->nodes[0], "DELETE FROM test.t1");
|
||||
execute_query(test.repl->nodes[0], "ALTER TABLE test.t1 DROP COLUMN c");
|
||||
execute_query(test.repl->nodes[0], "INSERT INTO test.t1 VALUES (5, \"d\")");
|
||||
execute_query(test.repl->nodes[0], "DELETE FROM test.t1");
|
||||
|
||||
test.repl->close_connections();
|
||||
|
||||
@ -61,7 +67,9 @@ int main(int argc, char *argv[])
|
||||
nrows++;
|
||||
}
|
||||
|
||||
test.add_result(nrows != 1, "Expected 1 line in file number %d, got %d: %s", i, nrows, rows);
|
||||
// The number of changes that are present in each version of the schema
|
||||
const int nchanges = 2;
|
||||
test.add_result(nrows != nchanges, "Expected %d line in file number %d, got %d: %s", nchanges, i, nrows, rows);
|
||||
free(rows);
|
||||
}
|
||||
|
||||
|
@ -203,12 +203,17 @@ int main(int argc, char** argv)
|
||||
TestConnections::require_repl_version("10.2");
|
||||
TestConnections test(argc, argv);
|
||||
test.connect_maxscale();
|
||||
test.repl->connect();
|
||||
|
||||
test.tprintf("Testing column-wise binding with a direct connection");
|
||||
test.add_result(bind_by_column(test.repl->nodes[0]), "Bulk inserts with a direct connection should work");
|
||||
test.tprintf("Testing column-wise binding with readwritesplit");
|
||||
test.add_result(bind_by_column(test.conn_rwsplit), "Bulk inserts with readwritesplit should work");
|
||||
test.tprintf("Testing column-wise binding with readconnroute");
|
||||
test.add_result(bind_by_column(test.conn_master), "Bulk inserts with readconnroute should work");
|
||||
|
||||
test.tprintf("Testing row-wise binding with a direct connection");
|
||||
test.add_result(bind_by_row(test.repl->nodes[0]), "Bulk inserts with a direct connection should work");
|
||||
test.tprintf("Testing row-wise binding with readwritesplit");
|
||||
test.add_result(bind_by_row(test.conn_rwsplit), "Bulk inserts with readwritesplit should work");
|
||||
test.tprintf("Testing row-wise binding with readconnroute");
|
||||
|
@ -11,7 +11,7 @@ monitor_interval=1000
|
||||
detect_standalone_master=true
|
||||
failcount=1
|
||||
allow_cluster_recovery=true
|
||||
failover=true
|
||||
auto_failover=true
|
||||
replication_user=repl
|
||||
replication_password=repl
|
||||
backend_connect_timeout=1
|
||||
|
@ -67,7 +67,7 @@ int main(int argc, char *argv[])
|
||||
/** Create test table */
|
||||
Test->repl->connect();
|
||||
Test->try_query(Test->repl->nodes[0], (char*)"DROP TABLE IF EXISTS long_blob_table");
|
||||
Test->try_query(Test->repl->nodes[0], (char*)"CREATE TABLE long_blob_table(x INT, b BLOB)");
|
||||
Test->try_query(Test->repl->nodes[0], (char*)"CREATE TABLE long_blob_table(x INT, b LONGBLOB)");
|
||||
|
||||
Test->connect_maxscale();
|
||||
Test->tprintf("Starting test");
|
||||
|
Reference in New Issue
Block a user