From dee8f22c079addf7ed2a27ea6ed73a81f52c5cb7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 May 2004 03:32:51 +0400 Subject: [PATCH] Added a test for a problem that was fixed by automerge and fixed a typo. --- mysql-test/r/ps.result | 13 +++++++++++-- mysql-test/t/ps.test | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index d16f24b34c6..fc82645840c 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; create table t1 ( a int primary key, -b char(10), +b char(10) ); insert into t1 values (1,'one'); insert into t1 values (2,'two'); @@ -89,4 +89,13 @@ prepare stmt6 from 'insert into t1 values (5,"five"); select2'; 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 '; select2' at line 1 explain prepare stmt6 from 'insert into t1 values (5,"five"); select2'; 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 'from 'insert into t1 values (5,"five"); select2'' at line 1 -drop table t1; +create table t2 +( +a int +); +insert into t2 values (0); +set @arg00=NULL ; +prepare stmt1 from 'select 1 FROM t2 where a=?' ; +execute stmt1 using @arg00 ; +1 +drop table t1,t2; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index dc9f054da0d..989dc6026fe 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -8,7 +8,7 @@ drop table if exists t1,t2; create table t1 ( a int primary key, - b char(10), + b char(10) ); insert into t1 values (1,'one'); insert into t1 values (2,'two'); @@ -86,5 +86,17 @@ prepare stmt6 from 'insert into t1 values (5,"five"); select2'; --error 1064 explain prepare stmt6 from 'insert into t1 values (5,"five"); select2'; -drop table t1; +create table t2 +( + a int +); + +insert into t2 values (0); + +# parameter is NULL +set @arg00=NULL ; +prepare stmt1 from 'select 1 FROM t2 where a=?' ; +execute stmt1 using @arg00 ; + +drop table t1,t2;