21 ms·
@ankrgyl > every statement was executed in its own transaction. I do not see any begin(), rollback() or commit()'s in your code. According to the mysql-python
by timaelliott 14y ago
@ankrgyl
> every statement was executed in its own transaction.
I do not see any begin(), rollback() or commit()'s in your code. According to the mysql-python docs, http://mysql-python.sourceforge.net/FAQ.html#my-data-disappeared-or-won-t-go-away http://mysql-python.sourceforge.net/FAQ.html#my-data-disappe..., autocommit is disabled by default. Therefore each of your workers appears to be operating inside one very large transaction and never actually committing anything to the database?
Can you clarify?
- deleted 14y ago[deleted]
- deleted 14y ago[deleted]
- ankrgyl 14y agoReferring to https://github.com/memsql/bench/blob/master/sql_database.py https://github.com/memsql/bench/blob/master/sql_database.py , we use _mysql, not mysqldb. Here's some code that demonstrates: In [1]: import _mysql In [2]: c = _mysql.connect(host='127.0.0.1', user='root') In [3]: c.query("SELECT @@session.autocommit") In [4]: c.store_result().fetch_row(1) Out[4]: (('1',),)