Commit Graph

4575 Commits

Author SHA1 Message Date
9575deeb10 ddl: add more features about generated column. (#3431)
DESC table_with_generated_column;
SHOW CREATE TABLE table_with_generated_column;
If generated expression in DDL references bad column, throw error;
If alter table change/drop column dependent by other columns, throw error;
if alter table change/modify generated columns, throw error if needs.
2017-06-13 18:53:58 +08:00
1ccc71a94a statistics, ranger: add method to calculate the range and row count of non pk column (#3234) 2017-06-13 12:01:05 +08:00
4bc3cf7a48 *: support using clause in join statement. (#3372) 2017-06-12 17:14:13 +08:00
233513ec5f executor: set statsLease to 0 (#3435) 2017-06-09 10:13:42 +08:00
72981fdbbd DDL: add two limits for JSON column: used as key and not null default value. (#3401) 2017-06-08 13:52:12 +08:00
eb2b32ee86 executor: validate snapshot TS (#3416) 2017-06-08 13:33:12 +08:00
a623135bae *: add cast(value as JSON) support. (#3395) 2017-06-07 19:58:27 +08:00
1c5ad420d3 executor: avoid allocating a lot of memory at first in topn. (#3392) 2017-06-07 19:13:24 +08:00
7ae996c411 Set stats lease. (#3408) 2017-06-07 18:19:52 +08:00
7d634a5486 *: fix a data race in privilege handle Update() (#3389)
privilege handle bind a ctx to call Update(), but it may be
called by multiple goroutines, so data race in that ctx.

change Update() to take a context parameter, avoid using the
same ctx to fix the race.
2017-06-07 11:30:11 +08:00
e1debd4505 executor: analyze executor construct new distsql exec. (#3410) 2017-06-07 11:10:25 +08:00
78319c7530 *: reset statement context for prepared statements (#3413) 2017-06-07 10:06:32 +08:00
757953632b store/tikv: write read-only select for update locks (#3402) 2017-06-06 01:29:33 -05:00
7b6e4475b3 variable: add a varaible to read current timestamp (#3400) 2017-06-06 07:27:30 +08:00
cae65ff127 executor, util: fix gorm-test when cast a value to varbinary(N) (#3379) 2017-06-04 21:18:47 +08:00
62450b9024 Use etcd to speed up DDL process
Add the mock owner-manager and schema-syncer and enable using etcd to speed up DDL process by default.
2017-06-04 10:00:41 +08:00
1183792524 executor: stop fetch handles after closing. (#3365) 2017-06-01 15:50:51 +08:00
f83bdd0aaf *: fix 3235 (#3358) 2017-05-31 23:27:47 +08:00
77b87ed170 variable: remove GoSQLDriverTest (#3361) 2017-05-31 11:43:38 +08:00
9b6fc032fc *: add References_priv to mysql.user (#3343) 2017-05-26 17:58:32 +08:00
a81726a42f executor, statistics: analyze with null count. (#3336) 2017-05-26 16:44:09 +08:00
6962814a29 add json_type function and compare json with primitive types. (#3307) 2017-05-24 15:21:40 +08:00
3c7df1c302 executor, plan: support batch index look up join. (#3306) 2017-05-23 23:12:19 +08:00
d2557fe49a executor: open doubleread close test and fix bug. (#3316) 2017-05-23 16:27:28 +08:00
b3c43e52ca *: retry commit for prepared statement when schema change (#3297) 2017-05-21 10:42:10 +08:00
26ee3cc2e5 executor: fix data race. (#3284) 2017-05-17 19:27:20 +08:00
1e4bf4775c document store: add JSON type and codec. (#3248)
Document store: add JSON type and codec.

The JSON binary representation is same with MySQL 5.7. we prefer
this not bson because 1) bson only supports JSON compound types
but not JSON primitive types, and 2) this representation is better
than bson on random access.

This PR now can support these  statements:
```
CREATE TABLE t (a json_field);
INSERT INTO t (a) values ('{"a": "b"}');
SELECT * FROM t;
```

JSON codec uses MySQL 5.7 compatible format, which doesn't support use JSON field as key or index. We will limit this in tidb later.
2017-05-17 12:00:34 +08:00
e7257d0e9d plan, executor: open the new plan switch for all test. (#3274) 2017-05-16 20:40:12 +08:00
345b30b929 executor: update an error code (#3276) 2017-05-16 18:07:49 +08:00
69a55ad845 *: refactor a function name (#3263) 2017-05-16 14:43:03 +08:00
301e984309 plan: support index join (#3262)
merge join forgot to set default values.
2017-05-15 17:18:15 +08:00
213954d2e7 *: add specified columns for LOAD DATA INFILE Syntax (#3240)
* : add specified columns for LOAD DATA INFILE Syntax
2017-05-15 16:40:47 +08:00
1e2b6af3ab plan: add topn operator. (#3242) 2017-05-12 10:37:12 +08:00
a0ecf85f9e plan, executor: let new plan resolve after physical plan building. (#3246) 2017-05-11 21:20:50 +08:00
5f34aa4776 *: Add warnings for load data (#3224) 2017-05-11 08:11:52 +08:00
665b137e0e fix jekins ci (#3229) 2017-05-10 16:40:42 +08:00
c5e864539f executor: fix some bugs about new plan. (#3231) 2017-05-10 16:32:00 +08:00
ad52a2462c executor: add open inteferce for Executor. (#3221) 2017-05-09 21:13:22 +08:00
436eb24303 executor,store: fix a bug caused by HashJoinExec encode/decode (#3225)
HashJoinExec encodeRow method doesn't consider timezone,
but decodeRow method does, this introduce a bug.
2017-05-09 16:13:38 +08:00
9a9db91f63 plan: move range calculation to package ranger (#3208) 2017-05-09 02:12:39 -05:00
e6ec57ee55 executor: fix data race (#3212) 2017-05-08 12:35:17 +08:00
0d6490efc4 *: interpret timestamp datum based on session's time_zone (#3167)
1. FromPackedUint don't consider time_zone any more, moved to Unflatten
2. use session's time_zone instead of time.Local
3. add a time.Location parameter to some Encode/Decode functions in tablecodec
2017-05-08 11:58:55 +08:00
cc3676abc0 *: fix aggregation bug in new plan. (#3210) 2017-05-05 13:37:06 +08:00
33c2262b9e *: assign RetType for Constant/Column (#3201) 2017-05-05 12:01:01 +08:00
d128a10fad plan, executor: implement index look up executor. (#3204)
index look up executor implements index double reading. we reuse the concurrency algorithm in old index executor.
2017-05-04 21:33:36 +08:00
67c62b3b39 *: make string in select result convert to bit correctly. (#3188) 2017-05-03 14:14:09 +08:00
3f296ed82d *: add Trigger_priv column to mysql.user (#3143) 2017-05-03 13:49:07 +08:00
67815f1a07 plan: copy the physical info to avoid panic. (#3199) 2017-05-03 11:27:07 +08:00
dbcab85ba6 *: support index reader executor. (#3175) 2017-05-03 10:58:55 +08:00
20be357e86 expression: fix buildin function found_rows() (#3134)
fix issue #3131.
2017-05-02 11:40:10 +08:00