diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 1d3deb0b09a..0e36b00a670 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -480,3 +480,10 @@ a 0061 b 0062 c 0063 drop table t1; +set @ivar= 1234; +set @str1 = 'select ?'; +set @str2 = convert(@str1 using ucs2); +prepare stmt1 from @str2; +execute stmt1 using @ivar; +? +1234 diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 6cad58282a2..6d9cfabb5a7 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -106,12 +106,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp set @fvar= 123.4567; prepare stmt1 from @fvar; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '123.4567' at line 1 -set @str1 = 'select ?'; -set @str2 = convert(@str1 using ucs2); -prepare stmt1 from @str2; -execute stmt1 using @ivar; -? -1234 drop table t1,t2; PREPARE stmt1 FROM "select _utf8 'A' collate utf8_bin = ?"; set @var='A'; diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index d9ef91496e9..4c6d1bbebef 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -315,3 +315,11 @@ alter table t1 modify a char(5); select a, hex(a) from t1; drop table t1; +# +# Check prepare statement from an UCS2 string +# +set @ivar= 1234; +set @str1 = 'select ?'; +set @str2 = convert(@str1 using ucs2); +prepare stmt1 from @str2; +execute stmt1 using @ivar; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 978ce2bc2c3..2b3e961fc28 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -110,10 +110,6 @@ set @fvar= 123.4567; --error 1064 prepare stmt1 from @fvar; -set @str1 = 'select ?'; -set @str2 = convert(@str1 using ucs2); -prepare stmt1 from @str2; -execute stmt1 using @ivar; drop table t1,t2; #