Bug #9442 | Set parameter make query fail if column character set is UCS2 | ||
---|---|---|---|
Submitted: | 29 Mar 2005 5:56 | Modified: | 18 Jul 2005 19:59 |
Reporter: | River Lee | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1 | OS: | Any (All) |
Assigned to: | Konstantin Osipov | CPU Architecture: | Any |
[29 Mar 2005 5:56]
River Lee
[29 Mar 2005 5:59]
River Lee
Test case
Attachment: Test.java (application/octet-stream, text), 1.09 KiB.
[30 Mar 2005 16:32]
Mark Matthews
This is a server bug with prepared statements, see the following testcase: I changed the category appropriately. mysql> create table t1 ( etext varchar(20), gtext varchar(20) CHARACTER SET GBK, utext varchar(20) CHARACTER SET UCS2); Query OK, 0 rows affected (0.03 sec) mysql> insert into t1 values ("lily", "lily", "lily"); Query OK, 1 row affected (0.00 sec) mysql> insert into t1 values ("river", "river", "river"); Query OK, 1 row affected (0.00 sec) mysql> prepare foo from 'select utext from t1 where utext like ?'; Query OK, 0 rows affected (0.02 sec) Statement prepared mysql> set @param1='%%'; Query OK, 0 rows affected (0.00 sec) mysql> execute foo using @param1; Empty set (0.02 sec) mysql> select utext from t1 where utext like '%%'; +-------+ | utext | +-------+ | lily | | river | +-------+ 2 rows in set (0.00 sec)
[24 Apr 2005 22:17]
Jorge del Conde
Verified w/4.1.12 from bk
[6 May 2005 11:31]
Alexander Barkov
A simplified version reproducing the problem looks like: # # Bug#9442 Set parameter make query fail if column character set is UCS2 # create table t1 (utext varchar(20) character set ucs2); insert into t1 values ("lily"); insert into t1 values ("river"); prepare foo from 'select utext from t1 where utext like ?'; set @param1='%%'; execute foo using @param1; drop table t1;
[13 Jul 2005 20:19]
Konstantin Osipov
Added a test case to the test suite, the bug can not be repeated after the fix for Bug#9379. (http://lists.mysql.com/internals/27029)
[14 Jul 2005 7:51]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/27051
[15 Jul 2005 15:50]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/27179
[18 Jul 2005 19:59]
Paul DuBois
Noted in 4.1.14, 5.0.10 changelogs.