相关文章推荐
  • Managing your MySQL Database Systems Managing your MySQL Database Systems
  • Database Schema Synchronization
  • MySQL DATA synchronization
  • SQL Scheduler and Reporting Tool
  • Importing external data
  • Backup/Restore
  • SQLyog Job Agent (SJA) SQLyog Job Agent (SJA)
  • Working with Views, Stored Procedures and Triggers
  • Character Set and Localization Issues
  • MySQL bugs that affect SQLyog
  • Questions on Open Source and Compiling
  • Sitemap
  • I get error 1130 "Host is not allowed to ... (440681 views)
  • Error no. 2003: Can't connect... (356794 views)
  • SQLyog Version History (209136 views)
  • Error no. 1045: "Connection denied..." (174923 views)
  • Error No. 2005: Unknown MySQL server host... (156217 views)
  • Error no. 1251: "Client does not support authentication..." (142615 views)
  • Can I use SQLyog with the WINE Windows emulator ... (132696 views)
  • What is HTTP-tunneling? (111320 views)
  • What Is SSH and SSH-tunneling? (82739 views)
  • Introduction to the 'SQLyog Job Agent' (SJA) (80037 views)
  • SQLyog Version History (2014-06-08 10:22)
  • I get error 1130 "Host is not allowed to ... (2014-01-30 12:21)
  • About CHUNKs and BULKs (2014-01-09 11:53)
  • SQLyog is a client for the MySQL server - ... (2013-08-04 04:48)
  • Problems creating a functional DSN on 64 bit Windows. ... (2013-07-22 08:34)
  • This is not really a bug with MySQL but nevertheless an undocumented issue that causes a problem with execution of queries with comments.

    A series of queries with a comment like

    sqlstatement_1;
    sqlstatement_2;
    ...
    sqlstatement_n;
    // this is a comment

    raise the infamous MySQL error: "Error Code: 1064: You have an error ..." when you "execute all queries" from the SQLyog query-pane. However those three

    sqlstatement_1;
    sqlstatement_2;
    sqlstatement_n;
    # this is a comment

    and

    sqlstatement_1;
    sqlstatement_2;
    sqlstatement_n;
    /* this is a comment */

    and

    sqlstatement_1;
    sqlstatement_2;
    sqlstatement_n;
    -- this is a comment

    don't raise any error.

    The MySQL documentation at http://dev.mysql.com/doc/refman/5.0/en/comments.html clearly states that only the three last styles/formats are valid comments with the MySQL server . Sometimes the //style comment works too and some people use it frequently. When it works it is because support for it is implemented in the client used and this //comment is 'stripped out' before the queries are sent to the server.

    We do not support the //style comments in SQLyog. Use one of the three styles/formats available with the MySQL server.

    Also with the Import External Data Tool we have had examples of queries failing (when connecting to Oracle for instance) when queries contained such //comments. They did work with the client that the user used to use (and this user never thought about it was implemented with the client for Oracle only) but they do not work with the SJA either. Use a comment-syntax supported by the source server !

     
    推荐文章