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

[5.2] Don't make use call when database is empty #13701

Merged

Conversation

thomasruiz
Copy link
Contributor

When database is empty, the use call will throw SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected. Making a connection to a mysql server without specifying a database is useful in some cases, it shouldn't throw an error.

@thomasruiz thomasruiz changed the title Don't make use call when database is empty [5.2] Don't make use call when database is empty May 25, 2016
@taylorotwell taylorotwell merged commit 3fed0f1 into laravel:5.2 May 25, 2016
@vlakoff
Copy link
Contributor

vlakoff commented May 25, 2016

It's probably better not to make such SQL statements when they are not required. There is the overhead of course, and it could only introduce problems, potentially.

😇

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.

3 participants