As case mentioned in http://drupal.org/node/147947, this patch remap {watchdog}.variables as BLOB type. Also merge with http://drupal.org/node/300219 for correct schema definition. A SELECT query for dblog_top() is also updated according invalid GROUP BY with BLOB.

MySQL:

  • update.php: pass.
  • INSERT/SELECT (Top * in...): pass.

PostgreSQL:

  • update.php: FAILED. Seems PostgreSQL schema don't handle change field correctly.
  • INSERT: FAILED. Seems db_insert() of PostgreSQL don't handle correctly.

Comments

hswong3i’s picture

StatusFileSize
new4.19 KB

Update based on http://drupal.org/node/316095 founding. Revamp BLOB field with nullable.

Tested with MySQL and PostgreSQL. Stand alone simpletest, pass.

hswong3i’s picture

StatusFileSize
new4.32 KB

Integrate with progress of http://drupal.org/node/319401.

Tested with MySQL and PostgreSQL, DBLog simpletest all pass.

hswong3i’s picture

Title: Remap field as BLOB: {watchdog}.variables » [DBTNG + BLOB]: remap {watchdog}.variables
StatusFileSize
new4.23 KB

Since #316095: Raise PHP requirement to 5.2.12 for PostgreSQL only already figure out the solution for PostgreSQL + BLOB + NULL + INSERT/UPDATE bug, this patch is now safe for using both null or nullable BLOB field.

Patch reroll via CVS HEAD. Only change field type from TEXT to BLOB.

P.S. Actually, I would like to add default value for "variables" as it is 'not null' => TRUE by default. But since MySQL will buggy with #300219: [DBTNG]: MySQL should remove TEXT/BLOB default value so I would like to wait and handle this with another issue.

hswong3i’s picture

StatusFileSize
new2.71 KB

According to commit of #300219: [DBTNG]: MySQL should remove TEXT/BLOB default value, patch reroll via CVS HEAD. Tested with MySQL's simpletest.

Anonymous’s picture

Status: Needs review » Needs work

The last submitted patch failed testing.

hswong3i’s picture

Status: Needs work » Needs review
StatusFileSize
new2.75 KB

Ooops... dblog.install need update. Patch reroll and pass MySQL + simpletest.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
hswong3i’s picture

Status: Needs review » Closed (duplicate)