From ac14f5344b22c056f3f338f4895edfcbaf8c4bee Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 May 2005 16:53:10 +0400 Subject: Post-merge fixes for Bug#9096 "select doesn't return all matched records if prepared statements is used" (see comments to the changed files). mysql-test/r/ps.result: Post-merge fix for Bug#9096: test results fixed. mysql-test/r/type_datetime.result: Post-merge fix for Bug#9096: now we do better constants comparison, so the optimizer is able to guess from the index that we don't need to evaluate WHERE clause. sql/item.cc: Post-merge fixes for Bug#9096: implement by-value comparison for new 5.0 DECIMAL type. Item_real is renamed to Item_float in 5.0 Item_varbinary is renamed to Item_hex_string in 5.0 sql/item.h: Post-merge fixes for Bug#9096: declaration for Item_decimal::eq --- mysql-test/r/ps.result | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'mysql-test/r/ps.result') diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index bbd95da2f82..c0f4412b3d8 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -570,3 +570,28 @@ id deallocate prepare stmt| drop procedure p1| drop table t1| +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (c1 int(11) not null, c2 int(11) not null, +primary key (c1,c2), key c2 (c2), key c1 (c1)); +insert into t1 values (200887, 860); +insert into t1 values (200887, 200887); +select * from t1 where (c1=200887 and c2=200887) or c2=860; +c1 c2 +200887 860 +200887 200887 +prepare stmt from +"select * from t1 where (c1=200887 and c2=200887) or c2=860"; +execute stmt; +c1 c2 +200887 860 +200887 200887 +prepare stmt from +"select * from t1 where (c1=200887 and c2=?) or c2=?"; +set @a=200887, @b=860; +execute stmt using @a, @b; +c1 c2 +200887 860 +200887 200887 +deallocate prepare stmt; -- cgit v1.2.1