You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Kuznetsov (JIRA)" <ji...@apache.org> on 2018/10/22 14:10:00 UTC
[jira] [Comment Edited] (IGNITE-9947) JDBC thin: Batch update is
not performed if streaming state changed before executeBatch()
[ https://issues.apache.org/jira/browse/IGNITE-9947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16659021#comment-16659021 ]
Pavel Kuznetsov edited comment on IGNITE-9947 at 10/22/18 2:09 PM:
-------------------------------------------------------------------
pasting here code of the test (org.apache.ignite.jdbc.thin.JdbcThinBatchSelfTest)
{noformat}
/**
* Check if we turned on streaming before {@link PreparedStatement#executeBatch()} call we get all results uploaded.
*
* @throws SQLException on error.
*/
public void testStreamingOnInMiddleOfBatch() throws SQLException {
fail("https://issues.apache.org/jira/browse/IGNITE-9947");
fillParamsWithPerson(pstmt, 1);
try (Statement statement = conn.createStatement()) {
statement.executeUpdate("SET STREAMING ON");
}
fillParamsWithPerson(pstmt, 2);
pstmt.addBatch();
pstmt.executeBatch();
try (Statement statement = conn.createStatement()) {
statement.executeUpdate("SET STREAMING OFF");
}
assertEquals("Uploaded rows count is not correct.", 2L, personsCount());
}
{noformat}
was (Author: pkouznet):
pasting here code of the test
{noformat}
/**
* Check if we turned on streaming before {@link PreparedStatement#executeBatch()} call we get all results uploaded.
*
* @throws SQLException on error.
*/
public void testStreamingOnInMiddleOfBatch() throws SQLException {
fail("https://issues.apache.org/jira/browse/IGNITE-9947");
fillParamsWithPerson(pstmt, 1);
try (Statement statement = conn.createStatement()) {
statement.executeUpdate("SET STREAMING ON");
}
fillParamsWithPerson(pstmt, 2);
pstmt.addBatch();
pstmt.executeBatch();
try (Statement statement = conn.createStatement()) {
statement.executeUpdate("SET STREAMING OFF");
}
assertEquals("Uploaded rows count is not correct.", 2L, personsCount());
}
{noformat}
> JDBC thin: Batch update is not performed if streaming state changed before executeBatch()
> -----------------------------------------------------------------------------------------
>
> Key: IGNITE-9947
> URL: https://issues.apache.org/jira/browse/IGNITE-9947
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.6
> Reporter: Pavel Kuznetsov
> Priority: Major
>
> Thin driver is affected.
> How to reproduce:
> 0) Create table
> 1) Create PreparedStatement "INSERT INTO TAB VALUES (?, ?)"
> 2) Set statement's args and call .addBatch()
> 3) Turn on streaming
> 4) call .executeBatch()
> 5) Turn off streaming to flush streamer.
> After that table should contain batched data, but it doesn't
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)