Skip to content

SELECT @@SQL_AUTO_IS_NULL on every reuse of a connection #65

@hamidmg

Description

@hamidmg

Describe the bug
Django ORM executes "SELECT @@SQL_AUTO_IS_NULL" on the creation of a connection. When I use a connection pool, I expect to execute this query only on creation, not on every reuse of the connection.
Am I right? If not, what is the logic and why we need to call this query every time?

django's backend
Switch to django's backend (django.db.backends.xxx), does the problem reproduce?
Yes

Environment

  • Python Version: 3.10
  • Django Version: 3.1

Traceback
Post traceback here.

Optional: SQL and parameters
SELECT @@SQL_AUTO_IS_NULL

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