summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_mb.result21
-rw-r--r--mysql-test/r/ctype_recoding.result14
-rw-r--r--mysql-test/r/func_system.result6
-rw-r--r--mysql-test/t/ctype_mb.test8
-rw-r--r--mysql-test/t/ctype_recoding.test7
5 files changed, 53 insertions, 3 deletions
diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result
new file mode 100644
index 00000000000..4b3b464dea1
--- /dev/null
+++ b/mysql-test/r/ctype_mb.result
@@ -0,0 +1,21 @@
+CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` char(4) character set utf8 NOT NULL default '',
+ `c2` char(4) character set utf8 NOT NULL default ''
+) TYPE=MyISAM CHARSET=latin1
+DELETE FROM t1;
+ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c1` char(4) character set utf8 NOT NULL default '',
+ `c2` char(4) character set utf8 NOT NULL default '',
+ `c3` char(4) character set utf8 default NULL
+) TYPE=MyISAM CHARSET=latin1
+INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
+SELECT * FROM t1;
+c1 c2 c3
+aaaabbbbcccc aaaabbbbcccc aaaabbbbcccc
+DROP TABLE t1;
diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result
index b89a90cc6ba..624eab4cf0b 100644
--- a/mysql-test/r/ctype_recoding.result
+++ b/mysql-test/r/ctype_recoding.result
@@ -1,5 +1,19 @@
SET CHARACTER SET koi8r;
DROP TABLE IF EXISTS ;
+SET CHARACTER SET koi8r;
+CREATE TABLE t1 (a CHAR(10) CHARACTER SET cp1251) SELECT _koi8r'' AS a;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(10) character set cp1251 default NULL
+) TYPE=MyISAM CHARSET=latin1
+SELECT a FROM t1;
+a
+
+SELECT HEX(a) FROM t1;
+HEX(a)
+EFF0EEE1E0
+DROP TABLE t1;
CREATE TABLE
(
CHAR(32) CHARACTER SET koi8r NOT NULL
diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result
index cde21ead33c..a52d5613c04 100644
--- a/mysql-test/r/func_system.result
+++ b/mysql-test/r/func_system.result
@@ -41,9 +41,9 @@ create table t1 (version char(40)) select database(), user(), version() as 'vers
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `database()` char(102) character set utf8 NOT NULL default '',
- `user()` char(231) character set utf8 NOT NULL default '',
- `version` char(40) character set utf8 default NULL
+ `database()` char(34) character set utf8 NOT NULL default '',
+ `user()` char(77) character set utf8 NOT NULL default '',
+ `version` char(40) default NULL
) TYPE=MyISAM CHARSET=latin1
drop table t1;
select TRUE,FALSE,NULL;
diff --git a/mysql-test/t/ctype_mb.test b/mysql-test/t/ctype_mb.test
new file mode 100644
index 00000000000..5c3e67eec01
--- /dev/null
+++ b/mysql-test/t/ctype_mb.test
@@ -0,0 +1,8 @@
+CREATE TABLE t1 SELECT _utf8'test' as c1, _utf8'тест' as c2;
+SHOW CREATE TABLE t1;
+DELETE FROM t1;
+ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
+SHOW CREATE TABLE t1;
+INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index 8fa31b1f17b..25df9c0a86b 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -4,6 +4,13 @@ SET CHARACTER SET koi8r;
DROP TABLE IF EXISTS ;
--enable_warnings
+SET CHARACTER SET koi8r;
+CREATE TABLE t1 (a CHAR(10) CHARACTER SET cp1251) SELECT _koi8r'' AS a;
+SHOW CREATE TABLE t1;
+SELECT a FROM t1;
+SELECT HEX(a) FROM t1;
+DROP TABLE t1;
+
CREATE TABLE
(
CHAR(32) CHARACTER SET koi8r NOT NULL