[MCOL-72] UPDATE reports incorrect number of Rows affected Created: 2016-05-22  Updated: 2016-05-31  Resolved: 2016-05-31

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: None
Fix Version/s: 1.0.0

Type: Bug Priority: Major
Reporter: Dipti Joshi (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MCOL-34 201 Version Buffer Test failed Closed
causes MCOL-36 297 Miscellaneous Tests: Failed Closed

 Description   

UPDATE statements is not reporting the number of rows affected correctly - even though values in the table are correctly updated.

Example test of UPDATE statement

create table t2(a int, b int)engine=infinidb;
Query OK, 0 rows affected (0.20 sec)
 
MariaDB [test]> insert into t2 values (1, 2);
Query OK, 1 row affected (0.07 sec)
 
MariaDB [test]> insert into t2 values (3, 4);
Query OK, 1 row affected (0.04 sec)
 
MariaDB [test]> select * from t2;
+------+------+                                    
| a    | b    |
+------+------+
|    1 |    2 |
|    3 |    4 |
+------+------+
2 rows in set (0.03 sec)
 
MariaDB [test]> update t2 set a = 10;
{color:red}Query OK, 0 rows affected (0.06 sec)
Rows matched: 0  Changed: 0  Warnings: 0{color}
 
MariaDB [test]> select * from t2;
+------+------+                                    
| a    | b    |
+------+------+
|   10 |    2 |
|   10 |    4 |
+------+------+
2 rows in set (0.01 sec)

As can be seen select after the UPDATE, the UPDATE statement did update the column a to 10 for 2 rows as expected, but the UPDATE reported "0 rows affected"



 Comments   
Comment by David Hall (Inactive) [ 2016-05-23 ]

For QA

There was a slight change in how rows affected was delivered to the client. InfiniDB has engine specific code there, and it didn't quite translate correctly.

git 6b14a4cd752590c37c5349c56efa4fcc820b32a7 MariaDB_InfiniDB

Changed sql_update.cc

Comment by Dipti Joshi (Inactive) [ 2016-05-24 ]

David.Hall hill tested this with last night's build, but it is still not working
Please make sure your changes got checked in and picked up for build for last night.

Comment by David Hall (Inactive) [ 2016-05-24 ]

Found another spot where the code was wrong. Fixed.

Comment by Dipti Joshi (Inactive) [ 2016-05-31 ]

dleeyh Have you verified this to be fixed ? If so - please close this item.

Comment by Daniel Lee (Inactive) [ 2016-05-31 ]

Build verified:

getsoftwareinfo Tue May 31 10:30:28 2016

Name : mariadb-columnstore-platform Relocations: (not relocatable)
Version : 1.0 Vendor: MariaDB Corporation Ab
Release : 0 Build Date: Fri 27 May 2016 04:07:53 PM EDT
Install Date: Mon 30 May 2016 11:32:15 AM EDT Build Host: srvbuilder

MariaDB [mytest]> update yabbaDabbaDoo set o_orderkey = -1;
Query OK, 28 rows affected (0.51 sec)
Rows matched: 0 Changed: 0 Warnings: 0

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