Subject: | assertion failed in rewrite_execute_stmt |
Using 1.31 under Perl 5.6.1 on FreeBSD 5.0, the following perl code produces an assertion failure:
$sth = $dbh->prepare(q{ select to_number(f1, '$9999.99')
from t where f2 > ? });
$sth->execute(0);
Here is the output:
Assertion failed: (ph <= imp_sth->phc), function rewrite_execute_stmt, file prescan_stmt.c, line 442.
Discussion:
This only happens when there are query arguments. I can get around the problem by replacing '$9999.99' with '$' || '9999.99' or by replacing it with a question mark and providing the format in the execute statement.