First of all, thank you for developing Dataset! I find it very useful!
I've noticed that in the last versions of Dataset, my scripts were issuing a lot of 'SHOW FULL TABLES FROM "db" ' commands to my MySQL server (basically one per transaction). I've traced the suspect code to:
def commit(self):
"""Commit the current transaction.
Make all statements executed since the transaction was begun permanent.
"""
if hasattr(self.local, "tx") and self.local.tx:
tx = self.local.tx.pop()
tx.commit()
self._flush_tables() # <-- this line
By eliminating the call _self._flushtables() the issue disappears and I do not notice any side effects of eliminating it. Looking into _flushtables(), the description says it is used to "Clear the table metadata after transaction rollbacks."_ Which is not the case during a successful commit.
Are my assumptions correct? If not, is there a reason why a schema reload is necessary after each successful transaction?
Greetings,
First of all, thank you for developing Dataset! I find it very useful!
I've noticed that in the last versions of Dataset, my scripts were issuing a lot of 'SHOW FULL TABLES FROM "db" ' commands to my MySQL server (basically one per transaction). I've traced the suspect code to:
By eliminating the call _self._flushtables() the issue disappears and I do not notice any side effects of eliminating it. Looking into _flushtables(), the description says it is used to "Clear the table metadata after transaction rollbacks."_ Which is not the case during a successful commit.
Are my assumptions correct? If not, is there a reason why a schema reload is necessary after each successful transaction?
Thanks in advance and Happy holidays! Felipe