Ask the Expert

Correcting load data issues

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?

Requires Free Membership to View

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'.

This was first published in April 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: