You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jon Haddad (Jira)" <ji...@apache.org> on 2025/05/06 23:48:00 UTC
[jira] [Created] (CASSANDRA-20632) Parser failure when trying to update or delete a row in a transaction
Jon Haddad created CASSANDRA-20632:
--------------------------------------
Summary: Parser failure when trying to update or delete a row in a transaction
Key: CASSANDRA-20632
URL: https://issues.apache.org/jira/browse/CASSANDRA-20632
Project: Apache Cassandra
Issue Type: Bug
Reporter: Jon Haddad
It looks like we don't correctly parse table.field in UPDATE and DELETE of transactions.
https://the-asf.slack.com/archives/C0459N9R5C6/p1745537893201929
{noformat}
create KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
USE demo;
CREATE TABLE base (
name text primary key,
city text
) with transactional_mode = 'full';
CREATE TABLE mv (
city text,
name text,
primary key (city, name)
) with transactional_mode = 'full';
BEGIN TRANSACTION
INSERT INTO base (name, city) VALUES ('jon', 'los angeles');
INSERT INTO mv (city, name) VALUES ('los angeles', 'jon');
COMMIT TRANSACTION;
BEGIN TRANSACTION
LET old = (SELECT city from base WHERE name = 'jon');
select old.city;
UPDATE base SET city = 'san diego' WHERE name = 'jon';
DELETE FROM mv WHERE city = old.city AND name = 'jon';
INSERT INTO mv WHERE city = 'san diego' AND name = 'jon';
COMMIT TRANSACTION;
{noformat}
Fails with:
{noformat}
SyntaxException: line 5:41 no viable alternative at input 'AND' (...FROM mv WHERE city = [old].city...)
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org