Recursive queries do not produce correct results when the result includes objects from a mount that is mounted on a child of the from clause. The following code demonstrates the scenario:
corto_mount m = corto_subscribe("//")
.from("/data/mounted")
.mount(corto_mount_o, NULL, NULL);
corto_select("//").from("/data").iter(&it)
The mount is matched when corto_select evaluates /data. When computing the relative mount query from /data and /data/mounted, the resulting from is set to ., which is correct. However, when a mount then returns an object with, for example, id x, this id is then added to the corto_select location as /data/x and not /data/mounted/x.
When computing the next mount query, the relative parent from /data/x and /data/mounted will still evaluate to ., which results in the exact same query being made to the mount. This process will repeat a few times which eventually yields undefined results.
Recursive queries do not produce correct results when the result includes objects from a mount that is mounted on a child of the
from
clause. The following code demonstrates the scenario:The mount is matched when
corto_select
evaluates/data
. When computing the relative mount query from/data
and/data/mounted
, the resultingfrom
is set to.
, which is correct. However, when a mount then returns an object with, for example, idx
, this id is then added to thecorto_select
location as/data/x
and not/data/mounted/x
.When computing the next mount query, the relative parent from
/data/x
and/data/mounted
will still evaluate to.
, which results in the exact same query being made to the mount. This process will repeat a few times which eventually yields undefined results.