• unknown's avatar
    Bug#21505 Create view - illegal mix of collation for operation 'UNION' · 7614eb0d
    unknown authored
      
      The problem was that any VIEW columns had always implicit derivation.
      Fix: derivation is now copied from the original expression
      given in VIEW definition.
      For example:
      - a VIEW column which comes from a string constant
        in CREATE VIEW definition have now coercible derivation.
      - a VIEW column having COLLATE clause
        in CREATE VIEW definition have now explicit derivation.
    
    
    mysql-test/r/ctype_utf8.result:
      Adding test case
    mysql-test/t/ctype_utf8.test:
      Adding test case
    sql/field.cc:
      Copying derivation from item to field.
    sql/field.h:
      Adding derivation and methods to get/set it into Field.
    sql/item.cc:
      Copying derivation from field to item.
    sql/item.h:
      Moving "enum Derivation" declaration from item.h to mysql_priv.h
    sql/mysql_priv.h:
      Moving "enum Derivation" declaration from item.h to mysql_priv.h
    sql/sql_select.cc:
      Copying derivation from item to field in
      create_tmp_field_from_item() and create_tmp_field().
    7614eb0d
mysql_priv.h 64.7 KB