• Tor Didriksen's avatar
    Bug#12340997 - DATE_ADD/DATE_SUB WITH INTERVAL CRASHES IN GET_INTERVAL_VALUE() · ae154449
    Tor Didriksen authored
    get_interval_value() was trying to parse the input string,
    looking for leading '-' while skipping whitespace.
    The macro my_isspace() does not work for utf16 character set,
    since my_charset_utf16_general_ci.ctype == NULL.
    
    Solution: convert input to ASCII before parsing.
    
    
    mysql-test/r/ctype_utf16.result:
      New test case.
    mysql-test/t/ctype_utf16.test:
      New test case.
    sql/item_timefunc.cc:
      Use val_string_ascii() rather than val_string()
      so that we can safely use my_isspace() for skipping whitespace.
    ae154449
item_timefunc.cc 93.3 KB