diff options
author | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-10-08 12:46:38 +0500 |
---|---|---|
committer | bar@mysql.com/bar.myoffice.izhnet.ru <> | 2007-10-08 12:46:38 +0500 |
commit | 2224e030a9cedab39222abe50c50c9851dc74816 (patch) | |
tree | 225dbb68221432e7e6565aea32d461f2ea523dc1 /sql/item_create.cc | |
parent | 4c01449b8464468a4be6ad03767e01e35991b038 (diff) | |
download | mariadb-git-2224e030a9cedab39222abe50c50c9851dc74816.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.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 561613032bc..60a17c21521 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -361,13 +361,13 @@ Item *create_func_space(Item *a) if (cs->mbminlen > 1) { uint dummy_errors; - sp= new Item_string("",0,cs); + sp= new Item_string("", 0, cs, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); if (sp) sp->str_value.copy(" ", 1, &my_charset_latin1, cs, &dummy_errors); } else { - sp= new Item_string(" ",1,cs); + sp= new Item_string(" ", 1, cs, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); } return sp ? new Item_func_repeat(sp, a) : 0; } |