Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1782

UPDATE and DELETE reported incorrect affected row count

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.2.1
    • DMLProc
    • None
    • 2018-20

    Description

      Build tested:

      /root/columnstore/mariadb-columnstore-server
      commit 6b44f0d9c453ede53024f525b7ddf32b5323171b
      Merge: 7db44a7 853a0f7
      Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
      Date: Thu Sep 27 20:37:03 2018 +0100

      Merge pull request #134 from mariadb-corporation/versionCmakeFix

      port changes for mysql_version cmake to fix columnstore RPM packaging

      /root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
      commit 6ee12248b8764569ca7e965b5cc35746b25d816c
      Merge: 068b168 47fbf62
      Author: Roman Nozdrin <drrtuy@gmail.com>
      Date: Mon Oct 8 11:22:42 2018 +0300

      Merge pull request #586 from mariadb-corporation/MCOL-1775

      MCOL-1775 Fix addtime/subtime for WHERE

      Both UPDATE and DELETE reports one less than actual affected rows.
      The row count is correct when row count is 0.

      MariaDB [mytest]> create table t2 (c1 int,c2 varchar(20)) engine=columnstore;
      Query OK, 0 rows affected (0.087 sec)

      MariaDB [mytest]> insert t2 values (1,'a');
      Query OK, 1 row affected (0.107 sec)

      MariaDB [mytest]> insert t2 values (2,'b'), (3,'c'), (4, 'd');
      Query OK, 3 rows affected (0.169 sec)
      Records: 3 Duplicates: 0 Warnings: 0

      MariaDB [mytest]> select * from t2;
      ----------+

      c1 c2

      ----------+

      1 a
      2 b
      3 c
      4 d

      ----------+
      4 rows in set (0.086 sec)

      MariaDB [mytest]> update t2 set c1 = -10 where c1 < 3;
      Query OK, 1 row affected (0.106 sec)
      Rows matched: 0 Changed: 0 Warnings: 0

      MariaDB [mytest]> select * from t2;
      ----------+

      c1 c2

      ----------+

      -10 a
      -10 b
      3 c
      4 d

      ----------+
      4 rows in set (0.022 sec)

      MariaDB [mytest]> delete from t2 where c1 < 0;
      Query OK, 1 row affected (0.074 sec)

      MariaDB [mytest]> select * from t2;
      ----------+

      c1 c2

      ----------+

      3 c
      4 d

      ----------+
      2 rows in set (0.027 sec)

      MariaDB [mytest]> delete from t2 where c1 < 0;
      Query OK (0.194 sec)

      MariaDB [mytest]> update t2 set c1 = -10 where c1 < 3;
      Query OK (0.116 sec)
      Rows matched: 0 Changed: 0 Warnings: 0

      MariaDB [mytest]> update t2 set c1 = -10 where c1 = 3;
      Query OK, 0 rows affected (0.131 sec)
      Rows matched: 0 Changed: 0 Warnings: 0

      MariaDB [mytest]> select * from t2;
      ----------+

      c1 c2

      ----------+

      -10 c
      4 d

      ----------+
      2 rows in set (0.025 sec)

      MariaDB [mytest]> delete from t2 where c1 =4;
      Query OK, 0 rows affected (0.114 sec)

      MariaDB [mytest]> select * from t2;
      ----------+

      c1 c2

      ----------+

      -10 c

      ----------+
      1 row in set (0.011 sec)

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              dleeyh Daniel Lee (Inactive)
              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.