Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-357

Multi-statements enabled by default in the pure-Python connector (inconsistent with the C extension)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-rc3
    • N/A
    • None

    Description

      The pure-Python client adds CLIENT_MULTI_STATEMENTS to its default handshake capabilities, while the C extension (libmariadb) does not. As a result the two backends behave differently for the same code: cursor.execute("SELECT 1; SELECT 2") succeeds on pure-Python but raises a syntax error on the C extension. The two implementations should differ only in performance, not behaviour.

      fis is to remove MULTI_STATEMENTS from the pure-Python default capabilities so it is off by default in both backends (matching the C extension, libmariadb and PyMySQL). It remains available as an opt-in via the existing client_flag parameter: client_flag=CAPABILITY.MULTI_STATEMENTS ( the same mechanism PyMySQL uses).

      Attachments

        Activity

          People

            georg Georg Richter
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.