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

builder: use empty db should return NoDB error #8908

Merged
merged 3 commits into from Jan 3, 2019

Conversation

Projects
None yet
5 participants
@lerencao
Copy link
Contributor

lerencao commented Jan 2, 2019

What problem does this PR solve?

Fix error returned when using an empty db (USE `` )

MySQL:

mysql> use ``;
ERROR 1046 (3D000): No database selected

TiDB:

mysql> use ``;
ERROR 1049 (42000): Unknown database ''

What is changed and how it works?

Check dbName when building plan.

Check List

Tests

  • Unit test

This change is Reviewable

@zz-jason

This comment has been minimized.

Copy link
Member

zz-jason commented Jan 2, 2019

LGTM

@zz-jason zz-jason added the status/LGT1 label Jan 2, 2019

@eurekaka
Copy link
Contributor

eurekaka left a comment

LGTM

@eurekaka eurekaka added status/LGT2 and removed status/LGT1 labels Jan 2, 2019

@eurekaka

This comment has been minimized.

Copy link
Contributor

eurekaka commented Jan 2, 2019

/run-all-tests

@ngaut

ngaut approved these changes Jan 3, 2019

@eurekaka

This comment has been minimized.

Copy link
Contributor

eurekaka commented Jan 3, 2019

/run-all-tests

@zz-jason

This comment has been minimized.

Copy link
Member

zz-jason commented Jan 3, 2019

/run-unit-test

1 similar comment
@winoros

This comment has been minimized.

Copy link
Member

winoros commented Jan 3, 2019

/run-unit-test

@winoros winoros merged commit 32cfaf1 into pingcap:master Jan 3, 2019

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@lerencao lerencao deleted the lerencao:use-empty-db branch Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment