lowka commented on code in PR #2683:
URL: https://github.com/apache/ignite-3/pull/2683#discussion_r1358315667
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -559,11 +559,24 @@ public MetricManager metricManager() {
private static void validateParsedStatement(
QueryContext context,
ParsedResult parsedResult,
+ @Nullable InternalTransaction outerTx,
Object[] params
) {
Set<SqlQueryType> allowedTypes = context.allowedQueryTypes();
SqlQueryType queryType = parsedResult.queryType();
+ if (parsedResult.queryType() == SqlQueryType.TX_CONTROL) {
+ if (outerTx != null) {
Review Comment:
>Checking for an explicit transaction seems useless, because the user is
currently prohibited from executing TX_CONTROL in any way
Control statement check can be moved to the caller method because
`validateParsedStatement` is going to be used by execute script method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]