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

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

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 2.4.16, 8.0.x
    • 8.0.10, 2.4.19
    • None
    • 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.

       

       

       

      Attachments

        Activity

          People

            rahul.malik Rahul Malik (Inactive)
            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

                Smart Checklist