summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-02-09 12:35:01 +0100
committerunknown <monty@mysql.com>2004-02-09 12:35:01 +0100
commit1c810278bd5e1d69f8612b047784e46b4ba7cd46 (patch)
tree4a48b244cf30bf5af88b92e2b77f60f9cd3a6a05 /mysql-test
parent35b1f5445056951dda823b6ec4ee6f06ca612714 (diff)
parentfaa8a41b1db57e643617eda8c49803f6e1287f87 (diff)
downloadmariadb-git-1c810278bd5e1d69f8612b047784e46b4ba7cd46.tar.gz
merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_mb.result2
-rw-r--r--mysql-test/r/ctype_utf8.result10
-rw-r--r--mysql-test/t/ctype_utf8.test7
3 files changed, 17 insertions, 2 deletions
diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result
index 288033e7530..edccb047c85 100644
--- a/mysql-test/r/ctype_mb.result
+++ b/mysql-test/r/ctype_mb.result
@@ -22,7 +22,7 @@ Warning 1264 Data truncated for column 'c2' at row 1
Warning 1264 Data truncated for column 'c3' at row 1
SELECT * FROM t1;
c1 c2 c3
-aaaabbbbcccc aaaabbbbcccc aaaabbbbcccc
+aaaa aaaa aaaa
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(4) CHARACTER SET utf8, KEY key_a(a(3)));
SHOW CREATE TABLE t1;
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 7c05b1ea446..31f26c421b6 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -73,9 +73,17 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d");
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` char(4) character set utf8 default NULL
+ `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` char(10) character set utf8 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
date_format("2004-01-19 10:10:10", "%Y-%m-%d")
2004-01-19
drop table t1;
+set names koi8r;
+create table t1 (s1 char(1) character set utf8);
+insert into t1 values (_koi8r'ÁÂ');
+Warnings:
+Warning 1264 Data truncated for column 's1' at row 1
+select s1,hex(s1),char_length(s1),octet_length(s1) from t1;
+s1 hex(s1) char_length(s1) octet_length(s1)
+Á D0B0 1 2
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 5e9324dd68f..c2ea1ed20a4 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -53,3 +53,10 @@ show create table t1;
select * from t1;
drop table t1;
+#
+# Bug #2366 Wrong utf8 behaviour when data is trancated
+#
+set names koi8r;
+create table t1 (s1 char(1) character set utf8);
+insert into t1 values (_koi8r'ÁÂ');
+select s1,hex(s1),char_length(s1),octet_length(s1) from t1;