Commit Graph

8026 Commits

Author SHA1 Message Date
5434d8046e ddl: add the reason for the unsupported modify column error. (#3078) 2017-04-18 20:50:20 +08:00
aa9a97a051 *: show create table output utf8_bin collate. (#3076)
*: show create table output utf8_bin collate.

We only support case sensitive utf8_bin collation right now, but show create table ignored the collation.
So the dumped DDL statement doesn't contains collation option.
When the DDL statement is executed on MySQL, the collation will be changed to utf8_general_ci.
If the string column is defined as unique key, there would be duplicated key error.

This PR enforce utf8 charset and utf8_bin collation when parse a column definition, and enfore table option
`DEFAULT CHARSET=utf8 COLLATE=utf8_bin` in SHOW CREATE TABLE statement.
2017-04-18 19:54:21 +08:00
42dec329fe session: return correct LastInsertID. (#3071)
When insert into an auto_increment column with a given value, the last insert id write to client should be the value.
2017-04-18 18:53:24 +08:00
05fc489229 plan: support DataSource converts to new plan. (#3045)
Support Selection and DataSource converts to new plan.
2017-04-18 17:38:44 +08:00
4c9452f944 Builtin: 'LOCATE' dealing with case sensitivity and utf8 characters. (#2960) 2017-04-18 17:23:00 +08:00
05f9a5f838 builtin:func to_base64() (#3070)
implement to_base64 and fix some case for from_base64
2017-04-18 16:01:59 +08:00
6fa6a990f8 statistics: use PrevLastVersion to avoid error. (#3060)
Currently, we use startTS of a txn as the version of a stats table. There may be an error like this:
txn1 with version 2 write firstly.
TiDB update it, and the latest udpate version is 2.
then txn2 with version 1 write.
TiDB will never get it with the version 2.

So we choose to get the table stats which version is greator than the version before last two lease.
2017-04-17 22:50:03 +08:00
d8c52e8ac9 *: Remove useless code and use the DAG mode in tests (#3069) 2017-04-17 22:14:16 +08:00
10e005f1e6 statistics: every histogram use its own version to update. (#3059)
after we support delta updae in #3053 , we shouldn't load the whole histogram when we find the table version updated. Every histogram has it's own version.
2017-04-17 21:13:18 +08:00
d52b257fb3 builtin: implement sec_to_time function (#3026) 2017-04-17 17:51:26 +08:00
b698bb54c3 *: fix data race when defer cancel() is called (#3068)
* *: fix data race when defer cancel() is called

defer cancel() was introduced in this PR
https://github.com/pingcap/tidb/pull/3010
2017-04-17 17:17:07 +08:00
195155ae35 log reason for server is busy error (#3067) 2017-04-17 15:14:23 +08:00
de65e12351 pd: update vendor. (#3066) 2017-04-17 15:00:23 +08:00
bcfb7f7534 store/tikv: separate context for goroutines (#3010) 2017-04-17 10:39:30 +08:00
8ce4a6ad14 builtin: add builtin-function 'to_seconds' (#2984) 2017-04-17 10:27:36 +08:00
48db378cb3 Update ROADMAP.md (#3063) 2017-04-17 09:46:32 +08:00
3126e5e341 *: online update count in table stats. (#3053)
When insert and update happens, we will cache the changed info in every session. After a duration(five minutes now) passes, handle will sweep every cache and merge them. Then dump the delta info to TiKV.
2017-04-15 21:20:44 +08:00
97bfafa702 *: Use AggregationFunction instead of evaluate in aggregation (#3040) 2017-04-14 19:49:00 +08:00
9a22e6830b typeinferer code cleanup (#3039) 2017-04-14 18:46:26 +08:00
846ad93577 *: update stats after creating table. (#3048) 2017-04-14 14:26:54 +08:00
f3d5c0492f Push more write flow to tikv (#3035) 2017-04-13 17:59:46 +08:00
70114c5b4d plan: fix resolving group by. (#3050)
When column is resolved by table sources, it should not check if it is aggregate function.
2017-04-13 16:35:22 +08:00
a671b3c5e5 plan: fix failed case when do index nested loop join (#3034) 2017-04-13 14:25:24 +08:00
d5f049abd5 tidb: add lock for session values (#3049) 2017-04-13 13:25:14 +08:00
dcf12b5273 statistics: refactor statistics package. (#3044) 2017-04-13 13:13:52 +08:00
2cce6080d6 util/types: use GenByArgs for ErrOverflow. (#3038)
ErrOverflow has changed to a format, we need to use GenByArgs to get a valid message.
2017-04-12 13:12:41 +08:00
f5270adcf9 fixed math operation returned wrong error code (#3017) 2017-04-12 11:37:38 +08:00
8a87d775b8 statistics: remove rlock using copy on write. (#3029)
every time we update stats cache, we copy the whole map. By this way we can avoid rlock.
2017-04-12 10:22:22 +08:00
654c10fd80 *: use etcd for privilege update notification (#3030) 2017-04-11 19:47:25 +08:00
780d88a075 *: Use expression instead of evaluator in selection and topN (#3027) 2017-04-11 18:38:28 +08:00
113070162e statistics: separate Column and Index Histogram (#3031) 2017-04-11 17:24:17 +08:00
d25805b639 expression: use MVMap for distinct checker. (#3033)
Reduce memory allocation and GC overhead.
2017-04-11 15:44:10 +08:00
1955d51ff9 plan: implement convert2NewPhysicalPlan for proj and sort (#3006) 2017-04-11 15:22:16 +08:00
a6e0019733 executor: use MVMap for aggregate (#3028) 2017-04-11 13:07:40 +08:00
1a5941ad98 *: update vendor add etcd/clientv3 (#3032) 2017-04-11 12:56:55 +08:00
543a368e16 expression: add NewDistAggFunc interface for mock tikv. (#3009) 2017-04-10 19:13:56 +08:00
9e4961a792 built-in: add time-to-sec built-in function (#2987) 2017-04-10 18:23:33 +08:00
4ce98317ce *: put the stats map to stats handle to make test more easier. (#3014) 2017-04-10 17:01:00 +08:00
e3a0dc68ce *: use column id to get stats instead of column offset (#3019)
Now we assume that the order of columns in stats matches the column offsets. It will return wrong stats sometimes.
If we analyze when a table is (c1, c2) and then drop c1, the c2's offset will become 0. But in stats the position of 0 is c1. I have added this case to test.
2017-04-10 16:03:20 +08:00
1ec85a7b1c *: add three more builtin definitions (#3016) 2017-04-10 14:26:16 +08:00
d88fdecb7b expression: fix pb2expr panic. (#3020)
every time we get builtinFunctionSignature, we should copy it.
A temp fix is to get function class directly.
2017-04-10 11:23:05 +08:00
3386954d9f plan: fix bug of topn push down (#3021)
When Limit has Offset, the pushed down limit's count should be count + offset.
2017-04-10 11:13:41 +08:00
160c36bd89 vendor: update vendor (#3013) 2017-04-09 11:53:06 +08:00
8cea9b8a42 plan, util: move IndexRange and TableRange to types package. (#3018)
Those types will be used in statistics later.
2017-04-08 17:18:51 +08:00
b1a1e94bd5 expression/builtin: fix inet6_ntoa (#3012) 2017-04-07 19:06:54 +08:00
34aeeae5c4 plan: add push topn optimizing. (#2997)
we push topn firstly to remove the limit property from required property. It will be used in new plan builder.
2017-04-07 18:19:05 +08:00
70df9c0464 *: support topN with DAG (#3008) 2017-04-07 18:05:55 +08:00
5eb8a819b7 *: Support limit with DAG (#3004) 2017-04-07 17:13:45 +08:00
445116a415 Builtin: add builtin function 'TO_DAYS' (#2983) 2017-04-07 12:35:00 +08:00
eba4e7138b privilege: clean up some old code (#3005) 2017-04-06 22:43:46 +08:00