You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
skip bad rows report test on multinode setup
This commit is contained in:
committed by
Leonid Fedorov
parent
1ce46b5e0b
commit
c30b490027
@ -1,51 +0,0 @@
|
||||
DROP DATABASE IF EXISTS mcol5164;
|
||||
CREATE DATABASE mcol5164;
|
||||
USE mcol5164;
|
||||
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
Rejected rows:
|
||||
0,test0,wrong
|
||||
1,test1,wrong
|
||||
2,test2,wrong
|
||||
3,test3,wrong
|
||||
4,test4,wrong
|
||||
5,test5,wrong
|
||||
6,test6,wrong
|
||||
7,test7,wrong
|
||||
8,test8,wrong
|
||||
9,test9,wrong
|
||||
10,test10,wrong
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
11 test11-good
|
||||
Rejected rows:
|
||||
0,test0,wrong
|
||||
1,test1,wrong
|
||||
2,test2,wrong
|
||||
3,test3,wrong
|
||||
4,test4,wrong
|
||||
5,test5,wrong
|
||||
6,test6,wrong
|
||||
7,test7,wrong
|
||||
8,test8,wrong
|
||||
9,test9,wrong
|
||||
10,test10,wrong
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
11 test11-good
|
||||
Rejected rows:
|
||||
0,test0,wrong
|
||||
1,test1,wrong
|
||||
2,test2,wrong
|
||||
3,test3,wrong
|
||||
4,test4,wrong
|
||||
5,test5,wrong
|
||||
6,test6,wrong
|
||||
7,test7,wrong
|
||||
8,test8,wrong
|
||||
9,test9,wrong
|
||||
10,test10,wrong
|
||||
DROP DATABASE mcol5164;
|
15
mysql-test/columnstore/basic/r/MCOL-5164-max-errors.result
Normal file
15
mysql-test/columnstore/basic/r/MCOL-5164-max-errors.result
Normal file
@ -0,0 +1,15 @@
|
||||
DROP DATABASE IF EXISTS mcol5164;
|
||||
CREATE DATABASE mcol5164;
|
||||
USE mcol5164;
|
||||
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
11 test11-good
|
||||
TRUNCATE t1;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
11 test11-good
|
||||
DROP DATABASE mcol5164;
|
20
mysql-test/columnstore/basic/r/MCOL-5164-report-bad.result
Normal file
20
mysql-test/columnstore/basic/r/MCOL-5164-report-bad.result
Normal file
@ -0,0 +1,20 @@
|
||||
DROP DATABASE IF EXISTS mcol5164rep;
|
||||
CREATE DATABASE mcol5164rep;
|
||||
USE mcol5164rep;
|
||||
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
|
||||
SELECT * FROM t1;
|
||||
col1 col2
|
||||
11 test11-good
|
||||
Rejected rows:
|
||||
0,test0,wrong
|
||||
1,test1,wrong
|
||||
2,test2,wrong
|
||||
3,test3,wrong
|
||||
4,test4,wrong
|
||||
5,test5,wrong
|
||||
6,test6,wrong
|
||||
7,test7,wrong
|
||||
8,test8,wrong
|
||||
9,test9,wrong
|
||||
10,test10,wrong
|
||||
DROP DATABASE mcol5164rep;
|
@ -2,7 +2,7 @@ if (!$MYSQL_TEST_ROOT){
|
||||
skip Should be run by root to execute cpimport;
|
||||
}
|
||||
|
||||
-- source ../include/have_columnstore.inc
|
||||
--source ../include/have_columnstore.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcol5164;
|
||||
@ -14,17 +14,13 @@ USE mcol5164;
|
||||
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
|
||||
|
||||
--exec mkdir -p /tmp/mtr-mcol5164
|
||||
--exec awk 'BEGIN { for (i = 0; i < 11; i++) { printf "%d,test%d,wrong\n", i, i; }; printf "%d,test%d-good", i, i; }' > /tmp/mtr-mcol5164/mcol5164.csv
|
||||
--exec awk 'BEGIN { for (i = 0; i < 11; i++) { printf "%d,test%d,wrong\n", i, i; }; printf "%d,test%d-good\n", i, i; }' > /tmp/mtr-mcol5164/mcol5164.csv
|
||||
|
||||
--disable_result_log
|
||||
--error 1 # exceeds default max-errors
|
||||
--exec $MCS_CPIMPORT -s , -L /tmp/mtr-mcol5164 mcol5164 t1 /tmp/mtr-mcol5164/mcol5164.csv
|
||||
--enable_result_log
|
||||
SELECT * FROM t1;
|
||||
--exec echo Rejected rows:
|
||||
--exec cat /tmp/mtr-mcol5164/mcol5164.csv*.bad
|
||||
--exec rm -f /tmp/mtr-mcol5164/*.err
|
||||
--exec rm -f /tmp/mtr-mcol5164/*.bad
|
||||
TRUNCATE t1;
|
||||
|
||||
# implicitly set max-errors
|
||||
@ -32,10 +28,6 @@ TRUNCATE t1;
|
||||
--exec $MCS_CPIMPORT -s , -e 11 -L /tmp/mtr-mcol5164 mcol5164 t1 /tmp/mtr-mcol5164/mcol5164.csv
|
||||
--enable_result_log
|
||||
SELECT * FROM t1;
|
||||
--exec echo Rejected rows:
|
||||
--exec cat /tmp/mtr-mcol5164/mcol5164.csv*.bad
|
||||
--exec rm -f /tmp/mtr-mcol5164/*.err
|
||||
--exec rm -f /tmp/mtr-mcol5164/*.bad
|
||||
TRUNCATE t1;
|
||||
|
||||
# max-errors = all
|
||||
@ -43,9 +35,6 @@ TRUNCATE t1;
|
||||
--exec $MCS_CPIMPORT -s , -e all -L /tmp/mtr-mcol5164 mcol5164 t1 /tmp/mtr-mcol5164/mcol5164.csv
|
||||
--enable_result_log
|
||||
SELECT * FROM t1;
|
||||
--exec echo Rejected rows:
|
||||
--exec cat /tmp/mtr-mcol5164/mcol5164.csv*.bad
|
||||
|
||||
|
||||
# Clean UP
|
||||
--exec rm -rf /tmp/mtr-mcol5164
|
35
mysql-test/columnstore/basic/t/MCOL-5164-report-bad.test
Normal file
35
mysql-test/columnstore/basic/t/MCOL-5164-report-bad.test
Normal file
@ -0,0 +1,35 @@
|
||||
if (!$MYSQL_TEST_ROOT){
|
||||
skip Should be run by root to execute cpimport;
|
||||
}
|
||||
|
||||
--source ../include/have_columnstore.inc
|
||||
--source ../include/check_multinode.inc
|
||||
|
||||
--if ($columnstore_nodes_count != 1) {
|
||||
--skip This test makes sense when run on a single-node setup
|
||||
--}
|
||||
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS mcol5164rep;
|
||||
--enable_warnings
|
||||
|
||||
CREATE DATABASE mcol5164rep;
|
||||
USE mcol5164rep;
|
||||
|
||||
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
|
||||
|
||||
--exec mkdir -p /tmp/mtr-mcol5164rep
|
||||
--exec awk 'BEGIN { for (i = 0; i < 11; i++) { printf "%d,test%d,wrong\n", i, i; }; printf "%d,test%d-good\n", i, i; }' > /tmp/mtr-mcol5164rep/mcol5164rep.csv
|
||||
|
||||
--disable_result_log
|
||||
--exec $MCS_CPIMPORT -e all -s , -L /tmp/mtr-mcol5164rep mcol5164rep t1 /tmp/mtr-mcol5164rep/mcol5164rep.csv
|
||||
--enable_result_log
|
||||
SELECT * FROM t1;
|
||||
--exec echo Rejected rows:
|
||||
--exec cat /tmp/mtr-mcol5164rep/mcol5164rep.csv*.bad
|
||||
--exec rm -f /tmp/mtr-mcol5164rep/mcol5164rep.csv*.err
|
||||
--exec rm -f /tmp/mtr-mcol5164rep/mcol5164rep.csv*.bad
|
||||
|
||||
# Clean UP
|
||||
--exec rm -rf /tmp/mtr-mcol5164rep
|
||||
DROP DATABASE mcol5164rep;
|
4
mysql-test/columnstore/include/check_multinode.inc
Normal file
4
mysql-test/columnstore/include/check_multinode.inc
Normal file
@ -0,0 +1,4 @@
|
||||
--let CHECK_MULTINODE_RESULT=$MYSQL_TMP_DIR/check_multinode_result.inc
|
||||
--exec echo "--let columnstore_nodes_count=`mcsGetConfig PrimitiveServers Count`" > $CHECK_MULTINODE_RESULT
|
||||
--source $CHECK_MULTINODE_RESULT
|
||||
--remove_file $CHECK_MULTINODE_RESULT
|
Reference in New Issue
Block a user