Skip to content

Commit c32ce98

Browse files
authored
Merge pull request #37 from youngsofun/fix4
fix test for format_escape in copy.
2 parents 788ab27 + 484192a commit c32ce98

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/suites/1_stateful/05_formats/05_02_csv/05_02_01_csv_escape.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
44
. "$CURDIR"/../../../../shell_env.sh
55

6+
7+
# Should be <root>/tests/data/
8+
DATADIR=$(realpath $CURDIR/../../../data/)
9+
610
echo "drop table if exists test_csv" | $MYSQL_CLIENT_CONNECT
711
echo "drop table if exists test_csv2" | $MYSQL_CLIENT_CONNECT
812

@@ -46,11 +50,11 @@ echo "select * from test_csv" | $MYSQL_CLIENT_CONNECT
4650
echo "truncate table test_csv" | $MYSQL_CLIENT_CONNECT
4751

4852
aws --endpoint-url http://127.0.0.1:9900/ s3 cp /tmp/escape_slash2.csv s3://testbucket/admin/data/csv/escape_slash2.csv > /dev/null 2>&1
49-
echo "copy into test_csv from 's3://testbucket/admin/data/csv/escape_slash2.csv' connection=(aws_key_id='minioadmin' aws_secret_key='minioadmin' endpoint_url='http://127.0.0.1:9900/') FILE_FORMAT = (type = 'CSV' escape='\\\')" | $MYSQL_CLIENT_CONNECT
53+
echo "copy into test_csv from 'fs:///tmp/escape_slash2.csv' FILE_FORMAT = (type = 'CSV' escape='\\\\\\\\')" | $MYSQL_CLIENT_CONNECT
5054
echo "select * from test_csv" | $MYSQL_CLIENT_CONNECT
5155

5256
aws --endpoint-url http://127.0.0.1:9900/ s3 cp /tmp/escape_slash3.csv s3://testbucket/admin/data/csv/escape_slash3.csv > /dev/null 2>&1
53-
echo "copy into test_csv2 from 's3://testbucket/admin/data/csv/escape_slash3.csv' connection=(aws_key_id='minioadmin' aws_secret_key='minioadmin' endpoint_url='http://127.0.0.1:9900/') FILE_FORMAT = (type = 'CSV' escape='\\\' skip_header=1)" | $MYSQL_CLIENT_CONNECT
57+
echo "copy into test_csv2 from 'fs:///tmp/escape_slash3.csv' FILE_FORMAT = (type = 'CSV' escape='\\\\\\\\' skip_header=1)" | $MYSQL_CLIENT_CONNECT
5458
echo "select * from test_csv2" | $MYSQL_CLIENT_CONNECT
5559

5660
echo "drop table if exists test_csv" | $MYSQL_CLIENT_CONNECT

0 commit comments

Comments
 (0)