1. 10 Feb, 2011 1 commit
  2. 11 Jan, 2011 1 commit
  3. 10 Feb, 2011 2 commits
    • Georgi Kodinov's avatar
      Bug #59884: setting charset to 2048 crashes · b2b69699
      Georgi Kodinov authored
      The retrieval of a charset by number was not
      doing bounds checking before accessing the internal 
      character sets array.
      Added checks for valid charset number.
      Added asserts for valid charset number to some of 
      the internal functions.
      Removed one superfluous check for charset_number 0
      (since the all_charsets_array[0] is set to 0 anyway) for 
      uniformity.
      Test suite added.
      b2b69699
    • Alexander Barkov's avatar
      Bug#31384 DATE_ADD() and DATE_SUB() return binary data · 7d88b552
      Alexander Barkov authored
      Problem: DATE_ADD() is a hybrid function and can return
      DATE, DATETIME or VARCHAR data type depending on arguments.
      
      In case of VARCHAR data type, DATE_ADD() reported "binary" character set,
      which was wrong.
      
      Fix: make DATE_ADD() return @character_set_connection in VARCHAR context.
       @ mysql-test/include/ctype_numconv.inc
         Adding tests
       @ mysql-test/r/ctype_binary.result
         Adding tests
       @ mysql-test/r/ctype_cp1251.result
         Adding tests
       @ mysql-test/r/ctype_latin1.result
         Adding tests
       @ mysql-test/r/ctype_ucs.result
         Adding tests
       @ mysql-test/r/ctype_utf8.result
         Adding tests
       @ sql/item_strfunc.cc
        - Moving code from Item_str_ascii_func::val_str() to
        Item_str_func::val_str_from_val_str_ascii(), as
        this code needs to be shared by Item_date_add_interval.
        - Adding str2 parameter to be used as a buffer, instead of
         using private ascii_buf member.
       @ sql/item_strfunc.h
        - Moving code from Item_str_ascii_func::val_str() to
        Item_str_func::val_str_from_val_str_ascii()
        - Removing "String *val_str_convert_from_ascii(String *str, String *ascii_buf)"
          prototype as it was neither used nor declared.
       @ sql/item_timefunc.h
        - Overwriting parent's charset_for_protocol() method,
          becase we need to behave differenlty in VARCHAR and DATE/DATETYPE context.
        - Adding ascii_buf for conversion.
        - Adding val_str_ascii() prototype.
        - Adding val_str() which uses newly added
          Item_str_func::val_str_from_val_str_ascii(),
          passing ascii_buf as a conversion buffer.
      7d88b552
  4. 09 Feb, 2011 15 commits
  5. 08 Feb, 2011 21 commits