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

SLOW QUERY LOG - add affected rows (UPDATE / DELETE) in slow query log

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.2
    • Component/s: OTHER
    • Labels:
      None

      Description

      hi guys i was running a update and it was logged in slow query

      # Time: 130422 10:34:20
      # User@Host: rspadim[rspadim] @  [179.233.54.101]
      # Thread_id: 10019  Schema: 19_org  QC_hit: No
      # Query_time: 17.094863  Lock_time: 0.000066  Rows_sent: 0  Rows_examined: 1301065
      SET timestamp=1366637660;
      UPDATE `nf_itens` SET `valor_produto_grandeza`='pl' WHERE  `id_item`=1;
      

      the point is... how many rows it changed? could it be logged in slow query log? since my write speed is slow, since it's a raid1 (faster read than write)

      tnkx!

        Gliffy Diagrams

          Attachments

            Activity

            Show
            nirbhay_c Nirbhay Choubey added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007091.html
            Show
            nirbhay_c Nirbhay Choubey added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007094.html
            Hide
            serg Sergei Golubchik added a comment -

            not ok yet, see the review in email

            Show
            serg Sergei Golubchik added a comment - not ok yet, see the review in email
            Show
            nirbhay_c Nirbhay Choubey added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007098.html
            Hide
            nirbhay_c Nirbhay Choubey added a comment -
            --- a/scripts/mysql_system_tables_fix.sql
            +++ b/scripts/mysql_system_tables_fix.sql
            @@ -251,6 +251,8 @@ SET GLOBAL slow_query_log = 'OFF';
             ALTER TABLE slow_log
               ADD COLUMN thread_id BIGINT(21) UNSIGNED NOT NULL AFTER sql_text;
             ALTER TABLE slow_log
            +  ADD COLUMN rows_affected INTEGER NOT NULL AFTER thread_id;
            +ALTER TABLE slow_log
               MODIFY start_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
               MODIFY user_host MEDIUMTEXT NOT NULL,
               MODIFY query_time TIME(6) NOT NULL,
            
            Show
            nirbhay_c Nirbhay Choubey added a comment - --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -251,6 +251,8 @@ SET GLOBAL slow_query_log = 'OFF'; ALTER TABLE slow_log ADD COLUMN thread_id BIGINT(21) UNSIGNED NOT NULL AFTER sql_text; ALTER TABLE slow_log + ADD COLUMN rows_affected INTEGER NOT NULL AFTER thread_id; +ALTER TABLE slow_log MODIFY start_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, MODIFY user_host MEDIUMTEXT NOT NULL, MODIFY query_time TIME(6) NOT NULL,
            Hide
            serg Sergei Golubchik added a comment -

            if that's the only change from the previous patch — ok to push

            Show
            serg Sergei Golubchik added a comment - if that's the only change from the previous patch — ok to push
            Hide
            rspadim roberto spadim added a comment -

            nice news i will test in some weeks

            Show
            rspadim roberto spadim added a comment - nice news i will test in some weeks

              People

              • Assignee:
                nirbhay_c Nirbhay Choubey
                Reporter:
                rspadim roberto spadim
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Time Spent - 30 minutes Remaining Estimate - 30 minutes
                  30m
                  Logged:
                  Time Spent - 30 minutes Remaining Estimate - 30 minutes
                  30m