Ensure that entries are written to watchdog table
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | watchdog.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Jump to:
If you read through different drupal bug reports you often see a quote like
Table 'watchdog' was not locked with LOCK TABLES
This could happen if you're using MySQL and a module requests a table lock and run into an error afterwards. In this case drupal is unable to store the error because it could not access the watchdog table.
I attached a patch that opens a dedicated database connection to write watchdog entries like I already proposed in these bug reports:
#298678: Impossible to lock two MySQL tables
#195812: db_error() doesn't work on default connection
Here are some issues related to this bug report:
#286176: Views causing error "Table 'watchdog' was not locked with LOCK TABLES'
#286380: Got past mem problem only to hit a timeout problem
#174705: Modify node type configuration storage to use a serialized collection stored in one variable rather than long variable names
#99718: user warning: Duplicate entry - work around available
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| dedicated_watchdog_connection.patch | 2.03 KB | Idle | Failed: Failed to apply patch. | View details | Re-test |

#1
Drupal 7 seems to have the same Problem.
#2
#3
Good idea, let's see how we can implement that in the new database layer.
#4
But don't forget the "backport" to drupal 6 and drupal 5 using my patch please.
#5
The last submitted patch failed testing.