Merge lp:~akopytov/percona-xtrabackup/bug1183500-2.0 into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Approved by: Sergei Glushchenko
Approved revision: no longer in the source branch.
Merged at revision: 563
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1183500-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 148 lines (+58/-25)
4 files modified
test/inc/common.sh (+48/-15)
test/t/bug1130627.sh (+4/-4)
test/t/bug766607.sh (+5/-4)
test/t/tar4ibd_symlink.sh (+1/-2)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1183500-2.0
Reviewer Review Type Date Requested Status
Sergei Glushchenko (community) g2 Approve
Review via email: mp+172189@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Approve

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) :
review: Approve (g2)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/inc/common.sh'
2--- test/inc/common.sh 2013-05-07 07:53:25 +0000
3+++ test/inc/common.sh 2013-06-29 03:20:34 +0000
4@@ -347,25 +347,58 @@
5 }
6
7 ########################################################################
8+# Shutdown cleanly server specified with the first argument
9+########################################################################
10+function shutdown_server_with_id()
11+{
12+ local id=$1
13+ switch_server $id
14+
15+ vlog "Shutting down server with id=$id..."
16+
17+ if [ -f "${MYSQLD_PIDFILE}" ]
18+ then
19+ ${MYSQLADMIN} ${MYSQL_ARGS} shutdown
20+ else
21+ vlog "Server PID file '${MYSQLD_PIDFILE}' doesn't exist!"
22+ fi
23+
24+ # unlock the port number
25+ free_reserved_port $MYSQLD_PORT
26+
27+ reset_server_variables $id
28+}
29+
30+########################################################################
31 # Shutdown server with id=1 cleanly
32 ########################################################################
33 function shutdown_server()
34 {
35- switch_server 1
36-
37- vlog "Shutting down server with id=1..."
38-
39- if [ -f "${MYSQLD_PIDFILE}" ]
40- then
41- ${MYSQLADMIN} ${MYSQL_ARGS} shutdown
42- else
43- vlog "Server PID file '${MYSQLD_PIDFILE}' doesn't exist!"
44- fi
45-
46- # unlock the port number
47- free_reserved_port $MYSQLD_PORT
48-
49- reset_server_variables 1
50+ shutdown_server_with_id 1
51+}
52+
53+########################################################################
54+# Force a checkpoint for a server specified with the first argument
55+########################################################################
56+function force_checkpoint_with_server_id()
57+{
58+ local id=$1
59+ shift
60+
61+ switch_server $id
62+
63+ vlog "Forcing a checkpoint for server #$id"
64+
65+ shutdown_server_with_id $id
66+ start_server_with_id $id $*
67+}
68+
69+########################################################################
70+# Force a checkpoint for server id=1
71+########################################################################
72+function force_checkpoint()
73+{
74+ force_checkpoint_with_server_id 1 $*
75 }
76
77 ########################################################################
78
79=== modified file 'test/t/bug1130627.sh'
80--- test/t/bug1130627.sh 2013-03-07 11:48:43 +0000
81+++ test/t/bug1130627.sh 2013-06-29 03:20:34 +0000
82@@ -5,7 +5,9 @@
83 . inc/common.sh
84 . inc/ib_part.sh
85
86-start_server --innodb_file_per_table
87+MYSQLD_EXTRA_MY_CNF_OPTS="innodb-file-per-table"
88+
89+start_server
90
91 require_partitioning
92
93@@ -27,9 +29,7 @@
94 PARTITIONS 10 */;
95 EOF
96
97-# Force a checkpoint
98-stop_server
99-start_server --innodb_file_per_table
100+force_checkpoint
101
102 # Test that specifying partitions with --include works
103 innobackupex --no-timestamp --include='^test.*#P#p5' $topdir/backup
104
105=== modified file 'test/t/bug766607.sh'
106--- test/t/bug766607.sh 2013-03-07 11:38:14 +0000
107+++ test/t/bug766607.sh 2013-06-29 03:20:34 +0000
108@@ -1,6 +1,8 @@
109 . inc/common.sh
110
111-start_server --innodb_file_per_table
112+MYSQLD_EXTRA_MY_CNF_OPTS="innodb-file-per-table"
113+
114+start_server
115 load_dbase_schema incremental_sample
116
117 # Backup dir
118@@ -15,8 +17,7 @@
119 FLUSH LOGS;
120 EOF
121
122-stop_server
123-start_server --innodb_file_per_table
124+force_checkpoint
125
126 vlog "Making incremental backup"
127 innobackupex --incremental --no-timestamp --incremental-basedir=$topdir/backup/full $topdir/backup/delta
128@@ -42,6 +43,6 @@
129 cd $topdir
130
131 vlog "Data restored"
132-start_server --innodb_file_per_table
133+start_server
134
135 run_cmd $MYSQL $MYSQL_ARGS -e "SELECT * FROM t" test
136
137=== modified file 'test/t/tar4ibd_symlink.sh'
138--- test/t/tar4ibd_symlink.sh 2012-06-05 12:35:33 +0000
139+++ test/t/tar4ibd_symlink.sh 2013-06-29 03:20:34 +0000
140@@ -10,8 +10,7 @@
141 load_dbase_data sakila
142
143 # Force a checkpoint
144-stop_server
145-start_server
146+force_checkpoint
147
148 # Copy some .ibd files to a temporary location and replace them with symlinks
149

Subscribers

People subscribed via source and target branches