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

mysql.slow_log reports incorrect start time

    Details

      Description

      MariaDB [test]> truncate mysql.slow_log;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select current_time(); select sleep(10); select current_time();
      +----------------+
      | current_time() |
      +----------------+
      | 17:24:37       |
      +----------------+
      1 row in set (0.00 sec)
       
      +-----------+
      | sleep(10) |
      +-----------+
      |         0 |
      +-----------+
      1 row in set (10.00 sec)
       
      +----------------+
      | current_time() |
      +----------------+
      | 17:24:47       |
      +----------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select start_time, sql_text from mysql.slow_log;
      +----------------------------+-------------------------+
      | start_time                 | sql_text                |
      +----------------------------+-------------------------+
      | 2016-12-21 17:24:15.320518 | truncate mysql.slow_log |
      | 2016-12-21 17:24:37.593565 | select current_time()   |
      | 2016-12-21 17:24:47.595008 | select sleep(10)        | <-- Start time is ~10sec after previous command
      | 2016-12-21 17:24:47.596239 | select current_time()   |
      +----------------------------+-------------------------+
      4 rows in set (0.00 sec)
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nirbhay_c Nirbhay Choubey (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: