• Alexander Barkov's avatar
    Bug#48766 SHOW CREATE FUNCTION returns extra data in return clause · f81700aa
    Alexander Barkov authored
    Problem: SHOW CREATE FUNCTION and SELECT DTD_IDENTIFIER FROM I_S.ROUTINES
    returned wrong values in case of ENUM return data type and UCS2
    character set.
    
    Fix: the string to collect returned data type was incorrectly set to
    "binary" character set, therefore UCS2 values where returned with
    extra '\0' characters.
    Setting string character set to creation_ctx->get_client_cs()
    in sp_find_routine(), and to system_charset_info in sp_create_routine
    fixes the problem.
    
    Adding tests:
    - the original test with Latin letters
    - an extra test with non-Latin letters
    f81700aa
sp-ucs2.result 1.38 KB