Commit Graph

183 Commits

Author SHA1 Message Date
932c4a7bfc expression: improve length and decimal size when a base type add/minus/multiply a decimal (#11873) 2019-08-28 13:29:05 +08:00
adb3071c90 *: refine the attribute definition of types.Time and types.Dur… (#11672) 2019-08-14 11:30:40 +08:00
ff71c0c746 expression: fix last_day incompatible with mysql (#11704) 2019-08-10 19:12:38 +08:00
768f61f52f expression: handle builtin time getInterval from Decimal\Real (#11479)
All tests passed, auto merged by Bot
2019-07-30 17:16:52 +08:00
5c35082f6a expression: handle builtin add_date/sub_date func overflow (#11472) 2019-07-27 18:22:21 +08:00
ca70d74a28 executor, expression: fix current_timestamp/now not consistent… (#11342) 2019-07-23 17:02:24 +08:00
d977edf8a3 Function SUBTIME ADDTIME should return NULL with a warning if… (#11262) 2019-07-19 19:49:40 +08:00
5aef053c16 expression: fix getIntervalFromDecimal in DATE_ADD() (#11297) 2019-07-18 23:18:41 +08:00
8d2c9be461 CONVERT_TZ should return NULL if its arguments are invalid. (#11176) 2019-07-12 16:33:01 +08:00
c8d1ff7ca6 *: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' (#10866) 2019-06-21 19:13:31 +08:00
785922d923 expression: fix the behavior of DATE_SUB (#10607) 2019-06-13 20:36:35 +08:00
7deedf8418 expression: fix issue that period_diff is not compatible with MySQL 8.0 (#10383) 2019-05-14 17:40:54 +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
c2e83af7a1 Support add datetime with real interval (#10347) 2019-05-09 15:59:03 +08:00
37e824134f expression: check if period is valid in period_add (#10380) 2019-05-09 11:11:02 +08:00
bbe1e690b4 expression: fix issue that timestampadd is not compatible with Mysql (#10314) 2019-05-05 22:06:49 +08:00
29e9a41fc9 expression: fix issue that monthname is not compatible with Mysql (#10109) 2019-04-11 15:51:56 +08:00
826c2991b5 handle unsigned hour overflow (#10074) 2019-04-09 16:46:51 +08:00
ad752611c8 expression: fix issue that function dayname is incompatible with Mysql when doing arithmetic (#9975) 2019-04-02 13:45:05 +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
Fox
9187e3d9e5 Fix last_day function (#9746) 2019-03-15 15:31:13 +08:00
ba26012231 expression: using pingcap/log and unify the log format (#9507) 2019-03-14 19:05:27 +08:00
133a1ee8f8 expression: fix week func format (#9685) 2019-03-13 15:25:11 +08:00
35829101ae expression: support bit for addtime & subtime (#6316) 2019-03-11 16:50:35 +08:00
2433e28d8d *: fix ineffectual assignments and misspellings (#9481) 2019-02-28 19:25:07 +08:00
eb2578bc42 expression: fix date_add interval month,year diffs from mysql (#8988) 2019-02-11 19:52:58 +08:00
2b114f42d2 expression: fix some typos in the comments (#9258) 2019-02-10 10:47:46 +08:00
d9e02b76dd expression: remove redundant "errors.Trace()" in "expression" package (#8609) 2018-12-07 12:20:31 +08:00
2f6639d12b expression: add builtin function tidb_parse_tso (#8385) 2018-11-28 22:37:44 +08:00
87838774e6 types: let round take effect in converting float string to int string. (#8279) 2018-11-26 15:55:11 +08:00
31f5abdad8 apply unit:day special logic on unit:hour for INTERVAL segment (#8146) 2018-11-02 14:14:57 +08:00
5374ff8935 expression,planner: support non-deterministic functions (e.g., now) in the plan cache (#8105) 2018-11-01 23:53:32 +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
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
b3cda9a7dc expression: fix comments mistake (#7713) 2018-09-17 14:28:14 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
6fb1a637fb expression: Fix some datetime related cases that is inconsistent with MySQL (#7636) 2018-09-07 14:38:43 +08:00
db873d68f3 infoschema: set right columns in infoschema by differ type (#7463) 2018-08-24 13:15:21 +08:00
8f1b494055 expression: fix missing microsecond for timestamp (#7418) 2018-08-17 14:40:49 +08:00
06021c7cfe remove types.Row interface (#7170) 2018-07-27 13:45:03 +08:00
9cf670a324 *: cut off duration.fsp in chunk (#7043) 2018-07-17 15:36:27 +08:00
7c18d24933 executor, store: fixed daylight saving time issue (#6823)
Thank you for working on TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.

## What have you changed? (mandatory)

During coprocessor dag task,  it first uses timezone `name`, if non-empty, to get legitimate timezone variable. To achieve this, we need to push down such data into tikv which leads to change the logic of building pushdown request. The logic I mentioned mainly resides in `executor` package. 

I change `timeZoneOffset` to `zone` and add second return parameter `name string`.  The intentioned of doing this to adopt the convention of `time` package. 

For the same purpose, I change `GetTimeZone` to `Location`. As you can see, in `time` package, timezone was bind to `Location`. 


## What are the type of the changes (mandatory)?
- Bug fix (non-breaking change which fixes an issue)


## How has this PR been tested (mandatory)?
unit-test
integration-test will be added shortly
2018-07-16 18:15:19 +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
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
357d5df66b remove useless alias (#6473) 2018-05-05 22:36:54 +08:00
f21483e6ed expression: add Clone() for builtinFunc 2018-04-11 10:00:19 -05:00