Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
engine: 1e56a0b557efb677d07533d05eb02ad723955317
server: 11c83d9ae9eb249d00589cc6ab71e7f4e67ffa27
buildNo: 7534
For UPDATE, the "Changed: " row count is always the same as "Rows matched". For InnoDB tables, "Changed: " reflects only the actual rows changed.
ColumnStore
MariaDB [mytest]> create table t2 (c1 int, c2 int) engine=columnstore;
|
Query OK, 0 rows affected (0.125 sec)
|
|
MariaDB [mytest]> insert into t2 values (1,1),(1,1),(1,1);
|
Query OK, 3 rows affected (0.106 sec)
|
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [mytest]> select * from t2;
|
+------+------+
|
| c1 | c2 |
|
+------+------+
|
| 1 | 1 |
|
| 1 | 1 |
|
| 1 | 1 |
|
+------+------+
|
3 rows in set (0.050 sec)
|
|
MariaDB [mytest]> update t2 set c1=1;
|
Query OK, 3 rows affected (0.090 sec)
|
Rows matched: 3 Changed: 3 Warnings: 0
|
|
MariaDB [mytest]> insert t2 values (2,2);
|
Query OK, 1 row affected (0.092 sec)
|
|
MariaDB [mytest]> select * from t2;
|
+------+------+
|
| c1 | c2 |
|
+------+------+
|
| 1 | 1 |
|
| 1 | 1 |
|
| 1 | 1 |
|
| 2 | 2 |
|
+------+------+
|
4 rows in set (0.014 sec)
|
|
MariaDB [mytest]> update t2 set c1=2;
|
Query OK, 4 rows affected (0.098 sec)
|
Rows matched: 4 Changed: 4 Warnings: 0
|
|
|
|
InnoDB
|
|
MariaDB [mytest]> create table t1 (c1 int, c2 int) engine=innodb;
Query OK, 0 rows affected (0.013 sec)
MariaDB [mytest]> insert into t1 values (1,1),(1,1),(1,1);
Query OK, 3 rows affected (0.003 sec)
Records: 3 Duplicates: 0 Warnings: 0
MariaDB [mytest]> select * from t1;
----------+
c1 | c2 |
----------+
1 | 1 |
1 | 1 |
1 | 1 |
----------+
3 rows in set (0.001 sec)
MariaDB [mytest]> update t1 set c1=1;
Query OK, 0 rows affected (0.001 sec)
Rows matched: 3 Changed: 0 Warnings: 0
MariaDB [mytest]> insert t1 values (2,2);
Query OK, 1 row affected (0.003 sec)
MariaDB [mytest]> select * from t1;
----------+
c1 | c2 |
----------+
1 | 1 |
1 | 1 |
1 | 1 |
2 | 2 |
----------+
4 rows in set (0.001 sec)
MariaDB [mytest]> update t1 set c1=2;
Query OK, 3 rows affected (0.002 sec)
Rows matched: 4 Changed: 3 Warnings: 0
|