Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-635

first REPLACE INTO command from a batch is ignored

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 2.2.6
    • N/A
    • batch
    • None

    Description

      When I issue a batch REPLACE INTO statement (i.e. with PreparedStatement.addBatch() / executeBatch()) the very first set of parameters is ignored. This happens regardless of whether it would result in inserting or updating.

      E.g. if I prepare `replace into test (id, active) values (?, ?)` with parameter sets (1, true), (2, true) and (3, true), the first one (1, true) is ignored:

      • If there is a row with id=1, its `active` column is not updated;
      • If there is no such row, it is not inserted;
      • For all subsequent parameter sets it works as expected;
      • It is really about the first parameter set, not e.g. the one with lowest `id`; if I reorder them, the one becoming first after reordering is ignored.

      Note that other batch commands (INSERT INTO, UPDATE etc.) or REPLACE INTO executed as non-batch statement work as expected.

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              doublep Paul Pogonyshev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.