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

Cursor does not accept None as parameter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.1.3
    • 1.1.4
    • DBAPI 2.0
    • None
    • 3.10

    Description

      Python connector in 1.1 does not accept None as valid data (indicating no data at all) for cursor execute method.

      1.0 works as expected.

      The error occurs on cursors.py in line 268:

              if len(data):
      

      As a suggestion, I would put it before (Avoiding error in lines 268 and 281):

              data = data or ()  # force an empty tuple if None was provided.
      

      Attachments

        Activity

          People

            georg Georg Richter
            lucianobarcaro Luciano Barcaro
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.