Ext func arg item seq can not be consumed 2 times
Bug #867262 reported by
Gabriel Petrovay
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
High
|
Markos Zaharioudakis |
Bug Description
If one tried to consume an external function argument item sequence 2 times, the 2nd time no more item is returned: next returns false and the item is NULL.
To reproduce, take any external module and in the "evaluate" implementation of a function do the following (make sure that the function receives a non non-empty sequence as the first parameter):
Item item;
Iterator_t iter = args[0]
iter->open();
iter->next(item);
iter->close();
// item is valid here
iter = args[0]
iter->open();
iter->next(item);
iter->close();
// item is NULL here
Changed in zorba: | |
status: | New → Fix Released |
Changed in zorba: | |
status: | Fix Released → Fix Committed |
milestone: | none → 2.1 |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The problem might have to do with src\runtime\ core\fncall_ iterator. cpp:
10015 nbrinza is_open = true; ->theChild- >reset( theItemSequence ->thePlanState) ;
9845 danielturcanu //if(open_count)
9845 danielturcanu // theItemSequence
9845 danielturcanu open_count++;
9845 danielturcanu }
...
11584 markosza // theItemSequence ->theChild- >close( theItemSequence ->thePlanState) ;