Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6757

autocommit does not work in MySQLdb Python connector with MariaDB

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 5.5.37
    • N/A
    • Platform Power
    • None
    • Hardware architecture: x86
      Operating system: Red Hat 7.0 GA
      MySQL Python connector version: 1.2.3

    Description

      If i run the following command in Python command line:

      import MySQLdb
      connArgs={"host": <server_url>,
                         "user": <user>,
                         "passwd": <password>,
                         "db": <database_name>}
      conn = MySQLdb.connect(**connArgs)
      conn.autocommit = True
      cursor = conn.cursor(MySQLdb.cursors.DictCursor)
      query = <insert_sql_query>
      cursor.execute(query)

      and then check the MariaDB database, the inserted tuple does not show up in a SELECT query output. If I commit as shown below, the new tuple shows up in SELECT query output.

      conn.commit()

      This works correctly in MySQL server 5.1.66, same MySQLdb module version.

      Attachments

        Activity

          People

            Unassigned Unassigned
            alanoe Alan Evangelista
            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.