Merge lp:~akopytov/percona-xtrabackup/bug1373429 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 5024
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1373429
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 68 lines (+24/-5)
1 file modified
storage/innobase/xtrabackup/src/xtrabackup.cc (+24/-5)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1373429
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+235907@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'storage/innobase/xtrabackup/src/xtrabackup.cc'
2--- storage/innobase/xtrabackup/src/xtrabackup.cc 2014-09-20 17:05:56 +0000
3+++ storage/innobase/xtrabackup/src/xtrabackup.cc 2014-09-25 07:26:36 +0000
4@@ -488,7 +488,8 @@
5 OPT_XTRA_INCREMENTAL_FORCE_SCAN,
6 OPT_DEFAULTS_GROUP,
7 OPT_OPEN_FILES_LIMIT,
8- OPT_CLOSE_FILES
9+ OPT_CLOSE_FILES,
10+ OPT_CORE_FILE
11 };
12
13 static struct my_option xb_long_options[] =
14@@ -863,6 +864,9 @@
15 "risk.", (G_PTR*) &xb_close_files, (G_PTR*) &xb_close_files, 0, GET_BOOL,
16 NO_ARG, 0, 0, 0, 0, 0, 0},
17
18+ {"core-file", OPT_CORE_FILE, "Write core on fatal signals", 0, 0, 0,
19+ GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
20+
21 { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
22 };
23
24@@ -999,6 +1003,9 @@
25 }
26 xtrabackup_encrypt = TRUE;
27 break;
28+ case (int) OPT_CORE_FILE:
29+ test_flags |= TEST_CORE_ON_SIGNAL;
30+ break;
31 case '?':
32 usage();
33 exit(EXIT_SUCCESS);
34@@ -5977,12 +5984,14 @@
35 exit(EXIT_FAILURE);
36 }
37
38-/* ================= main =================== */
39-
40-int main(int argc, char **argv)
41+/**************************************************************************
42+Signals-related setup. */
43+static
44+void
45+setup_signals()
46+/*===========*/
47 {
48 struct sigaction sa;
49- int ho_error;
50
51 /* Print a stacktrace on some signals */
52 sa.sa_flags = SA_RESETHAND | SA_NODEFER;
53@@ -6007,6 +6016,16 @@
54 exit(EXIT_FAILURE);
55 }
56 #endif
57+}
58+
59+/* ================= main =================== */
60+
61+int main(int argc, char **argv)
62+{
63+ int ho_error;
64+
65+ setup_signals();
66+
67 MY_INIT(argv[0]);
68 xb_regex_init();
69

Subscribers

People subscribed via source and target branches

to all changes: