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

Force callproc method to use always binary protocol

    XMLWordPrintable

Details

    Description

      When running callproc() method of cursor object we always have to use binary protocol.
      For some obvious reason, the callproc method falls back to text protocol when executed twice

      >>> conn=mariadb.connect(host="127.0.0.1", user="remote", password="remote", db="test")
      >>> cursor=conn.cursor()
      >>> cursor.callproc("p2", ("foo", "bar", 0))
      >>> cursor.callproc("p2", ("foo", "bar", 1))
      Traceback (most recent call last):
        File "<python-input-4>", line 1, in <module>
          cursor.callproc("p2", ("foo", "bar", 1))
          ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/georg/work/venv13/lib/python3.13/site-packages/mariadb/cursors.py", line 204, in callproc
          self.execute(statement, data)
          ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
        File "/home/georg/work/venv13/lib/python3.13/site-packages/mariadb/cursors.py", line 324, in execute
          self._readresponse()
          ~~~~~~~~~~~~~~~~~~^^
      mariadb.OperationalError: OUT or INOUT argument 3 for routine test.p2 is not a variable or NEW pseudo-variable in BEFORE trigger
      

      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.