By common programming logic, DB field with 'not null' => TRUE should always come with its default value, in order to prevent careless typing mistake or query implementation. But in case of MySQL, TEXT/BLOB don't support for default value (http://dev.mysql.com/doc/refman/5.1/en/blob.html):

BLOB and TEXT columns cannot have DEFAULT values.

According to our CVS HEAD implementation, we escape from this exceptional case within schema definition (bad). This patch try to catch the MySQL-specific requirement within its driver implementation (seems better), where keep the overall schema definition as simple as possible.

Comments

hswong3i’s picture

Title: MySQL can't handle TEXT/BLOB with default value » [DBTNG]: MySQL should remove TEXT/BLOB with default value
Priority: Normal » Critical
StatusFileSize
new903 bytes

Patch reroll via CVS HEAD.

hswong3i’s picture

Title: [DBTNG]: MySQL should remove TEXT/BLOB with default value » [DBTNG]: MySQL should remove TEXT/BLOB default value
Anonymous’s picture

Status: Needs review » Closed (won't fix)

@hswong3i: I think this is a "won't fix" based on the fact that you're adding what others call baby sitting code. The originator of the schema should fix his code so it should just fail.