Hi,

Sorry I don't understand. What is the problem exactly? Where is the
behavior of H2 different from Oracle?

Regards,
Thomas


On Monday, May 4, 2015, Peter Fich <[email protected]> wrote:

> While using H2 as a replacement for Oracle in test, I have come across
> this problem.
>
> Searching the group I have found nothing that indicates this is a know
> issue. If it is, please can someone help me find the relevant thread.
>
> I have added a test to TestCompatibilityOracle, that I believe shows the
> problem:
>
>        stat.execute("CREATE TABLE F (ID NUMBER, X VARCHAR2(1))");
>        stat.execute("INSERT INTO F VALUES (1, 'a')");
>        PreparedStatement preparedStatement = conn.prepareStatement("INSERT
> INTO F VALUES (2, ?)");
>        preparedStatement.setString(1, "");
>        preparedStatement.execute();
>        assertResult("2", stat, "SELECT COUNT(*) FROM F");
>        assertResult("1", stat, "SELECT COUNT(*) FROM F WHERE X IS NULL");
>        assertResult("0", stat, "SELECT COUNT(*) FROM F WHERE X = ''");
>        assertResult(new Object[][]{{1, "a"}, {2, null}}, stat, "SELECT *
> FROM F");
>
> In the setString method JdbcPreparedStatement, ValueString.get(x) is
> called without the flag. But getting the mode in there in an elegant way
> seems hard to me.
>
> Dose anyone have any suggestions on how to fix this?
>
>
> Cheers,
>
> Peter
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to