1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
unknown
2004-02-09 12:35:01 +01:00
20 changed files with 104 additions and 28 deletions

View File

@ -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;

View File

@ -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'<27><>');
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)
<EFBFBD> D0B0 1 2

View File

@ -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'<27><>');
select s1,hex(s1),char_length(s1),octet_length(s1) from t1;