From 0960c3eb26861238d9102845d370f3eb66d91290 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Aug 2003 18:18:34 +0500 Subject: Fix: create table t1 (a char(10) character set cp1251) SELECT _koi8r'blabla' as a The above query created a field of koi8r charset, not cp1251 Change: CREATE TABLE a (a CHAR(1) CHARACTER SET utf8) Length now means character length, not byte length. The above creates a field that guarantees can store a multibyte value 1 character long. For utf8 the above creates a field that can store 3 bytes. --- mysql-test/r/ctype_recoding.result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/r/ctype_recoding.result') 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 -- cgit v1.2.1