Skip to content

Commit b641c37

Browse files
committed
Merge pull request #2 from swbuehler/patch-1
Update empty-field handling in mysqldump_to_csv.py
2 parents 8577c62 + 3fcdad5 commit b641c37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysqldump_to_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def parse_values(values, outfile):
5050
for reader_row in reader:
5151
for column in reader_row:
5252
# If our current string is empty...
53-
if len(column) == 0:
54-
latest_row.append('""')
53+
if len(column) == 0 or column == 'NULL':
54+
latest_row.append(chr(0))
5555
continue
5656
# If our string starts with an open paren
5757
if column[0] == "(":

0 commit comments

Comments
 (0)