-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
area/ysqlYugabyte SQL (YSQL)Yugabyte SQL (YSQL)kind/bugThis issue is a bugThis issue is a bugpriority/mediumMedium priority issueMedium priority issue
Description
Jira Link: DB-14503
Description
Test Case:
create extension if not exists pgcrypto;
drop table if exists funds;
-- creating a table with duplicate values for k.
create table funds(k integer, u uuid default gen_random_uuid(), v integer);
insert into funds(k, v) values (1, 1);
insert into funds(k, v) values (1, 1);
insert into funds(k, v) values (1, 1);
-- deduplicate rows with same k. Keep only the one with largest value of u.
delete from funds f1
using funds f2
where f1.u < f2.u and f1.k = f2.k;
select * from funds;
We would expect the DELETE to delete two rows, but it seems to be reporting an incorrect number of rows (3).
delete from funds f1
using funds f2
where f1.u < f2.u and f1.k = f2.k;
DELETE 3
It seems to be just a reporting mistake. Because table does seem to have 1 remaining row left and only 2 rows seem to have gotten deleted.
select * from funds;
k | u | v
---+--------------------------------------+---
1 | bb7e5ed3-2cf8-45be-8c3e-e568c7e8b4ba | 1
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.
Metadata
Metadata
Assignees
Labels
area/ysqlYugabyte SQL (YSQL)Yugabyte SQL (YSQL)kind/bugThis issue is a bugThis issue is a bugpriority/mediumMedium priority issueMedium priority issue