[MCOL-4678] MTR tests fail because of /tmp and ./ with LOAD DATA Created: 2021-04-16  Updated: 2021-06-02  Resolved: 2021-05-03

Status: Closed
Project: MariaDB ColumnStore
Component/s: mtr
Affects Version/s: 5.6.1, 6.1.1
Fix Version/s: 5.6.1, 6.1.1

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MCOL-4659 Server MTR failures on ColumnStore tests Open
Relates
relates to MCOL-4736 Fix cross-engine mtr tests to run wit... Closed

 Description   

Problems with using the /tmp directory

When mtr is run without --extern, some MTR tests fail because of statements like:

LOAD DATA INFILE '/tmp/mcs102.csv' ...

This happens because by default --secure-file-priv does not allow to load files outside of the MariaDB data directory. So these tests fail with:

CURRENT_TEST: columnstore/basic.mcs102_ldi_transform_csv
 
mysqltest: At line 32: query 'LOAD DATA INFILE '/tmp/mcs102.csv' INTO TABLE discounts FIELDS TERMINATED BY ','' failed with wrong errno 1290: 'The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement', instead of 1292...

These tests should be fixed to store temporary files in the MariaDB data directory rather that in /tmp.

Problems with using the current directory ./

When mtr is run inside a build directory (rather than inside an installed directory), some tests fail because of statements like

LOAD DATA LOCAL infile './suite/columnstore/std_data/100Krows.dat'...

CURRENT_TEST: mcs203_calenablepartitions_function
 
mysqltest: At line 15: query 'LOAD DATA LOCAL infile './suite/columnstore/std_data/100Krows.dat' INTO TABLE t1 FIELDS TERMINATED BY '|'' failed: 2: File './suite/columnstore/std_data/100Krows.dat' not found (Errcode: 2)

These tests should be fixed to use the $MTR_SUITE_DIR variable instead of "./", because the location of the loaded files are very different with in-build and in-installed runs.

The entire list of the affected tests in /basic:

./mtr --force --max-test-fail=0  \
columnstore/basic.mcs51_cpimport_select_from \
columnstore/basic.mcs102_ldi_transform_csv \
columnstore/basic.mcs103_ldi_fields_enclosed_by \
columnstore/basic.mcs104_ldi_fields_escaped_by \
columnstore/basic.mcs105_ldi_lines_terminated_by \
columnstore/basic.mcs106_ldi_ignore_rows \
columnstore/basic.mcs201_calshowpartitions_function \
columnstore/basic.mcs202_caldisablepartitions_function \
columnstore/basic.mcs203_calenablepartitions_function \
columnstore/basic.mcs204_caldroppartitions_function \
columnstore/basic.mcs207_utility_functions \
columnstore/basic.mcs208_idbPartition_function \
columnstore/basic.mcs209_idbDBRoot_function \
columnstore/basic.mcs210_idbPm_function \
columnstore/basic.mcs211_idbExtentId_function \
columnstore/basic.mcs212_idbExtentMax_function \
columnstore/basic.mcs213_idbExtentMin_function \
columnstore/basic.mcs214_idbExtentRelativeRid_function \
columnstore/basic.mcs215_idbSegment_function \
columnstore/basic.mcs216_idbSegmentDir_function \



 Comments   
Comment by Alexander Barkov [ 2021-04-23 ]

A few other tests that fail for the same reasons:

./mtr --force --max-test-fail=0  \
columnstore/basic.mcs88_import_export_csv \
columnstore/basic.mcs47_cpimport_central_loc_sin_source \
columnstore/basic.mcs49_cpimport_parallel_dist \
columnstore/basic.mcs50_cpimport_stdin \
columnstore/basic.mcs55_cpimport_binary_source \
columnstore/basic.mcs56_cpimport_negative \
columnstore/basic.mcs68_cpimport_datafile_separators \

Generated at Thu Feb 08 02:52:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.