Commit ef1e748e authored by konstantin@mysql.com's avatar konstantin@mysql.com

A test case for Bug#9442 "Set parameter make query fail if column

character set is UCS2".
The bug is no longer repeatable.
parent 1755df76
...@@ -641,3 +641,22 @@ execute stmt using @a, @b; ...@@ -641,3 +641,22 @@ execute stmt using @a, @b;
?=? ?=?
1 1
deallocate prepare stmt; deallocate prepare stmt;
create table t1 (utext varchar(20) character set ucs2);
insert into t1 values ("lily");
insert into t1 values ("river");
prepare stmt from 'select utext from t1 where utext like ?';
set @param1='%%';
execute stmt using @param1;
utext
lily
river
execute stmt using @param1;
utext
lily
river
select utext from t1 where utext like '%%';
utext
lily
river
drop table t1;
deallocate prepare stmt;
...@@ -666,3 +666,16 @@ set @a='CHRISTINE '; ...@@ -666,3 +666,16 @@ set @a='CHRISTINE ';
set @b='CHRISTINE'; set @b='CHRISTINE';
execute stmt using @a, @b; execute stmt using @a, @b;
deallocate prepare stmt; deallocate prepare stmt;
#
# 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 stmt from 'select utext from t1 where utext like ?';
set @param1='%%';
execute stmt using @param1;
execute stmt using @param1;
select utext from t1 where utext like '%%';
drop table t1;
deallocate prepare stmt;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment