← Back to team overview

maria-discuss team mailing list archive

LOAD FILE and BIT datatype

 

hi guys, how could i send bit data to mysql with LOAD FILE?

a table example:
create table t (i bit not null default 0);

LOAD DATA LOCAL INFILE "file.csv" IGNORE INTO TABLE `t` FIELDS TERMINATED
BY ';' LINES TERMINATED BY '\n' (i)


the data file is simple:

0
1
0
1
0
1

but i got Warning 1024: Out of range value for column 'i' at row 1 ... to
last row

any idea? i tried
b'0'
b'1'
'0'
'1'
0
1
but no one work, i don't know what happen but it's cast always to 1  (maybe
convert from string to binary?)

Follow ups