Skip to content
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
504 changes: 8 additions & 496 deletions parser/sql/dialect/mysql/src/main/antlr4/imports/mysql/BaseRule.g4

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ showCreateDatabase
;

showCreateEvent
: SHOW CREATE EVENT eventName
: SHOW CREATE EVENT eventName
;

showCreateFunction
Expand Down Expand Up @@ -359,7 +359,7 @@ cacheTableIndexList
;

partitionList
: partitionName (COMMA_ partitionName)* | ALL
: ALL | partitionName (COMMA_ partitionName)*
;

flush
Expand All @@ -368,7 +368,7 @@ flush

flushOption
: BINARY LOGS | ENGINE LOGS | ERROR LOGS | GENERAL LOGS | HOSTS | LOGS | PRIVILEGES | OPTIMIZER_COSTS
| RELAY LOGS (FOR CHANNEL channelName)? | SLOW LOGS | STATUS | USER_RESOURCES
| RELAY LOGS (FOR CHANNEL channelName)? | SLOW LOGS | STATUS | USER_RESOURCES
;

tablesOption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ assignment
;

setAssignmentsClause
: valueReference? SET assignment (COMMA_ assignment)*
: SET assignment (COMMA_ assignment)*
;

assignmentValues
Expand Down Expand Up @@ -202,7 +202,7 @@ loadStatement

loadDataStatement
: LOAD DATA
(LOW_PRIORITY | CONCURRENT)? LOCAL?
(LOW_PRIORITY | CONCURRENT)? LOCAL?
INFILE string_
(REPLACE | IGNORE)?
INTO TABLE tableName partitionNames?
Expand All @@ -216,7 +216,7 @@ loadDataStatement

loadXmlStatement
: LOAD XML
(LOW_PRIORITY | CONCURRENT)? LOCAL?
(LOW_PRIORITY | CONCURRENT)? LOCAL?
INFILE string_
(REPLACE | IGNORE)?
INTO TABLE tableName
Expand Down Expand Up @@ -288,8 +288,10 @@ tableReference
;

tableFactor
: tableName partitionNames? (AS? alias)? indexHintList?
: tableName
| tableName partitionNames? (AS? alias)? indexHintList?
| subquery AS? alias (LP_ columnNames RP_)?
| expr
| expr (AS? alias)?
| LATERAL subquery AS? alias (LP_ columnNames RP_)?
| LP_ tableReferences RP_
Expand Down Expand Up @@ -424,4 +426,4 @@ returningClause

targetList
: projection (COMMA_ projection)*
;
;
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,6 @@ public String visitInsertSelectClause(final InsertSelectClauseContext ctx) {

@Override
public String visitSetAssignmentsClause(final SetAssignmentsClauseContext ctx) {
if (null != ctx.valueReference()) {
visit(ctx.valueReference());
formatPrint(' ');
}
indentCount++;
visit(ctx.SET());
formatPrint(' ');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

import org.apache.shardingsphere.test.it.sql.parser.internal.InternalSQLParserITSettings;
import org.apache.shardingsphere.test.it.sql.parser.internal.InternalUnsupportedSQLParserIT;
import org.junit.jupiter.api.Disabled;

@Disabled
@InternalSQLParserITSettings("MySQL")
class InternalUnsupportedMySQLParserIT extends InternalUnsupportedSQLParserIT {
}
Loading