1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00
Files
mariadb-columnstore-engine/mysql-test/columnstore/basic/t/MCOL-4882-cpimport-skip-headers.test
Alexey Antipovsky 78c1b5034d Feature/mcol 4882 cpimport skip rows (#3594)
* feat(cpimport): MCOL-4882 add a parameter to skip header rows

* chore(cpimport): MCOL-4882 Use boost::program_options to arguments parsing

* feat(cpimport.bin): MCOL-4882 Add missing changes

* add test

* fix clang

* add missing cmdline argument

* fix bug

* Fix double lines skipping

* Fix incorrect --silent (-N) parsing

* fix default --max-errors processing

* fix overwriting default username

* move initialization to members declaration
2025-07-11 23:35:43 +04:00

44 lines
969 B
Plaintext

if (!$MYSQL_TEST_ROOT){
skip Should be run by root to execute cpimport;
}
-- source ../include/have_columnstore.inc
--disable_warnings
DROP DATABASE IF EXISTS mcol4882;
--enable_warnings
CREATE DATABASE mcol4882;
USE mcol4882;
CREATE TABLE t1(col1 INT, col2 VARCHAR(64)) ENGINE=Columnstore;
--exec printf '1,test1\n2,test2\n3,test3\n' > /tmp/mcol4882.csv
--disable_result_log
--exec $MCS_CPIMPORT -s , mcol4882 t1 /tmp/mcol4882.csv
--enable_result_log
SELECT * FROM t1;
TRUNCATE t1;
--disable_result_log
--exec $MCS_CPIMPORT -s , --headers -- mcol4882 t1 /tmp/mcol4882.csv
--enable_result_log
SELECT * FROM t1;
TRUNCATE t1;
--disable_result_log
--exec $MCS_CPIMPORT -s , --headers 2 mcol4882 t1 /tmp/mcol4882.csv
--enable_result_log
SELECT * FROM t1;
TRUNCATE t1;
--disable_result_log
--exec $MCS_CPIMPORT -s , --headers 5 mcol4882 t1 /tmp/mcol4882.csv
--enable_result_log
SELECT * FROM t1;
# Clean UP
--exec rm -f /tmp/mcol4882.csv
DROP DATABASE mcol4882;