Download & Extend

Remap field as BLOB: {boxes}.body

Project:Drupal core
Version:8.x-dev
Component:block.module
Category:feature request
Priority:normal
Assigned:hswong3i
Status:needs work

Issue Summary

As case mentioned in #147947, this patch remap {boxes}.body as BLOB type.

The code logic should be correct, but it is now buggy for MySQL. It is because of INSERT DELAYED implementation in db_insert() which buggy when call db_last_insert_id() just after it, and MySQL don't support default value for TEXT/BLOB. I will mention the above bugs in other issues.

AttachmentSizeStatusTest resultOperations
boxes-body.patch3.22 KBIdleFailed: Failed to apply patch.View details | Re-test

Comments

#1

Status:needs work» needs review

Remove the use of db_last_insert_id(), and also merge with http://drupal.org/node/300219 for correct schema definition.

MySQL:

  • update.php: pass (remember to access admin/build/themes and re-click active and default theme after update.php, it should be another bug across D6/7)
  • Insert new custom block: pass, both flash install or after upgrade.
  • Update existing custom block: pass, both flash install or after upgrade.

PostgreSQL:

  • update.php: FAILED. Seems PostgreSQL schema don't handle change field correctly.
  • Insert new custom block: pass, for flash install
  • Update existing custom block: pass, for flash install
AttachmentSizeStatusTest resultOperations
boxes-body.patch4.09 KBIdleFailed: Failed to apply patch.View details | Re-test

#2

Revamp with drupal_write_record() for simpler handling.

When combine with simplify drupal_write_record() with db_insert() and db_update(), it can prevent the incorrect input type for pid and uid when compare with using db_insert() directly.

Tested with MySQL and PostgreSQL. Stand alone simpletetest, pass; simpletest when combine with http://drupal.org/node/299088, also pass.

AttachmentSizeStatusTest resultOperations
boxes-body.patch5.09 KBIdleFailed: Failed to apply patch.View details | Re-test

#3

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

Tested with MySQL and PostgreSQL. Stand alone simpletest, pass; simpletest when combine with http://drupal.org/node/299088, also pass.

AttachmentSizeStatusTest resultOperations
boxes-body-1223484987.patch3.97 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch boxes-body-1223484987.patch.View details | Re-test

#4

Status:needs review» needs work

The last submitted patch failed testing.

#5

Version:7.x-dev» 8.x-dev

Moving this to D8 now that #147947: [DBTNG + XDB] Replace some TEXT:BIG with BLOB has been moved to D8 as well.

#6

Status:needs work» needs review

#7

Priority:critical» normal

Not critical. May not even be valid any more.

#8

Status:needs review» needs work

The last submitted patch, boxes-body-1223484987.patch, failed testing.

nobody click here