Ensure that entries are written to watchdog table

mkalkbrenner - August 22, 2008 - 18:30
Project:Drupal
Version:7.x-dev
Component:watchdog.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

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

AttachmentSizeStatusTest resultOperations
dedicated_watchdog_connection.patch2.03 KBIdleFailed: Failed to apply patch.View details | Re-test

#1

mkalkbrenner - August 22, 2008 - 18:31

Drupal 7 seems to have the same Problem.

#2

mkalkbrenner - August 22, 2008 - 18:45
Title:Ensure that enties are written to watchdog table» Ensure that entries are written to watchdog table

#3

Damien Tournoud - October 30, 2008 - 18:40
Version:6.x-dev» 7.x-dev

Good idea, let's see how we can implement that in the new database layer.

#4

mkalkbrenner - October 30, 2008 - 18:49

But don't forget the "backport" to drupal 6 and drupal 5 using my patch please.

#5

Anonymous (not verified) - November 10, 2008 - 03:20
Status:needs review» needs work

The last submitted patch failed testing.

 
 

Drupal is a registered trademark of Dries Buytaert.