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

mariadb connector fails on information schema query containing non-ascii characters

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 1.1.2
    • 1.1.3
    • DBAPI 2.0
    • None
    • mariadb-connector-c was upgraded from 3.1.13 to 3.2.7, Fedora linux mariadb server 10.5 and 10.6
    • 3.10

    Description

      query containing non-ascii characters fails as of 1.1.2, no issues previously, works with other DB libraries, replace `col_Unitéble_id_seq` with an all ascii name and no issue

      import mariadb
       
       
      conn = mariadb.connect(
          user="scott", password="tiger", host="localhost", db="test",
      )
       
       
      cursor = conn.cursor()
       
      cursor.execute(
          f"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE "
          f"TABLE_TYPE='SEQUENCE' and TABLE_NAME=? and TABLE_SCHEMA=?",
          ("col_Unitéble_id_seq", "foobar")
      )
       
      cursor.close()
       
      conn.close()
       
      
      

      output:

      Traceback (most recent call last):
        File "/home/classic/dev/sqlalchemy/test3.py", line 11, in <module>
          cursor.execute(
        File "/home/classic/.venv3/lib/python3.10/site-packages/mariadb/cursors.py", line 293, in execute
          self._readresponse()
      mariadb.ProgrammingError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"foobar"?' at line 1
      
      

      Attachments

        Activity

          People

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