Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv9482
Modified Files:
ll_prec_foll.mx
Log Message:
(hopefully) fixing BUG #1719164 "PF: new loop-lifted following step still
buggy?":
When extending the result bug, make sure that we also update the cursors
accordingly.
Index: ll_prec_foll.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/ll_prec_foll.mx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ll_prec_foll.mx 14 May 2007 09:55:29 -0000 1.1
+++ ll_prec_foll.mx 15 May 2007 11:40:15 -0000 1.2
@@ -55,7 +55,7 @@
* as x itself.
*/
-#define PFll_check_BAT_capacity(b,grow) \
+#define PFll_check_BAT_capacity(b,grow,res_cur) \
{\
size_t _oldcap = BATbuncount(b);\
size_t _reqcap = BATcount(b) + grow;\
@@ -81,6 +81,7 @@
BBPreclaim(b);\
return GDK_FAIL;\
}\
+ res_cur = (oid*) BUNhead(res, BUNlast(res));\
}\
}
@@ -216,7 +217,7 @@
}
assert(BUNsize(res) == 2 * sizeof(oid));
assert((res->hloc == 0) && (res->tloc == sizeof(oid)));
- res_cur = (oid*) BUNhead(res, BUNfirst(res));
+ res_cur = (oid*) BUNhead(res, BUNlast(res));
@c
@:init(following)@
@@ -232,7 +233,7 @@
if (cur_following < boundary) {
/* check, if result buffer is big enough; otherwise extend it
*/
grow = num_iter * (boundary - cur_following);
- PFll_check_BAT_capacity(res, grow);
+ PFll_check_BAT_capacity(res, grow, res_cur);
if (num_iter == 1) {
ALGODEBUG THRprintf(GDKout, "%s: 1 ctx, 1 iter\n", name);
while(cur_following < boundary) {
@@ -316,7 +317,7 @@
/* now, everything until the end of the fragment is a
following node */
/* check, if result buffer is big enough; otherwise extend it
*/
grow = boundary - cur_following;
- PFll_check_BAT_capacity(res, grow);
+ PFll_check_BAT_capacity(res, grow, res_cur);
while(cur_following < boundary) {
int sz = size[cur_following];
if (sz >= 0) {
@@ -382,7 +383,7 @@
/* now, everything until the end of the fragment is a
following node */
/* check, if result buffer is big enough; otherwise extend it
*/
grow = ((lst_iter - fst_iter) + 1) * (boundary -
cur_following);
- PFll_check_BAT_capacity(res, grow);
+ PFll_check_BAT_capacity(res, grow, res_cur);
while(cur_following < boundary) {
int sz = size[cur_following];
if (sz >= 0) {
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins