Bug #67302 Multiple table drops, doesn't refresh properly if it fails to drop one of the ta
Submitted: 19 Oct 2012 16:44 Modified: 19 Nov 2012 20:05
Reporter: Chris Shepherd Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.44 OS:MacOS (Darwin 11.4.2)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[19 Oct 2012 16:44] Chris Shepherd
Description:
When I am in a database and I have multiple tables selected and choose to drop them. 
Sometimes it will fail because one ore more of my tables might have a forign key constraint that prevents it from being removed. When this happens it tells me
it failed to remove because of XYZ table. However the tables before that were deleted. When I close the window, the old tables which had been removed are still showing until I hit refresh.	

----- Developer Notes -----

MySQL Workbench CE for Mac OS X version 5.2.44  revision 9933
Configuration Directory: /Users/chris/Library/Application Support/MySQL/Workbench
Data Directory: /Applications/MySQLWorkbench.app/Contents/Resources
Cairo Version: 1.9.1
OS: Darwin 11.4.2
CPU: 8x Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz, 8.0 GB RAM

How to repeat:
Setup 3 tables. Table A, Table B, Table C. Setup a foriegn key linking C.field to B.field. Then select all three of those tables and choose to drop table.

 It will start dropping tehme in order. However will not finish, because it will be unable to remove table B. When the screen comes up and you close it you will
still see Table A in the left column under schemas. You will have to manually refresh it to see it was removed.
[19 Oct 2012 16:51] MySQL Verification Team
Thank you for the bug report. This happens with alive server or modeling?. Thanks.
[19 Oct 2012 16:55] Chris Shepherd
It happens with a live server, not modeling.
[19 Oct 2012 20:05] MySQL Verification Team
Thank you for the feedback and if you perform before the drop table the
set foreign_key_checks=0; command it works?
1
mysql 5.7 >show variables like "foreign_key_checks";
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| foreign_key_checks | ON    |
+--------------------+-------+
1 row in set (0.01 sec)

mysql 5.7 >set foreign_key_checks=0;
Query OK, 0 rows affected (0.00 sec)

mysql 5.7 >show variables like "foreign_key_checks";
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| foreign_key_checks | OFF   |
+--------------------+-------+
1 row in set (0.01 sec)

mysql 5.7 >
[20 Nov 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".