New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop temporary table when no longer needed #11544

Merged
merged 1 commit into from Mar 28, 2017

Conversation

Projects
None yet
2 participants
@tsteur
Member

tsteur commented Mar 28, 2017

I know the temporary table only exists during session, but problem is a possible error PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tmp_log_actions_to_keep' already exists when logs are purged twice during a session.

We could use if not exists when creating the table but then we would still have the entries from a previous "delete logs run" in there.

I noticed this error in tests but it may also occur in a regular task schedule that purge logs is called twice if eg implemented by a plugin and by privacy manager etc.

Drop temporary table when no longer needed
I know the temporary table only exists during session, but problem is a possible error `PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tmp_log_actions_to_keep' already exists` when logs are purged twice during a session. 

We could use `if not exists` when creating the table but then we would still have the entries from a previous "delete logs run" in there.

I noticed this error in tests but it may also occur in a regular task schedule that purge logs is called twice if eg implemented by a plugin and by privacy manager etc.

@tsteur tsteur added the Needs Review label Mar 28, 2017

@tsteur tsteur added this to the 3.0.3 milestone Mar 28, 2017

@mattab mattab merged commit a6e9fe1 into 3.x-dev Mar 28, 2017

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details

@mattab mattab deleted the droptmplogactions branch Apr 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment