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

Invalidate cursors if the connection was dropped

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 0.9.1
    • 0.9.1
    • DBAPI 2.0
    • None

    Description

      When a connection was closed or died, cursor should be invalidated/closed too.

      >>> conn=mariadb.connection(user="root")
      >>> cursor=conn.cursor()
      >>> print(cursor.closed)
      False
      >>> conn.close()
      >>> print(cursor.closed)
      False
      

      That means closed should be implemented as getter/setter function and should check the following conditions:

      • is connection alive
      • is statement valid
      • is statement error code==CR_STMT_CLOSED

      Additionally the MARIADB_CHECK_STMT macro should also check if the error code is CR_STMT_CLOSED.

      Attachments

        Activity

          People

            georg Georg Richter
            georg Georg Richter
            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.