80110fbf78
*: refactor slow log format and parse slow query log to SLOW_QUERY table. ( #9290 )
2019-03-11 14:42:29 +08:00
560e8cfe57
*: sleep 0 when retry whole transaction ( #9454 )
2019-03-02 13:16:28 +08:00
00c4ff4fa9
*: refactor Executor.Next() to receive RecordBatch ( #8994 )
2019-01-14 15:04:36 +08:00
b552bf8b98
Log duration using seconds instead of the default Duration.String(). It would help the log collector to parse the duration. ( #9015 )
2019-01-11 13:17:42 +08:00
7a966426ee
metric: replace QueryDurationHistogram's "general" type to more detail stmt type ( #8819 )
2018-12-29 13:10:30 +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
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
f085f4fee4
admin: admin check table/index using tidb_snapshot ( #8172 )
...
* admin: admin check table/index support snapshot
2018-11-22 12:21:53 +08:00
6fb260f8a6
*: redesign trace statement with json output ( #8357 )
2018-11-21 13:50:18 +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
0c3e9c1652
session,executor: run statement without transaction ( #8260 )
...
`set @@autocommit = 0`
`select 1` // This statement should not make the session enter a transaction,
because it never need Txn().
Make txn lazy initialize
2018-11-14 20:10:58 +08:00
6ccfec6d2e
*: add a variable tidb_query_log_max_len to set the max length of the query string in the log dynamically ( #8183 )
2018-11-06 11:25:11 +08:00
ec693ce502
*: add a variable tidb_slow_log_threshold to set the slow log threshold dynamically ( #8094 )
2018-11-05 14:54:07 +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
edaec7bdaf
*: move Statement and RecordSet from ast to sqlexec package ( #7970 )
2018-10-21 13:21:26 +08:00
b7a8f91e0a
executor: add the slow log for commit ( #7951 )
2018-10-18 22:59:04 +08:00
d21f294393
*: make explain support explain anaylze ( #7827 )
2018-10-12 20:01:19 +08:00
48704b8420
*: fix Command and Time in show processlist ( #7844 )
2018-10-12 14:06:54 +08:00
dbdd806c0e
*: add session variable "tidb_enable_cascades_planner" ( #7879 )
2018-10-12 13:21:51 +08:00
ee0d4d6c64
executor: print arguments in execute statement in log files ( #7684 )
2018-10-09 15:24:25 +08:00
05b37de16e
*: use chunk grow for simple executor ( #7540 )
2018-09-27 09:07:51 +08:00
081920da93
planner,executor: support admin show slow command ( #7785 )
2018-09-26 19:28:53 +08:00
4b5d83bcc4
domain: add recent slow queries queue and ShowSlowQuery() function ( #7692 )
2018-09-26 15:09:31 +08:00
0f8ee9df48
metric: add slow log metric ( #7759 )
2018-09-25 13:26:29 +08:00
e79bd946ed
*: change package name from plan to planner ( #7760 )
2018-09-25 11:16:39 +08:00
cb03f2bec1
move from juju/errors to pkg/errors ( #7151 )
2018-09-12 15:42:20 +08:00
6604e33c21
domain,executor: store topN slow query in domain ( #7646 )
2018-09-12 11:01:48 +08:00
b3d4ed79b9
server, mysql: return correct column name and column label name ( #7600 )
2018-09-08 13:06:14 +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
e3952d6eb8
*: collect execution details and output them in slow query log ( #7302 )
2018-08-10 21:06:20 +08:00
343cb849b8
*: fast path point select ( #6937 )
2018-07-30 18:13:47 +08:00
f9a5686f9b
executor: make set system variable log shorter ( #7029 )
2018-07-11 14:09:22 +08:00
d85334d3e9
executor, session: replace new line and add user in query log ( #6748 )
...
So we can grep a keyword to get the query, without the need to look up the query in the full log.
user name is also needed for auditing purpose.
2018-06-11 20:38:36 +08:00
ce071f5dd3
refactor load data ( #6665 )
2018-05-29 21:19:14 +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
ce0c9f373b
*: add schema version to the log ( #6527 )
2018-05-18 14:01:47 +08:00
5c2d21eab4
*: remove function "NewChunk" ( #6524 )
2018-05-14 13:43:19 +08:00
530aa9519d
executor: refine log information about slow queries ( #6343 )
2018-04-26 00:48:25 +08:00
fb8efa5596
*: clean up code for set SQL statement priority, let it bypass plan ( #6328 )
2018-04-21 08:58:24 -05:00
ccf6da1a46
*: rename NextChunk to Next ( #6214 )
2018-04-03 20:00:30 +08:00
a90ecea7dd
executor: remove some remained unused functions for removing Executor.Next ( #6112 )
2018-03-22 21:34:52 +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
50e98f427e
config: add validation for configuration ( #5864 )
2018-03-06 14:56:28 +08:00
04b504ee19
executor: remove supportChunk from interface Executor ( #5942 )
2018-03-05 10:45:59 +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
12c87929b8
*:fix some golint && ineffassign && misspell to improve GoReport Result ( #5867 )
2018-02-23 19:31:05 +08:00
4e1a114e68
*: move package context to sessionctx ( #5890 )
2018-02-22 18:03:38 +08:00