Commit Graph

134 Commits

Author SHA1 Message Date
a2d4bd1df0 log: temporary remove recvTs from context log (#9673) 2019-03-12 17:20:42 +08:00
22af193369 Allocate slice from memory pool (#9643) 2019-03-11 18:32:56 +08:00
4188ae19c0 log,server: add contextual log util & test it in conn.go (#9548) 2019-03-09 11:23:45 +08:00
2c90855cb7 *: add rollback for load data statement (#9444) 2019-02-28 21:03:01 +08:00
469fa877d6 util/hack: define a MutableString type for function hack.String (#9230) 2019-02-12 12:30:40 +08:00
46bebb4db1 server: return correct response if pass specified (#9140)
Improves MySQL compatibility
2019-01-24 19:14:23 +08:00
ec833bc4d2 *: fix some lints produced by golangci-lint (#8999) 2019-01-16 16:44:49 +08:00
00c4ff4fa9 *: refactor Executor.Next() to receive RecordBatch (#8994) 2019-01-14 15:04:36 +08:00
504b10c27c server: try graceful close connection first (#8711) 2019-01-11 18:44:53 +08:00
7a966426ee metric: replace QueryDurationHistogram's "general" type to more detail stmt type (#8819) 2018-12-29 13:10:30 +08:00
eedc6af305 server: compatible to old handshake protocol (#8812) 2018-12-26 20:55:27 +08:00
61a8699c47 server: fix noise log for wait_timeout (#8813) 2018-12-25 20:26:28 +08:00
a7907ede7a *: remove fail field from TxnState (#8712)
Originally, `fail` is added to simplify error handling, avoiding large changes on
the Txn() interface API. But it turns out that `fail` becomes the root of many bugs.
So this commit remove the `fail` and make an API refactory.
2018-12-20 16:36:12 +08:00
7528a059cf executor/server/session: add extra info message sent to mysql client (#8285) 2018-12-19 15:32:49 +08:00
e5b9fc079a server: close all connection directly when terminate tidb (#8692) 2018-12-17 15:51:08 +08:00
ac16ad5a9b server: tweak error info(consistent with the previous handleLoadData) (#8626) 2018-12-10 13:47:57 +08:00
93acd10f53 *: add context.Context to NewTxn(), tiny refactor (#8530) 2018-12-06 17:45:16 +08:00
c137cada68 *: change golang.org/x/net/context to standard context (#8579) 2018-12-05 13:54:00 +08:00
H
bb7bb14fc3 support system variable wait_timeout. (#8245) (#8346) 2018-11-28 11:53:07 +08:00
e69aa2749b server: unix socket should verify user's authentication (#8381) 2018-11-22 13:43:38 +08:00
3742a0d602 *: Txn() function signature refactor and remove ActivePendingTxn() (#8327)
* change Txn() function signature to Txn(active bool)
* ActivePendingTxn() is not used any more because Txn() does the work
* change executor builder getStartTS() uint64 to getStartTS() (uint64, error)
2018-11-16 11:10:39 +08:00
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
a8f2909d40 *: remove kv.BypassLatch option and enable latch scheduler by default (#7882)
kv.BypassLatch was introduced to handle the fake transaction confliction problem
in the old implementation. After redesign of the latch scheduler, it's not
needed any more.

Enable latch scheduler makes CI to run it, we can fix bugs and make this feature
more stable.
There is a small performance penalty, less than 5%, users are free to disable it.
2018-10-15 13:49:38 +08:00
48704b8420 *: fix Command and Time in show processlist (#7844) 2018-10-12 14:06:54 +08:00
05b37de16e *: use chunk grow for simple executor (#7540) 2018-09-27 09:07:51 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
8c44f562f5 metrics: add different labels for restricted SQL and general SQL (#7631)
The newly added label is `sql_type`, it has value: `general` and `internal`,
users can use this label to filter metrics they have interest.

Also, add keyword `[INTERNAL]` for restricted SQL printed in slow log for
convenient identification.
2018-09-07 14:23:48 +08:00
ce0843e4f3 binlog: fix bug in load data (#7074) 2018-07-19 12:58:57 +08:00
f9a5686f9b executor: make set system variable log shorter (#7029) 2018-07-11 14:09:22 +08:00
8db5811cb6 *: 'load data' should not use latches (#6927)
'load data' is not retryable when it meets conflicts, while latches may result in
false positive transaction conflicts. so enable latches will lead to 'load data'
abort abnormally, even there are no conflicts.
2018-07-02 11:53:12 +08:00
ef3d04087d server: fix COM_FIELD_LIST response bug that make mariadb-client crash during use db (#6918) 2018-06-28 13:40:27 +08:00
1fbcc10650 server,mysql: support server-side cursors (#6648)
Implement server-side cursors by handling COM_STMT_FETCH command.
The client indicates that it wants to use cursor
by setting a flag in COM_STMT_EXECUTE
Please refer to https://dev.mysql.com/doc/internals/en/com-stmt-execute.html
Subsequently, the client acquires result rows repeatedly by COM_STMT_FETCH,
which will carry stmt-id and fetch size.
Please refer to https://dev.mysql.com/doc/internals/en/com-stmt-fetch.html
This commit only support forward-only, read-only cursor
2018-06-22 16:10:08 +08:00
93efc51b96 *: unify the connection ID format in log (#6670)
Makes tracing the events of a session easier.
2018-05-29 00:31:16 +08:00
2bcef0fe71 server: support ComChangeUser (#6623) (#6638) 2018-05-24 19:09:45 +08:00
ac5020dc33 server: do not log write error during hand shake. (#6605)
If the handshake failed, we write error message to the connection, if the write returns error, we don't need to log it.
2018-05-22 22:34:49 +08:00
4185e53006 tikv/txn: support local latch in transaction (#6418) 2018-05-07 10:57:01 +08:00
ccf6da1a46 *: rename NextChunk to Next (#6214) 2018-04-03 20:00:30 +08:00
96a51da57c * Add conn ID to the transaction log (#6115) 2018-03-26 20:13:07 +08:00
a3bf058304 *: 1. remove EnableChunk 2. implement Next in baseExecutor to return nil (#5988) 2018-03-09 17:40:11 +08:00
913db283ea *: remove SupportChunk() from interface ResultSet and RecordSet (#5969) 2018-03-07 19:36:15 +08:00
c4a7242a1d executor: fix two bugs when enable chunk (#5945) 2018-03-06 22:00:45 +08:00
ad814b0d6c executor, util: employ memory Tracker to track memory usage during query execution (#5826) 2018-03-06 11:02:09 +08:00
e1121814d2 *: don't import golang.org/x/net/context as goctx alias (#5895)
Now that there is no conflict with sessionctx.Context, this can be
import directly
2018-02-24 03:40:56 -06:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +08:00
08720d01f9 executor: add more comments (#5728) 2018-02-08 19:55:59 -06:00
c92b3056c0 *: refine code for StmtTxn (#5763) 2018-02-08 07:07:12 -06:00
14a9a3df76 server, metrics: move and refine server metrics (#5766) 2018-02-01 19:04:31 +08:00
ddca655fcb server: forget to add StmtCommit when loading data (#5758) 2018-02-01 14:22:12 +08:00
775dcf4503 stats: support 'load stats' command (#5724) 2018-01-31 17:25:27 +08:00