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

executemany() fails on INSERT SELECT FROM against mariadb-server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.1.14
    • N/A
    • DBAPI 2.0, Protocol
    • None
    • Ubuntu 24.04 Mariadb in container 'mariadb:latest'
      `Starting MariaDB 12.2.2-MariaDB-ubu2404 source revision d26a6f44c1f2119377e79a9540886c6d8c01472f s`
    • 3.12

    Description

      A simple "INSERT INTO ... SELECT" statement fails with
      mariadb.OperationalError: This command is not supported in the prepared statement protocol yet

      This works if connected to a mysql server (still using mariadbconnector).

      Simple reproducible file:

      import mariadb
       
      conn = mariadb.connect(
          host="localhost",
          user="root",
          password="dummy",
          unix_socket="./run/mysqld/mysqld.sock",
          database="test",
      )
       
      cur = conn.cursor()
      cur.execute("DROP TABLE IF EXISTS t")
      cur.execute("CREATE TABLE t (c INT)")
      cur.executemany("INSERT INTO t (c) SELECT ?", [(1,), (2,)])
      

      Attachments

        Issue Links

          Activity

            People

              georg Georg Richter
              tpetersen Tobias Petersen
              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.