Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
5.5.2
-
Centos 8
-
2021-14, 2021-15, 2021-16, 2023-11
Description
Multi-tables UPDATE returns "Rows matched: 0" when expected 1.
SELECT ROW_COUNT(); is also 0, when 1 is expected.
The above happen only if engine=columnstore.
With InnoDB: "Rows matched: 1" and ROW_COUNT() is 1 as well
Reproduced with
plugin_name: COLUMNSTORE_EXTENTS
plugin_status: ACTIVE
plugin_type_version: 100510.0
plugin_library_version: 1.14
plugin_license: GPL
plugin_maturity: Stable
plugin_auth_version: 5.5.2
Repro:
-------
1) - preparation steps:
create database sam;
use sam;
drop table if exists mcs_1;
drop table if exists mcs_2;
create table mcs_1(a int, b int(11), c varchar(100) ) engine=columnstore;
create table mcs_2(a int, b int(11), c varchar(100) ) engine=columnstore;
insert into mcs_1(a,b, c) VAlues( 33 , 99 , 1 );
insert into mcs_1(a,b, c) VAlues( 33 , 99 , 2 );
insert into mcs_1(a,b, c) VAlues( 33 , 99 , 3 );
insert into mcs_2(a,b, c) VAlues( 33 , 11 , 1 );
insert into mcs_2(a,b, c) VAlues( 33 , 11 , 2 );
insert into mcs_2(a,b, c) VAlues( 33 , 11 , 3 );
2) - repro:
UPDATE mcs_1 A , mcs_2 B SET A.b = B.b WHERE A.c = B.c LIMIT 1;
Query OK, 0 rows affected (0.409 sec)
Rows matched: 0 Changed: 0 Warnings: 0 <========/ expected "Row matched: 1" in InnoDB
SELECT ROW_COUNT;
Attachments
Issue Links
- duplicates
-
MCOL-3445 update statement return wrong number of rows was updated
- Closed
- is blocked by
-
MDEV-28883 Re-design the upper level of handling UPDATE and DELETE statements
- Closed
-
MDEV-31725 Change visibility of some multi_update members to public
- Closed
- relates to
-
MCOL-5664 DELETE RETURNING doesn't return deleted rows
- Open
-
MDEV-32256 bulk multi-update / multi-delete API for smart engines
- Open