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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!