Commit Graph

91 Commits

Author SHA1 Message Date
88928adb0f ddl, types: fix int to datetime conversion to avoid useless retry (#24874) 2021-05-26 15:15:36 +08:00
670b5fbcf5 ranger: fix the range construction behavior when the column's type is YEAR (#23559) 2021-04-14 16:03:52 +08:00
1e3921aff5 chore: Refactor code quality issues (#23445) 2021-03-27 15:51:23 +08:00
a3a4a6c4da executor: add new format specifier(%# %@ %.) for str_to_date expression (#22790) 2021-02-19 14:57:27 +08:00
d1d5cc433e time: fix parse datetime won't truncate the reluctant string (#22232) 2021-01-07 14:52:16 +08:00
b232a23e7a expression, types: fix datetime and year comparison error (#20233) 2020-12-18 17:19:30 +08:00
f0c6fa9c25 expression: fix compatibility of extract day_time unit functions (#21601)
Signed-off-by: lzmhhh123 <lzmhhh123@gmail.com>
2020-12-11 17:13:21 +08:00
49a1527893 expression: adjust int constant when compare with year type (#21099) 2020-11-19 19:04:53 +08:00
dy
cc0bef82b7 util, types: fix overflow & adjustment for the year type in index ranger (#20338) 2020-11-06 17:14:54 +08:00
ccd48eeb4d expression: make str_to_date() more compatible with MySQL (#20298) 2020-10-28 19:06:25 +08:00
23d8b30470 expression, executor: add iso 8601 and timezone support for temporal string literal (#20534) 2020-10-27 16:24:59 +08:00
3db90e4256 types: fix incompatible result of DATE_ADD() (#19880) 2020-10-26 11:10:14 +08:00
8ed9a6ff6d expression: fix TIMESTAMP func get wrong result with decimal (#15185) (#20088) 2020-10-15 15:46:03 +08:00
462927bf31 types: fix datetime lower part overflow check (#19822) 2020-09-22 19:30:08 +08:00
c56f318349 expression: support %r and %T format for STR_TO_DATE() (#19474)
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
Co-authored-by: Zhang Jian <zjsariel@gmail.com>
2020-09-02 09:53:00 +08:00
dy
cc0b6f1aec types: fix STR_TO_DATE handling for %h, %r (#18171) (#18428) 2020-07-22 19:01:32 +08:00
f1b21b562a types: match MySQL behavior with datetime delimiters (#17376) 2020-05-29 11:05:35 +08:00
959ad888b0 types: fix StrToDate handling of %h and %p (#17395) 2020-05-28 17:37:13 +08:00
c561d5aa99 *: remove useless conversions and omit some types (#16262) 2020-04-10 00:23:06 +08:00
ab17254e3b executor: fix error message when inserting an invalid value for type datetime (#15220) 2020-03-12 12:04:03 +08:00
87bbe7dcbe types: Fix duration parser (#14588)
Signed-off-by: Iosmanthus Teng <myosmanthustree@gmail.com>
2020-02-07 14:30:44 +08:00
9d38c5467a *: use 8 byte MysqlTime format (#14278) 2020-01-31 14:49:06 +08:00
c88ceca2c4 types: fix parse DATETIME/TIME from string incompatible with MySQL (#14547)
Signed-off-by: Lonng <heng@lonng.org>
2020-01-23 16:53:36 +08:00
667f2d7296 types: fix parse date inconsistent with MySQL (#14405)
Signed-off-by: Lonng <heng@lonng.org>
2020-01-09 11:49:15 +08:00
d006443194 type: encapsulate Time API (#14288) 2019-12-31 12:41:09 +08:00
4d4678a4dd types: Fix potential timezone related bugs caused by gotime.Local (#13833) 2019-12-20 22:38:25 +08:00
018d3c3be2 *: fix staticcheck errors in folder types (#13773) 2019-12-04 12:38:42 +08:00
9dbd475c73 types: refactor the code (#13783)
fix struct variable judgement issue.
remove useless value.
use make function default values.
2019-11-29 18:04:45 +08:00
0b9059162c types: Fix potential timezone related bugs caused by gotime.Local (#13752) 2019-11-28 09:45:21 +08:00
a1dc0477a5 types: add error code for package types (#13300) 2019-11-26 19:45:14 +08:00
4b830aa7f6 *: Remove unused code (#13674) 2019-11-22 11:37:07 +08:00
61f24d2469 types: Fix "Invalid time format" caused by daily saving time (#13614) 2019-11-20 16:05:04 +08:00
9a7e382bc5 *: remove unused code (#13547) 2019-11-19 00:36:23 +08:00
b1aad07148 expression: QUARTER/DATE_FORMAT compatibility with mysql for 0/0.0 values (#12488) 2019-11-09 23:06:13 +08:00
e80bab6d46 fix the STR_TO_DATE incompatible between MySQL and TiDB (#12623)
Signed-off-by: Lonng <heng@lonng.org>
2019-10-15 17:51:25 +08:00
aaf11783f2 expression: Reduce memory allocation in builtinCastTimeAsDecimalSig (#12439) 2019-09-27 17:32:01 +08:00
8279053fd6 types: fix a bug of FromGoTime when handling rounding (#12240) 2019-09-18 13:38:16 +08:00
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