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

Invalidate cursors if the connection was dropped

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.9.1
    • Component/s: DBAPI 2.0
    • Labels:
      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

            Assignee:
            georg Georg Richter
            Reporter:
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration