Commit Graph

1902 Commits

Author SHA1 Message Date
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
63c4562c27 *: remove non-prepared plan cache (#7040)
* *: remove non-prepared plan cache

non-prepared plan cache is not usable if we can only do full string match.
And further development doesn't worth the effort.
2018-07-13 18:15:05 +08:00
4a7869e807 aggfuncs: implement Count with new aggregation framework (#7009) 2018-07-12 17:11:33 +08:00
7375633948 executor: support bit_and/bit_xor func in new agg evaluation framework (#7004) 2018-07-12 16:11:44 +08:00
0ef52acf82 executor: support MAX/MIN in new evaluation framework partially (#6971) 2018-07-12 15:01:16 +08:00
461663652d *: support 'admin show ddl jobs <number>' grammar (#7028) 2018-07-12 14:49:14 +08:00
7de2b6a042 aggfuncs: implement avg(distinct) functions (#7015)
* aggfuncs: implement avg(distinct) functions
2018-07-11 15:54:13 +08:00
ab46569a50 executor: refine StreamAggExec when child is empty (#7002) 2018-07-11 14:33:48 +08:00
f9a5686f9b executor: make set system variable log shorter (#7029) 2018-07-11 14:09:22 +08:00
5f6e36241c support generation_expression (#7017) 2018-07-09 20:06:27 +08:00
e28a81813c *: check the schema-validity when the DDL fails (#6797) 2018-07-09 17:35:04 +08:00
372a6fc921 plan: refine explain result format (#7011) 2018-07-09 13:55:36 +08:00
5bdf34b9bb plan: fix "INSERT ... ON DUPLICATE KEY UPDATE" (#6593) 2018-07-09 13:25:23 +08:00
3f574d97c9 stats: refactor stats update mechanism (#6901) 2018-07-06 11:22:11 +08:00
7682a74d15 *: kill one's own connection doesn't require SUPER privilege (#6954)
`kill tidb connID`, if the user is the owner of that connection, there
is no need to check the SUPER privilege.
SessionManager interface is slightly modified.
2018-07-05 20:17:17 +08:00
363cdc2d93 aggfuncs: implement bit-or with new aggregation framework (#6975) 2018-07-05 16:33:41 +08:00
48c0fcdaf5 executor, ddl: get the correct result of "show create table" when running "add index" (#6993) 2018-07-05 14:42:19 +08:00
40193a3daf executor: fix panic on Stream Aggregate (#6984) 2018-07-04 18:28:31 +08:00
5601c45189 executor: Fix query hang on hash aggregate operator (#6982) 2018-07-04 17:44:40 +08:00
ef1b9dfae1 aggfuncs: partially implement "AVG" (#6951) 2018-07-03 15:41:23 +08:00
2292844f34 *: support session variable 'warning_count' and 'error_count' (#6945) 2018-07-02 19:00:24 +08:00
8db5811cb6 *: 'load data' should not use latches (#6927)
'load data' is not retryable when it meets conflicts, while latches may result in
false positive transaction conflicts. so enable latches will lead to 'load data'
abort abnormally, even there are no conflicts.
2018-07-02 11:53:12 +08:00
dd37138dc0 *: support parallel hash agg (#6658) 2018-06-29 22:59:47 +08:00
8c666359a5 executor: handle \N as NULL in load data statement (#6873) 2018-06-29 19:42:24 +08:00
cef2ebde62 *: support 'SHOW ERRORS' statment and reports errors in 'SHOW WARNINGS' statement (#6936) 2018-06-29 19:09:12 +08:00
afe45fd2ea mockstore,tikv: fix that mocktikv ignore latches config (#6932) 2018-06-29 17:57:43 +08:00
3c05d77a17 executor: introduce a new execution framework for aggregate functions (#6852) 2018-06-29 16:52:56 +08:00
5a5aeb813a expression, plan: no longer call expression.Clone in plan package except ResolveIndices (#6866) 2018-06-29 16:25:26 +08:00
753b295877 executor, types: fix bug of insert into unsigned float/double (#6939) 2018-06-29 14:48:16 +08:00
ab332eba2a executor: BadNullError should be ignored by insert ignore statement (#6465) 2018-06-29 13:15:31 +08:00
c5524cb238 plan, executor: use CorrelatedColumn to calculate range. (#6779) 2018-06-28 16:23:05 +08:00
a7819c3385 plan: draw relation bewteen operators with indent (#6894) 2018-06-28 13:28:43 +08:00
6851878b9b *: add session var 'tidb_ddl_reorg_worker_cnt' to control ddl reorg workers count (#6441)
* *: add session var 'tidb_ddl_reorg_worker_cnt' to control ddl reorg workers count
2018-06-27 22:36:18 +08:00
0ab0b50f25 stats: refine the pseudo condition for stats (#6565) 2018-06-27 17:05:37 +08:00
ebf0a9b87b executor: reduce memory usage of insert select from statement (#6891) 2018-06-26 16:29:24 +08:00
0fbb980f9b stats: refine stats delta update (#6808) 2018-06-26 13:51:23 +08:00
99aba76c90 *: Make 'IF NOT EXISTS' great again in 'CREATE TABLE IF NOT EXISTS LIKE' syntax (#6896) 2018-06-26 12:24:57 +08:00
a9360655e8 plan: fix a bug when 'only_full_group_by' is set in sql_mode (#6734)
when 'only_full_group_by' is set in sql_mode, raise error for non-aggregated column in query without GROUP BY.

mysql> create table t(a bigint, b bigint, c bigint);                                                                                           Query OK, 0 rows affected (0.02 sec)

mysql> select a, max(b) from t;
ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'dc_test.t.a'; this is incompatible with sql_mode=only_full_group_by
2018-06-25 17:03:00 +08:00
a507ff3547 executor: polish comment (#6890)
Improve documentation.
2018-06-25 11:23:33 +08:00
48719d2019 stats: refine index row count estimation (#6869) 2018-06-22 15:48:36 +08:00
35b68b63ac expression, executor: extract expression to ProjExec from AggExec (#6839) 2018-06-22 15:25:44 +08:00
284fe1006e *: support select from partition table (#6642) 2018-06-22 11:38:51 +08:00
7a08c62433 executor: start hash join inner/outer workers together (#6856) 2018-06-20 22:58:52 +08:00
3c0bfc19b2 executor: improve performance for insert ignore on duplicate key update statement (#6760) 2018-06-19 20:28:06 +08:00
3d7528cbb3 *: add tidb_hashagg_partial/final_concurrency (#6831) 2018-06-14 10:17:08 +08:00
e2c8c4e975 executor: init builder startTS in buildTableDual (#6830) 2018-06-13 20:03:57 +08:00
d2799801ae test: fix leak test (#6822)
make sure close dom/store in all test.
2018-06-12 17:14:22 +08:00
69fdc8d610 plan: fix a bug in predicate push down phase. (#6809)
* plan: fix a bug in `predicate push down` phase.
2018-06-12 10:26:26 +08:00
d85334d3e9 executor, session: replace new line and add user in query log (#6748)
So we can grep a keyword to get the query, without the need to look up the query in the full log.
user name is also needed for auditing purpose.
2018-06-11 20:38:36 +08:00
37c41fd7ea *: support 'show privileges' (#6792) 2018-06-11 15:43:14 +08:00