Skip to content

Commit 2110b04

Browse files
committed
add stateful test for x01 delimiter
1 parent ca1399f commit 2110b04

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
. "$CURDIR"/../../../../shell_env.sh
5+
6+
echo "drop table if exists test_x01_csv" | $MYSQL_CLIENT_CONNECT
7+
8+
echo "CREATE TABLE test_x01_csv
9+
(
10+
a VARCHAR,
11+
b Int,
12+
c VARCHAR
13+
);" | $MYSQL_CLIENT_CONNECT
14+
15+
curl -sH "insert_sql:insert into test_x01_csv format CSV" -H "format_field_delimiter:\x01" -H "format_skip_header:1" -H "format_record_delimiter:\r\n" -F "upload=@${CURDIR}/x01_field_delimiter.csv" \
16+
-u root: -XPUT "http://localhost:${QUERY_HTTP_HANDLER_PORT}/v1/streaming_load" | grep -c "SUCCESS"
17+
echo "select count() from test_x01_csv" | $MYSQL_CLIENT_CONNECT
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
NameAgeOccupation
2+
Donald John Trump80president
3+
马斯克43特斯拉
4+
测试39TT
5+
测试39test

0 commit comments

Comments
 (0)