Commit Graph

266 Commits

Author SHA1 Message Date
88e1666ac6 *: change the log package to logrus (#4452) 2017-09-08 00:45:07 -05:00
fc209cb1df *: rewrite hex and bit literals (#4415) 2017-09-07 16:28:24 +08:00
ea29a1c30d expression: Support more types when getting default flen and decimal (#4236) 2017-08-28 02:26:07 -05:00
9367fdddd4 show column comment, table auto-increment; change index default collation (#4303)
* - 1. change index default collation from "utf8_bin" to "A".
- 2. show column comment. fix #4224.
- 3. show table auto-increment. fix #3747.
2017-08-26 17:45:03 -05:00
881d76840b plan,executor: calculate generated columns in CRUD. (#3951) 2017-08-23 14:52:43 +08:00
f5fd467f46 *: change terror.ErrorEqual to Error.Equal, which is more effetive (#4217) 2017-08-17 20:06:48 +08:00
bae8fe46f9 ddl: index name should not be primary (#3834) (#4030) 2017-08-06 20:59:14 +08:00
01c1d4c5c5 executor: truncate the trailing spaces for "CHAR[(M)]" types (#3878) 2017-08-01 16:15:25 +08:00
dff73cc6e4 *: Modify the Makefile for go vet (#3900) 2017-07-30 23:02:52 -05:00
597796e166 *: fix bad column offsets in DML. (#3754) 2017-07-28 20:56:25 +08:00
b091e828cf table(test): add unit tests for coverage of package table (#3770) 2017-07-21 21:34:59 +08:00
e2a122bfbb generation-expression: add name resolve (#3676) 2017-07-18 13:29:24 +08:00
1e1d01ad10 executor: fix explicitly insert null value into timestamp column (#3646)
create table t (ts timestamp);
insert into t values (null);
This should insert a null rather than default value.
2017-07-12 17:13:23 +08:00
a0dfa040ef table,tablecodec,util/types: make it possible to read empty enum value (#3664) 2017-07-12 16:42:28 +08:00
4023bb88b3 plan: Clean up (#3606) 2017-07-04 00:13:08 +08:00
379914a5af *: fix timestamp column data and index inconsistent involving timezone (#3497) 2017-06-20 15:22:50 +08:00
a5d14645d0 *: Fix add index after add column with default value (#3510) 2017-06-20 13:32:22 +08:00
19b2fb0e4c table: add GeneratedExpr in table.Column. (#3487) 2017-06-16 21:43:44 +08:00
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
a438237317 *: refactor binlog and reenable test (#3433) 2017-06-09 11:39:24 +08:00
5f34aa4776 *: Add warnings for load data (#3224) 2017-05-11 08:11:52 +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
892e3a8d18 fix table comments (#3184) 2017-04-29 06:51:26 -05:00
59154905aa *: rename table-driven tests name. (#3081) 2017-04-19 10:02:57 +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
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
e40243059d table: log more detail on incorrect utf8 value. (#2916) 2017-03-23 20:49:24 +08:00
7aa024c9a0 *: add UTF8 check global variable. (#2899) 2017-03-23 08:56:21 +08:00
d85a4cb1c8 table/column: disable utf8 check. (#2895)
When old row has invalid utf8 value and the data doesn't change, we should not fail to update.
So temporarily disable utf8 check until we can handle this problem.

* *: change log level

* *: do not truncate
2017-03-20 17:24:59 +08:00
10260db2bd table/tables: fix update unique index in transaction (#2843) 2017-03-16 12:02:50 +08:00
cca10bab58 table: check and truncate UTF8 string in CastValue. (#2819) 2017-03-15 11:26:19 +08:00
fb9cd85e2e *: Speed up the add columns phase (#2769) 2017-03-07 20:11:29 +08:00
8ff4e75407 binlog: always include old row for update and delete (#2624)
Old row value is required for translating to MySQL binlog.
2017-02-28 15:43:04 +08:00
0282310e8b executor,localstore: use default value if column not found in row. (#2703) 2017-02-23 15:18:57 +08:00
8bafc3d515 tidb: accelerate unit test (#2590)
Avoid BootstrapSession everytime, just do it once in testSessionSuite.SetUpSuite
2017-02-06 15:11:38 +08:00
9d536e34a7 *: run a bootstrap session before store is ready (fix race) (#2491) 2017-01-22 11:39:25 +08:00
999517c4f1 Revert "*: run a bootstrap session before store is ready" (#2490) 2017-01-17 15:14:24 +08:00
e1ecc1059e *: run a bootstrap session before store is ready (#2481) 2017-01-17 14:46:35 +08:00
64484a4257 *: refactor context.Context (#2298)
Make transaction life cycle under control, prepare for correctly handle schema out of date error.
The old `GetTxn(forceNew boll)` is replaced by `Txn` and `NewTxn`,
`CommitTxn` and `RollbackTxn` is removed.
2016-12-23 13:02:41 +08:00
26e5c0c867 *: move evaluator's helper to expression package. (#2291) 2016-12-23 11:34:52 +08:00
f32eaedcb3 Skip constraint check for prewrite when loading data (#2288) 2016-12-21 21:16:53 +08:00
0adabe53a1 *: begin a transaction in PrepareTxnCtx, unify in transaction. (#2290)
Transaction should has the same life cycle as TxnCtx, so create a
new transaction in PrepareTxnCtx if transaction is nil or invalid.
2016-12-21 16:48:19 +08:00
c24c90b4d3 tidb, variable: refactor retry, add TransactionContext (#2256) 2016-12-16 11:07:59 +08:00
d406c77c1f Revert "tidb, variable: refactor retry, add TransactionContext" (#2255) 2016-12-15 10:42:04 +08:00
ff0ceb1785 tidb, variable: refactor retry, add TransactionContext (#2254) 2016-12-15 10:35:57 +08:00
d5cf23a838 *: non-unique index doesn't need store value, write a '0' to reduce space (#2218) 2016-12-09 21:02:03 +08:00
74a1c9935d *: add StatementContext argument to functions. (#2157)
Add StatementContext argument to more functions where it is needed.
2016-12-02 23:28:11 +08:00
5230f5eabd variable: define StatementContext. (#2121)
StatementContext is used to hold statement execution mode and state.
As every computation need this, there are many API changes.
2016-11-29 14:25:38 +08:00
9cca7b0b02 types: move Bit, Enum, Set, Hex to types package (#2085)
Consistent with Time and MyDecimal.
2016-11-24 12:28:55 +08:00
b19cc75a94 mysql, types: move MyDecimal and Time from 'mysql' to 'types' package. (#2082)
So we don't need to handle sql mode in 'mysql' package, avoid potential dependency cycle.
2016-11-24 10:50:31 +08:00