Commit Graph

653 Commits

Author SHA1 Message Date
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
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
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
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
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
a6e0019733 executor: use MVMap for aggregate (#3028) 2017-04-11 13:07:40 +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
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
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
eba4e7138b privilege: clean up some old code (#3005) 2017-04-06 22:43:46 +08:00
79676b15f0 *: Support aggregation with DAG (#2970) 2017-04-06 14:56:47 +08:00
fac3eb283b plan, executor: add logical prefix for agg, join and apply. (#2985) 2017-04-05 19:38:35 +08:00
f7cc682eed *: support Super_priv (#2990) 2017-04-05 19:21:07 +08:00
c88280978b infoschema: add INFORMATION_SCHEMA.ENGINES table (#2988) 2017-04-05 13:19:11 +08:00
2bac467c0d with some spelling mistakes (#2986) 2017-04-05 10:34:09 +08:00
aaa6184670 *: implement index nested loop join (#2945) 2017-04-01 15:12:20 +08:00
16cefef717 executor, statistics: use FM sketch to estimate NDV (#2966) 2017-04-01 15:03:54 +08:00
9cb61b047d column: fix false negative utf8 check (#2979)
unicode 'u\fffd' is used to represent utf8 error when range a string, but itself is a valid utf8 character.
2017-03-31 21:31:42 +08:00
b9deb5e7aa privilege: rename interface name from Checker to Manager (#2969) 2017-03-31 10:55:38 +08:00
a168f413ba executor: reduce memory usage and GC overhead for hash join. (#2957)
Implemented and use MVMap to reduce GC overhead and memory usage for hash join.
2017-03-30 23:04:02 +08:00
3c494b7df1 *: add INFORMATION_SCHEMA.USER_PRIVILEGES table (#2963) 2017-03-30 17:10:14 +08:00
282ffd9c03 plan: optimize explain result (#2967) 2017-03-30 17:02:09 +08:00
992f367924 *: fix batch insert test data race (#2968)
Use atomic functions to access limit variable.
2017-03-30 16:36:04 +08:00
e068663cdc Auto split insert data into multiple batches. (#2958)
Add a sysvar to enable batch insert data and disable batch insert in transaction.
2017-03-30 14:57:55 +08:00
904101210b executor: fix decode row panic (#2961)
Index Schema may be replaced by aggregation schema, which may be longer than
original schema length, in this case decode row will panic.
2017-03-30 13:15:04 +08:00
78f7eab61d *: refactor distsql and executor. (#2942) 2017-03-29 15:20:25 +08:00
3bfc8207bc expression: fix bug about function equal logic. (#2951) 2017-03-29 14:38:39 +08:00
ee7df059e3 statistics: refactor package. (#2913) 2017-03-29 11:32:40 +08:00
9f17a88377 fix some typo in comments (#2943) 2017-03-29 08:55:49 +08:00
62c4685a7c plan: fix sort plan explain (#2937) 2017-03-29 08:51:39 +08:00
b799b182e8 store: Support table scan, index scan and selection with DAG. (#2930) 2017-03-28 22:36:21 +08:00
a89879d61a executor: skip the unstable test. (#2939)
Multiple package runs on the same process in parallel, we can't make sure the test always pass.
2017-03-28 15:12:50 +08:00
99b7606624 executor: Make admin test stable (#2940) 2017-03-28 14:50:30 +08:00
c8c7dde6d7 plan: enforce property for index join. (#2938) 2017-03-28 12:02:37 +08:00
60ba388e0c *: check visibility for show databases and tables (#2934) 2017-03-28 11:28:50 +08:00
0e172acd8e Add a controller in Selection to control the conditions of the below scan plan. (#2834)
Prepare for IndexLookupJoin.
2017-03-28 09:58:49 +08:00
95fb7d0ec3 Revert "fix sort in explain (#2933)" (#2936)
This reverts commit a6bf9231f985c6fe6a7049f9d56026d14a92d07d.
2017-03-28 00:23:33 +08:00
a6bf9231f9 fix sort in explain (#2933) 2017-03-27 23:59:38 +08:00
6c6f23f329 Maxiaoyu/ordered merge join (#2931)
plan: make merge sort keep ordering during planning
2017-03-27 19:27:43 +08:00
9f23ab74a9 store/tivk: wait task channel in Close (#2925) 2017-03-27 12:28:31 +08:00
6aa45e441c Make index serial scan concurrency configurable and fix golint errors. (#2928) 2017-03-27 00:57:19 +08:00
1513adc986 store/tikv: fix coprocessor iterator goroutine leak. (#2921) 2017-03-24 19:14:46 +08:00
ed56d82fa7 sessionctx/variable: refine TiDB specific system variables. (#2915) 2017-03-24 12:57:33 +08:00
7aa024c9a0 *: add UTF8 check global variable. (#2899) 2017-03-23 08:56:21 +08:00