phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Shen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4876) Delete returns incorrect number of rows affected in some case
Date Wed, 20 Feb 2019 17:30:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-4876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16773224#comment-16773224
] 

William Shen commented on PHOENIX-4876:
---------------------------------------

[~yanxinyi] - no we have not. Are you not able to reproduce this in 4.14?

> Delete returns incorrect number of rows affected in some case
> -------------------------------------------------------------
>
>                 Key: PHOENIX-4876
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4876
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.0
>            Reporter: William Shen
>            Priority: Minor
>
> Running Phoenix 4.13 and encountering deletion of a non-existing row returning "1 row
affected" instead of "No rows affected".
> Here is a simplified reproducible case:
> {code:java}
> > CREATE TABLE IF NOT EXISTS TEST (A BIGINT PRIMARY KEY, B BIGINT);
> No rows affected (2.524 seconds)
> > DELETE FROM TEST WHERE A = 0;
> 1 row affected (0.107 seconds)
> > DELETE FROM TEST WHERE B = 0;
> No rows affected (0.007 seconds)
> > DELETE FROM TEST WHERE A = 0 AND B = 0;
> No rows affected (0.007 seconds)
> > DELETE FROM TEST WHERE A = 0;
> 1 row affected (0.007 seconds)
> > SELECT * FROM TEST;
> +----+----+
> | A | B |
> +----+----+
> +----+----+
> No rows selected (0.023 seconds)
> > SELECT COUNT(*) FROM TEST;
> +-----------+
> | COUNT(1) |
> +-----------+
> | 0         |
> +-----------+
> 1 row selected (0.014 seconds){code}
> Expected: 
> {code:java}
> > DELETE FROM TEST WHERE A = 0;
> No rows affected{code}
> Actual:
> {code:java}
> > DELETE FROM TEST WHERE A = 0;
> 1 row affected{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message