Commit Graph

25 Commits

Author SHA1 Message Date
a8fa29b56d parser: make text return utf8 encoding string (#31457)
close pingcap/tidb#31228
2022-01-12 19:47:42 +08:00
b4df7ca4dc test: make all the tests run in serial (#30692) 2021-12-14 18:06:36 +08:00
11b61738f3 parser: migrate test-infra to testify (#29191) 2021-10-28 12:30:49 +08:00
xhe
94e30df8e2 parser: fix compiling, add unit tests (#28700) 2021-10-11 23:15:25 +08:00
ca82007543 [parser] Revert "make prepared readonly (#1139)" (#1145)
This reverts commit 72e9144ea37c26c219dc36afeb6a2e7689f12f27.
2021-10-09 14:53:23 +08:00
4c87213312 [parser] make prepared readonly (#1139) 2021-10-09 14:53:23 +08:00
78d16b53a2 [parser] ast, parser: fix parse join (#1129) 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
1b0af1dc96 [parser] parser: support except all, intersect all, parentheses for set operator (#960) 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
8f8575ddf5 [parser] parser: support set operator EXCEPT and INTERSECT (#916) 2021-10-09 14:53:23 +08:00
xhe
2dbf28d553 [parser] fix: correct file permission (#918)
Commit 334dfef16055ffaf9c704b7ad25ce7540cb6ce38 changed several files into
executables. Commit f6e17887c998e7c7d460bfabb198ed5f53dd22a2 reverted the
permission of parser_test.go from 755 to 644, but missed all other
files. Later go.mod1/go.sum1 are removed. This commit fixed the
permission of remaining affected files.
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
b9268c63bc [parser] remove dependency on TiDB (#679) 2021-10-09 14:53:23 +08:00
f3c3ddbf98 [parser] utils: IsReadOnly returns wrong result when checking SQLs like explain analyze insert ... (#381)
* update IsReadOnly

* add UT

* fixup
2021-10-09 14:53:23 +08:00
568898c8d7 [parser] type/compatibility: fix show create table output of generated column (#235) 2021-10-09 14:53:23 +08:00
7abc99d6e3 [parser] parser: implement Restore for CreateTableStmt (#170) 2021-10-09 14:53:23 +08:00
0e6164a43e [parser] parser: implement Restore for SelectStmt (#153) 2021-10-09 14:53:23 +08:00
b47d6e9f4c [parser] parser: implement Restore for AlterTableStmt and AlterTableSpec (#154)
* implement AlterTableStmt#Restore.

* implement TableOption#Restore

* implement AlterTableSpec#Restore.
add test cases.

* resolved conversation

* resolved conversation: WritePlainf -> WriteString

* resolved: ctx.Annotate -> ctx.Annotatef

* resolved: merge ctx,WriteKeyWord

* resolved: merge if used else.

* implement PartitionDefinition#restore.

* change error message.
2021-10-09 14:53:23 +08:00
779495f792 [parser] parser: change the location of RestoreCtx (#157) 2021-10-09 14:53:23 +08:00
6d3f99487a [parser] parser: implement Restore for FuncCallExpr and AggregateFuncExpr (#102) 2021-10-09 14:53:23 +08:00
6ecfe817ce [parser] parser: implement Restore for FrameBound (#135) 2021-10-09 14:53:23 +08:00
3d7841959f [parser] parser: add RestoreCtx and change the Node interface (#78) 2021-10-09 14:53:23 +08:00
133fda7b1f [parser] parser: optimize restore unit test (#75) 2021-10-09 14:53:23 +08:00
8a205ccc0a [parser] *: support AST to SQL text (#56)
* ast2sql demo

* add SQLSentence

* mock func Restore

* change copyright

* add comment

* add test

* change tidb dependentment

* fix error comment

* use strings.Builder

* fix test

* add error return value for Recoverable

* add error return value for Recoverable

* add error return value for Recoverable

* impl Restore of UnaryOperationExpr

* integrate utils

* switch tidb dependency

* add comment

* add comment

* update unit test

* fix Restore of DatabaseOption

* fix Restore of DatabaseOption

* fix Restore of DatabaseOption

* update unit test

* use errorf
2021-10-09 14:53:23 +08:00