When using --compact, --rebuild-indexes should be automatic

Bug #1333729 reported by Yves Trudeau
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Triaged
Medium
Unassigned
2.1
Triaged
Medium
Unassigned
2.2
Triaged
Medium
Unassigned
2.3
Triaged
Medium
Unassigned

Bug Description

Using the --compact option should automatically trigger the --rebuild-indexes option during the apply-log phase. This can be easily achieve with a flag file in the datadir.

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :
Download full text (5.2 KiB)

It seems, if we take backup with --compact option and if we don't use --rebuild -indexes option during the apply log then while access the secondary-index data got corrupted. Even server crashed. So it makes sense that "--compact option should automatically trigger the --rebuild-indexes "

root@nilnandan-Dell-XPS:~# innobackupex --compact --user=root --password=root /home/nilnandan/backup/

innobackupex --apply-log /home/nilnandan/backup/2014-07-01_15-13-41/

after that copy the backup data to datadir and started mysql. MySQL started successfully but when tries to access secondary index and the table status got below error.

mysql> select * from nil_test where city = 'ahmedabad';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
mysql> show create table nil_test \G
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1
Current database: test

*************************** 1. row ***************************
       Table: nil_test
Create Table: CREATE TABLE `nil_test` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  `city` varchar(10) DEFAULT NULL,
  `phone` int(11) DEFAULT NULL,
  KEY `city_phone` (`city`,`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.01 sec)

This is the content of error log:

InnoDB: Page directory corruption: infimum not pointed to
2014-07-01 14:40:04 7f536c6d8700 InnoDB: Page dump in ascii and hex (16384 bytes):
...
InnoDB: End of page dump
2014-07-01 14:40:04 7f536c6d8700 InnoDB: uncompressed page, stored checksum in field1 3735928559, calculated checksums for field1: crc32 177807968, innodb 3475755373, none 3735928559, stored checksum in field2 3735928559, calculated checksums for field2: crc32 177807968, innodb 1624572976, none 3735928559, page LSN 0 0, low 4 bytes of LSN at page end 0, page number (if stored to page already) 0, space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
09:10:04 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 77355 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f539fc09e80
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f536c6d7e40 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x7f539d84262c]
/usr/sbin/mysqld(handle_fatal_signal+0x3cb)[0...

Read more...

Changed in percona-xtrabackup:
status: New → Confirmed
Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :
Download full text (4.7 KiB)

I'm able to reproduce the same thing with Xtrabackup 2.1.9 version.

mysql> select count(*) from nil_test where city = 'ahmedabad' and phone = '12345';
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> show create table nil_test \G
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 2
Current database: test

*************************** 1. row ***************************
       Table: nil_test
Create Table: CREATE TABLE `nil_test` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(10) DEFAULT NULL,
  `city` varchar(10) DEFAULT NULL,
  `phone` int(11) DEFAULT NULL,
  KEY `city_phone` (`city`,`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.01 sec)

mysql> quit

InnoDB: Page directory corruption: infimum not pointed to
2014-07-02 12:50:30 7f7559d78700 InnoDB: Page dump in ascii and hex (16384 bytes):

InnoDB: End of page dump
2014-07-02 12:50:31 7f7559d78700 InnoDB: uncompressed page, stored checksum in field1 3735928559, calculated checksums for field1: crc32 177807968, innodb 3475755373, none 3735928559, stored checksum in field2 3735928559, calculated checksums for field2: crc32 177807968, innodb 1624572976, none 3735928559, page LSN 0 0, low 4 bytes of LSN at page end 0, page number (if stored to page already) 0, space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
07:20:31 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=3
max_threads=153
thread_count=2
connection_count=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 77355 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f758cacc030
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f7559d77e40 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2c)[0x7f758aedf62c]
/usr/sbin/mysqld(handle_fatal_signal+0x3cb)[0x7f758ac2caab]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7f75890f6340]
/usr/sbin/mysqld(+0x816684)[0x7f758afe1684]
/usr/sbin/mysqld(+0x7f8329)[0x7f758afc3329]
/usr/sbin/mysqld(+0x8a2d32)[0x7f758b06dd32]
/usr/sbin/mysqld(+0x8a9228)[0x7f758b074228]
/usr/sbin/mysqld(+0x79b277)[0x7f758af66277]
/usr/sbin/mysqld(_ZN7handler27multi_range_read_info_constEjP15st_range_seq_ifPvjPjS3_P13Cost_estimate+0xcf)[0x7f758ab57daf]
/usr/sbin/mysqld(_ZN10DsMrr_impl16dsmrr_info_constEjP15st_range_seq_ifPvjPjS3_P13Cost_estimate+0x48)[0x7f758ab61428]
/usr/sbin/mysqld(+0x619cc8)[0...

Read more...

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-690

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.