diff options
author | unknown <serg@serg.mylan> | 2004-06-26 23:55:38 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-26 23:55:38 +0200 |
commit | 1249934266a806ee6a6e6bbee68a7ac1816d26c8 (patch) | |
tree | 8d9a3160afdc652d71f8de3634d8def919a020cc /mysql-test/t/ps.test | |
parent | f7b6cafb7101b12330b15220dbe4a72b719fb956 (diff) | |
download | mariadb-git-1249934266a806ee6a6e6bbee68a7ac1816d26c8.tar.gz |
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
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r-- | mysql-test/t/ps.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 5af65242e7b..a3232fb15e9 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -178,4 +178,19 @@ drop table t1; prepare stmt1 from ' create table t1 (m int) as select ? as m ' ; execute stmt1 using @arg00; select m from t1; +deallocate prepare stmt1; +drop table t1; + +# +# eq() for parameters +# +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; +select name from t1 where id=1 or id=6; +deallocate prepare stmt1; drop table t1; |