diff options
author | ramil@mysql.com <> | 2005-03-02 20:04:38 +0400 |
---|---|---|
committer | ramil@mysql.com <> | 2005-03-02 20:04:38 +0400 |
commit | 89d44e039e202e18fd4f272eeefdcb5336397498 (patch) | |
tree | ee9f9400ac39ffe69398ac338c7121998d74613c /mysql-test | |
parent | c6f1a2e453c5ba0e03de9ff9f710b380a07f1d8a (diff) | |
parent | 89a105abc548cd276f9e32b8ae692efcb77290e7 (diff) | |
download | mariadb-git-89d44e039e202e18fd4f272eeefdcb5336397498.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/ps.result | 12 | ||||
-rw-r--r-- | mysql-test/t/ps.test | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 4e1e75f1b33..89c369a51e8 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -482,3 +482,15 @@ execute stmt; pnum deallocate prepare stmt; drop table t1, t2; +prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0"; +execute stmt; +foo +SELECT FOUND_ROWS(); +FOUND_ROWS() +2 +execute stmt; +foo +SELECT FOUND_ROWS(); +FOUND_ROWS() +2 +deallocate prepare stmt; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 92bf4ece4e3..b204e59267e 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -485,3 +485,14 @@ execute stmt; deallocate prepare stmt; drop table t1, t2; + +# +# Bug #6089: FOUND_ROWS returns wrong values when no table/view is used +# + +prepare stmt from "SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0"; +execute stmt; +SELECT FOUND_ROWS(); +execute stmt; +SELECT FOUND_ROWS(); +deallocate prepare stmt; |