Skip to content
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
Merged

Conversation

tsteur
Copy link
Member

@tsteur 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.

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 PRs that need a code 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
@mattab mattab deleted the droptmplogactions branch April 3, 2017 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants