Bug #2547 | Strange "like" behaviour in tables with default charset=cp1250 | ||
---|---|---|---|
Submitted: | 28 Jan 2004 14:20 | Modified: | 3 Feb 2004 6:16 |
Reporter: | Andrzej Pruski | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1 | OS: | Linux (Linux PLD 1.0,Mandrake 9.2) |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[28 Jan 2004 14:20]
Andrzej Pruski
[29 Jan 2004 3:34]
Alexander Keremidarski
The problem is somehow bound to character_set_connection = cp1250 and stirng "%PESA%" If character_set_connection is set to utf8 query select * from temp_k where nazwa like _"%PESA%"; returns expected result. mysql> SET NAMES utf8; Query OK, 0 rows affected (0.00 sec) mysql> select * from temp_k where nazwa like _cp1250"%PESA%"; +--------------------------------------------+ | nazwa | +--------------------------------------------+ | Pojazdy Szynowe PESA Bydgoszcz SA Holding | | Pojazdy Szynowe PESA Bydgoszcz S A Holding | +--------------------------------------------+ mysql> SET NAMES latin1; Query OK, 0 rows affected (0.00 sec) mysql> select * from temp_k where nazwa like _cp1250"%PESA%"; Empty set (0.00 sec) mysql> SET NAMES cp1250; Query OK, 0 rows affected (0.00 sec) mysql> select * from temp_k where nazwa like _cp1250"%PESA%"; Empty set (0.00 sec)
[3 Feb 2004 6:16]
Alexander Barkov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html