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

Parser error when parsing multibyte strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0b1
    • Fix Version/s: 1.1.0b2
    • Component/s: Parser
    • Labels:
      None
    • Python Version:
      3.9

      Description

      When parsing multibyte strings, the offsets for placeholder are delivered as byte position instead of character position.

      How to repeat:

      import mariadb
       
      c=mariadb.connect(db="test")
       
      cursor=c.cursor()
      cursor.execute("SELECT `Unitéble2`.`測試` AS `Unitéble2_測試`, `Unitéble2`.`測試_2` AS `Unitéble2_測試_2`, `Unitéble2`.`méil` AS `Unitéble2_méil` FROM `Unitéble2` WHERE ? = `Unitéble2`.`測試`",(1,))
      

      Error:
      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 '? = `Unitéble2`.`測試`2' at line 1

        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

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.