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

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.2
    • OTHER
    • 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!

      Attachments

        Activity

          nirbhay_c Nirbhay Choubey (Inactive) added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007091.html
          nirbhay_c Nirbhay Choubey (Inactive) added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007094.html

          not ok yet, see the review in email

          serg Sergei Golubchik added a comment - not ok yet, see the review in email
          nirbhay_c Nirbhay Choubey (Inactive) added a comment - http://lists.askmonty.org/pipermail/commits/2014-November/007098.html

          --- 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,

          nirbhay_c Nirbhay Choubey (Inactive) 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,

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

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

          nice news i will test in some weeks

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

          People

            nirbhay_c Nirbhay Choubey (Inactive)
            rspadim roberto spadim
            Votes:
            1 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.