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

driver.go & interpreter: remove driver.go and interpreter.go #2066

Merged
merged 5 commits into from Nov 23, 2016

Conversation

XuHuaiyu
Copy link
Contributor

@XuHuaiyu XuHuaiyu commented Nov 22, 2016

This commit

  1. removes driver.go and interpreter
  2. rewrite the tests which use TiDB driver.
    PTAL @coocood @shenli @zimulala @hanfei1991

@ngaut
Copy link
Member

ngaut commented Nov 23, 2016

LGTM

c.FailNow()
_, err := s.tk.Exec("insert into t2 values (?, ?, ?)", i, i, i)
if err != nil {
// if err is failed, the column number must be 4 now.
Copy link
Contributor

Choose a reason for hiding this comment

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

Line 577-584 don't need to be modified.

@@ -465,7 +462,7 @@ func (s *testDBSuite) testAddColumn(c *C) {
num := defaultBatchSize + 10
// add some rows
for i := 0; i < num; i++ {
s.mustExec(c, "insert into t2 values (?, ?, ?)", i, i, i)
s.tk.MustExec("insert into t2 values (?, ?, ?)", i, i, i)
Copy link
Contributor

Choose a reason for hiding this comment

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

You updated mustExec already, so you need not to modify here.

tx := mustBegin(c, currDB)
r, err := tx.Query(s)
func newSession(c *C, store kv.Storage, dbName string) tidb.Session {
se, err := tidb.CreateSession(store)
Copy link
Contributor

Choose a reason for hiding this comment

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

Check this error.

@@ -21,10 +21,12 @@ import (
"strings"
"time"

_ "github.com/go-sql-driver/mysql"
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to import mysql driver.

@XuHuaiyu XuHuaiyu force-pushed the xhy/remove-driver-and-interpreter branch from a5eafc7 to fb7f806 Compare November 23, 2016 09:34
@XuHuaiyu
Copy link
Contributor Author

@zimulala @coocood PTAL

@coocood
Copy link
Member

coocood commented Nov 23, 2016

LGTM

1 similar comment
@zimulala
Copy link
Contributor

LGTM

@XuHuaiyu XuHuaiyu merged commit f8c0b05 into master Nov 23, 2016
@XuHuaiyu XuHuaiyu deleted the xhy/remove-driver-and-interpreter branch November 23, 2016 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants