• unknown's avatar
    As it is wrong and confusing to associate any · 94957119
    unknown authored
    character set with NULL, @A should be latin2
    after this query sequence:
    
       SET @A=_latin2'string';
       SET @A=NULL;
    
    I.e. the second query should not change the charset
    to the current default value, but should keep the
    original value assigned during the first query.
    In order to do it, we don't copy charset
    from the argument if the argument is NULL
    and the variable has previously been initialized.
    
    
    mysql-test/r/ps_6bdb.result:
      t
    mysql-test/r/ps_5merge.result:
      t
    mysql-test/r/ps_3innodb.result:
      t
    mysql-test/r/ps_7ndb.result:
      t
    mysql-test/r/ps_4heap.result:
      t
    mysql-test/r/ps_2myisam.result:
      t
    sql/item_func.cc:
      t
    94957119
ps_5merge.result 201 KB