a0c6fa67ae
[parser] remove proxy from reserved keyword ( #1150 )
...
Signed-off-by: iosmanthus <myosmanthustree@gmail.com >
2021-10-09 14:53:23 +08:00
df2a55a4cc
[parser] parser: compatible with select...for share statement ( #946 )
...
* parser: compatible with `select...for share` statement
* parser: parse `LOCK IN SHARE MODE` into `FOR SHARE` and support `NOWAIT` & `SKIP LOCKED`
* merge master
* SelectLockType.String() returns string only
* update parser_test.go
* resolve conflicts
2021-10-09 14:53:23 +08:00
a3519e86f4
[parser] *: create / drop extended stats by ALTER TABLE ( #1138 )
2021-10-09 14:53:23 +08:00
df89db3af2
[parser] parser: change the trace statement default format to row ( #1107 )
...
* parser: change trace statement default format to row
* fix CI
Co-authored-by: tangenta <tangenta@126.com >
2021-10-09 14:53:23 +08:00
8950ad0f44
[parser] *: support dynamic privileges and more extended privileges ( #1144 )
...
* *: support dynamic privileges and more extended privileges
* address comment
* address comment
2021-10-09 14:53:23 +08:00
d0d67ddb9e
[parser] *: support GRANT PROXY ( #1142 )
2021-10-09 14:53:23 +08:00
593668b982
[parser] parser: Compatible with mysql8 fix select 1 where 1=1 ( #1131 )
2021-10-09 14:53:23 +08:00
21bcae2c9c
[parser] parser: remove invalid syntax ( #1134 )
...
* remove
* Merge remote-tracking branch 'upstream/master' into remove-dot
# Conflicts:
# parser.go
* add test
* add test
* Merge remote-tracking branch 'upstream/master' into remove-dot
# Conflicts:
# parser.go
2021-10-09 14:53:23 +08:00
22aef2341f
[parser] ast, parser: add FUNCTION and PROCEDURE for GRANT object_type ( #1136 )
2021-10-09 14:53:23 +08:00
634199be7f
[parser] lexer: reset identifierDot to false in QuotedIdent ( #1135 )
2021-10-09 14:53:23 +08:00
207955cf69
[parser] *: change privilege type to uint64 and support REPLICATION CLIENT, etc ( #1121 )
2021-10-09 14:53:23 +08:00
5e0bbb8eb8
[parser] lexer: treat dot differently in different context ( #1132 )
...
* fix lexer
* fix lexer
* fix lexer
* fix lexer
* fix lexer
* update test
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com >
2021-10-09 14:53:23 +08:00
78d16b53a2
[parser] ast, parser: fix parse join ( #1129 )
2021-10-09 14:53:23 +08:00
5d600ee3b0
[parser] *: support multiple select options ( #1122 )
...
* done
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* done
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* clean
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* fix
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* fix
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* clean
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* address comment
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
2021-10-09 14:53:23 +08:00
d2352cfd0d
[parser] fix create binding for update with hint ( #1117 )
2021-10-09 14:53:23 +08:00
0529fa31aa
[parser] parser: add grammar show stats_topn ( #1109 )
2021-10-09 14:53:23 +08:00
7a252afa7b
[parser] parser, ast: track if order is implicit ASC/DESC ( #1101 )
...
* Add nillable type of byitem
* parser, ast: track if order is implicit ASC/DESC
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com >
2021-10-09 14:53:23 +08:00
42ac1b81d6
[parser] parser: add RESUME and BRIEOptionLevel for IMPORT ( #1100 )
2021-10-09 14:53:23 +08:00
8a2041474b
[parser] parser: add PURGE IMPORT ( #1102 )
2021-10-09 14:53:23 +08:00
67c73b4af9
[parser] restore: make restore sql contains charset information even default charset ( #1012 )
2021-10-09 14:53:23 +08:00
ed62659e39
[parser] *: add alter table read only/write support ( #1095 )
2021-10-09 14:53:23 +08:00
7f9281d8d6
[parser] parser: support SQL Bind for Insert / Replace ( #1092 )
2021-10-09 14:53:23 +08:00
6f7f14c421
[parser] ddl: let create table field type double(N) raise sql syntax error ( #1078 )
...
* ddl: let `double(10)` raise sql syntax error
* ddl: add more test
* parser: add switch, let user can enable or disable strict double syntax check
* parser: add SetParserConfig API for simple update parser configuration
* parser: rename field
2021-10-09 14:53:23 +08:00
93dcd6aed4
[parser] ddl: some partition expression should return syntax error ( #1087 )
...
* fix partition bug
* update parser
* update parser
* add test
* fix test
Co-authored-by: Arenatlx <ailinsilence4@gmail.com >
2021-10-09 14:53:23 +08:00
b76254849a
[parser] support SELECT FROM TABLESAMPLE syntax ( #1071 )
...
* support SELECT FROM TABLESAMPLE syntax
* refine naming
* make table sample clause as a part of TableFactor
* address comment
2021-10-09 14:53:23 +08:00
cb5af255be
[parser] support call statement ( #1077 )
...
* support call statement
* support call statement (review fixes)
* support call statement (review fixes)
Co-authored-by: tiancaiamao <tiancaiamao@gmail.com >
2021-10-09 14:53:23 +08:00
02e1f6b198
[parser] parser.y: distinguish between empty string index and anonymous index ( #1059 )
2021-10-09 14:53:23 +08:00
512a9eb8a8
[parser] parser: support SQL bind syntax for update / delete ( #1067 )
2021-10-09 14:53:23 +08:00
c7f93089c6
[parser] goyacc: record the original text position in AST ( #984 )
2021-10-09 14:53:23 +08:00
74eb1b9729
[parser] *: fix not and ! restored ( #1064 )
...
* done
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
* address comment
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com >
2021-10-09 14:53:23 +08:00
caa3a88377
[parser] parser: support alter sequence ( #1046 )
2021-10-09 14:53:23 +08:00
5c19e29b5c
[parser] parser : support table statement and value statement ( #1026 )
...
* implement Table stmt
* fmt
* add TableStmt into Statement rule, fix OFFSET rule
* support TableStmt in InsertStmt
* remove TableStmtLimit, use SelectStmtLimit instead
* support basic setoptr, need to fix a lot things
* support INTO OUTFILE
* support CREATE TABLE and CREATE VIEW
* support basic VALUES stmt
* fmt
* implement set operation for table
* add some comment
* fix the wrong implements of TABLE stmt
* fix the wrong implements of VALUES stmt
* fix SetOprNode interface
* rename the fields refer to SetOpr statement, fix some comments
* finish
* remove unused comment
* resolve conflicts
* refactor
* resolve conflicts
* fix small problems
* remove wrong use of RowStmtField
2021-10-09 14:53:23 +08:00
123af51c0c
[parser] expression: Support bin-to-uuid and uuid-to-bin ( #1038 )
...
* add uuid-to-bin bin-to-uuid
* add test
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
79398e55da
[parser] parser: SQL BINDING support UNION ALL/INTERSECT/EXCEPT ( #1030 )
2021-10-09 14:53:23 +08:00
0a026a0b5e
[parser] parser.y: allow subquery without table alias syntax-checked ( #968 )
...
* parser.y: allow subquery without table alias to be parsed
* resolve conflict
2021-10-09 14:53:23 +08:00
1ffb873bba
[parser] executor: add builtin aggregate function json_arrayagg ( #1020 )
2021-10-09 14:53:23 +08:00
1b0af1dc96
[parser] parser: support except all, intersect all, parentheses for set operator ( #960 )
2021-10-09 14:53:23 +08:00
00712da525
[parser] parser: rename topn_to_cop hint to limit_to_cop hint. ( #1028 )
...
Co-authored-by: Yuanjia Zhang <zhangyuanjia@pingcap.com >
2021-10-09 14:53:23 +08:00
7f3ab46241
[parser] Add support GRANT CREATE TABLESPACE syntax ( #1029 )
...
* Add support GRANT CREATE TABLESPACE syntax
* recompilation parser.go
* adjust CreateTablespacePriv constant
2021-10-09 14:53:23 +08:00
8b4d3d968d
[parser] fix: add "UNDERSCORE_CHARSET hexLit/bitLit" in Literal ( #926 )
...
Signed-off-by: wangggong <793160615@qq.com >
Co-authored-by: Wang Ruichao <wangruichao2014@xiaochuankeji.cn >
2021-10-09 14:53:23 +08:00
9885b111b7
[parser] yy_parser: use the default SQL mode when create a new parser ( #1023 )
...
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com >
2021-10-09 14:53:23 +08:00
4a04e063a6
[parser] support select for update wait seconds grammar ( #997 )
2021-10-09 14:53:23 +08:00
d215bbeaf1
[parser] Support APPROX_PERCENTILE function ( #1002 )
...
* support approx_percentile function
* update
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00
c0d8c870f1
[parser] parser: trim trailing spaces in enum and set ( #1006 )
...
* trim space in enum and set
* add test
* add test
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com >
2021-10-09 14:53:23 +08:00
f42586fcd3
[parser] feat: add "HISTOGRAM" option in "ALTER TABLE... UPDATE/DROP..." ( #925 )
2021-10-09 14:53:23 +08:00
90606e4b55
[parser] Fix syntax error caused by unexpected hint ( #1004 )
...
* fix 987
* fix CI
* fix CI
2021-10-09 14:53:23 +08:00
57acffbb54
[parser] parser: add FETCH FIRST syntax support ( #985 )
2021-10-09 14:53:23 +08:00
7ad133a444
[parser] fix: use OptCharsetWithOptBinary for ENUM & SET ( #976 )
...
See also: https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L6617
Signed-off-by: Wang Ruichao <wangruichao2014@xiaochuankeji.cn >
Co-authored-by: tangenta <tangenta@126.com >
2021-10-09 14:53:23 +08:00
b77fec8b53
[parser] parser: add topn_to_cop hint ( #981 )
2021-10-09 14:53:23 +08:00
9c327e0427
[parser] fix: add hex & bit for text_string ( #975 )
...
See also: https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L13936
Signed-off-by: Wang Ruichao <wangruichao2014@xiaochuankeji.cn >
Co-authored-by: Arenatlx <ailinsilence4@gmail.com >
Co-authored-by: kennytm <kennytm@gmail.com >
2021-10-09 14:53:23 +08:00