Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PreparedBatch with first bindNull() and then bind() afterwards fails #2078

Open
doppelrittberger opened this issue Jul 26, 2022 · 2 comments

Comments

@doppelrittberger
Copy link

doppelrittberger commented Jul 26, 2022

Hi,
I think my issue is related to #1901
but I have a different call order which I cannot change. In my case I first use bindNull() on PreparedBatch and add another binding with bind() after it. You can simply check that this is failing if you change TestPreparedBatch:273 and move this line up:

    @Test
    public void testBindNull() {
        Handle handle = h2Extension.getSharedHandle();
        handle.execute("CREATE TABLE record (b bool)");
        assertThat(handle.prepareBatch("INSERT INTO record (b) VALUES (:bVal)")
            .bindNull("bVal", Types.BOOLEAN).add()
            .bind("bVal", false).add()
            .bindByType("bVal", null, boolean.class).add()
            .execute()).containsExactly(1, 1, 1);
    }

This will cause the test to fail.
If there is anything I can help you with please let me know.

Best regards
Markus Ritter

@hgschmie
Copy link
Contributor

hgschmie commented Aug 2, 2022

This is related to #1968 and #1991

@hgschmie
Copy link
Contributor

Closing, still tracked in #2390.

@hgschmie hgschmie reopened this Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants