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

SET STATEMENT executed after SET GLOBAL does not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.1.2
    • Component/s: Admin statements
    • Labels:
      None

      Description

      Results of the test case below
      MariaDB [test]> # SET STATEMENT works (OK)
      MariaDB [test]> set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
      +---------------------+
      | @@lock_wait_timeout |
      +---------------------+
      |                   1 |
      +---------------------+
      1 row in set (0.01 sec)
      
      MariaDB [test]> # Setting a totally unrelated global variable
      MariaDB [test]> set global general_log=0;
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [test]> # SET STATEMENT does not work anymore (FAIL)
      MariaDB [test]> set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
      +---------------------+
      | @@lock_wait_timeout |
      +---------------------+
      |            31536000 |
      +---------------------+
      1 row in set (0.00 sec)
      
      Test case
      
      --echo # SET STATEMENT works (OK)
      set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
      
      --echo # Setting a totally unrelated global variable
      set global general_log=0;
      
      --echo # SET STATEMENT does not work anymore (FAIL)
      set statement lock_wait_timeout=1 for select @@lock_wait_timeout;
      
      Current revision
      commit 3a3f88e789a41b309cfe902f4823c9c7ebbce6ca
      Author: Oleksandr Byelkin <sanja@mariadb.com>
      Date:   Fri Oct 24 10:13:08 2014 +0200
      
          MDEV-5231: Per query variables from Percona Server (rewritten)
      elenst@wheezy-64:~/git/bb-10.1-set-statement$ 
      

      Also reproducible with Percona-server (it's even worse there).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              sanja Oleksandr Byelkin added a comment -

              this strange 31536000 is actually what the wariable return as it value when we are saving old values.

              Show
              sanja Oleksandr Byelkin added a comment - this strange 31536000 is actually what the wariable return as it value when we are saving old values.

                People

                • Assignee:
                  sanja Oleksandr Byelkin
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: