summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t/galera_load_data.test
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2019-07-16 07:54:57 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2019-07-16 07:54:57 +0300
commit5244813114dcb2bb0d8cb66ab2fe90a83dcab7d1 (patch)
tree14e11a10397d24b8c13ff011a702576de32efae7 /mysql-test/suite/galera/t/galera_load_data.test
parent61cc932781cae3864be8f964c3893cfc3f059ff6 (diff)
downloadmariadb-git-5244813114dcb2bb0d8cb66ab2fe90a83dcab7d1.tar.gz
MDEV-19968: Galera test failure on galera_load_data
In this test we are not interested a real cardinality etc numbers. We are interested if they are not same in both galera nodes as they should be.
Diffstat (limited to 'mysql-test/suite/galera/t/galera_load_data.test')
-rw-r--r--mysql-test/suite/galera/t/galera_load_data.test34
1 files changed, 24 insertions, 10 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..f1dfd1af7fc 100644
--- a/mysql-test/suite/galera/t/galera_load_data.test
+++ b/mysql-test/suite/galera/t/galera_load_data.test
@@ -38,23 +38,37 @@ 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';
+--sleep 20
+
+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'`;
+
select count(*) from 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';
select count(*) from cardtest_tbl;
+if (`SELECT cardinality <> $cardinality1 from information_schema.statistics WHERE TABLE_NAME = 'cardtest_tbl'`)
+{
+SELECT cardinality from 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;