Using Schema API to create a database table I get an SQL syntax error on MySQL 5.0.51:

"User warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SMALLTEXT NOT NULL DEFAULT ''"

The field is defined as:

      'fieldname' => array(
        'type' => 'text', 
        'not null' => TRUE, 
        'default' => '',
        'size' => 'tiny'        
      ),

MySQL manuals for versions 3.x onwards (http://dev.mysql.com/doc/refman/5.0/en/blob.html) say:
"The four TEXT types are TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT."

The patch attached changes text:tiny and text:small to use TINYTEXT instead of SMALLTEXT.

Cheers,
Simon

CommentFileSizeAuthor
smalltext.patch747 bytesAnonymous (not verified)

Comments

gábor hojtsy’s picture

Status: Needs review » Fixed

Indeed, verified, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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