Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CALL to be readonly=true #3302

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading