summaryrefslogtreecommitdiff
path: root/mysql-test/r/ctype_euckr.result
diff options
context:
space:
mode:
authorunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-10-08 12:46:38 +0500
committerunknown <bar@mysql.com/bar.myoffice.izhnet.ru>2007-10-08 12:46:38 +0500
commit272bb6b5856a7f033e6826ba5a96b1ca52aabb12 (patch)
tree225dbb68221432e7e6565aea32d461f2ea523dc1 /mysql-test/r/ctype_euckr.result
parent5aba177bf6fd532386dcaf15e25ed7e9b1a44702 (diff)
downloadmariadb-git-272bb6b5856a7f033e6826ba5a96b1ca52aabb12.tar.gz
Bug#27580 SPACE() function collation bug?
Problem: when character_set_connection=utf8, mixing SPACE() with a non-Unicode column (e.g. for concat) produced "illegal mix of collations" error. Fix: Item_string() corresponding to space character is now created using "ASCII" repertoire. Previously it was incorrectly created using "UNICODE" repertoure, which didn't allow to convert results of SPACE() to a non-Unicode character set. mysql-test/include/ctype_common.inc: - Adding test for bug#27580 - Restoring previous values of character_set_client and character_set_results, because ctype_common.inc now changes them when doing "set names utf8" in the test for bug#27580 mysql-test/r/ctype_big5.result: Adding test mysql-test/r/ctype_cp1250_ch.result: Adding test mysql-test/r/ctype_euckr.result: Adding test mysql-test/r/ctype_gb2312.result: Adding test mysql-test/r/ctype_gbk.result: Adding test mysql-test/r/ctype_uca.result: Adding test mysql-test/r/ctype_ucs.result: Adding test mysql-test/t/ctype_cp1250_ch.test: Adding test mysql-test/t/ctype_ucs.test: Adding test sql/item_create.cc: Item for SQL function SPACE() is now created with ASCII repertoire, to allow automatic conversion from UTF8 to column's character set e.g. for CONCAT().
Diffstat (limited to 'mysql-test/r/ctype_euckr.result')
-rw-r--r--mysql-test/r/ctype_euckr.result19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 57e3e2ed8f8..3409c278847 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -3,6 +3,8 @@ SET @test_character_set= 'euckr';
SET @test_collation= 'euckr_korean_ci';
SET @safe_character_set_server= @@character_set_server;
SET @safe_collation_server= @@collation_server;
+SET @safe_character_set_client= @@character_set_client;
+SET @safe_character_set_results= @@character_set_results;
SET character_set_server= @test_character_set;
SET collation_server= @test_collation;
CREATE DATABASE d1;
@@ -52,10 +54,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%';
want1result
location
DROP TABLE t1;
+set names utf8;
+create table t1 (
+name varchar(10),
+level smallint unsigned);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `name` varchar(10) default NULL,
+ `level` smallint(5) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=euckr
+insert into t1 values ('string',1);
+select concat(name,space(level)), concat(name, repeat(' ',level)) from t1;
+concat(name,space(level)) concat(name, repeat(' ',level))
+string string
+drop table t1;
DROP DATABASE d1;
USE test;
SET character_set_server= @safe_character_set_server;
SET collation_server= @safe_collation_server;
+SET character_set_client= @safe_character_set_client;
+SET character_set_results= @safe_character_set_results;
SET NAMES euckr;
SET collation_connection='euckr_korean_ci';
create table t1 select repeat('a',4000) a;