• Georgi Kodinov's avatar
    Bug #51876: crash/memory underrun when loading data with ucs2 · dbb643d6
    Georgi Kodinov authored
    and reverse() function
          
    3 problems fixed : 
    1. The reported problem : caused by incorrect parsing of 
    the file as ucs data resulting in wrong length of the parsed
    string. Fixed by truncating the invalid trailing bytes 
    (non-complete multibyte characters) when reading from the file
    2. LOAD DATA when reading from a proper UCS2 file wasn't 
    recognizing the new line characters. Fixed by first looking 
    if a byte is a new line (or any other special) character before
    reading it as a part of a multibyte character.
    3. When using user variables to hold the column data in LOAD
    DATA the character set of the user variable was set incorrectly
    to the database charset. Fixed by setting it to the charset
    specified by LOAD DATA (if any). 
    dbb643d6
sql_load.cc 42.7 KB