[MDEV-20199] RocksDB ROW_COUNT() after UPDATE always 1, even if the data has not changed. Created: 2019-07-29  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - RocksDB
Affects Version/s: 10.3.16, 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Илья Индиго Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: rocksdb
Environment:

openSUSE Tumbleweed x86_64



 Description   

In MariaDB 10.3.16 on ROCKSDB engine ROW_COUNT() return always 1 (not 0), after UPDETE, when data not changed.
In InnoDB always returns 0 if the data has not changed.

DROP TABLE IF EXISTS `test`;
 
CREATE TABLE `test`
(
	`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
	`status` TINYINT UNSIGNED NOT NULL,
	KEY(`status`)
)
ENGINE=ROCKSDB CHARACTER SET utf8 COLLATE utf8_general_ci;
 
INSERT INTO `test`(`id`,`status`) VALUES (1,1),(2,2),(3,3);
 
UPDATE `test` SET `status`=2 WHERE `id`=2;
 
SELECT ROW_COUNT();



 Comments   
Comment by Alice Sherepa [ 2019-07-29 ]

Thanks for the report! Repeatable on 10.2-10.4:

--source include/have_rocksdb.inc
create table t1 ( id int , status int) engine=rocksdb;
insert into t1(id,status) values (1,1),(2,2),(2,2),(2,2);
update t1 set status=2 where id=2;
select row_count();
 
alter table t1 engine=myisam;
update t1 set status=2 where id=2;
select row_count();
drop table t1;

update t1 set status=2 where id=2;
select row_count();
row_count()
3
alter table t1 engine=myisam;
update t1 set status=2 where id=2;
select row_count();
row_count()
0

Comment by Илья Индиго [ 2019-12-16 ]

Hello!
If there is any progress in this bug?
Can we expect its elimination in 10.5?
Is this the original problem of the MyRocks engine itself, or is it a flaw in MariaDB?

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