While testing Amazon Q with the SQLcl MCP server, I encountered the following issue:
-
Insert:
Amazon Q used run-sql
to insert a record for a person named Wilson into the PERSONS
table.
-
First SAVEPOINT attempt:
It then used run-sql
to create a savepoint named sp
1, but this failed with
ORA-17068: Invalid arguments in call
The command executed was:
SAVEPOINT /* LLM in use is claude-3-5-sonnet-20241022 */ sp1
-
Second SAVEPOINT attempt:
Next, it used run-sqlcl
to create a savepoint named sp1
.
This worked, and the command sent was:
SAVEPOINT sp1
-
Subsequent changes:
Amazon Q then used run-sql
for further operations — updating an existing record and inserting another record into the PERSONS
table (let's say Smith).
-
First rollback attempt:
It then used run-sqlcl
to roll back to sp1
, but this failed with
ORA-01086: savepoint 'SP1' never established in this session or is invalid
The command sent was:
ROLLBACK TO sp1
-
Second rollback attempt:
After that, it used run-sql
to roll back to sp1
. This worked without any ORA error.
The command sent was:
ROLLBACK /* LLM in use is claude-3-5-sonnet-20241022 */ TO sp1
-
Result:
Expected results: undo of PERSONS update, undo of PERSONS insert of “Smith”
Unexpected: However, after this rollback, the Wilson row was gone.
Did anyone faced this kind of inconsistency?