Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.6.1, 6.1.1
-
None
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 \
|