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

Bug: Wrong Statement Is Being Executed

forums forums SQLyog SQLyog: Bugs / Feature Requests Bug: Wrong Statement Is Being Executed

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #9292
      vygi
      Member

      Today I was several times very confused because SQLyog (4.2 beta 5) showed me unexpected results. Ater a while, I realized that it executes wrong query (!) when mouse cursor is placed near beginning of the line (I use F5 to run current query).

      Actually I have several single-line statements in the Query tab. I've put numbers on the front to refer them.

      01. SELECT * FROM inv_customer_service_charge WHERE CUSTOMER_ID=1000258 AND STARTDATETIME>20050901 LIMIT 20;

      02. SELECT * FROM inv_customer_service_charge WHERE STARTDATETIME='2005-09-05 09:35:37';

      03. SELECT * FROM inv_invoice_call_detail WHERE STARTDATETIME='2005-09-05 09:35:37';

      04.

      05. SELECT * FROM inv_customer_service_charge WHERE CUSTOMER_ID=1000928 AND SERVICE_ID='1379699699' AND STARTDATETIME>20050901 LIMIT 20;

      06. SELECT * FROM inv_customer_service_charge WHERE STARTDATETIME='2005-09-01 00:28:14';

      07. SELECT * FROM inv_invoice_call_detail WHERE STARTDATETIME='2005-09-01 00:28:14';

      08.

      09. SELECT 1;

      10. SELECT 2;

      11. SELECT 3;

      12. SELECT 4;

      13. SELECT 5;

      14. SELECT 6;

      It is all right with the lines 1 till 3.

      SQLyog executes 3rd query when cursor is placed in the 4th (empty) line which is already wrong but not really critical.

      SQLyog executes 5th query if the cursor is at the very beginning of 6th line – this is definitively not OK. It executes right query only if cursor is placed after first “S” chacter.

      7th line confuses even more: SQLyog still executes 6th query if the cursor on the left of second “E” (eg. SEL|ECT) and switches to 7th query just after this E (SELE|CT).

      Following test queries:

      SELEC|T 1 still executes 7th query,

      SELECT| 1 is says “1” (correct),

      SELECT 2 says “1” no matter where cursor is placed,

      SELECT 3 still says “1” if the cursor is at the beginning of the line; else it says “2”,

      ….

      SELE|CT 6 selects “3” and SELEC|T 6 returns “4”.

      Huh…. quite confusing, right?… 😮

    • #19491
      peterlaursen
      Participant

      I did experience something similar.

      But I thought it only occurred when a delimiter was used.

    • #19492
      vygi
      Member

      I have installed 4.2 RC1 and the bug is still here!

      Actually I have 3 SQL statements in the query tab:

      1st one is quite long (44 lines),

      and following two are simple ones:

      SELECT MAX(date_id) FROM calls;

      UPDATE OLAP.calls, tinb.zones00 SET dest_id=code WHERE dest_id=100 AND date_id=1759 AND …

      SQLyog 4.2 RC1 still executes 2nd (select max) query when cursor is placed on the left from the blank between “dest_id=100” and “AND” in the 3rd statement. (“…dest_id=100| AND date_id…”)

      Full query tab content attached.

      Vygi

    • #19493
      vygi
      Member

      I have installed 4.2 RC2 and the bug is still here, although it now “works” in reverse order: next query can be executed insted of actual.

      Actually I have 3 SQL statements in the query tab:

      1st one is quite long (44 lines),

      and following two are very simple:

      SELECT 2+2;

      and

      SELECT 3+3;

      SQLyog 4.2 RC2 now executes 3rd (select 3+3) query when cursor is placed on the right from “+” in the 2nd query, eg. in that way:

      SELECT 2+|2;

      SELECT 3+3;

      Result is “6” and not “4”.

      Queries are attached.

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