Merge lp:~laurynas-biveinis/percona-server/bug1191580-1191589-5.6 into lp:percona-server/5.6

Proposed by Laurynas Biveinis on 2013-09-25
Status: Merged
Approved by: Vlad Lesin on 2013-09-26
Approved revision: 430
Merged at revision: 432
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1191580-1191589-5.6
Merge into: lp:percona-server/5.6
Prerequisite: lp:~laurynas-biveinis/percona-server/bug1217002-5.6
Diff against target: 158 lines (+73/-7)
4 files modified
Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result (+6/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test (+31/-0)
Percona-Server/storage/innobase/handler/i_s.cc (+2/-0)
Percona-Server/storage/innobase/log/log0online.cc (+34/-7)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1191580-1191589-5.6
Reviewer Review Type Date Requested Status
Vlad Lesin (community) 2013-09-25 Approve on 2013-09-26
Registry Administrators 2013-09-25 Pending
Review via email: mp+187458@code.launchpad.net

This proposal supersedes a proposal from 2013-09-20.

Description of the change

To post a comment you must log in.
Vlad Lesin (vlad-lesin) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result'
--- Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result 2013-09-09 14:20:25 +0000
+++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result 2013-09-25 08:03:15 +0000
@@ -35,5 +35,11 @@
35SET @@GLOBAL.innodb_track_changed_pages=TRUE;35SET @@GLOBAL.innodb_track_changed_pages=TRUE;
36SET @@GLOBAL.innodb_track_redo_log_now=TRUE;36SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
37SET DEBUG_SYNC="now SIGNAL finish_alter_table";37SET DEBUG_SYNC="now SIGNAL finish_alter_table";
38SET DEBUG_SYNC="setup_bitmap_range_middle SIGNAL changed_pages_query_ready WAIT_FOR finish_changed_pages_query";
39SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
40SET DEBUG_SYNC="now WAIT_FOR changed_pages_query_ready";
41call mtr.add_suppression("InnoDB: Warning: inconsistent bitmap file directory");
42SET DEBUG_SYNC="now SIGNAL finish_changed_pages_query";
43ERROR HY000: Can't read record in system table
38SET DEBUG_SYNC="RESET";44SET DEBUG_SYNC="RESET";
39DROP TABLE t2;45DROP TABLE t2;
4046
=== modified file 'Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test'
--- Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test 2013-09-24 13:11:08 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test 2013-09-25 08:03:15 +0000
@@ -95,6 +95,37 @@
9595
96--connection default96--connection default
97reap;97reap;
98
99#
100# Test for
101# - bug 1191580 (InnoDB: Failing assertion: bitmap_files->files[0].seq_num
102# == first_file_seq_num in file log0online.cc line 1423 | abort in
103# log_online_setup_bitmap_file_range)
104# - bug 1191589 (mysqld-debug: .../sql/protocol.cc:518: void
105# Protocol::end_statement(): Assertion `0' failed on a
106# INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query)
107#
108
109SET DEBUG_SYNC="setup_bitmap_range_middle SIGNAL changed_pages_query_ready WAIT_FOR finish_changed_pages_query";
110
111send SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
112
113--connection con2
114
115SET DEBUG_SYNC="now WAIT_FOR changed_pages_query_ready";
116
117# Remove the first bitmap file in the range after it has been enumerated
118remove_files_wildcard $MYSQLD_DATADIR ib_modified_log_1_*.xdb;
119
120call mtr.add_suppression("InnoDB: Warning: inconsistent bitmap file directory");
121
122SET DEBUG_SYNC="now SIGNAL finish_changed_pages_query";
123
124--connection default
125
126--error ER_CANT_FIND_SYSTEM_REC
127reap;
128
98SET DEBUG_SYNC="RESET";129SET DEBUG_SYNC="RESET";
99130
100disconnect con2;131disconnect con2;
101132
=== modified file 'Percona-Server/storage/innobase/handler/i_s.cc'
--- Percona-Server/storage/innobase/handler/i_s.cc 2013-09-20 05:27:28 +0000
+++ Percona-Server/storage/innobase/handler/i_s.cc 2013-09-25 08:03:15 +0000
@@ -8229,6 +8229,7 @@
8229 }8229 }
82308230
8231 if (!log_online_bitmap_iterator_init(&i, min_lsn, max_lsn)) {8231 if (!log_online_bitmap_iterator_init(&i, min_lsn, max_lsn)) {
8232 my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0));
8232 DBUG_RETURN(1);8233 DBUG_RETURN(1);
8233 }8234 }
82348235
@@ -8292,6 +8293,7 @@
8292 if (schema_table_store_record(thd, table))8293 if (schema_table_store_record(thd, table))
8293 {8294 {
8294 log_online_bitmap_iterator_release(&i);8295 log_online_bitmap_iterator_release(&i);
8296 my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0));
8295 DBUG_RETURN(1);8297 DBUG_RETURN(1);
8296 }8298 }
82978299
82988300
=== modified file 'Percona-Server/storage/innobase/log/log0online.cc'
--- Percona-Server/storage/innobase/log/log0online.cc 2013-06-25 13:13:06 +0000
+++ Percona-Server/storage/innobase/log/log0online.cc 2013-09-25 08:03:15 +0000
@@ -34,6 +34,14 @@
34#include "trx0sys.h"34#include "trx0sys.h"
35#include "ut0rbt.h"35#include "ut0rbt.h"
3636
37#ifdef __WIN__
38/* error LNK2001: unresolved external symbol _debug_sync_C_callback_ptr */
39# define DEBUG_SYNC_C(dummy) ((void) 0)
40#else
41# include "m_string.h" /* for my_sys.h */
42# include "my_sys.h" /* DEBUG_SYNC_C */
43#endif
44
37enum { FOLLOW_SCAN_SIZE = 4 * (UNIV_PAGE_SIZE_MAX) };45enum { FOLLOW_SCAN_SIZE = 4 * (UNIV_PAGE_SIZE_MAX) };
3846
39#ifdef UNIV_PFS_MUTEX47#ifdef UNIV_PFS_MUTEX
@@ -1251,6 +1259,24 @@
1251}1259}
12521260
1253/*********************************************************************//**1261/*********************************************************************//**
1262Diagnose a bitmap file range setup failure and free the partially-initialized
1263bitmap file range. */
1264static
1265void
1266log_online_diagnose_inconsistent_dir(
1267/*=================================*/
1268 log_online_bitmap_file_range_t *bitmap_files) /*!<in/out: bitmap file
1269 range */
1270{
1271 ib_logf(IB_LOG_LEVEL_WARN,
1272 "InnoDB: Warning: inconsistent bitmap file "
1273 "directory for a "
1274 "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query"
1275 "\n");
1276 free(bitmap_files->files);
1277}
1278
1279/*********************************************************************//**
1254List the bitmap files in srv_data_home and setup their range that contains the1280List the bitmap files in srv_data_home and setup their range that contains the
1255specified LSN interval. This range, if non-empty, will start with a file that1281specified LSN interval. This range, if non-empty, will start with a file that
1256has the greatest LSN equal to or less than the start LSN and will include all1282has the greatest LSN equal to or less than the start LSN and will include all
@@ -1351,6 +1377,8 @@
13511377
1352 bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;1378 bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;
13531379
1380 DEBUG_SYNC_C("setup_bitmap_range_middle");
1381
1354 /* 2nd pass: get the file names in the file_seq_num order */1382 /* 2nd pass: get the file names in the file_seq_num order */
13551383
1356 bitmap_dir = os_file_opendir(srv_data_home, FALSE);1384 bitmap_dir = os_file_opendir(srv_data_home, FALSE);
@@ -1388,12 +1416,7 @@
1388 array_pos = file_seq_num - first_file_seq_num;1416 array_pos = file_seq_num - first_file_seq_num;
1389 if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {1417 if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {
13901418
1391 fprintf(stderr,1419 log_online_diagnose_inconsistent_dir(bitmap_files);
1392 "InnoDB: Error: inconsistent bitmap file "
1393 "directory for a "
1394 "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query"
1395 "\n");
1396 free(bitmap_files->files);
1397 return FALSE;1420 return FALSE;
1398 }1421 }
13991422
@@ -1420,8 +1443,12 @@
1420 }1443 }
14211444
1422#ifdef UNIV_DEBUG1445#ifdef UNIV_DEBUG
1446 if (!bitmap_files->files[0].seq_num) {
1447
1448 log_online_diagnose_inconsistent_dir(bitmap_files);
1449 return FALSE;
1450 }
1423 ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);1451 ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);
1424 ut_ad(bitmap_files->files[0].start_lsn == first_file_start_lsn);
1425 {1452 {
1426 size_t i;1453 size_t i;
1427 for (i = 1; i < bitmap_files->count; i++) {1454 for (i = 1; i < bitmap_files->count; i++) {

Subscribers

People subscribed via source and target branches