diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-07-13 12:09:59 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-07-13 12:09:59 +0200 |
commit | 326a8dcd875b76faf85626942eb0e6ee76db304e (patch) | |
tree | c0d5a91cd2315dd2ce8d06a16c62778c78ca6f0f /mysql-test/suite/vcol | |
parent | 64583629aded09f74d6d14178475fe6b2c849c00 (diff) | |
parent | c6fdb92ca829fed893d9e7324e80b1450de16087 (diff) | |
download | mariadb-git-326a8dcd875b76faf85626942eb0e6ee76db304e.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysql-test/suite/vcol')
-rw-r--r-- | mysql-test/suite/vcol/r/charsets.result | 31 | ||||
-rw-r--r-- | mysql-test/suite/vcol/t/charsets.test | 24 |
2 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/suite/vcol/r/charsets.result b/mysql-test/suite/vcol/r/charsets.result new file mode 100644 index 00000000000..d06edc544d9 --- /dev/null +++ b/mysql-test/suite/vcol/r/charsets.result @@ -0,0 +1,31 @@ +set names utf8; +create table t1 ( +a int, +b varchar(100) as (if(a,collation('й'),hex('ю'))) +) character set koi8r; +insert t1 (a) values (0),(1); +select * from t1; +a b +0 D18E +1 utf8_general_ci +set names latin1; +select * from t1; +a b +0 D18E +1 utf8_general_ci +flush tables; +select * from t1; +a b +0 D18E +1 latin1_swedish_ci +set names koi8r; +select * from t1; +a b +0 D18E +1 latin1_swedish_ci +flush tables; +select * from t1; +a b +0 D18E +1 koi8r_general_ci +drop table t1; diff --git a/mysql-test/suite/vcol/t/charsets.test b/mysql-test/suite/vcol/t/charsets.test new file mode 100644 index 00000000000..32fb9a7741c --- /dev/null +++ b/mysql-test/suite/vcol/t/charsets.test @@ -0,0 +1,24 @@ +# +# This shows a bug in vcol charset handling. +# vcol definition is stored in the connection charset when a table was created +# vcol is parsed in the connection charset when a table was opened +# +# this cannot be fixed without changing frm format, so we only +# fix it in 10.2. +# +set names utf8; +create table t1 ( + a int, + b varchar(100) as (if(a,collation('й'),hex('ю'))) +) character set koi8r; +insert t1 (a) values (0),(1); +select * from t1; +set names latin1; +select * from t1; +flush tables; +select * from t1; +set names koi8r; +select * from t1; +flush tables; +select * from t1; +drop table t1; |