Problem solve Get help with specific problems with your technologies, process and projects.

Correcting load data issues

Expert Mike Hillyer recommends a PHP workaround and bug monitoring to deal with load data issues in MySQL.

I'm using MySQL 5.0.18, and I'm trying to use LOAD DATA INFILE to load data into a table with large BIT columns. I've tried various formats for the BIT column values (0x01, b'01', 1), but the resulting value is never correct. If I export an existing table using SELECT INTO OUTFILE, it creates the text file with an irreproducible binary value for the BIT column. A subsequent import works fine. How do I load data so the value is correct with reproduceable binary values in the BIT columns?

This is being looked into, in the meantime it appears that using a function such as PHP's pack() function to write binary values for the bit data is a workaround. You may wish to keep an eye on the bug tracking system to find out what progress is being made. Try searching for 'load data bit'.

Dig Deeper on Linux servers

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.