Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15577

CONNECT engine JDBC remote index prevents UPDATE

Details

    Description

      If I declare a CONNECT table (test case is using MS SQL Server) I can easily issue simple UPDATE statements like:

      UPDATE MyConnectTable SET name = 'bob' WHERE id = 23
      

      The above works great. However, if I add a remote index to the table as follows (or during the CREATE TABLE statement) the UPDATE will fail:

      ALTER TABLE MyConnectTable ADD INDEX (id)
      

      For some reason it appears that CONNECT won't let me issue an UPDATE if I declare the primary key column of the remote table as indexed.

      Attachments

        Activity

          rdyas Robert Dyas added a comment -

          Olivier - am I missing something, or is this a bug?

          rdyas Robert Dyas added a comment - Olivier - am I missing something, or is this a bug?

          Yes, it is a trivial regression bug not met until you did because creating an index on a JDBC table is almost never useful. I don't know what you mean by "CONNECT won't let me issue an UPDATE" but for me it just made the server crash!
          The rare cases creating a remote index make sens is when a big table is joined to another or queried with an ORDER BY clause, which is never the case for queries other than SELECT ones.
          Until I publish the fix, the easy and obvious turnaround is: don't index JDBC tables.

          bertrandop Olivier Bertrand added a comment - Yes, it is a trivial regression bug not met until you did because creating an index on a JDBC table is almost never useful. I don't know what you mean by "CONNECT won't let me issue an UPDATE" but for me it just made the server crash! The rare cases creating a remote index make sens is when a big table is joined to another or queried with an ORDER BY clause, which is never the case for queries other than SELECT ones. Until I publish the fix, the easy and obvious turnaround is: don't index JDBC tables .
          rdyas Robert Dyas added a comment -

          I'm not seeing this listed in the 10.2.14 change log.
          https://mariadb.com/kb/en/library/mariadb-10214-changelog/

          rdyas Robert Dyas added a comment - I'm not seeing this listed in the 10.2.14 change log. https://mariadb.com/kb/en/library/mariadb-10214-changelog/

          Of course, I just pushed the fix today.

          bertrandop Olivier Bertrand added a comment - Of course, I just pushed the fix today.

          People

            bertrandop Olivier Bertrand
            rdyas Robert Dyas
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.