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

Proposed by Laurynas Biveinis
Status: Superseded
Proposed branch: lp:~laurynas-biveinis/percona-server/bug1191580-1191589-5.5
Merge into: lp:percona-server/5.5
Prerequisite: lp:~laurynas-biveinis/percona-server/bug1217002-5.5
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.c (+34/-7)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug1191580-1191589-5.5
Reviewer Review Type Date Requested Status
Vlad Lesin (community) g2 Needs Fixing
Registry Administrators Pending
Review via email: mp+186709@code.launchpad.net

This proposal has been superseded by a proposal from 2013-09-25.

Description of the change

No BT or ST but 5.6 QA blocker.

Merge bug 1191580 and bug 1191589 fixes from 5.1.

http://jenkins.percona.com/job/percona-server-5.5-param/860/

To post a comment you must log in.
Revision history for this message
Vlad Lesin (vlad-lesin) wrote :
review: Needs Fixing (g2)

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 13:23:00 +0000
+++ Percona-Server/mysql-test/suite/innodb/r/percona_changed_page_bmp_debug.result 2013-09-25 05:54:01 +0000
@@ -34,5 +34,11 @@
34SET @@GLOBAL.innodb_track_changed_pages=TRUE;34SET @@GLOBAL.innodb_track_changed_pages=TRUE;
35SET @@GLOBAL.innodb_track_redo_log_now=TRUE;35SET @@GLOBAL.innodb_track_redo_log_now=TRUE;
36SET DEBUG_SYNC="now SIGNAL finish_alter_table";36SET DEBUG_SYNC="now SIGNAL finish_alter_table";
37SET DEBUG_SYNC="setup_bitmap_range_middle SIGNAL changed_pages_query_ready WAIT_FOR finish_changed_pages_query";
38SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
39SET DEBUG_SYNC="now WAIT_FOR changed_pages_query_ready";
40call mtr.add_suppression("InnoDB: Warning: inconsistent bitmap file directory");
41SET DEBUG_SYNC="now SIGNAL finish_changed_pages_query";
42ERROR HY000: Can't read record in system table
37SET DEBUG_SYNC="RESET";43SET DEBUG_SYNC="RESET";
38DROP TABLE t2;44DROP TABLE t2;
3945
=== 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-09 13:23:00 +0000
+++ Percona-Server/mysql-test/suite/innodb/t/percona_changed_page_bmp_debug.test 2013-09-25 05:54:01 +0000
@@ -94,6 +94,37 @@
9494
95--connection default95--connection default
96reap;96reap;
97
98#
99# Test for
100# - bug 1191580 (InnoDB: Failing assertion: bitmap_files->files[0].seq_num
101# == first_file_seq_num in file log0online.cc line 1423 | abort in
102# log_online_setup_bitmap_file_range)
103# - bug 1191589 (mysqld-debug: .../sql/protocol.cc:518: void
104# Protocol::end_statement(): Assertion `0' failed on a
105# INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query)
106#
107
108SET DEBUG_SYNC="setup_bitmap_range_middle SIGNAL changed_pages_query_ready WAIT_FOR finish_changed_pages_query";
109
110send SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
111
112--connection con2
113
114SET DEBUG_SYNC="now WAIT_FOR changed_pages_query_ready";
115
116# Remove the first bitmap file in the range after it has been enumerated
117remove_files_wildcard $MYSQLD_DATADIR ib_modified_log_1_*.xdb;
118
119call mtr.add_suppression("InnoDB: Warning: inconsistent bitmap file directory");
120
121SET DEBUG_SYNC="now SIGNAL finish_changed_pages_query";
122
123--connection default
124
125--error ER_CANT_FIND_SYSTEM_REC
126reap;
127
97SET DEBUG_SYNC="RESET";128SET DEBUG_SYNC="RESET";
98129
99disconnect con2;130disconnect con2;
100131
=== modified file 'Percona-Server/storage/innobase/handler/i_s.cc'
--- Percona-Server/storage/innobase/handler/i_s.cc 2013-08-14 03:52:04 +0000
+++ Percona-Server/storage/innobase/handler/i_s.cc 2013-09-25 05:54:01 +0000
@@ -7509,6 +7509,7 @@
7509 }7509 }
75107510
7511 if (!log_online_bitmap_iterator_init(&i, min_lsn, max_lsn)) {7511 if (!log_online_bitmap_iterator_init(&i, min_lsn, max_lsn)) {
7512 my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0));
7512 DBUG_RETURN(1);7513 DBUG_RETURN(1);
7513 }7514 }
75147515
@@ -7572,6 +7573,7 @@
7572 if (schema_table_store_record(thd, table))7573 if (schema_table_store_record(thd, table))
7573 {7574 {
7574 log_online_bitmap_iterator_release(&i);7575 log_online_bitmap_iterator_release(&i);
7576 my_error(ER_CANT_FIND_SYSTEM_REC, MYF(0));
7575 DBUG_RETURN(1);7577 DBUG_RETURN(1);
7576 }7578 }
75777579
75787580
=== modified file 'Percona-Server/storage/innobase/log/log0online.c'
--- Percona-Server/storage/innobase/log/log0online.c 2013-06-01 15:04:43 +0000
+++ Percona-Server/storage/innobase/log/log0online.c 2013-09-25 05:54:01 +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
@@ -1255,6 +1263,24 @@
1255}1263}
12561264
1257/*********************************************************************//**1265/*********************************************************************//**
1266Diagnose a bitmap file range setup failure and free the partially-initialized
1267bitmap file range. */
1268static
1269void
1270log_online_diagnose_inconsistent_dir(
1271/*=================================*/
1272 log_online_bitmap_file_range_t *bitmap_files) /*!<in/out: bitmap file
1273 range */
1274{
1275 fprintf(stderr,
1276 "InnoDB: Warning: inconsistent bitmap file "
1277 "directory for a "
1278 "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query"
1279 "\n");
1280 free(bitmap_files->files);
1281}
1282
1283/*********************************************************************//**
1258List the bitmap files in srv_data_home and setup their range that contains the1284List the bitmap files in srv_data_home and setup their range that contains the
1259specified LSN interval. This range, if non-empty, will start with a file that1285specified LSN interval. This range, if non-empty, will start with a file that
1260has the greatest LSN equal to or less than the start LSN and will include all1286has the greatest LSN equal to or less than the start LSN and will include all
@@ -1355,6 +1381,8 @@
13551381
1356 bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;1382 bitmap_files->count = last_file_seq_num - first_file_seq_num + 1;
13571383
1384 DEBUG_SYNC_C("setup_bitmap_range_middle");
1385
1358 /* 2nd pass: get the file names in the file_seq_num order */1386 /* 2nd pass: get the file names in the file_seq_num order */
13591387
1360 bitmap_dir = os_file_opendir(srv_data_home, FALSE);1388 bitmap_dir = os_file_opendir(srv_data_home, FALSE);
@@ -1390,12 +1418,7 @@
1390 array_pos = file_seq_num - first_file_seq_num;1418 array_pos = file_seq_num - first_file_seq_num;
1391 if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {1419 if (UNIV_UNLIKELY(array_pos >= bitmap_files->count)) {
13921420
1393 fprintf(stderr,1421 log_online_diagnose_inconsistent_dir(bitmap_files);
1394 "InnoDB: Error: inconsistent bitmap file "
1395 "directory for a "
1396 "INFORMATION_SCHEMA.INNODB_CHANGED_PAGES query"
1397 "\n");
1398 free(bitmap_files->files);
1399 return FALSE;1422 return FALSE;
1400 }1423 }
14011424
@@ -1422,8 +1445,12 @@
1422 }1445 }
14231446
1424#ifdef UNIV_DEBUG1447#ifdef UNIV_DEBUG
1448 if (!bitmap_files->files[0].seq_num) {
1449
1450 log_online_diagnose_inconsistent_dir(bitmap_files);
1451 return FALSE;
1452 }
1425 ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);1453 ut_ad(bitmap_files->files[0].seq_num == first_file_seq_num);
1426 ut_ad(bitmap_files->files[0].start_lsn == first_file_start_lsn);
1427 {1454 {
1428 size_t i;1455 size_t i;
1429 for (i = 1; i < bitmap_files->count; i++) {1456 for (i = 1; i < bitmap_files->count; i++) {

Subscribers

People subscribed via source and target branches