MySQL

The world's most popular open source database

Contact a MySQL Representative


  • MySQL.com
  • Developer Zone
  • Partners & Solutions
  • Customer Login
  • DevZone
  • Downloads
  • Documentation
  • Articles
  • Forums
  • Bugs
  • Forge
  • Blogs
 
  • Pages

    • About
    • Find and store the error return value in procedures or functions
  • Archives

    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
  • Categories

    • MySQL 5.1 Features (3)
    • MySQL 5.4 New Features (2)
    • MySQL 6.0 New Features (5)
    • MySQL 6.x New Features (5)
    • News (8)
    • Personal Opinion (4)
    • Tiny Tweaks (10)
    • Uncategorized (19)



New Features In MySQL 6.x

« Tiny Tweak: DTrace unless –disable-dtrace
News: Materialized Views »

Tiny Tweak: Tilde in Chinese

For those who haven’t memorized the names of every symbol: the tilde is the wavy line that appears occasionally over specific characters, particularly over N in Spanish. But it can appear alone. If you’re North American and you look at the top left corner of your keyboard, you’ll probably see it:

~

Anyway, we ran into this bug during a comprehensive re-test of all the Chinese character sets:

mysql> create table tbig5 (s1 char(5) character set big5);

Query OK, 0 rows affected (0.11 sec)mysql> insert into tbig5 values ('Y'),('~');

Query OK, 2 rows affected (0.08 sec)

Records: 2  Duplicates: 0  Warnings: 0

mysql> select * from tbig5 where s1 = 'Y';

+------+

| s1   |

+------+

| Y    |

| ~    |

+------+

2 rows in set (0.04 sec)

This is Bug#25420 “Tilde = ‘Y’ in Chinese”. It has been around for years, ever since the contribution of the BIG5 Chinese character set. No Chinese user has every complained — frankly I doubt that the Chinese have found much use for ~s yet. Alexander Barkov had no difficulty fixing it. It’s a trivial bug and a trivial fix. Um. Except that we must think about consequences even for trivia.

Indexes in MySQL are usually in order. (Don’t say “duh”, please, they don’t have to be thus, and in fact Falcon indexes can be a tiny bit disordered with no danger.) So it’s just possible that somewhere a Chinese database contains the index keys in order:
~ Y Z
and that somebody, after the fix for Bug#25420 is in, will add a new tilde, making the index look like
~ Y Z ~
which is no longer in order.

Call us finicky, but we can’t just put the bug fix into a production release, or even a release candidate like MySQL 5.1. The plan is to turn the fix on for MySQL 6.0, and encourage checks when users upgrade, perhaps with a warning during the mysql_upgrade script.

This entry was posted on Monday, May 19th, 2008 at 1:03 am and is filed under Tiny Tweaks. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

New Features In MySQL 6.x is proudly powered by WordPress MU running on Blogs.mysql.com.
Entries (RSS) and Comments (RSS).