Skip to content
  • Thayumanavar's avatar
    e60b902c
    BUG#14653594 - "INSTALL PLUGIN" HANGS SERVER WITH INVALID · e60b902c
    Thayumanavar authored
                    UTF8 CHARACTERS IN PATH
    PROBLEM AND FIX:
    If the shared library name in INSTALL PLUGIN contains an
    invalid UTF8 character, then it causes hang in the release
    build and it raises an assert in the function my_strcspn
    in debug builds.
    
    The reason for this failure is because in macro SCAN_STRING,
    my_mbcharlen returns zero if there is any invalid encoding
    of the character which results in assertion being 
    triggered in debug builds and in release build it gets into 
    an infinite loop causing a hang. The client can supply an 
    invalid utf8 encoded character and cause a hang of session,
    the assert needs to be removed and fixed.
    
    The fix is to return zero to the caller if my_mbcharlen
    returns zero in SCAN_STRING. The function my_strchr has
    also been modified to return NULL if it encounters an        
    invalid UTF8 char while walking through the supplied
    string. Also other uses of my_mbcharlen have been 
    identified and error has been propagated.
    
    NOTE:The 'CHARSET UTF8' needs to be executed prior to using 
    utf8 in the windows OS at mysql client prompt to read utf8
    encoded characters.
    e60b902c
    BUG#14653594 - "INSTALL PLUGIN" HANGS SERVER WITH INVALID
    Thayumanavar authored
                    UTF8 CHARACTERS IN PATH
    PROBLEM AND FIX:
    If the shared library name in INSTALL PLUGIN contains an
    invalid UTF8 character, then it causes hang in the release
    build and it raises an assert in the function my_strcspn
    in debug builds.
    
    The reason for this failure is because in macro SCAN_STRING,
    my_mbcharlen returns zero if there is any invalid encoding
    of the character which results in assertion being 
    triggered in debug builds and in release build it gets into 
    an infinite loop causing a hang. The client can supply an 
    invalid utf8 encoded character and cause a hang of session,
    the assert needs to be removed and fixed.
    
    The fix is to return zero to the caller if my_mbcharlen
    returns zero in SCAN_STRING. The function my_strchr has
    also been modified to return NULL if it encounters an        
    invalid UTF8 char while walking through the supplied
    string. Also other uses of my_mbcharlen have been 
    identified and error has been propagated.
    
    NOTE:The 'CHARSET UTF8' needs to be executed prior to using 
    utf8 in the windows OS at mysql client prompt to read utf8
    encoded characters.
Loading