this error occurs, when Cursor.__init__ is trying to use a cached connection
mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
at conn.ping(True) in database_sql.py
solution:
remove the call conn.ping(True), and the program works anyway
earlier, the same error occured at self.conn.autocommit(False)
but now its working ....
guess:
SQLDatabase.setup is running in background, locking the connection cursor.
contradiction: the Cursor.__exit__ function does close the cursor ....
env:
mariadb 10.3.14
reconnect patch for mariadb, so we can build mysql-python: sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bak
python 2.7.16
mysql-python 1.2.3c1
this error occurs, when
Cursor.__init__
is trying to use a cached connectionmysql_exceptions.ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
at
conn.ping(True)
in database_sql.pysolution: remove the call
conn.ping(True)
, and the program works anywayearlier, the same error occured at
self.conn.autocommit(False)
but now its working ....guess: SQLDatabase.setup is running in background, locking the connection cursor. contradiction: the
Cursor.__exit__
function does close the cursor ....env: mariadb 10.3.14 reconnect patch for mariadb, so we can build mysql-python:
sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h -i.bak
python 2.7.16 mysql-python 1.2.3c1