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

Cursor does not accept None as parameter

    XMLWordPrintable

    Details

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

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