1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

correct eq() method for Item_param (BUG#4233)

mysql-test/r/ps.result:
  eq() for parameters test
mysql-test/t/ps.test:
  eq() for parameters test
sql/item.h:
  correct eq() method for Item_param
This commit is contained in:
unknown
2004-06-26 23:55:38 +02:00
parent f7b6cafb71
commit 1249934266
3 changed files with 34 additions and 0 deletions

View File

@ -191,4 +191,21 @@ execute stmt1 using @arg00;
select m from t1;
m
1
deallocate prepare stmt1;
drop table t1;
create table t1 (id int(10) unsigned NOT NULL default '0',
name varchar(64) NOT NULL default '',
PRIMARY KEY (id), UNIQUE KEY `name` (`name`));
insert into t1 values (1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7');
prepare stmt1 from 'select name from t1 where id=? or id=?';
set @id1=1,@id2=6;
execute stmt1 using @id1, @id2;
name
1
6
select name from t1 where id=1 or id=6;
name
1
6
deallocate prepare stmt1;
drop table t1;