summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2004-06-22 19:38:07 +0200
committerunknown <pem@mysql.comhem.se>2004-06-22 19:38:07 +0200
commit3df8b829b6054da7f0e275b5f5edd33f1456ec33 (patch)
tree0ec3a45a9e2b366990567cba2d2b6b9848869dd1 /sql/item_create.cc
parent84afec5bfa6ae2a675667ed0399592bb1e2bbe86 (diff)
downloadmariadb-git-3df8b829b6054da7f0e275b5f5edd33f1456ec33.tar.gz
Fixed BUG#3486: FOUND_ROWS() fails inside stored procedure [and prepared statement].
mysql-test/r/ps.result: New test case for BUG#3486. mysql-test/t/ps.test: New test case for BUG#3486. sql/item_create.cc: Create an Item_func_found_rows() at parse time, not an Item_int. sql/item_func.cc: Added val_int() method for new Item_func_found_rows class. sql/item_func.h: New class Item_func_found_rows for FOUND_ROWS() function. sql/sql_select.cc: Don't reset thd->limit_found_rows too early, or FOUND_ROWS() wont work.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 4977ba2c5d3..4290a25e348 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -154,7 +154,7 @@ Item *create_func_found_rows(void)
{
THD *thd=current_thd;
thd->lex->safe_to_cache_query= 0;
- return new Item_int(NullS,(longlong) thd->found_rows(),21);
+ return new Item_func_found_rows();
}
Item *create_func_from_days(Item* a)