Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions integration-tests/bats/sql-load-data.bats
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,9 @@ SQL
[ $status -eq 0 ]
[[ $output =~ "0,0,0" ]] || false

# Use \N to represent NULL in MySQL LOAD DATA semantics
cat <<CSV > in.csv
1,NULL,1
1,\N,1
CSV

run dolt sql <<SQL
Expand Down Expand Up @@ -478,7 +479,7 @@ SQL
[[ $output =~ "0,0,0" ]] || false

cat <<CSV > in.csv
1,NULL,1
1,\N,1
CSV

dolt sql <<SQL
Expand All @@ -490,7 +491,7 @@ SQL
run dolt sql -r csv -q "select * from t"
[ $status -eq 0 ]
[[ $output =~ "0,0,0" ]] || false
skip "Column defaults not applied on load data"
# With MySQL semantics, \N maps to NULL, and default is applied to c1 (default 1)
! [[ $output =~ "1,NULL,1" ]] || false
[[ $output =~ "1,1,1" ]] || false
}
Expand Down
Loading