• unknown's avatar
    1. Item now uses my_charset_bin by default, · cd89ed9a
    unknown authored
    not default_charset_into. It fixes the
    problem that in some cases numbers where
    treated as CHAR(N), not as BINARY(N), e.g.
    wrong 'charsetnr' when sent to the client side.
    2. IFNULL didn't aggregate argument charsets
    and collations, so IFNULL(1,'a') produced
    a CHAR(N). Now produces a BINARY(N).
    3. SELECT PROCEDURE ANALIZE now returns
    BINARY columns, which is much better than it worked
    previously: CHAR with the default character set.
    But in the future it's worth to fix the fields
    'Field_name' and 'Optimal_fieldtype' to use UTF8,
    and 'Min_value' and 'Max_value' to inherit their charsets
    from the original items. But it is not important,
    and BINARY(N) is OK for now.
    4. Tests were fixed accordingly. No new tests were
    made, as the old onces cover everything.
    
    
    mysql-test/r/analyse.result:
      SELECT PROCEDURE ANALIZE now returns
      BINARY columns, which is much better than it worked
      previously: CHAR with the default character set.
      But in the future it's worth to fix the fields
      'Field_name' and 'Optimal_fieldtype' to use UTF8,
      and 'Min_value' and 'Max_value' to inherit their charsets
      from the original items. But it is not important,
      and BINARY(N) is OK for now.
    mysql-test/r/case.result:
      Test fix according to the changes
    mysql-test/r/metadata.result:
      Test fix according to the changes
    mysql-test/r/ps_1general.result:
      Test fix according to the changes
    mysql-test/r/ps_2myisam.result:
      Test fix according to the changes
    mysql-test/r/ps_3innodb.result:
      Test fix according to the changes
    mysql-test/r/ps_4heap.result:
      Test fix according to the changes
    mysql-test/r/ps_5merge.result:
      Test fix according to the changes
    mysql-test/r/ps_6bdb.result:
      Test fix according to the changes
    mysql-test/r/ps_7ndb.result:
      Test fix according to the changes
    mysql-test/r/union.result:
      Test fix according to the changes
    sql/item.cc:
      Item is now BINARY by default
    sql/item_cmpfunc.cc:
      IFNULL now collects arguments collations/charsets
      like other functions do.
    cd89ed9a
ps_3innodb.result 103 KB