mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
A fix and a test case for Bug#9379 (collation of a parameter marker is
binary).
This commit is contained in:
@@ -622,3 +622,22 @@ execute stmt using @user_id, @id;
|
||||
partner_id
|
||||
deallocate prepare stmt;
|
||||
drop table t1, t2, t3, t4;
|
||||
prepare stmt from 'select ?=?';
|
||||
set @a='CHRISTINE ';
|
||||
set @b='CHRISTINE';
|
||||
execute stmt using @a, @b;
|
||||
?=?
|
||||
1
|
||||
execute stmt using @a, @b;
|
||||
?=?
|
||||
1
|
||||
set @a=1, @b=2;
|
||||
execute stmt using @a, @b;
|
||||
?=?
|
||||
0
|
||||
set @a='CHRISTINE ';
|
||||
set @b='CHRISTINE';
|
||||
execute stmt using @a, @b;
|
||||
?=?
|
||||
1
|
||||
deallocate prepare stmt;
|
||||
|
||||
@@ -650,3 +650,19 @@ execute stmt using @user_id, @id;
|
||||
execute stmt using @user_id, @id;
|
||||
deallocate prepare stmt;
|
||||
drop table t1, t2, t3, t4;
|
||||
|
||||
#
|
||||
# Bug#9379: make sure that Item::collation is reset when one sets
|
||||
# a parameter marker from a string variable.
|
||||
#
|
||||
prepare stmt from 'select ?=?';
|
||||
set @a='CHRISTINE ';
|
||||
set @b='CHRISTINE';
|
||||
execute stmt using @a, @b;
|
||||
execute stmt using @a, @b;
|
||||
set @a=1, @b=2;
|
||||
execute stmt using @a, @b;
|
||||
set @a='CHRISTINE ';
|
||||
set @b='CHRISTINE';
|
||||
execute stmt using @a, @b;
|
||||
deallocate prepare stmt;
|
||||
|
||||
Reference in New Issue
Block a user