Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 7ffcfc8

Browse files
BohuTANGarray
authored andcommitted
*: update sqlparser to the lastest version of RadonDB
1 parent 5501ab9 commit 7ffcfc8

36 files changed

+10240
-5234
lines changed

driver/client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ func (c *conn) Close() error {
388388
select {
389389
case <-ctx.Done():
390390
c.Cleanup()
391-
close(quitCh)
392391
case <-quitCh:
393392
c.Cleanup()
394393
}

makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ fmt:
55
go vet ./...
66

77
test:
8-
go get github.com/shopspring/decimal
98
go get github.com/stretchr/testify/assert
109
@echo "--> Testing..."
1110
@$(MAKE) testxlog

sqldb/constants.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ var CharacterSetMap = map[string]uint8{
270270

271271
const (
272272
// Error codes for server-side errors.
273-
// Originally found in include/mysql/mysqld_error.h
273+
// Originally found in include/mysqld_error.h
274274

275275
// ER_ERROR_FIRST enum.
276276
ER_ERROR_FIRST uint16 = 1000
@@ -293,6 +293,9 @@ const (
293293
// ER_BAD_DB_ERROR enum.
294294
ER_TABLE_EXISTS_ERROR = 1050
295295

296+
// ER_TOO_LONG_IDENT enum
297+
ER_TOO_LONG_IDENT = 1059
298+
296299
// ER_KILL_DENIED_ERROR enum
297300
ER_KILL_DENIED_ERROR = 1095
298301

@@ -311,6 +314,9 @@ const (
311314
// ER_SPECIFIC_ACCESS_DENIED_ERROR enum.
312315
ER_SPECIFIC_ACCESS_DENIED_ERROR = 1227
313316

317+
// ER_UNKNOWN_STORAGE_ENGINE enum.
318+
ER_UNKNOWN_STORAGE_ENGINE = 1286
319+
314320
// ER_OPTION_PREVENTS_STATEMENT enum.
315321
ER_OPTION_PREVENTS_STATEMENT = 1290
316322

@@ -340,12 +346,14 @@ var SQLErrors = map[uint16]*SQLError{
340346
ER_NO_DB_ERROR: &SQLError{Num: ER_NO_DB_ERROR, State: "3D000", Message: "No database selected"},
341347
ER_BAD_DB_ERROR: &SQLError{Num: ER_BAD_DB_ERROR, State: "42000", Message: "Unknown database '%-.192s'"},
342348
ER_TABLE_EXISTS_ERROR: &SQLError{Num: ER_TABLE_EXISTS_ERROR, State: "42S01", Message: "Table '%s' already exists"},
349+
ER_TOO_LONG_IDENT: &SQLError{Num: ER_TOO_LONG_IDENT, State: "42000", Message: "Identifier name '%-.100s' is too long"},
343350
ER_KILL_DENIED_ERROR: &SQLError{Num: ER_KILL_DENIED_ERROR, State: "HY000", Message: "You are not owner of thread '%-.192s'"},
344351
ER_UNKNOWN_ERROR: &SQLError{Num: ER_UNKNOWN_ERROR, State: "HY000", Message: "%v"},
345352
ER_HOST_NOT_PRIVILEGED: &SQLError{Num: ER_HOST_NOT_PRIVILEGED, State: "HY000", Message: "Host '%-.64s' is not allowed to connect to this MySQL server"},
346353
ER_NO_SUCH_TABLE: &SQLError{Num: ER_NO_SUCH_TABLE, State: "42S02", Message: "Table '%s' doesn't exist"},
347354
ER_SYNTAX_ERROR: &SQLError{Num: ER_SYNTAX_ERROR, State: "42000", Message: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use, %s"},
348355
ER_SPECIFIC_ACCESS_DENIED_ERROR: &SQLError{Num: ER_SPECIFIC_ACCESS_DENIED_ERROR, State: "42000", Message: "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation"},
356+
ER_UNKNOWN_STORAGE_ENGINE: &SQLError{Num: ER_UNKNOWN_STORAGE_ENGINE, State: "42000", Message: "Unknown storage engine '%v', currently we only support InnoDB and TokuDB"},
349357
ER_OPTION_PREVENTS_STATEMENT: &SQLError{Num: ER_OPTION_PREVENTS_STATEMENT, State: "42000", Message: "The MySQL server is running with the %s option so it cannot execute this statement"},
350358
ER_MALFORMED_PACKET: &SQLError{Num: ER_MALFORMED_PACKET, State: "HY000", Message: "Malformed communication packet, err: %v"},
351359
CR_SERVER_LOST: &SQLError{Num: CR_SERVER_LOST, State: "HY000", Message: ""},

sqlparser/.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlparser/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlparser/.idea/sqlparser.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlparser/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlparser/.idea/workspace.xml

Lines changed: 176 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqlparser/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ MAKEFLAGS = -s
77
sql.go: sql.y
88
goyacc -o sql.go sql.y
99

10+
visitor:
11+
go generate rewriter.go
12+
1013
clean:
1114
rm -f y.output sql.go

0 commit comments

Comments
 (0)