Something seems indeed not quite right. The following code mightn show some issues, but I'm not sure if this is the same as discussed in this bug.
import time import mysql.connector
def bug812970(): print('Script starts. Waiting 5 secs..') time.sleep(5) cnx = mysql.connector.connect(user='root',database='test',buffered=False)
i = 0 while i < 100: cur = cnx.cursor() cur.execute("SELECT REPEAT('a',5000000)") rows = cur.fetchall() cur.close() i += 1 rows = None
print('Cursor execution done. Waiting 10 secs..') time.sleep(10) cnx.close() print('Connection closed. Waiting 10 secs..') time.sleep(10)
Something seems indeed not quite right. The following code mightn show some issues, but I'm not sure if this is the same as discussed in this bug.
import time
import mysql.connector
def bug812970(): .connect( user='root' ,database= 'test', buffered= False)
print('Script starts. Waiting 5 secs..')
time.sleep(5)
cnx = mysql.connector
i = 0
cur.execute( "SELECT REPEAT( 'a',5000000) ")
while i < 100:
cur = cnx.cursor()
rows = cur.fetchall()
cur.close()
i += 1
rows = None
print('Cursor execution done. Waiting 10 secs..') 'Connection closed. Waiting 10 secs..')
time.sleep(10)
cnx.close()
print(
time.sleep(10)