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

Wrong Seconds_Behind_Master when only starting the SQL_Thread.

    XMLWordPrintable

Details

    Description

      Hi,

      When I run replication normally, I get a value in "Seconds_Behind_Master" from "SHOW SLAVE STATUS". However, when I run only the SQL Thread (on local relay logs that have been downloaded previously), I have "NULL" in "Seconds_Behind_Master". I would expect to have a numeric value.

      Also, note that the manual ([1]) does not document a "NULL" value in "Seconds_Behind_Master", even if "NULL" is shown when the SQL Thread is not running. This might be a different bug thought and is documentation related.

      [1]: https://mariadb.com/kb/en/library/show-slave-status/

      mysql <<< "select version();"
      version()
      10.2.12-MariaDB-log
      

      mysql <<< "start slave; do sleep(1); show slave status\G stop slave" | grep Seconds_Behind_Master
              Seconds_Behind_Master: 130422
      

      mysql <<< "start slave sql_thread; do sleep(1); show slave status\G stop slave" | grep Seconds_Behind_Master
              Seconds_Behind_Master: NULL
      

      mysql <<< "stop slave; do sleep(1); show slave status\G" | grep Seconds_Behind_Master
              Seconds_Behind_Master: NULL
      

      Many thanks for looking into that,

      JFG

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            jeanfrancois.gagne Jean-François Gagné
            Votes:
            0 Vote for this issue
            Watchers:
            7 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.