forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Feature Request: Warn When Dump Contains Use Statement
- This topic is empty.
-
AuthorPosts
-
-
November 24, 2011 at 12:23 pm #12515larsenParticipant
Hi,
atm, SQLyog only warns with a message box “[…]unless one or more USE statements[…]” when you want to import a SQL script into a database. I think it would be nice when SQLyog actually scanned the file for such statements and only if present would give that warning.
On the downside, it could take some time to scan a big sql dump, so perhaps make it configurable.
Lars
-
November 25, 2011 at 5:50 am #32873ashwinMember
Hello,
Quote:SQLyog only warns with a message box “[…]unless one or more USE statements[…]” when you want to import a SQL script into a database. I think it would be nice when SQLyog actually scanned the file for such statements and only if present would give that warning.SQLyog has to parse the sql file looking for a USE statement and as you told- “On the downside, it could take some time to scan a big sql dump, so perhaps make it configurable.” So the only option left is to add an option in Preferences. But it is not a helpful option to make it configurable. So it is not going to be in our priority list.
Thanks for your comments.
Regards,
Ashwin A
-
November 25, 2011 at 7:54 am #32874larsenParticipant
I respect your decision but I´m curious why making it an option would not be helpful. Could you please explain that to me?
-
November 26, 2011 at 12:05 pm #32875peterlaursenParticipant
I'll explain.
1)
First of all we had a lot of complaints before we added this dialog. We also had some very aggressive tweets and Blogs that “SQLyog imports my backup to the wrong database”. Even mistunderstood they had impact on our business. And it is actually equally bad whether the file has a USE statement or not. In either case the data may import to another database than where user expects if he does not realize how USE statements work. This dialog is a reminder for users that we cannot afford to omit.
2)
Checking for a *USE-statement* isn't plain simple, because it is not enough to check for a *USE-literal*. The literal “USE” may occur in an INSERT statement (for a string column) or in a 'stored program' or View -body. So when Ashwin wrote that we need to *parse* he meant *parse* and not just *read*. It would requrie a SQL-parser inside SQLyog. We don't have such and we don't want to add it because we believe that parsing is a job for the server and not the client.
3)
Add to this that a DUMP may be very large (Gigabytes).
You will have to live with the little annoyance of this dialog.
-
November 28, 2011 at 10:54 am #32876larsenParticipant
Ok. Thank you very much for the detailed explanation.
-
-
AuthorPosts
- You must be logged in to reply to this topic.