forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Drop Database Bug
- This topic is empty.
-
AuthorPosts
-
-
December 20, 2005 at 8:28 pm #9411danyMember
Hi,
if you drop the last database in the Object Browser SQLyog does not change the database selected.
HOW TO REPEAT:
1) Select the last database in the object browser
2) From the Tools menu use “Export database as SQL statements”
3) Drop that database from the drop-down menu
4) From the Tools menu use “Import from SQL statements” to import the file generated in step 2.
you will get this error:
“There was an error while executing a query…”
Bye
-
December 20, 2005 at 8:52 pm #20059peterlaursenParticipant
Confirmed with this simple code
Code:*
SQLyog Enterprise – MySQL GUI v5.01
Host – 5.0.17-nt-max : Database – yy
*********************************************************************
Server version : 5.0.17-nt-max
*/create database if not exists `yy`;
USE `yy`;
/*Table structure for table `tablename1` */
DROP TABLE IF EXISTS `tablename1`;
CREATE TABLE `tablename1` (
`id` bigint(20) NOT NULL auto_increment,
`t` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;/*Data for the table `tablename1` */
However, if you add in between 3) and 4)
3a: select an existing database (from dropdown or by highligting in Object Browser) – – – it works OK.
Try also to open 'History' tab while importing. At the very moment you click 'Import from SQL-statements' this SQL is added to the history
Code:select database()I don't understand this SQL and how it was supposed to work! 😮
-
December 21, 2005 at 5:52 am #20060RiteshMember
select database() returns the current database for the connection. SQLyog uses the result to know the current selected database.
-
December 21, 2005 at 9:51 am #20061RiteshMember
Bug confirmed. When you drop the last database in the Object Browser, the currently selected database shown in the combo box is incorrect. It has been fixed in v5.02 development tree. Now it will correctly show “NONE” as currently selected database in the dialog.
Quote:you will get this error:“There was an error while executing a query…”
I dont think this is an error. What does sqlyog.err say?
It generally happens when you deselect the option “Add CREATE DATABASE” option while exporting the data. This result in execution of statements with respect to the currently selected database which is not existing as you have just dropped it. Can you confirm that CREATE DATABASE IF NOT EXISTS sql is present in the dump file?
-
December 21, 2005 at 9:54 am #20062RiteshMember
Or did I miss something?
-
December 21, 2005 at 3:36 pm #20063peterlaursenParticipant
The error message appearing in SQLyog 5.01 when following the procedure as desribed by dany is like quoted by him. Sqlyog.err does not give more info.
Did you repeat steps 1-4 as described by dany?
If no error occurs with the 5.02 tree with the same procedure there is no need for further discussin!
-
December 21, 2005 at 7:18 pm #20064peterlaursenParticipant
No matter what …
bug confirmed fixed with 5.02 Beta. 😀
-
December 22, 2005 at 5:45 am #20065danyMember
Hi,
these are the first lines of the dump file:
create database if not exists `yyy`;
USE `yyy`;
SET FOREIGN_KEY_CHECKS=0;
By the way this bug was in SQLyog at least from V. 4.07.
Bye
-
December 22, 2005 at 5:56 am #20066RiteshMember
http://www.webyog.com/forums/index.php?sho…st=0&#entry8251
Does that help?
-
December 22, 2005 at 6:50 pm #20067danyMember
Hi Ritesh,
version 5.02beta it's working better.
But there's still a small thing that can be fixed.
1) use the “Import From SQL Statements” function to import a database that will get to the last position in the Object Browser
2) press F9 to refresh the Object Browser
3) even if you click on the database name SQLyog will not select that database as the active database.
Daniele
-
December 22, 2005 at 7:03 pm #20068peterlaursenParticipant
Looks like then that pressing
only does a graphics refresh, but does not refresh the memory stack/structure that holds information about available databases !? -
February 28, 2006 at 1:47 am #20069jarsylMember
While using the “Import From SQL Statements” command I noticed this bug as well. If you click on the top-most element in the object browser, the one that takes the form “username@host” and then click refresh, the object browser will update correctly.
-
February 28, 2006 at 1:56 am #20070peterlaursenParticipant
I just tested with SQLyog 5.1 BETA 1 and it seems to be fixed here already. Simply clicking 'refresh' displays the newly imported database (`utest` in this case – the latest in alphabetical view). No need for any tricks like jarsyl's with 5.1! 🙂
-
March 1, 2006 at 3:56 am #20071jarsylMember
Glad to hear it. I meant to mention that I am using v5.02. Looking forward to trying v5.1.
-
-
AuthorPosts
- You must be logged in to reply to this topic.