Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove the dependence between tables and table #44

Merged
merged 2 commits into from Sep 7, 2015

Conversation

astaxie
Copy link
Contributor

@astaxie astaxie commented Sep 7, 2015

As tables is the implement of table. So tables like the drivers, while
table like database/sql. while drivers need to regiester in the init.

As tables is the implement of table. So tables like the drivers, while
table like database/sql. while drivers need to regiester in the init.
@@ -22,6 +22,7 @@ import (
"github.com/pingcap/tidb/meta/autoid"
"github.com/pingcap/tidb/model"
"github.com/pingcap/tidb/table"
_ "github.com/pingcap/tidb/table/tables"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any elegant way to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the best way for implement and interface.

the same style as database/sql

import "database/sql"
import _ "github.com/go-sql-driver/mysql"

db, err := sql.Open("mysql", "user:password@/dbname")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golint reports
"infoschema.go:25:2: a blank import should be only in a main or test package, or have a comment justifying it"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ngaut
Copy link
Member

ngaut commented Sep 7, 2015

LGTM

ngaut added a commit that referenced this pull request Sep 7, 2015
remove the dependence between tables and table
@ngaut ngaut merged commit 81db754 into pingcap:master Sep 7, 2015
@c4pt0r
Copy link
Member

c4pt0r commented Sep 7, 2015

LGTM

@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
I found dep is hard to use so I switch to glide. Maybe someday we will switch to vgo, the ongoing official go vendor management tool.

After updating vendor, then build parser so we don't need to build parser.go(everytime) in tidb repo and then copy the parser.go to vendor, and finally clean up the useless files.

Besides, both tidb and lightning use logrus as log lib, and they share a same logger before, but we don't need tidb logging. So I set up a new logger for lightning.
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
* update tidb-tools

* update pd dependency

* fix make

* fix ci
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
iosmanthus pushed a commit to iosmanthus/tidb that referenced this pull request Oct 31, 2022
* update reference to client, GetKeyspaceID -> GetKeyspace

Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
rleungx pushed a commit to rleungx/tidb that referenced this pull request Feb 26, 2024
* init

* audit: init first version of audit log

* audit: support log global rotate

* audit: update log keys

* audit: more common notify implement

* audit: add record id

* audit: rename some names

* audit: default use normal log path

* audit: add server ip info

* audit: do some refine

* audit: Add some log keys

* audit: update some item format

* audit: add stmt demo

* audit: support redact

* audit: fix bug

* audit: update filter

* audit: update filter

* audit: check user

* audit: update

* update

* audit: update

* audit: fix bug

* aduit: update

* audit: update

* update

* update

* audit: add filter unit test

* fmt

* Add tests for `tidb_audit_enabled` and `tidb_audit_log`

* Add tests for `tidb_audit_log_max_size` and `tidb_audit_log_max_lifetime`

* Add tests for `tidb_audit_log_reserved_*`

* TODO: TestAuditLogRedact

* Fininsh `TestAuditLogRedact`

* Update (pingcap#1)

* fix typo (pingcap#2)

* Add `TRANSACTION`

* rename sysvar

* audit_log_create_filter, audit_log_remove_filter

* finish function call and table test

* test privilege

* finish test for sysvar

* TODO: TestConnectionEvenClass

* update

* audit: fix lint for audit log (pingcap#1)

* audit: fix UT failure caused by the change of redact log (pingcap#3)

* audit: use `t.TempDir()` to make test stable (pingcap#4)

* audit: fix test failed for 7.1

* Add `OWNERS` file (pingcap#35)

Co-authored-by: Chao Wang <cclcwangchao@hotmail.com>

* audit: fix panic when logging sometime (pingcap#26) (pingcap#31)

* test: fix unstable test TestAuditLogReservedDays (pingcap#8)

* Format sysvar_test.go

* audit: use `StatementContext` to generate redacted SQL (pingcap#9)

* audit: fix panic when logging sometime (pingcap#26)

* update

* add owner

* Update OWNERS

---------

Co-authored-by: CbcWestwolf <1004626265@qq.com>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>

* audit: fix panic sometimes when `create user` without password (pingcap#37) (pingcap#39)

* This is an automated cherry-pick of pingcap#37

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

* fix conflict

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>

* extension/audit: introduce serverless audit log

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* update bazel config

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* support enable audit log when activate

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* add gwconnid to audit log

Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>

* comment unstable test

* update bazel

* add log about activate request

* diff audit log enabled

* audit: fix memory leak for executeSQL (pingcap#44) (pingcap#45)

* This is an automated cherry-pick of pingcap#44

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>

* Update util.go

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Co-authored-by: 王超 <cclcwangchao@hotmail.com>

* Update extension/serverless/OWNERS

---------

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: Wen Jiazhi <jiazhi.wen@pingcap.com>
Co-authored-by: Chao Wang <cclcwangchao@hotmail.com>
Co-authored-by: cbcwestwolf <1004626265@qq.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Co-authored-by: wuhuizuo <wuhuizuo@126.com>
Co-authored-by: zzm <zhouzemin@pingcap.com>
Co-authored-by: Yuqing Bai <baiyuq@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants