[MCOL-4536] update returns wrong number of rows updated Created: 2021-02-09  Updated: 2023-10-31  Resolved: 2023-10-31

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 5.5.1, 6.1.1
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Allen Lee (Inactive) Assignee: Kirill Perov
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Relates
relates to MCOL-1156 Incorrect 0 row(s) affected on delete Closed
relates to MCOL-1527 Incorrect 0 row(s) affected on delete... Closed
relates to MCOL-1782 UPDATE and DELETE reported incorrect ... Closed
relates to MCOL-2239 Rows matched: and Changed: are 0 even... Closed

 Description   

Customer reported that after adding a new `null` column in columnstore and updading all 705 million rows and the message was "Rows matched: 0 Changed: 0 Warnings: 0" even though update was just fine.

MariaDB [dwhs]> select count(*) from sh_fact_impression_denorm;
+-----------+
| count(*) |
+-----------+
| 704371829 |
+-----------+
1 row in set (0.508 sec)
 
MariaDB [dwhs]> alter table sh_fact_impression_denorm add dms_publisher_key int;
Query OK, 0 rows affected (14.655 sec)
Records: 0 Duplicates: 0 Warnings: 0
 
MariaDB [dwhs]> update sh_fact_impression_denorm c, publisher1 s
-> set c.dms_publisher_key = s.dms_publisher_key
-> where c.affiliate_key = s.affiliate_key;
Query OK, 0 rows affected (12 min 57.315 sec)
Rows matched: 0 Changed: 0 Warnings: 0
 
MariaDB [dwhs]> select count(*) from sh_fact_impression_denorm where dms_publisher_key is not null;
+-----------+
| count(*) |
+-----------+
| 615313416 |
+-----------+
1 row in set (0.537 sec)
 
MariaDB [dwhs]> select count(*) from sh_fact_impression_denorm c, publisher1 s where c.affiliate_key = s.affiliate_key;
+-----------+
| count(*) |
+-----------+
| 701918781 |
+-----------+
1 row in set (1.535 sec)

So, the question is CS does not update null with a null once it determines the old value is also null?



 Comments   
Comment by Leonid Fedorov [ 2023-10-27 ]

kirill.perov@mariadb.com Please check is it reproducible

Comment by Kirill Perov [ 2023-10-31 ]

leonid.fedorov This ticket is a duplicate for https://jira.mariadb.org/browse/MCOL-4740 which is in work now.
So I close current ticket.

Comment by Kirill Perov [ 2023-10-31 ]

https://jira.mariadb.org/browse/MCOL-4740

Generated at Thu Feb 08 02:51:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.