Uploaded image for project: 'Percona XtraBackup'
  1. Percona XtraBackup
  2. PXB-1982

The `history` table showed a wrong value for ``lock_time``.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.4.16, 8.0.x
    • Fix Version/s: 8.0.10, 2.4.19
    • Component/s: None
    • Labels:
      None

      Description

      hi.

      i execution xtrabackup utility using 2.4.16 version.

      (command : xtrabackup, no innobackupex)

      The backup was performed using the no-lock option.

      But, I found that the lock_time result was stored in timestamp format.

       

      MYSQL_CNF=/etc/mysql/my.cnf
      BACKUP_DIR=/backup
      TEMP_DIR=/var/lib/mysql/tmp
      FILE_DATE=$(date +%Y-%m-%d)
      HOST=$(/bin/hostname | awk -F . '{print $1}')
      xtrabackup --defaults-file=${MYSQL_CNF} --backup --target-dir=${BACKUP_DIR} \
      --tmpdir=${TEMP_DIR} --user=backup_user --password='PASSWORD' \
      --history=${HOST}_full_${FILE_DATE} --no-lock
      

       

      +-------------------------+---------------------+---------------------+-----------+-----------+
      | NAME | start_time | end_time | exec_time | lock_time |
      +-------------------------+---------------------+---------------------+-----------+-----------+
      | test_full_1 | 2019-12-15 00:15:04 | 2019-12-15 14:11:06 | 13:56:02 | 1576386666| <- 
      | test_full_2 | 2019-12-14 15:30:04 | 2019-12-14 00:00:48 | 08:30:44 | 0| 
      +-------------------------+---------------------+---------------------+-----------+-----------+
      
      
      SQL> select from_unixtime(1576386666);
      +---------------------------+
      | from_unixtime(1576386666) |
      +---------------------------+
      | 2019-12-15 14:11:06       |
      +---------------------------+
      
      -- test_full_1 : using no-lock option
      -- test_full_2 : not using no-lock option
      

       

      1576386666 The timestamp value was "2019-12-15 14:11:06" when converted to a date, and found that the time was nearly coincident with end_time.

      what is lock_time value in the xtrabackup_history table when using the xtrabackup no-lock option?

      I couldn't find anything related to the document or content When using the no-lock option, lock_time comes in timestamp format.

      (https://www.percona.com/doc/percona-xtrabackup/2.4/xtrabackup_bin/xbk_option_reference.html)

       

      I would like to know the relevant official documentation and how to calculate lock_time using this value.

       

      I want to hear the answer. Thank you.

       

       

       

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              rahul.malik Rahul Malik
              Reporter:
              jungheelee jungheelee
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 1 hour, 20 minutes
                  1d 1h 20m