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
0af8520a78
sessionctx/variable: remove dependency on context package. ( #2064 )
...
Makes using session variable easier and faster.
Prepare for use session variable to handle data truncated error.
2016-11-23 14:39:48 +08:00
3612ba0e0f
binlog: add sequence to binlog.TableMutation ( #2060 )
...
Add sequence in binlog.TableMutation to preserve the original mutation order.
2016-11-22 17:54:24 +08:00
5f457a2c62
*: Add a variable to skip constraint check in session. ( #2031 )
...
When import data from mysqldump/mydumper. We could skip constraint check.
2016-11-18 22:54:28 +08:00
6748d3e83e
*: add comment for show table status. ( #2032 )
2016-11-18 19:10:25 +08:00
d0cb5d9187
*: truncate data ( #2002 )
2016-11-15 14:02:20 +08:00
5d3bb33afd
util/types: fix decimal conversion. ( #1979 )
...
When datum converts to decimal, we should check the Flen and Decimal of
the given field type, return max value for overflow and round the value
for truncation.
2016-11-09 16:53:30 +08:00
1c6c145f94
*: Set custom verbose flag to true ( #1956 )
...
* *: set custom verbose flag to true
* *: update .gitignore
2016-11-05 18:00:13 +08:00
4a6b093dff
table/tables: fix panic ( #1952 )
...
fix panic
2016-11-05 10:04:42 +08:00
3738794502
util/types, table: truncate string by rune count, remove UTF8 validation ( #1877 )
...
Column length defined in create table should limits the rune count rather than bytes.
And MySQL doesn't return error for inserting invalid UTF8 string, we should not do it.
2016-10-26 20:34:35 +08:00
d04dea2c57
*: use schema diff to reduce memory allocation ( #1858 )
...
When schema version has changed, we don't need to reload all schemas, only
modified table need to be reloaded, this will reduce the pressure on Go garbage collector.
Also removed used map in *inforSchema.
2016-10-24 15:17:44 +08:00
9f615fc5dc
table: change Column type to alias of ColumnInfo ( #1855 )
...
So we can use a ColumnInfo directly, without coping, reduce memory usage.
2016-10-20 21:48:08 +08:00
3d670c47b0
executor,table: remove LockKeys and Truncate method in Table interface. ( #1833 )
...
Those two method should not be defiend in Table, LockKeys should be implemented
In SelectLock executor, Truncate has changed to use DDL operation.
2016-10-18 00:35:45 +08:00
ff1c7b1f0a
table: check valid UTF8 value for UTF8 column ( #1818 )
...
We need to check if the input data is valid UTF8 string if the column charset is UTF8,
Otherwise, it may cause more serious error in the future, and hard to fix.
2016-10-14 16:00:02 +08:00
f86a32d261
ddl: write DDL binlog. ( #1752 )
...
Pass query string in context, also disallows prepare DDL, so we can be sure that
DDL query do not contains parameter marker.
change binlog row encoding format.
including columnID in binlog row, so it can be adapted to different schema version.
prepend old row for update binlog when don't have PK.
2016-10-08 11:48:58 +08:00
1dd9e89eb0
*: write binlog to unix socket. ( #1660 )
...
support write binlog to a unix socket through grpc.
2016-09-21 13:09:03 +08:00
ed4649e85d
*: Support load data local ( #1634 )
2016-08-30 09:38:37 +08:00
558ba06368
decode with value size ( #1641 )
...
Add size parameter for Decode to reduce slice growth
BenchmarkDecodeWithSize-8 300000 6153 ns/op
BenchmarkDecodeWithOutSize-8 200000 11934 ns/op
2016-08-26 10:44:03 +08:00
2b5d2b15d0
*: Fix mysql_test and make autoid rebase method more efficient. ( #1637 )
...
* *: fix mysql_test and more efficient autoid rebase method.
2016-08-25 17:49:51 +08:00
fa06043ce7
More efficient autoid rebase methord ( #1631 )
...
Prevent update kv everytime when rebase autoid
2016-08-24 11:18:40 +08:00
e31b281ee7
*: use new MyDecimal implementation. ( #1611 )
2016-08-22 20:24:39 +08:00
f3645267bd
Remove useless index seek ( #1556 )
2016-08-08 10:27:39 +08:00
cbddbcdcd0
*: fix add record panic ( #1482 )
2016-07-22 08:38:18 +08:00
fda013b080
ddl: set default value to zero value when add a not null column. ( #1443 )
2016-07-14 10:57:34 +08:00
8edbf557a2
*: remove MemBuffer cache and Release method. ( #1411 )
2016-07-08 11:57:02 +08:00
e687f908d3
*: tiny clean up ( #1404 )
2016-07-07 09:50:45 +08:00
5dc459c657
terror: Improve terror performance. ( #1393 )
2016-07-05 15:04:33 +08:00
5408833b9a
ddl: improve ddl test ( #1387 )
2016-07-05 11:21:50 +08:00
0450ba0b47
*: unify "See url" format ( #1391 )
...
* *: unify "See url" format
2016-07-05 11:21:10 +08:00
d04b0b997c
*: support index length ( #1350 )
...
For string columns, indexes can be created that use only the
leading part of column values, using col_name(length) syntax
to specify an index prefix length
2016-07-02 13:26:40 +08:00
d1afacc451
table: export WritableCols ( #1369 )
2016-07-01 12:55:04 +08:00
a4fe3f457c
tables: Fix shadowed err ( #1362 )
2016-06-30 11:27:53 +08:00
9bf6e03812
table/table: set default value when write only column is null ( #1357 )
...
The test cover this issue need some work, will be added in next PR.
2016-06-29 14:29:20 +08:00
83a6c94302
table/tables: fix IterRecords. ( #1356 )
2016-06-29 11:43:07 +08:00
a0e3c2ee3b
ddl: fix column test ( #1354 )
2016-06-28 12:37:12 +08:00