What steps will reproduce the problem?
1. execute this code :
$sql = "SELECT CAST( 12 AS decimal( 9, 3 ) )";
$parser->parse($sql, true);
$p = $parser->parsed;
2. parser dies with this message :
cannot calculate position of , within , 3 ) )
What version of the product are you using? On what operating system?
rev 235 on windows 7
Please provide any additional information below.
failing test case :
<?php
require_once(dirname(__FILE__) . '/../../../php-sql-parser.php');
require_once(dirname(__FILE__) . '/../../test-more.php');
$parser = new PHPSQLParser();
$sql = "SELECT CAST( 12 AS decimal( 9, 3 ) )";
$parser->parse($sql, true);
$p = $parser->parsed;
$expected = getExpectedValue(dirname(__FILE__), 'issue51.serialized');
eq_array($p, $expected, 'does not die if query contains cast expression');
Original issue reported on code.google.com by nderm...@adequasys.com on 24 Apr 2012 at 10:06
Original issue reported on code.google.com by
nderm...@adequasys.com
on 24 Apr 2012 at 10:06