Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.7.0

Bug #4081 [PATCH] Added tinyint to synonyms
Submitted: 2005-04-06 15:06 UTC
From: epte at ruffdogs dot com Assigned: epte
Status: Closed Package: SQL_Parser
PHP Version: 4.3.8 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2005-04-06 15:06 UTC] epte at ruffdogs dot com
Description: ------------ I needed to add tinyint to the dialect's synonyms list as well. Here's the patch: Index: Dialect_MySQL.php =================================================================== --- Dialect_MySQL.php (revision 2687) +++ Dialect_MySQL.php (working copy) @@ -115,10 +115,11 @@ 'decimal'=>'numeric', 'dec'=>'numeric', 'numeric'=>'numeric', 'float'=>'float', 'real'=>'real', 'double'=>'real', 'int'=>'int', 'integer'=>'int', 'interval'=>'interval', 'smallint'=>'smallint', - 'timestamp'=>'timestamp', 'bool'=>'bool', 'boolean'=>'bool', 'set'=>'set', - 'enum'=>'enum', 'text'=>'text', 'char'=>'char', 'character'=>'char', - 'varchar'=>'varchar', 'ascending'=>'asc', 'asc'=>'asc', - 'descending'=>'desc', 'desc'=>'desc', 'date'=>'date', 'time'=>'time'), + 'tinyint'=>'tinyint', 'timestamp'=>'timestamp', 'bool'=>'bool', + 'boolean'=>'bool', 'set'=>'set', 'enum'=>'enum', 'text'=>'text', + 'char'=>'char', 'character'=>'char', 'varchar'=>'varchar', + 'ascending'=>'asc', 'asc'=>'asc', 'descending'=>'desc', 'desc'=>'desc', + 'date'=>'date', 'time'=>'time'), 'lexeropts'=>array('allowIdentFirstDigit'=>true),

Comments

 [2005-04-06 15:11 UTC] epte at ruffdogs dot com
AND tinyint needed to be in the case statement. Here's that patch: Index: Parser.php =================================================================== --- Parser.php (revision 2688) +++ Parser.php (working copy) @@ -555,7 +555,7 @@ $fields[$name]['length'] = $values[0]; break; case 'char': case 'varchar': - case 'integer': case 'int': + case 'integer': case 'int': case 'tinyint': if (sizeof($values) != 1) { return $this->raiseError('Expected 1 parameter');
 [2007-03-13 03:12 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.