-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
[DBAL-1114] Drop database without having it opened #368
[DBAL-1114] Drop database without having it opened #368
Conversation
I've just been hit by this bug. Is it possible to add a test that would fail without this patch? |
👍 for the test |
[DBAL-1114] Drop database without having it opened
That would be overly complex to test... I don't see the point since this is a once bug. |
Same issue here. |
The problem is still there. The suggested fix didn't help. |
The issue is definitely still here. I'm experiencing this issue as well and it seems this fix is not working properly. I have the feeling Doctrine reconnects to the database somewhere in the |
Please don't just comment "it's not working" and rather provide some more error details. Otherwise It's really hard to do any statement on this. Thanks. |
@deeky666 I'm sorry, I should have mentioned the error - it's the same as the one in the jira ticket:
I'm running the console on a Windows 8.1 machine with PHP 5.6.7 installed (but the same happens on a OpenSUSE machine as well). The database is PostgreSQL 9.2.7 which is running on OpenSUSE as well. After doing some debugging I'm beginning to thinking this might be a
I made a new user & database with different names which had nothing in common and tried the same code again:
I believe we might need to open up a bug report in PHP. The same thing happens if you use the
I made a fork of the code with a fix. Could you please check it out here? I had to change the |
A recent fix in DBAL doctrine/dbal@4a603c7 makes the drop database command fail on PostgreSQL. PostgreSQL does not allow dropping a database currently opened by a connection so instead a "temporary" connection without database name specified should be used to drop the database (as already done in create database command).
Successfully tested this with MySQL, SQLite, PostgreSQL, SQL Anywhere, SQL Server (DB2 and Oracle do not support dropping and creating databases anyways).
See: http://www.doctrine-project.org/jira/browse/DBAL-1114