Commit Graph

473 Commits

Author SHA1 Message Date
b200cef223 support function rpad (#2270) 2016-12-19 16:36:41 +08:00
8eb2bbd37d parser, evaluator: support mysql builtin functions ln(), log(), log2(), log10() (#2258) 2016-12-16 08:52:51 +08:00
893a157301 *: support builtin function timediff (#2249) 2016-12-15 19:04:20 +08:00
aca4151716 parser: fix parse explain union statement error (#2216) 2016-12-09 20:45:48 +08:00
5917a784be parser: fix .1_t_1_x parsed as .1 _t_1_x (#2210)
it should not be parsed as a .1(float) and _t_1_x(identifier)
instead, it should be .(dot) 1_t_1_x(identifier)
2016-12-09 11:47:46 +08:00
f15333b8c7 parser: fix bug 0_x should parse to identifier (#2200) 2016-12-08 17:14:15 +08:00
196b6b18fe *: Support for changing column (#2174)
*: support for changing column in parser
* ddl: support for changing column in ddl
2016-12-07 11:19:37 +08:00
8e2c8362d4 Support builtin function schema() (#2173) 2016-12-06 13:34:52 +08:00
f42d3b2bcc *: Support the statement of "alter user" (#2144) 2016-12-03 14:01:38 +08:00
3a721da8fc *: fix cast decimal allocates large memory. (#2146)
If precision is too large, encode decimal allocates large amount of memory.
This commit set cast decimal unspecified length to default decimal length (10),
also add check on precision and frac on `MyDecimal.ToBin`.
2016-12-01 17:37:10 +08:00
1bca024601 parser: parse more PARTITION option (#2133) 2016-12-01 00:24:20 +08:00
ca700d2c75 parser: fix wrong offset for token inner mysql comment (#2141) 2016-11-30 22:29:07 +08:00
36a16d3ee8 parser: handle PARTITION keyword generated by mydumper (#2115)
* parser: parse PARTITION keyword generated by mydumper
2016-11-29 11:29:04 +08:00
3c349259e4 *: basic support for builtin function STR_TO_DATE (#2078) 2016-11-28 14:17:32 +08:00
36f0f307a8 parser: support show events (#2099)
* parser: support show events
2016-11-27 22:49:49 +08:00
9cca7b0b02 types: move Bit, Enum, Set, Hex to types package (#2085)
Consistent with Time and MyDecimal.
2016-11-24 12:28:55 +08:00
b19cc75a94 mysql, types: move MyDecimal and Time from 'mysql' to 'types' package. (#2082)
So we don't need to handle sql mode in 'mysql' package, avoid potential dependency cycle.
2016-11-24 10:50:31 +08:00
91050ff1f8 parser: parse decimal literal instead of float literal (#2044)
Improves MySQL compatibility.
2016-11-21 19:29:25 +08:00
81a3ba602a parser: support select t.ReservedKeyword from t; (#2039)
For example "select t.desc from t;"
2016-11-20 22:44:13 +08:00
2f47f24b22 parser: database.ReservedKeyword as identifier & clean up (#2027)
1. fix a bug test.desc can't be used as identifier, which is valid in mysql
2. introduce ReservedKeyword in parser.y and clean up
3. fix mysql client "use `select`;" can't work
4. refine lexer's special comment mode pos line/offset
2016-11-19 14:22:10 +08:00
94b5d1001f parser: handle MySQL-specific-code comment syntax in parser (#2018)
* parser: handle MySQL-specific-code comment syntax in parser

fix issue 2017
2016-11-17 10:47:21 +08:00
3b8bf2135c parser: tiny clean up (#1992)
rename scanner_test.go to lexer_test.go
make the code more robust when unicode.ReplacementChar appears
2016-11-13 15:20:01 +08:00
2543f4b17c parser: handle scan identifier meets \0 (#1994)
this is a vague corner case
it should be illegal according to mysql document
but mysql implementation seems accept it
so we follow implementation
trim \0 in conn packet, report error when parser meet \0
2016-11-12 09:30:12 +08:00
1056c56df1 ddl: support modify column (#1930)
* ddl: support modify column
2016-11-08 15:20:41 +08:00
1eecf8e718 parser: support drop view if exists (#1969)
mydumper executes this statement before create a table,
since we don't support view, we can simply return success.
2016-11-07 19:56:03 +08:00
1c6c145f94 *: Set custom verbose flag to true (#1956)
* *: set custom verbose flag to true

* *: update .gitignore
2016-11-05 18:00:13 +08:00
85c0954dc2 support builtin function from_unixtime (#1929) 2016-11-04 13:15:55 +08:00
5ee84a7a9a *: support show create db (#1911) 2016-11-01 13:11:18 +08:00
a0cf16c092 parser: identifier may begin with digit (#1887)
* parser: identifier may begin with digit, fix issue 1878
2016-11-01 12:38:16 +08:00
a6144ad1e1 *: Support Show processlist (#1907) 2016-10-31 18:23:00 +08:00
04b97b68ba parser: Support show index in tbl (#1873)
Support show index/indexes in tbl.
Fix: https://github.com/pingcap/tidb/issues/1849
2016-10-26 14:22:28 +08:00
c0c9729300 parser: fix bug hexadecimal parsed as string (#1871)
x'13181C76734725455A' should be parsed as a hexLit, but it's parsed as a string
2016-10-25 14:24:59 +08:00
ba4d6bae37 *: support drop user. (#1854) 2016-10-24 21:01:02 +08:00
8930ed05b1 parser: fix bug 'BINARY' not parsed as charset name (#1803)
* parser: fix bug 'BINARY' not parsed as charset name
2016-10-09 19:45:53 +08:00
a33240d8a8 parser: set flag in parse function. (#1799)
Every `ast.Statement` needs to set flag before use, set the flag in parse function,
so we don't need to set it somewhere else and won't forget to do it.
2016-10-09 11:36:56 +08:00
6dec14119a Fix typos (#1714) 2016-09-09 22:58:47 +08:00
099e8a9880 parser: Support show function status grammar (#1710)
Parsed but do nothing. Just make workbench happy.
2016-09-09 16:51:35 +08:00
fe3555e77d *: FLUSH TABLE statement front end (#1701) 2016-09-08 13:27:09 +08:00
9c75a19ebf parser: mysql start transaction WITH CONSISTENT SNAPSHOT syntax (#1703) 2016-09-08 08:19:06 +08:00
5a3f87d099 support unhex. (#1675) 2016-09-01 19:25:04 +08:00
7bedd9cd40 parser: recognise \r\n as whitespace (#1672) 2016-09-01 11:51:26 +08:00
aabb7664ef *: Support ceil() and ceiling() (#1666)
* *: support ceil and ceiling
2016-09-01 10:53:02 +08:00
ed4649e85d *: Support load data local (#1634) 2016-08-30 09:38:37 +08:00
e33587ed47 support explain (#1632) 2016-08-26 11:19:23 +08:00
b8730279d9 parser: fix set upper-case variable (#1624)
* parser: fix set upper-case variable
2016-08-23 15:06:40 +08:00
c90d91cba9 *: Support insert ignore (#1579)
Ignore duplicate key errors for insert ignore stmt, Fix #1570
2016-08-22 14:18:56 +08:00
3eb6f4f513 parser: remove the old lexer, clean up (#1597) 2016-08-18 14:29:45 +08:00
a3eac844ae *: Support set names binary (#1578) 2016-08-15 22:25:23 +08:00
ac4b8c90b6 parser: fix a lex bug (#1590)
fix bug `numeric` recognised as numericType in new lexer
2016-08-15 16:59:09 +08:00
0a0abbb2e7 parser: use the new lexer as default (#1566) 2016-08-15 10:06:52 +08:00