diff options
Diffstat (limited to 'mysql-test/t/ps.test')
-rw-r--r-- | mysql-test/t/ps.test | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 9546a698e58..76da86dc6df 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -422,14 +422,30 @@ deallocate prepare stmt; create table t1 (a int); insert into t1 values (1),(2),(3); create table t2 select * from t1; -PREPARE my_stmt FROM 'create table t2 select * from t1'; +prepare stmt FROM 'create table t2 select * from t1'; drop table t2; -execute my_stmt; +execute stmt; drop table t2; -execute my_stmt; +execute stmt; --error 1050 -execute my_stmt; +execute stmt; drop table t2; -execute my_stmt; +execute stmt; drop table t1,t2; -deallocate prepare my_stmt; +deallocate prepare stmt; + +# +# Bug#6088 "FOUND_ROWS returns wrong values for prepared statements when +# LIMIT is used" +# +create table t1 (a int); +insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); +prepare stmt from "select sql_calc_found_rows * from t1 limit 2"; +execute stmt; +select found_rows(); +execute stmt; +select found_rows(); +execute stmt; +select found_rows(); +deallocate prepare stmt; +drop table t1; |