Commit Graph

86 Commits

Author SHA1 Message Date
5bf03c8df4 executor: add SHUTDOWN command and privilege check (#12804) 2019-10-21 21:49:56 +08:00
0fbd21c085 *: replace pessimistic default config option with global variable (#12041) 2019-09-05 18:32:58 +08:00
073ab9b6a3 *: refactor RestrictedSQLExecutor (#11904) 2019-08-28 19:17:19 +08:00
8a4b60c682 executor, privileges: fix privilege check fail for CREATE USER and DROP USER (#11589) 2019-08-19 19:08:17 +08:00
b393b76826 executor, privileges: fix privileges check fail for SET DEFAULT ROLE (#11201) 2019-08-19 13:48:16 +08:00
c00d8a95cf executor, privilege: fix some two bug of RBAC (#11273) 2019-07-22 13:08:03 +08:00
5886bb90d1 executor: let flush privileges do nothing when skip-grant-table is configured (#10986)
When skip-grant-table is enabled, privilege handle is not initialized, calling flush privileges
would meet nil pointer panic
2019-07-02 10:44:30 +08:00
d244723a5e executor: remove unused structure RecordBatch (#10891) 2019-06-26 15:26:16 +08:00
c8d1ff7ca6 *: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' (#10866) 2019-06-21 19:13:31 +08:00
78881f6d2d executor: execute some statement (create user grant etc) would commit current transaction automically (#10707) 2019-06-06 15:45:48 +08:00
8344801d32 executor,privilege: fix "show grants" result for RBAC (#10571) 2019-05-24 13:18:58 +08:00
96c6ea1ca9 *: support 'tidb_txn_mode' session variable. (#10574) 2019-05-24 00:50:04 +08:00
3439e6be48 executor: add warning for "drop user if exists" (#10395) 2019-05-22 16:53:19 +08:00
373748adf7 *: support pessimistic transaction (experimental feature) (#10297) 2019-05-11 09:48:45 +08:00
1690912375 privilege,executor: update DBIsVisible() function for RBAC (#10261) 2019-05-08 15:23:46 +08:00
0b8ce46f0c priviege, executor: add set role option (#10268) 2019-05-08 14:10:21 +08:00
58d1bb8cb3 privilege: support authentication with active roles (#10125) 2019-04-23 10:05:53 +08:00
abeddab5ba privilege, executor: support SET DEFAULT ROLE (#9949) 2019-04-17 14:25:49 +08:00
4f20b5b9f4 executor, plan: add revoke role support (#9771) 2019-04-11 15:34:29 +08:00
e9653675dd *: remove errors.Trace in main handle path (#10033) 2019-04-04 14:27:15 +08:00
c612252667 executor, planner: add executor to support GRANT ROLE (#9721) 2019-03-30 20:18:47 +08:00
778c3f4a5a privilege, executor: add SET ROLE and CURRENT_ROLE support (#9581) 2019-03-21 13:11:27 +08:00
f738ba24ad executor: replace logger with zap logger (#9521) 2019-03-14 15:14:38 +08:00
d4bad4ebb3 executor: add DROP ROLE support (#9616) 2019-03-13 15:01:38 +08:00
4f232e5c8d executor: add CREATE ROLE support (#9461) 2019-03-01 10:07:28 +08:00
84d1513b09 plugin: support flush tidb plugin {name} in tidb-server (#9320) 2019-02-18 13:48:43 +08:00
c3f64b2629 *: tiny update for the whitelist plugin (#9271) 2019-02-12 15:54:45 +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
3040788655 *: make errcheck work again (#8795) 2018-12-25 17:16:52 +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
f72769cee4 sessionctx/variable: fix field(History) typo in TransactionContext (#8600) 2018-12-07 12:33:03 +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
558e02dbce executor: fix grant operation in ANSI_QUOTES sql mode (#8561) 2018-12-04 20:55:24 +08:00
73c91738d7 executor: privilege check USE command (#8418) 2018-11-27 19:06:17 +08:00
7a88c33a67 executor,planner: Improve SET PASSWORD (#8426) 2018-11-26 22:19:51 +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
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
508a83607a Changed FTWRL to produce error (#7712) 2018-10-12 10:04:22 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
33367fdd48 config,executor: provide a compatible-kill-query option in the config file (#7192)
When compatible-kill-query option is turned on, "kill xxx" command will not be
ignored, it works like "kill tidb xxx".
2018-07-30 23:53:47 +08:00
f9a5686f9b executor: make set system variable log shorter (#7029) 2018-07-11 14:09:22 +08:00
3f574d97c9 stats: refactor stats update mechanism (#6901) 2018-07-06 11:22:11 +08:00
a54ab4270c executor: gather all the error definitions together (#6772) 2018-06-07 10:58:03 +08:00
7227db3a0c executor: fix drop user bug (#6624) 2018-06-06 17:13:28 +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
d3a69d8b04 *: set rollback log to debug level (#6653) 2018-05-26 22:11:27 +08:00