• unknown's avatar
    Fix for BUG#10491: Server returns data as charset binary · 003f416f
    unknown authored
    SHOW CREATE TABLE or SELECT FROM I_S.
    
    Actually, the bug discovers two problems:
      - the original query is not preserved properly. This is the problem
        of BUG#16291;
      - the resultset of SHOW CREATE TABLE statement is binary.
    
    This patch fixes the second problem for the 5.0.
    
    Both problems will be fixed in 5.1.
    
    
    mysql-test/r/show_check.result:
      Update result file.
    mysql-test/t/show_check.test:
      Provide test case for BUG#10491.
    sql/item.h:
      Use utf8_general_ci instead of binary collation by default,
      because for views and base tables utf8 is the character set
      in which their definition is stored. For system constants
      it's the default character set, and for other objects
      (routines, triggers), no character set is stored, and
      therefore no character set is known, so returning utf8
      is just as good as any non-binary character set.
      This latter problem is fixed in 5.1 by 16291. In 5.1
      we will return the "real" character set.
    003f416f
show_check.test 19 KB