359debdae6
[parser] Remove unnecessary .(string) casting and $$ = $1 from parser.y ( #825 )
...
* parser: use <ident> rather than <item> for string-only rules
This get rid of many .(string) casts.
* parser: get rid of unnecessary $$ = $1.
2021-10-09 14:53:23 +08:00
3a347a826b
[parser] parser: introduce a new privilege for the set config statement ( #835 )
2021-10-09 14:53:23 +08:00
cda62de3ce
[parser] types: Don't check Flen when Tp is double or float in FieldType.Equal. ( #832 )
...
* float flen free.
* Fix bug.
2021-10-09 14:53:23 +08:00
e228ea6519
[parser] parser: change CONFIG to an unreserved keyword
2021-10-09 14:53:23 +08:00
6c03d809f2
[parser] Update BACKUP/RESTORE syntax to match the RFC; Added IMPORT statement ( #824 )
...
* *: remove the s3/gcs-specific options
* *: replace the INCREMENTAL UNTIL syntax with LAST_BACKUP = ...
* *: use SHOW BACKUPS rather than SHOW BACKUP
* *: added IMPORT statements and options
2021-10-09 14:53:23 +08:00
96e2a03403
[parser] parser: rename auto rand table option ( #828 )
2021-10-09 14:53:23 +08:00
97e61aea57
[parser] parser: add auto_random table option support ( #823 )
...
* add auto_random table option support
* .
* .
2021-10-09 14:53:23 +08:00
34c18a6ee0
[parser] add some tests for ignore_plan_cache, and correct a bug in parser.y ( #822 )
2021-10-09 14:53:23 +08:00
7f7e9bf8df
[parser] parser: support using dash('-') in config item names ( #821 )
2021-10-09 14:53:23 +08:00
29c3fc2591
[parser] parser: add order by clause in group_concat ( #813 )
2021-10-09 14:53:23 +08:00
f1d610f394
[parser] fix type conversion panic from NUM to int64 ( #809 )
...
* fix conversion panic from NUM to int64
* catch teardown error
* polish int64num description
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
928eb78a0e
[parser] add func: mvcc_get_by_hex ( #805 )
...
Signed-off-by: Qiannan Lyu <lvqiannan@gmail.com >
Co-authored-by: Lingyu Song <songlingyu@pingcap.com >
2021-10-09 14:53:23 +08:00
2131dae117
[parser] terror: print the stack in terror.Log() ( #803 )
...
* terror: print the stack in terror.Log()
In TiDB, terror.Log(err) is called when we expect the error to be nil
and get rid of the annoying golint check.
Sometimes the error is not nil as expected, so it's better to print the
stack to find why
* go fmt
* address comment
* address comment
2021-10-09 14:53:23 +08:00
22fc63f328
[parser] parser: add autoid cache option ( #765 )
2021-10-09 14:53:23 +08:00
8598cb86e9
[parser] parser: remove with/without validation unsupported warning in parser ( #795 )
2021-10-09 14:53:23 +08:00
511776d406
[parser] parser: remove sequence order option support ( #796 )
2021-10-09 14:53:23 +08:00
096d4fad21
[parser] opcode,ast: fix invalid restore of '4 DIV 2' (became '4DIV2') ( #792 )
2021-10-09 14:53:23 +08:00
2a7d4fa913
[parser] parser: sequence order option parse warning ( #791 )
2021-10-09 14:53:23 +08:00
02e3e4fb03
[parser] fix / in normalize ( #790 )
2021-10-09 14:53:23 +08:00
6d587c8837
[parser] support 'binary' collation in table option ( #789 )
...
Co-authored-by: Arenatlx <ailinsilence4@gmail.com >
2021-10-09 14:53:23 +08:00
6cd14a0c30
[parser] lexer: replace version comments with feature-ids mechanism ( #777 )
...
* lexer: replace version comments with feature-ids mechanism
* tests: retain the original version digit test
* fix scanVersionDigits
* add SpecialCommentsController to decide what comments can be parsed
* only ignore comments with unsupported feature-id
* remove debug log
2021-10-09 14:53:23 +08:00
c6b2ea9598
[parser] parser: add syntax ADMIN RELOAD BINDINGS ( #787 )
2021-10-09 14:53:23 +08:00
79eff12f73
[parser] add new action ActionDropColumns ( #786 )
2021-10-09 14:53:23 +08:00
3b3575a14e
[parser] Change hint "enable_plan_cache(bool)" to "ignore_plan_cache()" ( #785 )
2021-10-09 14:53:23 +08:00
d7b93edc66
[parser] parser: recognize BACKUP SNAPSHOT = TSO in additional to 'TIMESTAMP' ( #782 )
2021-10-09 14:53:23 +08:00
e7a686be57
[parser] Add new ddl action ActionAddColumns ( #784 )
2021-10-09 14:53:23 +08:00
ea8d816ea7
[parser] rename sm_join to merge_join, letter case correction ( #775 )
...
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
af3a3c6266
[parser] parser: support set config ... and show config ... syntaxes ( #770 )
...
* support 'set config ...' and 'show config ...' syntaxes
* address comments
* address comment
* address comment
2021-10-09 14:53:23 +08:00
58f9e70de7
[parser] *: support parsing BACKUP and RESTORE statements ( #746 )
...
* *: support parsing BACKUP and RESTORE statements
* parser: add SNAPSHOT = 'str' option to BACKUP statement
2021-10-09 14:53:23 +08:00
486bd152dc
[parser] model: add invisible option for IndexInfo ( #771 )
...
* model: add invisible option for IndexInfo
* fmt
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
1471d3cc89
[parser] parser: add USE_CASCADES hint syntax ( #769 )
...
Signed-off-by: gauss <gauss1314@gmail.com >
2021-10-09 14:53:23 +08:00
37c036ca8b
[parser] parser: support group_concat as window function in parser ( #766 )
...
* windown function add
* fix
* make test
* window function support for group_concat
* back mod fiel
2021-10-09 14:53:23 +08:00
b01eedeba1
[parser] mysql: clean up unused TiDB errcode ( #764 )
2021-10-09 14:53:23 +08:00
8c1da586c4
[parser] README.md, docs: add an introduction to parser ( #758 )
...
refactor and make it more formal
* README.md: fix typo
* README.md: move acknowledgments to the end and add license
Co-authored-by: Zhang Jian <zjsariel@gmail.com >
2021-10-09 14:53:23 +08:00
12683245ad
[parser] parser: remove useless IndexToProto,ColumnToProto,ColumnsToProto function ( #762 )
2021-10-09 14:53:23 +08:00
b255e058e5
[parser] *: set charset and collate for string literals correctly ( #761 )
...
* done
* address comment
* fix
* revert
2021-10-09 14:53:23 +08:00
2f1915d785
[parser] parser: set UnionStmt and ShowStmt as readonly ( #755 )
...
* add UnionStmt and ShowStmt as readonly
* fix UnionStmt
2021-10-09 14:53:23 +08:00
1f323f3aa7
[parser] *: Add format_bytes and format_nano_time function ( #754 )
...
* add Performance Schema Functions format_bytes and format_nano_time
Signed-off-by: gauss <gauss1314@gmail.com >
* remove a test case
Signed-off-by: gauss <gauss1314@gmail.com >
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
e437ae67a8
[parser] parser, ast: accept syntax about chain, release when commit or rollback ( #751 )
...
* add CompletionType in CommitStmt and RollbackStmt
* refine CompletionType in ast
* fix typo in parser.y
* add parser test for ROLLBACK
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
126233c2b1
[parser] model: do not rewrite collation id as default for tipb. ( #752 )
2021-10-09 14:53:23 +08:00
fcace6539d
[parser] misc: correct TiDB-style executable comment version for auto_random ( #748 )
...
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
46600d4798
[parser] parser, ast: add SetCollatorExpr ( #749 )
...
This ExprNode is equivalent to the `Item_func_set_collation` in MySQL,
it is used to specify the collation for the result of another
expression.
Co-authored-by: tangenta <tangenta@126.com >
2021-10-09 14:53:23 +08:00
a9dc625514
[parser] README.md: add a user list ( #750 )
2021-10-09 14:53:23 +08:00
cfc2e0273f
[parser] refine table optimizer hint and make it more generic ( #747 )
...
* refine table optimizer hint and make it more generic
Signed-off-by: Lonng <heng@lonng.org >
* implement the restore
Signed-off-by: Lonng <heng@lonng.org >
* address comment
Signed-off-by: Lonng <heng@lonng.org >
* address comment
Signed-off-by: Lonng <heng@lonng.org >
* fix typo
Signed-off-by: Lonng <heng@lonng.org >
2021-10-09 14:53:23 +08:00
1539b1f3fe
[parser] parser: support the SELECT ... INTO OUTFILE syntax ( #745 )
...
* SELECT OUTFILE
* fix CI
* update
* add more tests
2021-10-09 14:53:23 +08:00
9fe4e83705
[parser] parser: add WEIGHT_STRING() function ( #743 )
2021-10-09 14:53:23 +08:00
9a0826d097
[parser] model: add partition replica available info to support partition table in tiflash ( #742 )
...
Signed-off-by: crazycs <crazycs520@gmail.com >
2021-10-09 14:53:23 +08:00
b1500ed8d3
[parser] support alter instance reload tls ( #740 )
2021-10-09 14:53:23 +08:00
36dbd526d0
[parser] mysql/errname.go: update error message of ErrCantGetValidID ( #741 )
2021-10-09 14:53:23 +08:00
bb8631cca6
[parser] add errcode and errname of unsupported sequence default value for column type ( #739 )
2021-10-09 14:53:23 +08:00