MySQL Forums
Forum List  »  Connector/Python

sick and twisted behaviour
Posted by: Philippe Florent
Date: June 28, 2016 03:29AM

Hello,

apparently I can create one cursor , execute one query and that's it

If I repeat the query , then no queries are pushed to the db

I cant use multiple cursors and I cant reuse the same cursor to execute different sort of statements...

not only doesn'it work but it seems to invalidate the first cursor execution

just insane

connection = mysql.connector.connect(user='root', password='***********',host='localhost',port=3306,buffered=True,unix_socket='/var/run/mysqld/mysqld.sock')
cursor = connection.cursor()

cursor.execute("INSERT INTO ... \
INSERT INTO ..."
,multi=True)

connection.commit()

cursor.close()

cursor = connection.cursor()

cursor.execute("INSERT INTO ... \
INSERT INTO ..."
,multi=True)

connection.commit()

cursor.close()

connection.close()

can someone explain to me what is wrong with the connector ?

thanks

Options: ReplyQuote


Subject
Written By
Posted
sick and twisted behaviour
June 28, 2016 03:29AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.