46f1dc15f6
types: convert EOF error to ErrTruncate when parse duration ( #11865 )
...
* fix time_func
* check warnings
2019-08-26 17:36:55 +08:00
adb3071c90
*: refine the attribute definition of types.Time and types.Dur… ( #11672 )
2019-08-14 11:30:40 +08:00
ddafdff8f7
expression: fix date_add func in SECOND INTERVAL ( #11312 )
2019-08-05 15:22:16 +08:00
479db57ba0
types/time: optimize time convertDateFormat function by remove fprintf ( #11523 )
2019-08-02 11:34:13 +08:00
566c3278e3
expression: improve the compatibility with mysql when datatime is invalid. ( #11445 )
...
All tests passed, auto merged by Bot
2019-07-25 18:12:06 +08:00
c8d1ff7ca6
*: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' ( #10866 )
2019-06-21 19:13:31 +08:00
6a3a73a52d
*: add_date can return mysql.Time ( #9830 )
2019-05-14 10:06:10 +08:00
d241d741b9
expression: addition between datetime and interval is not compatible with Mysql ( #10329 )
2019-05-10 15:20:57 +08:00
c9f0a1c44f
types: Fix checkMonthDay() to correctly handle leap year ( #10342 )
2019-05-05 19:17:45 +08:00
7423c3c85f
types: extract month support 0 ( #10116 )
2019-04-11 17:34:52 +08:00
bf9570a1b8
types: fix incorrect time fraction parsing method ( #9933 )
2019-04-01 12:51:35 +08:00
cebc7ffad9
types: refine the parsing logic of INTERVAL to correct DATE_ADD/DATE_SUB ( #9874 )
2019-03-30 18:34:37 +08:00
94f163d98e
expression: fix issue that date_add and date_sub is incompatible with MySQL ( #9702 )
2019-03-29 17:57:29 +08:00
97f88f70d5
expression: fix issue that results of unix_timestamp()-unix_timestamp(now()) is wrong and not stable ( #9884 )
2019-03-29 15:20:28 +08:00
99defc0c48
types: fix time_format is not compatible with MySQL ( #9841 )
2019-03-25 13:47:16 +08:00
b78490e403
*: use the unified log format for the remaining packages ( #9743 )
2019-03-22 16:34:47 +08:00
47a564be2f
types:change Map to switch in GetFormatType ( #9851 )
2019-03-22 12:09:05 +08:00
b4cc3e4893
fix str_to_date func compatible issues 9773 ( #9819 )
2019-03-21 15:00:29 +08:00
b76b2da8f6
types: fix incompatible issue for builtin function str_to_date ( #9693 )
2019-03-14 13:04:44 +08:00
133a1ee8f8
expression: fix week func format ( #9685 )
2019-03-13 15:25:11 +08:00
7072052316
expression,types: improve str_to_date builtin function compatibility ( #9617 )
2019-03-09 15:15:31 +08:00
893d1d5989
types: provide the default capacity for result of ParseDateFormat ( #9516 )
...
Prevents calling `runtime.growslice` too many times in a tight loop when
processing many datetime values.
2019-03-01 17:36:11 +08:00
2433e28d8d
*: fix ineffectual assignments and misspellings ( #9481 )
2019-02-28 19:25:07 +08:00
af99a0df5a
types: fix processing of "0000" value for year type ( #9250 )
2019-02-11 11:20:22 +08:00
ec833bc4d2
*: fix some lints produced by golangci-lint ( #8999 )
2019-01-16 16:44:49 +08:00
f20c849857
types: support sql_mode ALLOW_INVALID_DATES ( #9027 )
2019-01-14 19:34:22 +08:00
884db0ab3d
types: fix the incorrect behavior of "%y"/"%Y" for STR_TO_DATE() ( #8517 )
2019-01-08 12:37:30 +08:00
6e27de255b
expression: fix incorrect date arithmitical with negative interval ( #8523 )
2018-12-04 10:34:47 +08:00
3c0d0534f2
server,types: convert zero input correctly for column type year ( #8292 )
2018-11-14 15:25:08 +08:00
32b1dbd8d5
*: rename "github.com/pkg/errors" to "github.com/pingcap/errors" ( #8136 )
...
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8
*: move parser to a separate repository ( #8036 )
2018-10-25 11:12:10 +08:00
a2beedf88a
types: fix date time parse ( #7933 )
2018-10-18 17:55:58 +08:00
b3ef641f4b
types: fix bug which Float type is not effective in AddDate & SubDate function ( #7840 )
2018-10-12 18:36:35 +08:00
5baedaa21c
expression, types: fix some corner case when parsing string to datetime ( #7701 )
2018-10-08 10:35:52 +08:00
a947590b14
stats: update the way of using index feedback ( #7488 )
2018-09-13 19:02:32 +08:00
cb03f2bec1
move from juju/errors to pkg/errors ( #7151 )
2018-09-12 15:42:20 +08:00
5ad005b941
types,expression: Fix parse time from string ( #7654 )
2018-09-11 14:00:25 +08:00
9cf670a324
*: cut off duration.fsp in chunk ( #7043 )
2018-07-17 15:36:27 +08:00
39d00d35aa
sqltostr: fix str_to_date('2018-6-14', '%Y-%m-%d') bug ( #6919 )
2018-06-28 21:38:06 +08:00
cb45eaa7f8
*: update errcheck rule ( #6876 )
2018-06-22 09:48:11 +08:00
87ce884b2e
*:check max/min timestamp bound with timezone aware ( #6581 )
...
- mytime: max/min configure with UTC tz, convert to local tz during process starting, convert it to session tz before checking bound.
- time: so `check()`/`add()` need force pass `StatementContext` parameter.
- builtin_time: pass `StatementContext` from `b.ctx.sessionVars` into check/add.
- dump: also set timezone for StatementContext with UTC.
- *_test/mock: fix test case, make mock context with stmt TimeZone.
- add testcase for checkTimestamp and mytime convert timezone.
2018-05-24 15:27:38 +08:00
d53e7d6873
Makefile: fix 'errcheck' after github.com/kisielk/errcheck is updated ( #6574 )
2018-05-18 13:01:58 +08:00
877d0d4d3d
*: fix a bug occurred when insert into time column ( #6451 )
...
* *: fix a bug when insert decimal or decimal-like string into time col
2018-05-09 10:52:30 +08:00
11616c46c0
types,expression: make 'invalid time format' error log more friendly ( #6069 )
2018-03-17 06:40:37 -05:00
469b246965
types,expression: make ConvertToTime unaffected by location ( #5741 )
2018-02-01 06:22:59 -06:00
5db9ac2506
types,util/chunk: refactor Time for Chunk. ( #5571 )
2018-01-09 10:12:27 +08:00
8b149c3323
Prealloc / collides with package name ( #5560 )
2018-01-05 19:15:54 +08:00
b1e1a26151
types: refine Time type ( #5521 )
...
remove redundant fields, makes it easier to fit in Chunk.
2017-12-30 19:30:35 +08:00
fed3ffac0b
types,statistics: don't use time.Local timezone in time Sub ( #5424 )
2017-12-19 18:22:31 +08:00
f1e89cde19
*: use lower-case of github.com/sirupsen/logrus ( #5400 )
...
*: rename github.com/Sirupsen/logrus to github.com/sirupsen/logrus
* vendor: update pd
* vendor: update github.com/pingcap/tipb/go-mysqlx
2017-12-14 16:25:58 +08:00