@@ -298,14 +298,18 @@ alterListItem:
298
298
| OPEN_PAR_SYMBOL tableElementList CLOSE_PAR_SYMBOL
299
299
)
300
300
| ADD_SYMBOL tableConstraintDef
301
- | CHANGE_SYMBOL COLUMN_SYMBOL ? columnInternalRef identifier fieldDefinition place?
302
- | MODIFY_SYMBOL COLUMN_SYMBOL ? columnInternalRef fieldDefinition place?
301
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
302
+ | CHANGE_SYMBOL COLUMN_SYMBOL ? fieldIdentifier identifier fieldDefinition place?
303
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
304
+ | MODIFY_SYMBOL COLUMN_SYMBOL ? fieldIdentifier fieldDefinition place?
303
305
| DROP_SYMBOL (
304
- COLUMN_SYMBOL ? columnInternalRef restrict?
306
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
307
+ COLUMN_SYMBOL ? fieldIdentifier restrict?
305
308
| FOREIGN_SYMBOL KEY_SYMBOL (
309
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
306
310
// This part is no longer optional starting with 5.7.
307
- {serverVersion >= 50700 } ? columnInternalRef
308
- | {serverVersion < 50700 } ? columnInternalRef ?
311
+ {serverVersion >= 50700 } ? fieldIdentifier
312
+ | {serverVersion < 50700 } ? fieldIdentifier ?
309
313
)
310
314
| PRIMARY_SYMBOL KEY_SYMBOL
311
315
| keyOrIndex indexRef
@@ -314,7 +318,8 @@ alterListItem:
314
318
)
315
319
| DISABLE_SYMBOL KEYS_SYMBOL
316
320
| ENABLE_SYMBOL KEYS_SYMBOL
317
- | ALTER_SYMBOL COLUMN_SYMBOL ? columnInternalRef (
321
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
322
+ | ALTER_SYMBOL COLUMN_SYMBOL ? fieldIdentifier (
318
323
SET_SYMBOL DEFAULT_SYMBOL (
319
324
{serverVersion >= 80014 } ? exprWithParentheses
320
325
| signedLiteral
@@ -325,7 +330,8 @@ alterListItem:
325
330
| {serverVersion >= 80000 } ? ALTER_SYMBOL INDEX_SYMBOL indexRef visibility
326
331
| {serverVersion >= 80017 } ? ALTER_SYMBOL CHECK_SYMBOL identifier constraintEnforcement
327
332
| {serverVersion >= 80019 } ? ALTER_SYMBOL CONSTRAINT_SYMBOL identifier constraintEnforcement
328
- | {serverVersion >= 80000 } ? RENAME_SYMBOL COLUMN_SYMBOL columnInternalRef TO_SYMBOL identifier
333
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
334
+ | {serverVersion >= 80000 } ? RENAME_SYMBOL COLUMN_SYMBOL fieldIdentifier TO_SYMBOL identifier
329
335
| RENAME_SYMBOL (TO_SYMBOL | AS_SYMBOL )? tableName
330
336
| {serverVersion >= 50700 } ? RENAME_SYMBOL keyOrIndex indexRef TO_SYMBOL indexName
331
337
| CONVERT_SYMBOL TO_SYMBOL charset (
@@ -353,11 +359,11 @@ restrict:
353
359
354
360
/*
355
361
* @CHANGED:
356
- * Fixed ALTER TABLE with ORDER to use 'qualifiedIdentifier ' instead of just 'identifier'.
362
+ * Fixed ALTER TABLE with ORDER to use 'simpleIdentifier ' instead of just 'identifier'.
357
363
* This is necessary to support "t.id" in a query like "ALTER TABLE t ORDER BY t.id".
358
364
*/
359
365
alterOrderList :
360
- qualifiedIdentifier direction? (COMMA_SYMBOL qualifiedIdentifier direction?)*
366
+ simpleIdentifier direction? (COMMA_SYMBOL simpleIdentifier direction?)*
361
367
;
362
368
363
369
alterAlgorithmOption :
@@ -1711,7 +1717,7 @@ xid:
1711
1717
/*
1712
1718
* @CHANGED:
1713
1719
* Fixed "replicationStatement" to correctly support the "RESET PERSIST" statement.
1714
- * The "ifExists" clause wasn't optional, and "identifier" was used instead of "qualifiedIdentifier ".
1720
+ * The "ifExists" clause wasn't optional, and "identifier" was used instead of "internalVariableName ".
1715
1721
*/
1716
1722
replicationStatement :
1717
1723
PURGE_SYMBOL (BINARY_SYMBOL | MASTER_SYMBOL ) LOGS_SYMBOL (
@@ -3561,7 +3567,8 @@ getDiagnostics:
3561
3567
signalAllowedExpr :
3562
3568
literal
3563
3569
| variable
3564
- | qualifiedIdentifier
3570
+ /* @CHANGED: Changed "qualifiedIdentifier" to "simpleIdentifier" as per sql_yacc.yy. */
3571
+ | simpleIdentifier
3565
3572
;
3566
3573
3567
3574
statementInformationItem :
@@ -3627,7 +3634,8 @@ schedule:
3627
3634
;
3628
3635
3629
3636
columnDefinition :
3630
- columnName fieldDefinition checkOrReferences?
3637
+ /* @CHANGED: Replaced "columnInternalRef" with "fieldIdentifier" as per sql_yacc.yy. */
3638
+ fieldIdentifier fieldDefinition checkOrReferences?
3631
3639
;
3632
3640
3633
3641
checkOrReferences :
@@ -4265,16 +4273,19 @@ usePartition:
4265
4273
// Sometimes we need additional reference rules with different form, depending on the place such a reference is used.
4266
4274
4267
4275
// A name for a field (column/index). Can be qualified with the current schema + table (although it's not a reference).
4276
+ /* @CHANGED: Moved the conditional from "columnName" to "fieldIdentifier" as per sql_yacc.yy. */
4268
4277
fieldIdentifier :
4269
- dotIdentifier
4270
- | qualifiedIdentifier dotIdentifier?
4278
+ // With server 8.0 this became a simple identifier.
4279
+ {serverVersion < 80000 } ? (dotIdentifier | qualifiedIdentifier dotIdentifier?)
4280
+ | {serverVersion >= 80000 } ? identifier
4271
4281
;
4272
4282
4273
- columnName :
4283
+ /* @CHANGED: Replaced more universally with "fieldIdentifier" as per sql_yacc.yy. */
4284
+ /* columnName:
4274
4285
// With server 8.0 this became a simple identifier.
4275
4286
{serverVersion >= 80000}? identifier
4276
4287
| {serverVersion < 80000}? fieldIdentifier
4277
- ;
4288
+ ;*/
4278
4289
4279
4290
// A reference to a column of the object we are working on.
4280
4291
columnInternalRef :
@@ -4340,12 +4351,14 @@ triggerRef:
4340
4351
4341
4352
viewName :
4342
4353
qualifiedIdentifier
4343
- | dotIdentifier
4354
+ /* @CHANGED: Added missing version constraint. */
4355
+ | {serverVersion < 80000 } ? dotIdentifier
4344
4356
;
4345
4357
4346
4358
viewRef :
4347
4359
qualifiedIdentifier
4348
- | dotIdentifier
4360
+ /* @CHANGED: Added missing version constraint. */
4361
+ | {serverVersion < 80000 } ? dotIdentifier
4349
4362
;
4350
4363
4351
4364
tablespaceName :
@@ -4390,7 +4403,8 @@ engineRef:
4390
4403
4391
4404
tableName :
4392
4405
qualifiedIdentifier
4393
- | dotIdentifier
4406
+ /* @CHANGED: Added missing version constraint. */
4407
+ | {serverVersion < 80000 } ? dotIdentifier
4394
4408
;
4395
4409
4396
4410
filterTableRef : // Always qualified.
@@ -4403,7 +4417,8 @@ tableRefWithWildcard:
4403
4417
4404
4418
tableRef :
4405
4419
qualifiedIdentifier
4406
- | dotIdentifier
4420
+ /* @CHANGED: Added missing version constraint. */
4421
+ | {serverVersion < 80000 } ? dotIdentifier
4407
4422
;
4408
4423
4409
4424
tableRefList :
0 commit comments