| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | dblog.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
If you read through different drupal bug reports you often see a quote likeTable '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 |
Comments
#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.
#6
This issue will not go anywhere without confirmation that this issue still exists in current Drupal 7.x and without a patch against a current version.
#7
It was Damien who moved the issue forward to D7 three years ago. My patch was for D5 / D6.
I don't have time to create a patch for D7 at the moment or to confirm, that the issue still exists in D7.
But it definitely exists in D6 which is still supported!
#8
What version of D6 still has this issue?
BTW: Your last patch failed. Without a valid patch this issue won't go anywhere.
#9
My patch from 3 years ago could still be applied against 6.22 and 6.x-dev:
mkalkbrenner-laptop:drupal-6.22 mkalkbrenner$ patch -p0 < ~/dedicated_watchdog_connection.patchpatching file includes/database.inc
Hunk #1 succeeded at 129 (offset -1 lines).
Hunk #2 succeeded at 156 (offset -1 lines).
patching file modules/dblog/dblog.module
Hunk #1 succeeded at 129 with fuzz 2 (offset 2 lines).
#10
Please attached your patch and mark this ticket as "needs review". The automated patch review system will tell you if the patch is acceptable.
#11
#12
If this is against Drupal 6.22 (which it should be), the version needs to be changed on the issue.
#13
It's against 6.22 and of course 6.x-dev
#14
Your patch has been "ignored". Try changing the version to 6.x-dev and resubmitting the patch.
#15
#16
Still applies to 8.x, which uses the default connection for watchdog messages.
#17
Let's not confuse the system. If this patch is needed and applied cleanly to 8.x-dev, lets open a new issue in that queue.