Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Feature Request: Warn When Dump Contains Use Statement

forums forums SQLyog SQLyog: Bugs / Feature Requests Feature Request: Warn When Dump Contains Use Statement

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #12515
      larsen
      Participant

      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

    • #32873
      ashwin
      Member

      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

    • #32874
      larsen
      Participant

      I respect your decision but I´m curious why making it an option would not be helpful. Could you please explain that to me?

    • #32875
      peterlaursen
      Participant

      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.

    • #32876
      larsen
      Participant

      Ok. Thank you very much for the detailed explanation.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.