Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-5735

Selecting from SEQUENCE table with negative number hangs server

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.8
    • 10.0.9
    • None
    • None
    • mariadb-10.0.8-linux-x86_64 from tarball on CentOS 6.5

    Description

      This command causes the connection to hang:

        select * from `seq_-1_to_10`;

      It is possible for other threads to connect to the server, but the thread executing the SELECt statement is hung.

      mysql 10.0.8-MariaDB (root) [test] db1> show processlist;
      +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
      | Id | User | Host      | db   | Command | Time | State          | Info                         | Progress |
      +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
      |  2 | root | localhost | test | Query   |  154 | Writing to net | select * from `seq_-1_to_10` |    0.000 |
      |  3 | root | localhost | test | Query   |    0 | init           | show processlist             |    0.000 |
      +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
      2 rows in set (0.01 sec)

      Attachments

        Activity

          kolbe Kolbe Kegel (Inactive) created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Fix Version/s 10.0.9 [ 14400 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ]

          It'd be neat if the SEQUENCE engine simply supported sequences that included negative values

          kolbe Kolbe Kegel (Inactive) added a comment - It'd be neat if the SEQUENCE engine simply supported sequences that included negative values

          I don't think it actually hangs, it just selects from 18446744073709551615 to 10 which isn't going to be easy for the client.

          elenst Elena Stepanova added a comment - I don't think it actually hangs, it just selects from 18446744073709551615 to 10 which isn't going to be easy for the client.
          elenst Elena Stepanova made changes -
          Description This command causes the connection to hang:

            select * from `seq_-1_to_10`;

          It is possible for other threads to connect to the server, but the thread executing the SELECt statement is hung.

          mysql 10.0.8-MariaDB (root) [test] db1> show processlist;
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          | Id | User | Host | db | Command | Time | State | Info | Progress |
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          | 2 | root | localhost | test | Query | 154 | Writing to net | select * from `seq_-1_to_10` | 0.000 |
          | 3 | root | localhost | test | Query | 0 | init | show processlist | 0.000 |
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          2 rows in set (0.01 sec)
          This command causes the connection to hang:
          {code:sql}
            select * from `seq_-1_to_10`;
          {code}

          It is possible for other threads to connect to the server, but the thread executing the SELECt statement is hung.

          {noformat}
          mysql 10.0.8-MariaDB (root) [test] db1> show processlist;
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          | Id | User | Host | db | Command | Time | State | Info | Progress |
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          | 2 | root | localhost | test | Query | 154 | Writing to net | select * from `seq_-1_to_10` | 0.000 |
          | 3 | root | localhost | test | Query | 0 | init | show processlist | 0.000 |
          +----+------+-----------+------+---------+------+----------------+------------------------------+----------+
          2 rows in set (0.01 sec)
          {noformat}

          Aha! You're right of course. I would've seen that immediately if I'd been running the client with --quick. Sorry for the confusion!

          kolbe Kolbe Kegel (Inactive) added a comment - Aha! You're right of course. I would've seen that immediately if I'd been running the client with --quick. Sorry for the confusion!
          serg Sergei Golubchik made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 34917 ] MariaDB v2 [ 42530 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 42530 ] MariaDB v3 [ 61497 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 61497 ] MariaDB v4 [ 147546 ]

          People

            serg Sergei Golubchik
            kolbe Kolbe Kegel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.