Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As case mentioned in http://drupal.org/node/147947, this patch remap {node_revisions}.body and {node_revisions}.teaser as BLOB type. Also merge with http://drupal.org/node/300219 for correct schema definition. Since node INSERT/UPDATE is already wrapped with drupal_write_record(), we don't need db_insert() or db_update() here (for update drupal_write_record() with db_insert() and db_update(), please refer to http://drupal.org/node/299088).
MySQL:
- update.php: pass.
- INSERT/UPDATE: pass.
PostgreSQL:
- update.php: FAILED. Seems PostgreSQL schema don't handle change field correctly.
- INSERT/UPDATE: pass.
Comment | File | Size | Author |
---|---|---|---|
#2 | dbtng-node_revisions-body-teaser-1224006155.patch | 1.31 KB | hswong3i |
#1 | node_revisions-body-teaser-1223494702.patch | 1.4 KB | hswong3i |
node_revisions-body-teaser.patch | 2.67 KB | hswong3i | |
Comments
Comment #1
hswong3i CreditAttribution: hswong3i commentedUpdate based on http://drupal.org/node/316095 founding. Revamp BLOB field with nullable.
Tested with MySQL and PostgreSQL:
P.S. According to recent comments, seems we are scheduled to revamp {node_revisions}.body and {node_revisions}.teaser as nullable. Should we include within this issue, too?
Comment #2
hswong3i CreditAttribution: hswong3i commentedSince #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. We MUST have PHP newer than snapshot php5.2-200810130030.tar.gz for PostgreSQL or else will buggy!
Simpletest for both MySQL and PostgreSQL are now pass as CVS HEAD.
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.Comment #4
hswong3i CreditAttribution: hswong3i commentedduplicate with #147947: [DBTNG + XDB] Replace some TEXT:BIG with BLOB