Skip to content

Commit

Permalink
CALL to be readonly=true (#3302)
Browse files Browse the repository at this point in the history
* CALL to be readonly=true

* Remove Test for readonly
  • Loading branch information
OTooleMichael committed Apr 17, 2024
1 parent 149a4f7 commit 5e84178
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion src/include/parser/visitor/statement_read_write_analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class StatementReadWriteAnalyzer final : public StatementVisitor {
inline void visitDropTable(const Statement& /*statement*/) override { readOnly = false; }
inline void visitAlter(const Statement& /*statement*/) override { readOnly = false; }
inline void visitCopyFrom(const Statement& /*statement*/) override { readOnly = false; }
inline void visitStandaloneCall(const Statement& /*statement*/) override { readOnly = false; }
inline void visitStandaloneCall(const Statement& /*statement*/) override { readOnly = true; }
inline void visitCreateMacro(const Statement& /*statement*/) override { readOnly = false; }
inline void visitCommentOn(const Statement& /*statement*/) override { readOnly = false; }

Expand Down
7 changes: 0 additions & 7 deletions test/test_files/tinysnb/call/call.test
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ True
---- 1
False

-LOG CallTransaction
-STATEMENT BEGIN TRANSACTION READ ONLY;
---- ok
-STATEMENT CALL var_length_extend_max_depth=10
---- error
Can not execute a write query inside a read-only transaction.

-LOG NodeTableInfo
-STATEMENT CALL table_info('person') RETURN *
---- 16
Expand Down

0 comments on commit 5e84178

Please sign in to comment.