sudoconf / php-sql-parser

Automatically exported from code.google.com/p/php-sql-parser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

default clause causes Fatal error #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. define SQL statement "CREATE TABLE t (mv DECIMAL(3) DEFAULT 10)"
2. subsequent parse and create on this statement will produce
3. ) Fatal error: Uncaught exception 'UnableToCreateSQLException' with message 
'unknown [expr_type] = default-value in "CREATE TABLE column-type subtree" [3] 
' in D:\ontwikkeling\www\SqlParser\src\builders\ColumnTypeBuilder.php on line 84

What is the expected output? What do you see instead?
expected output is "CREATE TABLE t (mv DECIMAL(3) DEFAULT 10)"

What version of the product are you using? On what operating system?
@version   SVN: $Id: ColumnTypeBuilder.php 935 2014-01-08 13:58:11Z 
phosco@gmx.de $
Windows XP

Please provide any additional information below.
When you leave out "DEFAULT 10", it will run as expected.

Original issue reported on code.google.com by Henk.Blo...@gmail.com on 10 Feb 2014 at 11:12

GoogleCodeExporter commented 9 years ago
There is an expression type DEF_VALUE, which has not been re-created. I have 
fixed that in r1080.

Original comment by pho...@gmx.de on 18 Feb 2014 at 1:39