Skip to content

[sqlwrapper] session-scoped objects are left out of get_objects #137

@tokoko

Description

@tokoko

Came across this issue when trying to list tables from mariadb with direct query vs adbc get_objects. mariadb (unlike mysql) includes temporary tables in information_schema.tables and I was able to list active temp tables with the query, but get_objects (which runs the same query under the hood) didn't list them. Turns out sqlwrapper prepares two separate objects Conn and Db for connections, one that's supposed to be used by queries and another that's supposed to be used by get_objects. The use of a separate connection for get_objects means that temporary tables that are created as part of the dedicated connection's session won't show up in the metadata.

mysql driver can of course use Conn instead of Db, but the driverbase also runs get objects queries concurrently so right now even that's impossible. Thought I would open a ticket here first to discuss. Is there a good reason why metadata queries can't go over the same Conn? I understand the performance arguments, but feels like a safer option to me.

Also, if performance is the main issue, couldn't we instead look into changing driverbase such that sql drivers would be able to issue a single query for all metadata rather than having to run separate queries per database?

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