Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.1.67, 5.2.14, 5.3.12, 5.5.34, 10.0.6
    • 5.5.35, 10.0.7
    • None
    • Ubuntu 12.04

    Description

      If I run mysql client, run lang query (like select * from table) and press Ctrl-C - nothing happens, I have to wait till query finish (even several minutes).

      Tried in different virtual terminals.

      Mysqlclient worked fine, before I upgraded to mariadb.

      mariadb-client:
        Installed: 5.5.33a+maria-1~precise
        Candidate: 5.5.33a+maria-1~precise
        Version table:
       *** 5.5.33a+maria-1~precise 0
             1000 http://mariadb.cu.be//repo/5.5/ubuntu/ precise/main amd64 Packages
              100 /var/lib/dpkg/status

      Attachments

        Activity

          elenst Elena Stepanova added a comment - - edited

          I think I figured the missing point.

          There are two important stages of executing a query, easily distinguishable on the client side:
          1) the query is being processed by the server, nothing is happening in the client, the query is kind of "hanging";
          2) the server is returning result set, the client starts printing it.

          When you are saying that Ctrl-C does not work, do you mean the second stage, when the result set rows already started appearing in the client?

          elenst Elena Stepanova added a comment - - edited I think I figured the missing point. There are two important stages of executing a query, easily distinguishable on the client side: 1) the query is being processed by the server, nothing is happening in the client, the query is kind of "hanging"; 2) the server is returning result set, the client starts printing it. When you are saying that Ctrl-C does not work, do you mean the second stage, when the result set rows already started appearing in the client?
          vsespb vsespb added a comment -

          > 2) the server is returning result set, the client starts printing it.
          exactly, stage (2)

          vsespb vsespb added a comment - > 2) the server is returning result set, the client starts printing it. exactly, stage (2)

          The difference between MariaDB and MySQL behavior is visible on the following conditions:

          • the client is connected to the server through the socket;
          • the interruption occurs when the client has already started producing the result set.

          MySQL client aborts the output immediately, saying

          42
          42

          ^C| 42 |
          Ctrl-C – sending "KILL QUERY 52" to server ...
          Ctrl-C – query aborted.
          ------
          262144 rows in set (2.10 sec)

          The next query fails with
          mysql> select * from t1;
          ERROR 1317 (70100): Query execution was interrupted

          The next query works as usual.

          MariaDB client does not do anything until the query is finished:

          42
          42
          42

          ------
          262144 rows in set (2.09 sec)

          The next query fails with
          MariaDB [test]> select * from t1;
          ERROR 1317 (70100): Query execution was interrupted

          The next query works as usual.

          MySQL behavior is better in comparison, I would also want to be able to interrupt the undesirable output.
          It would be even better if the next query didn't inherit the interruption, but maybe it's too difficult to do.

          elenst Elena Stepanova added a comment - The difference between MariaDB and MySQL behavior is visible on the following conditions: the client is connected to the server through the socket ; the interruption occurs when the client has already started producing the result set. MySQL client aborts the output immediately, saying 42 42 ^C| 42 | Ctrl-C – sending "KILL QUERY 52" to server ... Ctrl-C – query aborted. ------ 262144 rows in set (2.10 sec) The next query fails with mysql> select * from t1; ERROR 1317 (70100): Query execution was interrupted The next query works as usual. MariaDB client does not do anything until the query is finished: 42 42 42 ------ 262144 rows in set (2.09 sec) The next query fails with MariaDB [test] > select * from t1; ERROR 1317 (70100): Query execution was interrupted The next query works as usual. MySQL behavior is better in comparison, I would also want to be able to interrupt the undesirable output. It would be even better if the next query didn't inherit the interruption, but maybe it's too difficult to do.
          dbart Daniel Bartholomew added a comment - http://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/3999
          vsespb vsespb added a comment -

          main issue seems fixed in 5.5.35+maria-1~precise
          however seems there is still a problem.

          after query terminated with Ctrl-C, next query is failed.

          |    2545589 |
          |    2545590 |
          |    2545592 |
          |    2545593 |
          |    2545595 ||    2545595 |
          Ctrl-C -- query killed. Continuing normally.
          ^C
          +------------+
          383850 rows in set (0.27 sec)
           
          MariaDB [xxx]> select service_id from services;
          ERROR 1317 (70100): Query execution was interrupted

          vsespb vsespb added a comment - main issue seems fixed in 5.5.35+maria-1~precise however seems there is still a problem. after query terminated with Ctrl-C, next query is failed. | 2545589 | | 2545590 | | 2545592 | | 2545593 | | 2545595 || 2545595 | Ctrl-C -- query killed. Continuing normally. ^C +------------+ 383850 rows in set (0.27 sec)   MariaDB [xxx]> select service_id from services; ERROR 1317 (70100): Query execution was interrupted

          People

            serg Sergei Golubchik
            vsespb vsespb
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.