Skip to content

Prepared statements are never deallocated #30

@mattetti

Description

@mattetti

jet/query.go

Line 72 in ae59b2c

stmt, err = q.qo.Prepare(query)

In the case of a transaction, jet always creates a prepared statement but never deallocate them. It looks like postgres automatically clears prepared statement when the session is reset, MySQL doesn't. When using this feature for too long, MySQL quickly reaches the max amount of created statements.

I'm not quite sure what the right behavior should be but deallocation should at least be doable by the users (currently the statement isn't exposed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions