dblog_watchdog() already forces the use of the default database, but it does so by database switching. That is so last version. These days we can request the database directly.

While I was at it I also converted dblog_watchdog() to use a built Insert query. I did not convert the rest of the module to DBTNG yet, as there's some tricksy Select work going on for the admin page that is pending on #299267: Add "Extender" support to SELECT query builder to make the Select builder even more flexible.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hswong3i’s picture

Correct some typing mistake.

Tested with MySQL and PostgreSQL, DBLog simpletest all pass. Should be RTBC. Maybe someone give a hand for it?

hswong3i’s picture

Title: DBTNG: Properly force default database in the dblog module » [DBTNG] Properly force default database in the dblog module
FileSize
1.49 KB

Patch reroll via CVS HEAD.

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

andypost’s picture

Status: Closed (fixed) » Needs review
FileSize
968 bytes

If we insert into "default" database so delete should happen same way

Dries’s picture

Status: Needs review » Reviewed & tested by the community

That makes sense to me but let see if there are any objections.

Crell’s picture

In practice I don't think #5 is strictly necessary, but it's good parallelism and I can think of no adverse effects. +1

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.