diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-08-21 09:09:26 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2019-08-21 09:09:26 +0300 |
commit | 1a3c77e524e87e8f4151d31cd9c3112df6de218f (patch) | |
tree | b0eadb6d09a3ac3311bb36d42233cb26926f28fe /mysql-test/suite/galera/t | |
parent | 6c06defb5f6ddccba1a3d7b03ba34dbb83c7ef69 (diff) | |
download | mariadb-git-1a3c77e524e87e8f4151d31cd9c3112df6de218f.tar.gz |
MDEV-19968: Galera test failure on galera_load_data
Add wait conditions and compare cardinality etc information
between nodes and print something only if they differ.
Diffstat (limited to 'mysql-test/suite/galera/t')
-rw-r--r-- | mysql-test/suite/galera/t/galera_load_data.test | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/mysql-test/suite/galera/t/galera_load_data.test b/mysql-test/suite/galera/t/galera_load_data.test index 99f8e571ef0..d4e09582a55 100644 --- a/mysql-test/suite/galera/t/galera_load_data.test +++ b/mysql-test/suite/galera/t/galera_load_data.test @@ -1,6 +1,5 @@ --source include/galera_cluster.inc - --connection node_1 create database cardtest02; @@ -38,23 +37,44 @@ ALTER TABLE `cardtest_tbl` ENABLE KEYS; UNLOCK TABLES; use cardtest02; ---sleep 15 ---vertical_results -show indexes from cardtest_tbl; ---vertical_results -select table_rows, avg_row_length, data_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +--let $wait_timeout=600 +--let $wait_condition = SELECT table_rows = 301 from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +--source include/wait_condition.inc + select count(*) from cardtest_tbl; +let $cardinality1 = `SELECT cardinality from information_schema.statistics WHERE TABLE_NAME = 'cardtest_tbl'`; +let $table_rows1 = `SELECT table_rows from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`; +let $avg_row_length1 = `SELECT avg_row_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`; +let $data_length1 = `SELECT data_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`; + --connection node_2 set session wsrep_sync_wait=15; use cardtest02; ---sleep 15 ---vertical_results -show indexes from cardtest_tbl; ---vertical_results -select table_rows, avg_row_length, data_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; + +--let $wait_timeout=600 +--let $wait_condition = SELECT table_rows = 301 from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +--source include/wait_condition.inc + select count(*) from cardtest_tbl; +if (`SELECT cardinality <> $cardinality1 from information_schema.statistics WHERE TABLE_NAME = 'cardtest_tbl'`) +{ +SELECT cardinality from information_schema.statistics WHERE TABLE_NAME = 'cardtest_tbl'; +} +if (`SELECT table_rows <> $table_rows1 from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`) +{ +SELECT table_rows from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +} +if (`SELECT avg_row_length <> $avg_row_length1 from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`) +{ +SELECT avg_row_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +} +if (`SELECT data_length <> $data_length1 from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'`) +{ +SELECT data_length from information_schema.tables WHERE TABLE_NAME = 'cardtest_tbl'; +} + --connection node_1 use test; drop database cardtest02; |