Skip to content

UDx side process exited abnormally if calling dblink multiple times in one query #28

@h-serizawa

Description

@h-serizawa
=> SELECT l.id, l.description, tab_a.value value_a, tab_b.value value_b
-> FROM tab_local l
-> LEFT JOIN (SELECT DBLINK(USING PARAMETERS cid='orcl', query='SELECT * FROM tab1') OVER()) tab_a
->   ON tab_a.id = l.id
-> LEFT JOIN (SELECT DBLINK(USING PARAMETERS cid='orcl', query='SELECT * FROM tab1') OVER()) tab_b
->   ON tab_b.id = l.id;

ERROR 8092:  Failure in UDx RPC call InvokeProcessPartition() in User Defined Object [dblink]: UDx side process has exited abnormally

dblink has several global variables and doesn't consider being called multiple times in one query.

For example, in the first call, DBLinkFactory.getReturnType() sets the data type array pointer to 'Odt' global variable. Then, the same method sets a different pointer to that variable in the second call. After that, 'Obt' global variable is cleared by clean() method called by processPartition(). But the cleared pointer is for the second call. So the second call failed when accessing this variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions