Joinutility seperatorLogin utility separator Infobright.com
   
 
different result character set with MIN() and DISTINCT ?
Posted: 02 March 2009 09:48 AM   Ignore ]  
Newbie
Avatar
Rank
Total Posts:  7
Joined  2009-02-25

Hi,

I’m experiencing a strange behaviour with ICE regarding the character of the returned data (see the selects below).
Can someone give me some hints on how to make both results the same and why it works ?

mysql> select min(“KTO_MGL=REGION_TEXT”)  from “EZR1=KTO_MGL=do_A_CUBE” where “KTO_MGL=REGION_TEXT” like ‘Baden%’;                 
+——————————————+
| min(“KTO_MGL=REGION_TEXT”) |
+——————————————+
| Baden-Württemburg       |
+——————————————+
1 row in set (0.00 sec)

mysql> select distinct “KTO_MGL=REGION_TEXT”  from “EZR1=KTO_MGL=do_A_CUBE” where “KTO_MGL=REGION_TEXT” like ‘Baden%’;
+——————————-+
| KTO_MGL=REGION_TEXT |
+——————————-+
| Baden-Württemburg   |
+——————————-+
1 row in set (0.00 sec)

————————————————————————————————
Here are some infos I thought would be useful:
————————————————————————————————

mysql-ib test
[
...]
Your MySQL connection id is 72
Server version
5.1.14-log build number (revision)=IB_3.1_r2625_2673(ice)

mysqldesc "EZR1=KTO_MGL=do_A_CUBE"  "KTO_MGL=REGION_TEXT";
+---------------------+--------------+------+-----+---------+-------+
Field               Type         Null Key | Default | Extra |
+---------------------+--------------+------+-----+---------+-------+
KTO_MGL=REGION_TEXT varchar(140) | YES  |     | NULL    |       | 
+---------------------+--------------+------+-----+---------+-------+
1 row in set (0.00 sec)

mysqlshow variables like '%character%';
+--------------------------+------------------------------------------------------+
Variable_name            Value                                                |
+--------------------------+------------------------------------------------------+
character_set_client     latin1                                               
character_set_connection latin1                                               
character_set_database   utf8                                                 
character_set_filesystem binary                                               
character_set_results    latin1                                               
character_set_server     utf8                                                 
character_set_system     utf8                                                 
character_sets_dir       | /usr/local/infobright-3.1-i686/share/mysql/charsets/ | 
+--------------------------+------------------------------------------------------+
8 rows in set (0.00 sec)

mysqlshow variables like '%collation%';
+----------------------+-------------------+
Variable_name        Value             |
+----------------------+-------------------+
collation_connection latin1_swedish_ci 
collation_database   utf8_general_ci   
collation_server     utf8_general_ci   
+----------------------+-------------------+
3 rows in set (0.00 sec

Thanks.

Profile
 
Posted: 02 March 2009 10:29 AM   Ignore ]   [ # 1 ]  
Super Duper Member
Avatar
RankRankRankRankRank
Total Posts:  917
Joined  2008-08-18

Hi !

The current version of ICE fully supports only ascii character set and for sure multi byte utf-8 encoding is not supported, although it works to a certain degree, as reported by users.

The first case looks as if u-umlaut has been encoded in multibyte utf8 and displayed on a latin1 terminal. The second case seems use proper encoding. I guess encoding conversions can be applied differently for distinct and for min(), resulting in different display. However, I do not know if the difference is on ICE or mysql side. I think it is rather a matter of proper environment config.

Cheers.

Profile