Merge lp:~akopytov/percona-server/enhancements-for-start-transaction-with-consistent into lp:percona-server/5.6
- enhancements-for-start-transaction-with-consistent
- Merge into 5.6
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 584 |
Proposed branch: | lp:~akopytov/percona-server/enhancements-for-start-transaction-with-consistent |
Merge into: | lp:percona-server/5.6 |
Prerequisite: | lp:~akopytov/percona-server/backup-locks |
Diff against target: |
1877 lines (+1099/-34) (has conflicts) 22 files modified
build-ps/debian/control (+17/-0) build-ps/debian/rules (+19/-0) client/client_priv.h (+4/-0) client/mysqldump.c (+107/-22) doc/source/upstream-bug-fixes.rst (+135/-0) mysql-test/r/backup_locks_mysqldump.result (+146/-0) mysql-test/r/mysqldump-max.result (+57/-0) mysql-test/suite/binlog/r/binlog_consistent.result (+103/-0) mysql-test/suite/binlog/t/binlog_consistent.test (+88/-0) mysql-test/suite/perfschema/r/dml_setup_instruments.result (+1/-1) mysql-test/t/backup_locks_mysqldump.test (+61/-0) mysql-test/t/mysqldump-max.test (+83/-0) sql/binlog.cc (+183/-6) sql/binlog.h (+12/-1) sql/handler.cc (+10/-0) sql/handler.h (+10/-0) sql/log.cc (+11/-1) sql/log.h (+28/-0) sql/mysqld.cc (+8/-2) sql/mysqld.h (+2/-1) sql/share/errmsg-utf8.txt (+7/-0) storage/innobase/buf/buf0flu.cc (+7/-0) Text conflict in build-ps/debian/control Text conflict in build-ps/debian/rules Text conflict in client/client_priv.h Text conflict in client/mysqldump.c Text conflict in doc/source/upstream-bug-fixes.rst Text conflict in mysql-test/r/backup_locks_mysqldump.result Text conflict in mysql-test/t/backup_locks_mysqldump.test Text conflict in sql/handler.h Text conflict in sql/share/errmsg-utf8.txt Text conflict in storage/innobase/buf/buf0flu.cc |
To merge this branch: | bzr merge lp:~akopytov/percona-server/enhancements-for-start-transaction-with-consistent |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Laurynas Biveinis (community) | Approve | ||
Review via email: mp+207877@code.launchpad.net |
Commit message
Description of the change
Implementation of
https:/
This is a port of enhancements to START TRANSACTION WITH CONSISTENT
SNAPSHOT in MariaDB 5.3+ to the group commit implementation available in
MySQL/PS 5.6.
The major difference with the MariaDB group commit implementation is
that there’s just one mutex to block storage engine commits and binary
log updates, LOCK_commit_
MYSQL_BIN_LOG. In PS 5.6 LOCK_log is used to protect binary log updates
and commits are performed by the commit stage leader thread under the
LOCK_commit mutex. Unless binlog_
commits are performed in parallel by the corresponding threads. When
binary log is not used as a transaction coordinator, there is no mutex
protecting commits neither.
Introducing new mutexes to provide atomicity for START TRANSACTION WITH
CONSISTENT SNAPSHOT would have a serious performance impact: we don’t
really want to serialize commits, but rather make block them for a short
duration when STWCS initiates snapshot creation for all storage
engines. Therefore, this patch introduces four new “methods” to the
transaction coordinator class: xlock(), xunlock(), slock() and
sunlock(). The first 2 acquire/release an exclusive lock on commits,
whereas the other 2 acquire/release a shared lock. Depending on the
transaction coordinator being used and the binlog_
those functions may either:
1) be no-ops (for TC_LOG_DUMMY)
2) just lock LOCK_log and LOCK_commit, as that guarantees that no binary
log updates and commits will occur with binlog_
3) lock LOCK_log and a new global rwlock, LOCK_consistent
shared lock on it may be acquired on commits, and an exclusive lock may
only be acquired for STWCS.
4) use only LOCK_consistent
is used (i.e. in TC_LOG_MMAP).
mysqldump changes have been merged with backup locks changes. Now
mysqldump --lock-for-backup --single-
FTWRL even if --master-data is also requested.
http://
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
Alexey Kopytov (akopytov) wrote : | # |
Hi Laurynas,
On Tue, May 06 2014 11:03:13 +0400, Laurynas Biveinis wrote:
> Review: Needs Fixing
>
> - mysqlbinlog.
> exit from the function return 0 not 1?
Hard to tell. The only case when we reach the first exit in
check_consisten
fails (as in, not returns an empty result set, but fails), and mysqldump
is invoked with --force. Now, if we are running with --force and the
SHOW STATUS query fails for whatever reasons, should we proceed with the
assumption that STWCS enhancements are available or not?
The original MariaDB patch assumes that they are available. I didn’t
mind. Looked like a corner case to me.
> - check_consisten
> not found. Most other mysqldump.c functions return 0 for
> success, 1 failure. Don't have a strong opinion whether this
> should be fixed, just pointing out.
That’s correct, but OTOH the purpose of the function is to check whether
something is available. I.e. it should be boolean and named something
like ‘has_consistent
indicates ‘false’ rather than a failure.
> - Might be a good idea to include show_binlog_
> instead of direct replace_regex/SHOW BINLOG EVENTS, to save any
> future regexp maintenance, and, if we ever do MTR collections
> runs, make the testcase more compatible with GTID mode I guess.
That’s one of the things I tried to change from the MariaDB’s
implementation. That didn’t work out, because show_binlog_
mask binlog positions. Which are essential to that specific test case:
we want to make sure that reported binlog coordinates map to specific
binlog positions. Which is hard to do without positions being reported
in SHOW BINLOG EVENTS.
> - MYSQL_BIN_
Yep, fixed.
> - Diff lines 1077/1078: spurious change?
Yep, fixed.
http://
Laurynas Biveinis (laurynas-biveinis) wrote : | # |
Looks good.
The diff shows many spurious changes now. Would you mind either rebasing the branch on the current trunk, either just pushing to the trunk yourself?
Alexey Kopytov (akopytov) wrote : | # |
Yep, noticed the conflicts. I will merge it to trunk and see what is.
Alexey Kopytov (akopytov) wrote : | # |
No conflicts occurred with bzr merge --weave (it was a criss-cross merge due to backup locks dependency).
Preview Diff
1 | === modified file 'build-ps/debian/control' | |||
2 | --- build-ps/debian/control 2014-04-25 10:55:01 +0000 | |||
3 | +++ build-ps/debian/control 2014-05-06 08:36:28 +0000 | |||
4 | @@ -2,6 +2,7 @@ | |||
5 | 2 | Section: database | 2 | Section: database |
6 | 3 | Priority: extra | 3 | Priority: extra |
7 | 4 | Maintainer: Percona Server Development Team <mysql-dev@percona.com> | 4 | Maintainer: Percona Server Development Team <mysql-dev@percona.com> |
8 | 5 | <<<<<<< TREE | ||
9 | 5 | Uploaders: George Lorch <george.lorch@percona.com>, | 6 | Uploaders: George Lorch <george.lorch@percona.com>, |
10 | 6 | Alexey Bychko <alexey.bychko@percona.com> | 7 | Alexey Bychko <alexey.bychko@percona.com> |
11 | 7 | Build-Depends: libtool (>= 1.4.2-7), | 8 | Build-Depends: libtool (>= 1.4.2-7), |
12 | @@ -26,6 +27,10 @@ | |||
13 | 26 | libaio-dev[linux-any], | 27 | libaio-dev[linux-any], |
14 | 27 | libpam-dev, | 28 | libpam-dev, |
15 | 28 | libssl-dev | 29 | libssl-dev |
16 | 30 | ======= | ||
17 | 31 | Uploaders: Stewart Smith <stewart.smith@percona.com>, Alexey Bychko <alexey.bychko@percona.com> | ||
18 | 32 | Build-Depends: libtool (>= 1.4.2-7), procps, debhelper (>= 7.0.50~), file (>= 3.28), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline-dev, psmisc, po-debconf, chrpath, ghostscript, gawk, bison, lsb-release, cmake, gcc (>= 4.4), g++ (>= 4.4), libaio-dev[linux-any], libpam-dev, libssl-dev | ||
19 | 33 | >>>>>>> MERGE-SOURCE | ||
20 | 29 | Standards-Version: 3.9.4 | 34 | Standards-Version: 3.9.4 |
21 | 30 | Homepage: http://www.percona.com/software/percona-server/ | 35 | Homepage: http://www.percona.com/software/percona-server/ |
22 | 31 | Vcs-Bzr: lp:percona-server/5.6 | 36 | Vcs-Bzr: lp:percona-server/5.6 |
23 | @@ -140,6 +145,7 @@ | |||
24 | 140 | Package: percona-server-server-5.6 | 145 | Package: percona-server-server-5.6 |
25 | 141 | Architecture: any | 146 | Architecture: any |
26 | 142 | Suggests: tinyca | 147 | Suggests: tinyca |
27 | 148 | <<<<<<< TREE | ||
28 | 143 | Pre-Depends: percona-server-common-5.6 (>= ${source:Version}), | 149 | Pre-Depends: percona-server-common-5.6 (>= ${source:Version}), |
29 | 144 | adduser (>= 3.4.0), | 150 | adduser (>= 3.4.0), |
30 | 145 | debconf | 151 | debconf |
31 | @@ -175,6 +181,13 @@ | |||
32 | 175 | mariadb-server, | 181 | mariadb-server, |
33 | 176 | mariadb-server-core-5.5, | 182 | mariadb-server-core-5.5, |
34 | 177 | mariadb-server-5.5 | 183 | mariadb-server-5.5 |
35 | 184 | ======= | ||
36 | 185 | Pre-Depends: percona-server-common-5.6 (>= ${source:Version}), adduser (>= 3.4.0), debconf | ||
37 | 186 | Depends: percona-server-client-5.6 (>= ${source:Version}), libdbi-perl, libdbd-mysql-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10) | ||
38 | 187 | Conflicts: mysql-server, mysql-server-4.1, mysql-server-core-5.1, percona-xtradb-server-5.0, percona-server-server-5.1, percona-server-server-5.5 | ||
39 | 188 | Provides: mysql-server | ||
40 | 189 | Replaces: mysql-server, mysql-server-5.0, mysql-server-core-5.1, percona-xtradb-server-5.0, percona-server-server-5.1, percona-server-server-5.5 | ||
41 | 190 | >>>>>>> MERGE-SOURCE | ||
42 | 178 | Description: Percona Server database server binaries | 191 | Description: Percona Server database server binaries |
43 | 179 | Percona Server is a fast, stable and true multi-user, multi-threaded SQL | 192 | Percona Server is a fast, stable and true multi-user, multi-threaded SQL |
44 | 180 | database server. SQL (Structured Query Language) is the most popular database | 193 | database server. SQL (Structured Query Language) is the most popular database |
45 | @@ -214,10 +227,14 @@ | |||
46 | 214 | 227 | ||
47 | 215 | Package: percona-server-test-5.6 | 228 | Package: percona-server-test-5.6 |
48 | 216 | Architecture: any | 229 | Architecture: any |
49 | 230 | <<<<<<< TREE | ||
50 | 217 | Depends: percona-server-client-5.6 (>= ${source:Version}), | 231 | Depends: percona-server-client-5.6 (>= ${source:Version}), |
51 | 218 | percona-server-server-5.6 (>= ${source:Version}), | 232 | percona-server-server-5.6 (>= ${source:Version}), |
52 | 219 | ${misc:Depends}, | 233 | ${misc:Depends}, |
53 | 220 | ${shlibs:Depends} | 234 | ${shlibs:Depends} |
54 | 235 | ======= | ||
55 | 236 | Depends: percona-server-client-5.6 (>= ${source:Version}), percona-server-server-5.6 (>= ${source:Version}), ${misc:Depends}, ${shlibs:Depends} | ||
56 | 237 | >>>>>>> MERGE-SOURCE | ||
57 | 221 | Description: Percona Server database test suite | 238 | Description: Percona Server database test suite |
58 | 222 | Percona Server is a fast, stable and true multi-user, multi-threaded SQL | 239 | Percona Server is a fast, stable and true multi-user, multi-threaded SQL |
59 | 223 | database server. SQL (Structured Query Language) is the most popular database | 240 | database server. SQL (Structured Query Language) is the most popular database |
60 | 224 | 241 | ||
61 | === modified file 'build-ps/debian/rules' | |||
62 | --- build-ps/debian/rules 2014-04-25 10:55:01 +0000 | |||
63 | +++ build-ps/debian/rules 2014-05-06 08:36:28 +0000 | |||
64 | @@ -73,6 +73,7 @@ | |||
65 | 73 | -DWITH_LIBWRAP=ON \ | 73 | -DWITH_LIBWRAP=ON \ |
66 | 74 | -DWITH_ZLIB=system \ | 74 | -DWITH_ZLIB=system \ |
67 | 75 | -DWITH_SSL=system \ | 75 | -DWITH_SSL=system \ |
68 | 76 | <<<<<<< TREE | ||
69 | 76 | -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \ | 77 | -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \ |
70 | 77 | -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ | 78 | -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ |
71 | 78 | -DSYSTEM_TYPE="debian-linux-gnu" \ | 79 | -DSYSTEM_TYPE="debian-linux-gnu" \ |
72 | @@ -85,6 +86,19 @@ | |||
73 | 85 | -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ | 86 | -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ |
74 | 86 | -DWITH_FEDERATED_STORAGE_ENGINE=ON \ | 87 | -DWITH_FEDERATED_STORAGE_ENGINE=ON \ |
75 | 87 | -DWITH_PAM=ON \ | 88 | -DWITH_PAM=ON \ |
76 | 89 | ======= | ||
77 | 90 | -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \ | ||
78 | 91 | -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \ | ||
79 | 92 | -DSYSTEM_TYPE="debian-linux-gnu" \ | ||
80 | 93 | -DINSTALL_LAYOUT=RPM \ | ||
81 | 94 | -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \ | ||
82 | 95 | -DINSTALL_PLUGINDIR=lib/mysql/plugin \ | ||
83 | 96 | -DWITH_EMBEDDED_SERVER=OFF \ | ||
84 | 97 | -DWITH_ARCHIVE_STORAGE_ENGINE=ON \ | ||
85 | 98 | -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \ | ||
86 | 99 | -DWITH_FEDERATED_STORAGE_ENGINE=ON \ | ||
87 | 100 | -DWITH_PAM=ON \ | ||
88 | 101 | >>>>>>> MERGE-SOURCE | ||
89 | 88 | -DWITH_EXTRA_CHARSETS=all ..' | 102 | -DWITH_EXTRA_CHARSETS=all ..' |
90 | 89 | touch $@ | 103 | touch $@ |
91 | 90 | 104 | ||
92 | @@ -258,8 +272,13 @@ | |||
93 | 258 | dh_installinfo -a | 272 | dh_installinfo -a |
94 | 259 | dh_installlogcheck -a | 273 | dh_installlogcheck -a |
95 | 260 | dh_installchangelogs -a | 274 | dh_installchangelogs -a |
96 | 275 | <<<<<<< TREE | ||
97 | 261 | dh_strip -a --dbg-package=percona-server-5.6-dbg | 276 | dh_strip -a --dbg-package=percona-server-5.6-dbg |
98 | 262 | dh_lintian | 277 | dh_lintian |
99 | 278 | ======= | ||
100 | 279 | dh_strip -a | ||
101 | 280 | dh_lintian | ||
102 | 281 | >>>>>>> MERGE-SOURCE | ||
103 | 263 | dh_link -a # .so muss nach .so.1.2.3 installier werden! | 282 | dh_link -a # .so muss nach .so.1.2.3 installier werden! |
104 | 264 | dh_compress -a | 283 | dh_compress -a |
105 | 265 | dh_fixperms -a | 284 | dh_fixperms -a |
106 | 266 | 285 | ||
107 | === modified file 'client/client_priv.h' | |||
108 | --- client/client_priv.h 2014-02-25 17:05:01 +0000 | |||
109 | +++ client/client_priv.h 2014-05-06 08:36:28 +0000 | |||
110 | @@ -104,8 +104,12 @@ | |||
111 | 104 | OPT_SERVER_PUBLIC_KEY, | 104 | OPT_SERVER_PUBLIC_KEY, |
112 | 105 | OPT_ENABLE_CLEARTEXT_PLUGIN, | 105 | OPT_ENABLE_CLEARTEXT_PLUGIN, |
113 | 106 | OPT_INNODB_OPTIMIZE_KEYS, | 106 | OPT_INNODB_OPTIMIZE_KEYS, |
114 | 107 | <<<<<<< TREE | ||
115 | 107 | OPT_REWRITE_DB, | 108 | OPT_REWRITE_DB, |
116 | 108 | OPT_LOCK_FOR_BACKUP, | 109 | OPT_LOCK_FOR_BACKUP, |
117 | 110 | ======= | ||
118 | 111 | OPT_LOCK_FOR_BACKUP, | ||
119 | 112 | >>>>>>> MERGE-SOURCE | ||
120 | 109 | OPT_MAX_CLIENT_OPTION | 113 | OPT_MAX_CLIENT_OPTION |
121 | 110 | }; | 114 | }; |
122 | 111 | 115 | ||
123 | 112 | 116 | ||
124 | === modified file 'client/mysqldump.c' | |||
125 | --- client/mysqldump.c 2014-04-24 05:16:52 +0000 | |||
126 | +++ client/mysqldump.c 2014-05-06 08:36:28 +0000 | |||
127 | @@ -85,6 +85,9 @@ | |||
128 | 85 | #define IGNORE_DATA 0x01 /* don't dump data for this table */ | 85 | #define IGNORE_DATA 0x01 /* don't dump data for this table */ |
129 | 86 | #define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */ | 86 | #define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */ |
130 | 87 | 87 | ||
131 | 88 | /* Chars needed to store LONGLONG, excluding trailing '\0'. */ | ||
132 | 89 | #define LONGLONG_LEN 20 | ||
133 | 90 | |||
134 | 88 | typedef enum { | 91 | typedef enum { |
135 | 89 | KEY_TYPE_NONE, | 92 | KEY_TYPE_NONE, |
136 | 90 | KEY_TYPE_PRIMARY, | 93 | KEY_TYPE_PRIMARY, |
137 | @@ -419,9 +422,10 @@ | |||
138 | 419 | "This causes the binary log position and filename to be appended to the " | 422 | "This causes the binary log position and filename to be appended to the " |
139 | 420 | "output. If equal to 1, will print it as a CHANGE MASTER command; if equal" | 423 | "output. If equal to 1, will print it as a CHANGE MASTER command; if equal" |
140 | 421 | " to 2, that command will be prefixed with a comment symbol. " | 424 | " to 2, that command will be prefixed with a comment symbol. " |
144 | 422 | "This option will turn --lock-all-tables on, unless " | 425 | "This option will turn --lock-all-tables on, unless --single-transaction " |
145 | 423 | "--single-transaction is specified too (in which case a " | 426 | "is specified too (on servers that don't provide Binlog_snapshot_file and " |
146 | 424 | "global read lock is only taken a short time at the beginning of the dump; " | 427 | "Binlog_snapshot_position status variables this will still take a " |
147 | 428 | "global read lock for a short time at the beginning of the dump; " | ||
148 | 425 | "don't forget to read about --single-transaction below). In all cases, " | 429 | "don't forget to read about --single-transaction below). In all cases, " |
149 | 426 | "any action on logs will happen at the exact moment of the dump. " | 430 | "any action on logs will happen at the exact moment of the dump. " |
150 | 427 | "Option automatically turns --lock-tables off.", | 431 | "Option automatically turns --lock-tables off.", |
151 | @@ -1226,6 +1230,44 @@ | |||
152 | 1226 | } | 1230 | } |
153 | 1227 | 1231 | ||
154 | 1228 | 1232 | ||
155 | 1233 | /* | ||
156 | 1234 | Check if server supports non-blocking binlog position using the | ||
157 | 1235 | binlog_snapshot_file and binlog_snapshot_position status variables. If it | ||
158 | 1236 | does, also return the position obtained if output pointers are non-NULL. | ||
159 | 1237 | Returns 1 if position available, 0 if not. | ||
160 | 1238 | */ | ||
161 | 1239 | static int | ||
162 | 1240 | check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset) | ||
163 | 1241 | { | ||
164 | 1242 | MYSQL_RES *res; | ||
165 | 1243 | MYSQL_ROW row; | ||
166 | 1244 | int found; | ||
167 | 1245 | |||
168 | 1246 | if (mysql_query_with_error_report(mysql, &res, | ||
169 | 1247 | "SHOW STATUS LIKE 'binlog_snapshot_%'")) | ||
170 | 1248 | return 1; | ||
171 | 1249 | |||
172 | 1250 | found= 0; | ||
173 | 1251 | while ((row= mysql_fetch_row(res))) | ||
174 | 1252 | { | ||
175 | 1253 | if (0 == strcmp(row[0], "Binlog_snapshot_file")) | ||
176 | 1254 | { | ||
177 | 1255 | if (binlog_pos_file) | ||
178 | 1256 | strmake(binlog_pos_file, row[1], FN_REFLEN-1); | ||
179 | 1257 | found++; | ||
180 | 1258 | } | ||
181 | 1259 | else if (0 == strcmp(row[0], "Binlog_snapshot_position")) | ||
182 | 1260 | { | ||
183 | 1261 | if (binlog_pos_offset) | ||
184 | 1262 | strmake(binlog_pos_offset, row[1], LONGLONG_LEN); | ||
185 | 1263 | found++; | ||
186 | 1264 | } | ||
187 | 1265 | } | ||
188 | 1266 | mysql_free_result(res); | ||
189 | 1267 | |||
190 | 1268 | return (found == 2); | ||
191 | 1269 | } | ||
192 | 1270 | |||
193 | 1229 | static char *my_case_str(const char *str, | 1271 | static char *my_case_str(const char *str, |
194 | 1230 | uint str_len, | 1272 | uint str_len, |
195 | 1231 | const char *token, | 1273 | const char *token, |
196 | @@ -5302,41 +5344,64 @@ | |||
197 | 5302 | } /* dump_selected_tables */ | 5344 | } /* dump_selected_tables */ |
198 | 5303 | 5345 | ||
199 | 5304 | 5346 | ||
201 | 5305 | static int do_show_master_status(MYSQL *mysql_con) | 5347 | static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) |
202 | 5306 | { | 5348 | { |
203 | 5307 | MYSQL_ROW row; | 5349 | MYSQL_ROW row; |
204 | 5308 | MYSQL_RES *master; | 5350 | MYSQL_RES *master; |
205 | 5351 | char binlog_pos_file[FN_REFLEN]; | ||
206 | 5352 | char binlog_pos_offset[LONGLONG_LEN+1]; | ||
207 | 5353 | char *file, *offset; | ||
208 | 5309 | const char *comment_prefix= | 5354 | const char *comment_prefix= |
209 | 5310 | (opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : ""; | 5355 | (opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : ""; |
211 | 5311 | if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS")) | 5356 | |
212 | 5357 | if (consistent_binlog_pos) | ||
213 | 5312 | { | 5358 | { |
215 | 5313 | return 1; | 5359 | if (!check_consistent_binlog_pos(binlog_pos_file, binlog_pos_offset)) |
216 | 5360 | return 1; | ||
217 | 5361 | |||
218 | 5362 | file= binlog_pos_file; | ||
219 | 5363 | offset= binlog_pos_offset; | ||
220 | 5314 | } | 5364 | } |
221 | 5315 | else | 5365 | else |
222 | 5316 | { | 5366 | { |
223 | 5367 | if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS")) | ||
224 | 5368 | return 1; | ||
225 | 5369 | |||
226 | 5317 | row= mysql_fetch_row(master); | 5370 | row= mysql_fetch_row(master); |
227 | 5318 | if (row && row[0] && row[1]) | 5371 | if (row && row[0] && row[1]) |
228 | 5319 | { | 5372 | { |
237 | 5320 | /* SHOW MASTER STATUS reports file and position */ | 5373 | file= row[0]; |
238 | 5321 | print_comment(md_result_file, 0, | 5374 | offset= row[1]; |
231 | 5322 | "\n--\n-- Position to start replication or point-in-time " | ||
232 | 5323 | "recovery from\n--\n\n"); | ||
233 | 5324 | fprintf(md_result_file, | ||
234 | 5325 | "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", | ||
235 | 5326 | comment_prefix, row[0], row[1]); | ||
236 | 5327 | check_io(md_result_file); | ||
239 | 5328 | } | 5375 | } |
241 | 5329 | else if (!ignore_errors) | 5376 | else |
242 | 5330 | { | 5377 | { |
243 | 5331 | /* SHOW MASTER STATUS reports nothing and --force is not enabled */ | ||
244 | 5332 | my_printf_error(0, "Error: Binlogging on server not active", | ||
245 | 5333 | MYF(0)); | ||
246 | 5334 | mysql_free_result(master); | 5378 | mysql_free_result(master); |
249 | 5335 | maybe_exit(EX_MYSQLERR); | 5379 | if (!ignore_errors) |
250 | 5336 | return 1; | 5380 | { |
251 | 5381 | /* SHOW MASTER STATUS reports nothing and --force is not enabled */ | ||
252 | 5382 | my_printf_error(0, "Error: Binlogging on server not active", MYF(0)); | ||
253 | 5383 | maybe_exit(EX_MYSQLERR); | ||
254 | 5384 | return 1; | ||
255 | 5385 | } | ||
256 | 5386 | else | ||
257 | 5387 | { | ||
258 | 5388 | return 0; | ||
259 | 5389 | } | ||
260 | 5337 | } | 5390 | } |
261 | 5391 | } | ||
262 | 5392 | |||
263 | 5393 | /* SHOW MASTER STATUS reports file and position */ | ||
264 | 5394 | print_comment(md_result_file, 0, | ||
265 | 5395 | "\n--\n-- Position to start replication or point-in-time " | ||
266 | 5396 | "recovery from\n--\n\n"); | ||
267 | 5397 | fprintf(md_result_file, | ||
268 | 5398 | "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n", | ||
269 | 5399 | comment_prefix, file, offset); | ||
270 | 5400 | check_io(md_result_file); | ||
271 | 5401 | |||
272 | 5402 | if (!consistent_binlog_pos) | ||
273 | 5338 | mysql_free_result(master); | 5403 | mysql_free_result(master); |
275 | 5339 | } | 5404 | |
276 | 5340 | return 0; | 5405 | return 0; |
277 | 5341 | } | 5406 | } |
278 | 5342 | 5407 | ||
279 | @@ -6295,6 +6360,7 @@ | |||
280 | 6295 | { | 6360 | { |
281 | 6296 | char bin_log_name[FN_REFLEN]; | 6361 | char bin_log_name[FN_REFLEN]; |
282 | 6297 | int exit_code; | 6362 | int exit_code; |
283 | 6363 | int consistent_binlog_pos= 0; | ||
284 | 6298 | MY_INIT("mysqldump"); | 6364 | MY_INIT("mysqldump"); |
285 | 6299 | 6365 | ||
286 | 6300 | compatible_mode_normal_str[0]= 0; | 6366 | compatible_mode_normal_str[0]= 0; |
287 | @@ -6343,6 +6409,7 @@ | |||
288 | 6343 | if (opt_slave_data && do_stop_slave_sql(mysql)) | 6409 | if (opt_slave_data && do_stop_slave_sql(mysql)) |
289 | 6344 | goto err; | 6410 | goto err; |
290 | 6345 | 6411 | ||
291 | 6412 | <<<<<<< TREE | ||
292 | 6346 | if ((opt_lock_all_tables || opt_master_data || | 6413 | if ((opt_lock_all_tables || opt_master_data || |
293 | 6347 | (opt_single_transaction && flush_logs))) | 6414 | (opt_single_transaction && flush_logs))) |
294 | 6348 | { | 6415 | { |
295 | @@ -6350,6 +6417,24 @@ | |||
296 | 6350 | goto err; | 6417 | goto err; |
297 | 6351 | } | 6418 | } |
298 | 6352 | else if (opt_lock_for_backup && do_lock_tables_for_backup(mysql)) | 6419 | else if (opt_lock_for_backup && do_lock_tables_for_backup(mysql)) |
299 | 6420 | ======= | ||
300 | 6421 | if (opt_single_transaction && opt_master_data) | ||
301 | 6422 | { | ||
302 | 6423 | /* | ||
303 | 6424 | See if we can avoid FLUSH TABLES WITH READ LOCK with Binlog_snapshot_* | ||
304 | 6425 | variables. | ||
305 | 6426 | */ | ||
306 | 6427 | consistent_binlog_pos= check_consistent_binlog_pos(NULL, NULL); | ||
307 | 6428 | } | ||
308 | 6429 | |||
309 | 6430 | if ((opt_lock_all_tables || (opt_master_data && !consistent_binlog_pos) || | ||
310 | 6431 | (opt_single_transaction && flush_logs))) | ||
311 | 6432 | { | ||
312 | 6433 | if (do_flush_tables_read_lock(mysql)) | ||
313 | 6434 | goto err; | ||
314 | 6435 | } | ||
315 | 6436 | else if (opt_lock_for_backup && do_lock_tables_for_backup(mysql)) | ||
316 | 6437 | >>>>>>> MERGE-SOURCE | ||
317 | 6353 | goto err; | 6438 | goto err; |
318 | 6354 | 6439 | ||
319 | 6355 | /* | 6440 | /* |
320 | @@ -6390,7 +6475,7 @@ | |||
321 | 6390 | goto err; | 6475 | goto err; |
322 | 6391 | 6476 | ||
323 | 6392 | 6477 | ||
325 | 6393 | if (opt_master_data && do_show_master_status(mysql)) | 6478 | if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos)) |
326 | 6394 | goto err; | 6479 | goto err; |
327 | 6395 | if (opt_slave_data && do_show_slave_status(mysql)) | 6480 | if (opt_slave_data && do_show_slave_status(mysql)) |
328 | 6396 | goto err; | 6481 | goto err; |
329 | 6397 | 6482 | ||
330 | === modified file 'doc/source/upstream-bug-fixes.rst' | |||
331 | --- doc/source/upstream-bug-fixes.rst 2014-04-25 10:55:01 +0000 | |||
332 | +++ doc/source/upstream-bug-fixes.rst 2014-05-06 08:36:28 +0000 | |||
333 | @@ -5,6 +5,7 @@ | |||
334 | 5 | ============================================================= | 5 | ============================================================= |
335 | 6 | 6 | ||
336 | 7 | +-------------------------------------------------------------------------------------------------------------+ | 7 | +-------------------------------------------------------------------------------------------------------------+ |
337 | 8 | <<<<<<< TREE | ||
338 | 8 | |:Upstream bug: :mysqlbug:`71374` - Slave IO thread won't attempt auto reconnect to the master/error-code 1159| | 9 | |:Upstream bug: :mysqlbug:`71374` - Slave IO thread won't attempt auto reconnect to the master/error-code 1159| |
339 | 9 | |:Launchpad bug: :bug:`1268729` | | 10 | |:Launchpad bug: :bug:`1268729` | |
340 | 10 | |:Upstream state: Verified (checked on 2014-03-17) | | 11 | |:Upstream state: Verified (checked on 2014-03-17) | |
341 | @@ -71,6 +72,14 @@ | |||
342 | 71 | |:Fix Released: :rn:`5.6.15-63.0` | | 72 | |:Fix Released: :rn:`5.6.15-63.0` | |
343 | 72 | |:Upstream fix: N/A | | 73 | |:Upstream fix: N/A | |
344 | 73 | +-------------------------------------------------------------------------------------------------------------+ | 74 | +-------------------------------------------------------------------------------------------------------------+ |
345 | 75 | ======= | ||
346 | 76 | |:Upstream bug: :mysqlbug:`71217` - Threadpool - add thd_wait_begin/thd_wait_end to the network IO functions | | ||
347 | 77 | |:Launchpad bug: :bug:`1159743` | | ||
348 | 78 | |:Upstream state: Open (checked on 2014-02-05) | | ||
349 | 79 | |:Fix Released: :rn:`5.6.15-63.0` | | ||
350 | 80 | |:Upstream fix: N/A | | ||
351 | 81 | +-------------------------------------------------------------------------------------------------------------+ | ||
352 | 82 | >>>>>>> MERGE-SOURCE | ||
353 | 74 | |:Upstream bug: :mysqlbug:`41975` - Support for SSL options not included in mysqlbinlog | | 83 | |:Upstream bug: :mysqlbug:`41975` - Support for SSL options not included in mysqlbinlog | |
354 | 75 | |:Launchpad bug: :bug:`1258154` | | 84 | |:Launchpad bug: :bug:`1258154` | |
355 | 76 | |:Upstream state: Closed | | 85 | |:Upstream state: Closed | |
356 | @@ -81,12 +90,21 @@ | |||
357 | 81 | |:Launchpad bug: :bug:`1258154` | | 90 | |:Launchpad bug: :bug:`1258154` | |
358 | 82 | |:Upstream state: Closed | | 91 | |:Upstream state: Closed | |
359 | 83 | |:Fix Released: :rn:`5.6.15-63.0` | | 92 | |:Fix Released: :rn:`5.6.15-63.0` | |
360 | 93 | <<<<<<< TREE | ||
361 | 84 | |:Upstream fix: 5.6.12 | | 94 | |:Upstream fix: 5.6.12 | |
362 | 85 | +-------------------------------------------------------------------------------------------------------------+ | 95 | +-------------------------------------------------------------------------------------------------------------+ |
363 | 86 | |:Upstream bug: :mysqlbug:`71411` - buf_flush_LRU() does not return correct number in case of compressed pages| | 96 | |:Upstream bug: :mysqlbug:`71411` - buf_flush_LRU() does not return correct number in case of compressed pages| |
364 | 87 | |:Launchpad bug: :bug:`1231918` | | 97 | |:Launchpad bug: :bug:`1231918` | |
365 | 88 | |:Upstream state: Verified (checked on 2014-03-17) | | 98 | |:Upstream state: Verified (checked on 2014-03-17) | |
366 | 89 | |:Fix Released: :rn:`5.6.13-61.0` | | 99 | |:Fix Released: :rn:`5.6.13-61.0` | |
367 | 100 | ======= | ||
368 | 101 | |:Upstream fix: 5.6.12 | | ||
369 | 102 | +-------------------------------------------------------------------------------------------------------------+ | ||
370 | 103 | |:Upstream bug: :mysqlbug:`71411` - buf_flush_LRU() does not return correct number in case of compressed pages| | ||
371 | 104 | |:Launchpad bug: :bug:`1231918` | | ||
372 | 105 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
373 | 106 | |:Fix Released: :rn:`5.6.13-61.0` | | ||
374 | 107 | >>>>>>> MERGE-SOURCE | ||
375 | 90 | |:Upstream fix: N/A | | 108 | |:Upstream fix: N/A | |
376 | 91 | +-------------------------------------------------------------------------------------------------------------+ | 109 | +-------------------------------------------------------------------------------------------------------------+ |
377 | 92 | |:Upstream bug: :mysqlbug:`70417` - rw_lock_x_lock_func_nowait() calls os_thread_get_curr_id() mostly ... | | 110 | |:Upstream bug: :mysqlbug:`70417` - rw_lock_x_lock_func_nowait() calls os_thread_get_curr_id() mostly ... | |
378 | @@ -97,7 +115,11 @@ | |||
379 | 97 | +-------------------------------------------------------------------------------------------------------------+ | 115 | +-------------------------------------------------------------------------------------------------------------+ |
380 | 98 | |:Upstream bug: :mysqlbug:`70490` - Suppression is too strict on some systems | | 116 | |:Upstream bug: :mysqlbug:`70490` - Suppression is too strict on some systems | |
381 | 99 | |:Launchpad bug: :bug:`1205196` | | 117 | |:Launchpad bug: :bug:`1205196` | |
382 | 118 | <<<<<<< TREE | ||
383 | 100 | |:Upstream state: No Feedback (checked on 2014-03-17) | | 119 | |:Upstream state: No Feedback (checked on 2014-03-17) | |
384 | 120 | ======= | ||
385 | 121 | |:Upstream state: No Feedback (checked on 2014-02-05) | | ||
386 | 122 | >>>>>>> MERGE-SOURCE | ||
387 | 101 | |:Fix Released: :rn:`5.6.13-61.0` | | 123 | |:Fix Released: :rn:`5.6.13-61.0` | |
388 | 102 | |:Upstream fix: N/A | | 124 | |:Upstream fix: N/A | |
389 | 103 | +-------------------------------------------------------------------------------------------------------------+ | 125 | +-------------------------------------------------------------------------------------------------------------+ |
390 | @@ -109,7 +131,11 @@ | |||
391 | 109 | +-------------------------------------------------------------------------------------------------------------+ | 131 | +-------------------------------------------------------------------------------------------------------------+ |
392 | 110 | |:Upstream bug: :mysqlbug:`70500` - Page cleaner should perform LRU flushing regardless of server activity | | 132 | |:Upstream bug: :mysqlbug:`70500` - Page cleaner should perform LRU flushing regardless of server activity | |
393 | 111 | |:Launchpad bug: :bug:`1234562` | | 133 | |:Launchpad bug: :bug:`1234562` | |
394 | 134 | <<<<<<< TREE | ||
395 | 112 | |:Upstream state: Open (checked on 2014-03-17) | | 135 | |:Upstream state: Open (checked on 2014-03-17) | |
396 | 136 | ======= | ||
397 | 137 | |:Upstream state: Open (checked on 2014-02-05) | | ||
398 | 138 | >>>>>>> MERGE-SOURCE | ||
399 | 113 | |:Fix Released: :rn:`5.6.13-61.0` | | 139 | |:Fix Released: :rn:`5.6.13-61.0` | |
400 | 114 | |:Upstream fix: N/A | | 140 | |:Upstream fix: N/A | |
401 | 115 | +-------------------------------------------------------------------------------------------------------------+ | 141 | +-------------------------------------------------------------------------------------------------------------+ |
402 | @@ -127,31 +153,51 @@ | |||
403 | 127 | +-------------------------------------------------------------------------------------------------------------+ | 153 | +-------------------------------------------------------------------------------------------------------------+ |
404 | 128 | |:Upstream bug: :mysqlbug:`68481` - InnoDB LRU flushing for MySQL 5.6 needs work | | 154 | |:Upstream bug: :mysqlbug:`68481` - InnoDB LRU flushing for MySQL 5.6 needs work | |
405 | 129 | |:Launchpad bug: :bug:`1232406` | | 155 | |:Launchpad bug: :bug:`1232406` | |
406 | 156 | <<<<<<< TREE | ||
407 | 130 | |:Upstream state: Verified (checked on 2014-03-17) | | 157 | |:Upstream state: Verified (checked on 2014-03-17) | |
408 | 158 | ======= | ||
409 | 159 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
410 | 160 | >>>>>>> MERGE-SOURCE | ||
411 | 131 | |:Fix Released: :rn:`5.6.13-61.0` | | 161 | |:Fix Released: :rn:`5.6.13-61.0` | |
412 | 132 | |:Upstream fix: N/A | | 162 | |:Upstream fix: N/A | |
413 | 133 | +-------------------------------------------------------------------------------------------------------------+ | 163 | +-------------------------------------------------------------------------------------------------------------+ |
414 | 134 | |:Upstream bug: :mysqlbug:`70453` - Add hard timeouts to page cleaner flushes | | 164 | |:Upstream bug: :mysqlbug:`70453` - Add hard timeouts to page cleaner flushes | |
415 | 135 | |:Launchpad bug: :bug:`1232101` | | 165 | |:Launchpad bug: :bug:`1232101` | |
416 | 166 | <<<<<<< TREE | ||
417 | 136 | |:Upstream state: Verified (checked on 2014-03-17) | | 167 | |:Upstream state: Verified (checked on 2014-03-17) | |
418 | 168 | ======= | ||
419 | 169 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
420 | 170 | >>>>>>> MERGE-SOURCE | ||
421 | 137 | |:Fix Released: :rn:`5.6.13-61.0` | | 171 | |:Fix Released: :rn:`5.6.13-61.0` | |
422 | 138 | |:Upstream fix: N/A | | 172 | |:Upstream fix: N/A | |
423 | 139 | +-------------------------------------------------------------------------------------------------------------+ | 173 | +-------------------------------------------------------------------------------------------------------------+ |
424 | 140 | |:Upstream bug: :mysqlbug:`69170` - buf_flush_LRU is lazy | | 174 | |:Upstream bug: :mysqlbug:`69170` - buf_flush_LRU is lazy | |
425 | 141 | |:Launchpad bug: :bug:`1231918` | | 175 | |:Launchpad bug: :bug:`1231918` | |
426 | 176 | <<<<<<< TREE | ||
427 | 142 | |:Upstream state: Verified (checked on 2014-03-17) | | 177 | |:Upstream state: Verified (checked on 2014-03-17) | |
428 | 178 | ======= | ||
429 | 179 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
430 | 180 | >>>>>>> MERGE-SOURCE | ||
431 | 143 | |:Fix Released: :rn:`5.6.13-61.0` | | 181 | |:Fix Released: :rn:`5.6.13-61.0` | |
432 | 144 | |:Upstream fix: N/A | | 182 | |:Upstream fix: N/A | |
433 | 145 | +-------------------------------------------------------------------------------------------------------------+ | 183 | +-------------------------------------------------------------------------------------------------------------+ |
434 | 146 | |:Upstream bug: :mysqlbug:`68555` - thread convoys from log_checkpoint_margin with innodb_buffer_pool_inst... | | 184 | |:Upstream bug: :mysqlbug:`68555` - thread convoys from log_checkpoint_margin with innodb_buffer_pool_inst... | |
435 | 147 | |:Launchpad bug: :bug:`1236884` | | 185 | |:Launchpad bug: :bug:`1236884` | |
436 | 186 | <<<<<<< TREE | ||
437 | 148 | |:Upstream state: Verified (checked on 2014-03-17) | | 187 | |:Upstream state: Verified (checked on 2014-03-17) | |
438 | 188 | ======= | ||
439 | 189 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
440 | 190 | >>>>>>> MERGE-SOURCE | ||
441 | 149 | |:Fix Released: :rn:`5.6.13-61.0` | | 191 | |:Fix Released: :rn:`5.6.13-61.0` | |
442 | 150 | |:Upstream fix: N/A | | 192 | |:Upstream fix: N/A | |
443 | 151 | +-------------------------------------------------------------------------------------------------------------+ | 193 | +-------------------------------------------------------------------------------------------------------------+ |
444 | 152 | |:Upstream bug: :mysqlbug:`70228` - Is buf_LRU_free_page() really supposed to make non-zip block sticky at ...| | 194 | |:Upstream bug: :mysqlbug:`70228` - Is buf_LRU_free_page() really supposed to make non-zip block sticky at ...| |
445 | 153 | |:Launchpad bug: :bug:`1220544` | | 195 | |:Launchpad bug: :bug:`1220544` | |
446 | 196 | <<<<<<< TREE | ||
447 | 154 | |:Upstream state: Verified (checked on 2014-03-17) | | 197 | |:Upstream state: Verified (checked on 2014-03-17) | |
448 | 198 | ======= | ||
449 | 199 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
450 | 200 | >>>>>>> MERGE-SOURCE | ||
451 | 155 | |:Fix Released: :rn:`5.6.13-60.6` | | 201 | |:Fix Released: :rn:`5.6.13-60.6` | |
452 | 156 | |:Upstream fix: N/A | | 202 | |:Upstream fix: N/A | |
453 | 157 | +-------------------------------------------------------------------------------------------------------------+ | 203 | +-------------------------------------------------------------------------------------------------------------+ |
454 | @@ -169,13 +215,21 @@ | |||
455 | 169 | +-------------------------------------------------------------------------------------------------------------+ | 215 | +-------------------------------------------------------------------------------------------------------------+ |
456 | 170 | |:Upstream bug: :mysqlbug:`70216` - Unnecessary overhead from persistent adaptive hash index latches | | 216 | |:Upstream bug: :mysqlbug:`70216` - Unnecessary overhead from persistent adaptive hash index latches | |
457 | 171 | |:Launchpad bug: :bug:`1218347` | | 217 | |:Launchpad bug: :bug:`1218347` | |
458 | 218 | <<<<<<< TREE | ||
459 | 172 | |:Upstream state: Verified (checked on 2014-03-17) | | 219 | |:Upstream state: Verified (checked on 2014-03-17) | |
460 | 220 | ======= | ||
461 | 221 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
462 | 222 | >>>>>>> MERGE-SOURCE | ||
463 | 173 | |:Fix Released: :rn:`5.6.13-60.6` | | 223 | |:Fix Released: :rn:`5.6.13-60.6` | |
464 | 174 | |:Upstream fix: N/A | | 224 | |:Upstream fix: N/A | |
465 | 175 | +-------------------------------------------------------------------------------------------------------------+ | 225 | +-------------------------------------------------------------------------------------------------------------+ |
466 | 176 | |:Upstream bug: :mysqlbug:`62018` - innodb adaptive hash index mutex contention | | 226 | |:Upstream bug: :mysqlbug:`62018` - innodb adaptive hash index mutex contention | |
467 | 177 | |:Launchpad bug: :bug:`1216804` | | 227 | |:Launchpad bug: :bug:`1216804` | |
468 | 228 | <<<<<<< TREE | ||
469 | 178 | |:Upstream state: Verified (checked on 2014-03-17) | | 229 | |:Upstream state: Verified (checked on 2014-03-17) | |
470 | 230 | ======= | ||
471 | 231 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
472 | 232 | >>>>>>> MERGE-SOURCE | ||
473 | 179 | |:Fix Released: :rn:`5.6.13-60.6` | | 233 | |:Fix Released: :rn:`5.6.13-60.6` | |
474 | 180 | |:Upstream fix: N/A | | 234 | |:Upstream fix: N/A | |
475 | 181 | +-------------------------------------------------------------------------------------------------------------+ | 235 | +-------------------------------------------------------------------------------------------------------------+ |
476 | @@ -193,13 +247,21 @@ | |||
477 | 193 | +-------------------------------------------------------------------------------------------------------------+ | 247 | +-------------------------------------------------------------------------------------------------------------+ |
478 | 194 | |:Upstream bug: :mysqlbug:`42415` - UPDATE/DELETE with LIMIT clause unsafe for SBL even with ORDER BY PK ... | | 248 | |:Upstream bug: :mysqlbug:`42415` - UPDATE/DELETE with LIMIT clause unsafe for SBL even with ORDER BY PK ... | |
479 | 195 | |:Launchpad bug: :bug:`1132194` | | 249 | |:Launchpad bug: :bug:`1132194` | |
480 | 250 | <<<<<<< TREE | ||
481 | 196 | |:Upstream state: Verified (checked on 2014-03-17) | | 251 | |:Upstream state: Verified (checked on 2014-03-17) | |
482 | 252 | ======= | ||
483 | 253 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
484 | 254 | >>>>>>> MERGE-SOURCE | ||
485 | 197 | |:Fix Released: :rn:`5.6.13-60.5` | | 255 | |:Fix Released: :rn:`5.6.13-60.5` | |
486 | 198 | |:Upstream fix: N/A | | 256 | |:Upstream fix: N/A | |
487 | 199 | +-------------------------------------------------------------------------------------------------------------+ | 257 | +-------------------------------------------------------------------------------------------------------------+ |
488 | 200 | |:Upstream bug: :mysqlbug:`69639` - mysql failed to build with dtrace Sun D 1.11 | | 258 | |:Upstream bug: :mysqlbug:`69639` - mysql failed to build with dtrace Sun D 1.11 | |
489 | 201 | |:Launchpad bug: :bug:`1196460` | | 259 | |:Launchpad bug: :bug:`1196460` | |
490 | 260 | <<<<<<< TREE | ||
491 | 202 | |:Upstream state: Open (checked on 2014-03-17) | | 261 | |:Upstream state: Open (checked on 2014-03-17) | |
492 | 262 | ======= | ||
493 | 263 | |:Upstream state: Open (checked on 2014-02-05) | | ||
494 | 264 | >>>>>>> MERGE-SOURCE | ||
495 | 203 | |:Fix Released: :rn:`5.6.13-60.5` | | 265 | |:Fix Released: :rn:`5.6.13-60.5` | |
496 | 204 | |:Upstream fix: N/A | | 266 | |:Upstream fix: N/A | |
497 | 205 | +-------------------------------------------------------------------------------------------------------------+ | 267 | +-------------------------------------------------------------------------------------------------------------+ |
498 | @@ -217,10 +279,15 @@ | |||
499 | 217 | +-------------------------------------------------------------------------------------------------------------+ | 279 | +-------------------------------------------------------------------------------------------------------------+ |
500 | 218 | |:Upstream bug: :mysqlbug:`69856` - mysql_install_db does not function properly in 5.6 for debug builds | | 280 | |:Upstream bug: :mysqlbug:`69856` - mysql_install_db does not function properly in 5.6 for debug builds | |
501 | 219 | |:Launchpad bug: :bug:`1179359` | | 281 | |:Launchpad bug: :bug:`1179359` | |
502 | 282 | <<<<<<< TREE | ||
503 | 220 | |:Upstream state: Verified (checked on 2014-03-17) | | 283 | |:Upstream state: Verified (checked on 2014-03-17) | |
504 | 284 | ======= | ||
505 | 285 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
506 | 286 | >>>>>>> MERGE-SOURCE | ||
507 | 221 | |:Fix Released: :rn:`5.6.12-60.4` | | 287 | |:Fix Released: :rn:`5.6.12-60.4` | |
508 | 222 | |:Upstream fix: N/A | | 288 | |:Upstream fix: N/A | |
509 | 223 | +-------------------------------------------------------------------------------------------------------------+ | 289 | +-------------------------------------------------------------------------------------------------------------+ |
510 | 290 | <<<<<<< TREE | ||
511 | 224 | |:Upstream bug: :mysqlbug:`71603` - file name is not escaped in binlog for LOAD DATA INFILE statement | | 291 | |:Upstream bug: :mysqlbug:`71603` - file name is not escaped in binlog for LOAD DATA INFILE statement | |
512 | 225 | |:Launchpad bug: :bug:`1277351` | | 292 | |:Launchpad bug: :bug:`1277351` | |
513 | 226 | |:Upstream state: N/A | | 293 | |:Upstream state: N/A | |
514 | @@ -233,6 +300,14 @@ | |||
515 | 233 | |:Fix Released: :rn:`5.6.11-60.3` | | 300 | |:Fix Released: :rn:`5.6.11-60.3` | |
516 | 234 | |:Upstream fix: N/A | | 301 | |:Upstream fix: N/A | |
517 | 235 | +-------------------------------------------------------------------------------------------------------------+ | 302 | +-------------------------------------------------------------------------------------------------------------+ |
518 | 303 | ======= | ||
519 | 304 | |:Upstream bug: :mysqlbug:`71183` - os_file_fsync() should handle fsync() returning EINTR | | ||
520 | 305 | |:Launchpad bug: :bug:`1262651` | | ||
521 | 306 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
522 | 307 | |:Fix Released: :rn:`5.6.11-60.3` | | ||
523 | 308 | |:Upstream fix: N/A | | ||
524 | 309 | +-------------------------------------------------------------------------------------------------------------+ | ||
525 | 310 | >>>>>>> MERGE-SOURCE | ||
526 | 236 | |:Upstream bug: :mysqlbug:`63451` - atomic/x86-gcc.h:make_atomic_cas_body64 potential miscompilation bug | | 311 | |:Upstream bug: :mysqlbug:`63451` - atomic/x86-gcc.h:make_atomic_cas_body64 potential miscompilation bug | |
527 | 237 | |:Launchpad bug: :bug:`878022` | | 312 | |:Launchpad bug: :bug:`878022` | |
528 | 238 | |:Upstream state: Closed | | 313 | |:Upstream state: Closed | |
529 | @@ -247,7 +322,11 @@ | |||
530 | 247 | +-------------------------------------------------------------------------------------------------------------+ | 322 | +-------------------------------------------------------------------------------------------------------------+ |
531 | 248 | |:Upstream bug: :mysqlbug:`69252` - All the parts.partition_max* tests are broken with MTR --parallel | | 323 | |:Upstream bug: :mysqlbug:`69252` - All the parts.partition_max* tests are broken with MTR --parallel | |
532 | 249 | |:Launchpad bug: :bug:`1180481` | | 324 | |:Launchpad bug: :bug:`1180481` | |
533 | 325 | <<<<<<< TREE | ||
534 | 250 | |:Upstream state: Closed | | 326 | |:Upstream state: Closed | |
535 | 327 | ======= | ||
536 | 328 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
537 | 329 | >>>>>>> MERGE-SOURCE | ||
538 | 251 | |:Fix Released: :rn:`5.6.11-60.3` | | 330 | |:Fix Released: :rn:`5.6.11-60.3` | |
539 | 252 | |:Upstream fix: 5.6.15 | | 331 | |:Upstream fix: 5.6.15 | |
540 | 253 | +-------------------------------------------------------------------------------------------------------------+ | 332 | +-------------------------------------------------------------------------------------------------------------+ |
541 | @@ -259,7 +338,11 @@ | |||
542 | 259 | +-------------------------------------------------------------------------------------------------------------+ | 338 | +-------------------------------------------------------------------------------------------------------------+ |
543 | 260 | |:Upstream bug: :mysqlbug:`68714` - Remove literal statement digest values from perfschema tests | | 339 | |:Upstream bug: :mysqlbug:`68714` - Remove literal statement digest values from perfschema tests | |
544 | 261 | |:Launchpad bug: :bug:`1157078` | | 340 | |:Launchpad bug: :bug:`1157078` | |
545 | 341 | <<<<<<< TREE | ||
546 | 262 | |:Upstream state: Verified (checked on 2014-03-17) | | 342 | |:Upstream state: Verified (checked on 2014-03-17) | |
547 | 343 | ======= | ||
548 | 344 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
549 | 345 | >>>>>>> MERGE-SOURCE | ||
550 | 263 | |:Fix Released: :rn:`5.6.11-60.3` | | 346 | |:Fix Released: :rn:`5.6.11-60.3` | |
551 | 264 | |:Upstream fix: N/A | | 347 | |:Upstream fix: N/A | |
552 | 265 | +-------------------------------------------------------------------------------------------------------------+ | 348 | +-------------------------------------------------------------------------------------------------------------+ |
553 | @@ -283,13 +366,21 @@ | |||
554 | 283 | +-------------------------------------------------------------------------------------------------------------+ | 366 | +-------------------------------------------------------------------------------------------------------------+ |
555 | 284 | |:Upstream bug: :mysqlbug:`68970` - fsp_reserve_free_extents switches from small to big tblspace handling ... | | 367 | |:Upstream bug: :mysqlbug:`68970` - fsp_reserve_free_extents switches from small to big tblspace handling ... | |
556 | 285 | |:Launchpad bug: :bug:`1169494` | | 368 | |:Launchpad bug: :bug:`1169494` | |
557 | 369 | <<<<<<< TREE | ||
558 | 286 | |:Upstream state: Verified (checked on 2014-03-17) | | 370 | |:Upstream state: Verified (checked on 2014-03-17) | |
559 | 371 | ======= | ||
560 | 372 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
561 | 373 | >>>>>>> MERGE-SOURCE | ||
562 | 287 | |:Fix Released: :rn:`5.6.11-60.3` | | 374 | |:Fix Released: :rn:`5.6.11-60.3` | |
563 | 288 | |:Upstream fix: N/A | | 375 | |:Upstream fix: N/A | |
564 | 289 | +-------------------------------------------------------------------------------------------------------------+ | 376 | +-------------------------------------------------------------------------------------------------------------+ |
565 | 290 | |:Upstream bug: :mysqlbug:`68713` - create_duplicate_weedout_tmp_table() leaves key_part_flag uninitialized | | 377 | |:Upstream bug: :mysqlbug:`68713` - create_duplicate_weedout_tmp_table() leaves key_part_flag uninitialized | |
566 | 291 | |:Launchpad bug: :bug:`1157037` | | 378 | |:Launchpad bug: :bug:`1157037` | |
567 | 379 | <<<<<<< TREE | ||
568 | 292 | |:Upstream state: Verified (checked on 2014-03-17) | | 380 | |:Upstream state: Verified (checked on 2014-03-17) | |
569 | 381 | ======= | ||
570 | 382 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
571 | 383 | >>>>>>> MERGE-SOURCE | ||
572 | 293 | |:Fix Released: :rn:`5.6.11-60.3` | | 384 | |:Fix Released: :rn:`5.6.11-60.3` | |
573 | 294 | |:Upstream fix: N/A | | 385 | |:Upstream fix: N/A | |
574 | 295 | +-------------------------------------------------------------------------------------------------------------+ | 386 | +-------------------------------------------------------------------------------------------------------------+ |
575 | @@ -301,13 +392,21 @@ | |||
576 | 301 | +-------------------------------------------------------------------------------------------------------------+ | 392 | +-------------------------------------------------------------------------------------------------------------+ |
577 | 302 | |:Upstream bug: :mysqlbug:`68999` - SSL_OP_NO_COMPRESSION not defined | | 393 | |:Upstream bug: :mysqlbug:`68999` - SSL_OP_NO_COMPRESSION not defined | |
578 | 303 | |:Launchpad bug: :bug:`1183610` | | 394 | |:Launchpad bug: :bug:`1183610` | |
579 | 395 | <<<<<<< TREE | ||
580 | 304 | |:Upstream state: No Feedback (checked on 2014-03-17) | | 396 | |:Upstream state: No Feedback (checked on 2014-03-17) | |
581 | 397 | ======= | ||
582 | 398 | |:Upstream state: No Feedback (checked on 2014-02-05) | | ||
583 | 399 | >>>>>>> MERGE-SOURCE | ||
584 | 305 | |:Fix Released: :rn:`5.6.11-60.3` | | 400 | |:Fix Released: :rn:`5.6.11-60.3` | |
585 | 306 | |:Upstream fix: N/A | | 401 | |:Upstream fix: N/A | |
586 | 307 | +-------------------------------------------------------------------------------------------------------------+ | 402 | +-------------------------------------------------------------------------------------------------------------+ |
587 | 308 | |:Upstream bug: :mysqlbug:`68845` - Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write() | | 403 | |:Upstream bug: :mysqlbug:`68845` - Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write() | |
588 | 309 | |:Launchpad bug: :bug:`1163439` | | 404 | |:Launchpad bug: :bug:`1163439` | |
589 | 405 | <<<<<<< TREE | ||
590 | 310 | |:Upstream state: Verified (checked on 2014-03-17) | | 406 | |:Upstream state: Verified (checked on 2014-03-17) | |
591 | 407 | ======= | ||
592 | 408 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
593 | 409 | >>>>>>> MERGE-SOURCE | ||
594 | 311 | |:Fix Released: :rn:`5.6.11-60.3` | | 410 | |:Fix Released: :rn:`5.6.11-60.3` | |
595 | 312 | |:Upstream fix: N/A | | 411 | |:Upstream fix: N/A | |
596 | 313 | +-------------------------------------------------------------------------------------------------------------+ | 412 | +-------------------------------------------------------------------------------------------------------------+ |
597 | @@ -337,7 +436,11 @@ | |||
598 | 337 | +-------------------------------------------------------------------------------------------------------------+ | 436 | +-------------------------------------------------------------------------------------------------------------+ |
599 | 338 | |:Upstream bug: :mysqlbug:`68476` - Suboptimal code in my_strnxfrm_simple() | | 437 | |:Upstream bug: :mysqlbug:`68476` - Suboptimal code in my_strnxfrm_simple() | |
600 | 339 | |:Launchpad bug: :bug:`1132350` | | 438 | |:Launchpad bug: :bug:`1132350` | |
601 | 439 | <<<<<<< TREE | ||
602 | 340 | |:Upstream state: Verified (checked on 2014-03-17) | | 440 | |:Upstream state: Verified (checked on 2014-03-17) | |
603 | 441 | ======= | ||
604 | 442 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
605 | 443 | >>>>>>> MERGE-SOURCE | ||
606 | 341 | |:Fix Released: :rn:`5.6.11-60.3` | | 444 | |:Fix Released: :rn:`5.6.11-60.3` | |
607 | 342 | |:Upstream fix: N/A | | 445 | |:Upstream fix: N/A | |
608 | 343 | +-------------------------------------------------------------------------------------------------------------+ | 446 | +-------------------------------------------------------------------------------------------------------------+ |
609 | @@ -391,13 +494,21 @@ | |||
610 | 391 | +-------------------------------------------------------------------------------------------------------------+ | 494 | +-------------------------------------------------------------------------------------------------------------+ |
611 | 392 | |:Upstream bug: :mysqlbug:`61180` - korr/store macros in my_global.h assume the argument to be a char pointer | | 495 | |:Upstream bug: :mysqlbug:`61180` - korr/store macros in my_global.h assume the argument to be a char pointer | |
612 | 393 | |:Launchpad bug: :bug:`1042517` | | 496 | |:Launchpad bug: :bug:`1042517` | |
613 | 497 | <<<<<<< TREE | ||
614 | 394 | |:Upstream state: Closed | | 498 | |:Upstream state: Closed | |
615 | 499 | ======= | ||
616 | 500 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
617 | 501 | >>>>>>> MERGE-SOURCE | ||
618 | 395 | |:Fix Released: :rn:`5.6.11-60.3` | | 502 | |:Fix Released: :rn:`5.6.11-60.3` | |
619 | 396 | |:Upstream fix: N/A | | 503 | |:Upstream fix: N/A | |
620 | 397 | +-------------------------------------------------------------------------------------------------------------+ | 504 | +-------------------------------------------------------------------------------------------------------------+ |
621 | 398 | |:Upstream bug: :mysqlbug:`61178` - Incorrect implementation of intersect(ulonglong) in non-optimized Bitmap..| | 505 | |:Upstream bug: :mysqlbug:`61178` - Incorrect implementation of intersect(ulonglong) in non-optimized Bitmap..| |
622 | 399 | |:Launchpad bug: :bug:`1042517` | | 506 | |:Launchpad bug: :bug:`1042517` | |
623 | 507 | <<<<<<< TREE | ||
624 | 400 | |:Upstream state: Verified (checked on 2014-03-17) | | 508 | |:Upstream state: Verified (checked on 2014-03-17) | |
625 | 509 | ======= | ||
626 | 510 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
627 | 511 | >>>>>>> MERGE-SOURCE | ||
628 | 401 | |:Fix Released: :rn:`5.6.11-60.3` | | 512 | |:Fix Released: :rn:`5.6.11-60.3` | |
629 | 402 | |:Upstream fix: N/A | | 513 | |:Upstream fix: N/A | |
630 | 403 | +-------------------------------------------------------------------------------------------------------------+ | 514 | +-------------------------------------------------------------------------------------------------------------+ |
631 | @@ -409,7 +520,11 @@ | |||
632 | 409 | +-------------------------------------------------------------------------------------------------------------+ | 520 | +-------------------------------------------------------------------------------------------------------------+ |
633 | 410 | |:Upstream bug: :mysqlbug:`64800` - mysqldump with --include-master-host-port putting quotes around port no. | | 521 | |:Upstream bug: :mysqlbug:`64800` - mysqldump with --include-master-host-port putting quotes around port no. | |
634 | 411 | |:Launchpad bug: :bug:`1013432` | | 522 | |:Launchpad bug: :bug:`1013432` | |
635 | 523 | <<<<<<< TREE | ||
636 | 412 | |:Upstream state: Verified (checked on 2014-03-17) | | 524 | |:Upstream state: Verified (checked on 2014-03-17) | |
637 | 525 | ======= | ||
638 | 526 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
639 | 527 | >>>>>>> MERGE-SOURCE | ||
640 | 413 | |:Fix Released: :rn:`5.6.11-60.3` | | 528 | |:Fix Released: :rn:`5.6.11-60.3` | |
641 | 414 | |:Upstream fix: N/A | | 529 | |:Upstream fix: N/A | |
642 | 415 | +-------------------------------------------------------------------------------------------------------------+ | 530 | +-------------------------------------------------------------------------------------------------------------+ |
643 | @@ -439,13 +554,21 @@ | |||
644 | 439 | +-------------------------------------------------------------------------------------------------------------+ | 554 | +-------------------------------------------------------------------------------------------------------------+ |
645 | 440 | |:Upstream bug: :mysqlbug:`25007` - memory tables with dynamic rows format | | 555 | |:Upstream bug: :mysqlbug:`25007` - memory tables with dynamic rows format | |
646 | 441 | |:Launchpad bug: N/A | | 556 | |:Launchpad bug: N/A | |
647 | 557 | <<<<<<< TREE | ||
648 | 442 | |:Upstream state: Verified (checked on 2014-03-17) | | 558 | |:Upstream state: Verified (checked on 2014-03-17) | |
649 | 559 | ======= | ||
650 | 560 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
651 | 561 | >>>>>>> MERGE-SOURCE | ||
652 | 443 | |:Fix Released: :rn:`5.6.11-60.3` | | 562 | |:Fix Released: :rn:`5.6.11-60.3` | |
653 | 444 | |:Upstream fix: N/A | | 563 | |:Upstream fix: N/A | |
654 | 445 | +-------------------------------------------------------------------------------------------------------------+ | 564 | +-------------------------------------------------------------------------------------------------------------+ |
655 | 446 | |:Upstream bug: :mysqlbug:`61595` - mysql-test/include/wait_for_slave_param.inc timeout logic is incorrect | | 565 | |:Upstream bug: :mysqlbug:`61595` - mysql-test/include/wait_for_slave_param.inc timeout logic is incorrect | |
656 | 447 | |:Launchpad bug: :bug:`800035` | | 566 | |:Launchpad bug: :bug:`800035` | |
657 | 567 | <<<<<<< TREE | ||
658 | 448 | |:Upstream state: Verified (checked on 2014-03-17) | | 568 | |:Upstream state: Verified (checked on 2014-03-17) | |
659 | 569 | ======= | ||
660 | 570 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
661 | 571 | >>>>>>> MERGE-SOURCE | ||
662 | 449 | |:Fix Released: :rn:`5.6.11-60.3` | | 572 | |:Fix Released: :rn:`5.6.11-60.3` | |
663 | 450 | |:Upstream fix: N/A | | 573 | |:Upstream fix: N/A | |
664 | 451 | +-------------------------------------------------------------------------------------------------------------+ | 574 | +-------------------------------------------------------------------------------------------------------------+ |
665 | @@ -457,7 +580,11 @@ | |||
666 | 457 | +-------------------------------------------------------------------------------------------------------------+ | 580 | +-------------------------------------------------------------------------------------------------------------+ |
667 | 458 | |:Upstream bug: :mysqlbug:`68116` - InnoDB monitor may hit an assertion error in buf_page_get_gen in debug ...| | 581 | |:Upstream bug: :mysqlbug:`68116` - InnoDB monitor may hit an assertion error in buf_page_get_gen in debug ...| |
668 | 459 | |:Launchpad bug: :bug:`1100178` | | 582 | |:Launchpad bug: :bug:`1100178` | |
669 | 583 | <<<<<<< TREE | ||
670 | 460 | |:Upstream state: Verified (checked on 2014-03-17) | | 584 | |:Upstream state: Verified (checked on 2014-03-17) | |
671 | 585 | ======= | ||
672 | 586 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
673 | 587 | >>>>>>> MERGE-SOURCE | ||
674 | 461 | |:Fix Released: :rn:`5.6.10-60.2` | | 588 | |:Fix Released: :rn:`5.6.10-60.2` | |
675 | 462 | |:Upstream fix: N/A | | 589 | |:Upstream fix: N/A | |
676 | 463 | +-------------------------------------------------------------------------------------------------------------+ | 590 | +-------------------------------------------------------------------------------------------------------------+ |
677 | @@ -469,13 +596,21 @@ | |||
678 | 469 | +-------------------------------------------------------------------------------------------------------------+ | 596 | +-------------------------------------------------------------------------------------------------------------+ |
679 | 470 | |:Upstream bug: :mysqlbug:`20001` - Support for temp-tables in INFORMATION_SCHEMA | | 597 | |:Upstream bug: :mysqlbug:`20001` - Support for temp-tables in INFORMATION_SCHEMA | |
680 | 471 | |:Launchpad bug: N/A | | 598 | |:Launchpad bug: N/A | |
681 | 599 | <<<<<<< TREE | ||
682 | 472 | |:Upstream state: Verified (checked on 2014-03-17) | | 600 | |:Upstream state: Verified (checked on 2014-03-17) | |
683 | 601 | ======= | ||
684 | 602 | |:Upstream state: Verified (checked on 2014-02-05) | | ||
685 | 603 | >>>>>>> MERGE-SOURCE | ||
686 | 473 | |:Fix Released: :rn:`5.6.5-60.0` | | 604 | |:Fix Released: :rn:`5.6.5-60.0` | |
687 | 474 | |:Upstream fix: N/A | | 605 | |:Upstream fix: N/A | |
688 | 475 | +-------------------------------------------------------------------------------------------------------------+ | 606 | +-------------------------------------------------------------------------------------------------------------+ |
689 | 476 | |:Upstream bug: :mysqlbug:`69146` - Optimization in buf_pool_get_oldest_modification if srv_buf_pool_instances| | 607 | |:Upstream bug: :mysqlbug:`69146` - Optimization in buf_pool_get_oldest_modification if srv_buf_pool_instances| |
690 | 477 | |:Launchpad bug: :bug:`1176496` | | 608 | |:Launchpad bug: :bug:`1176496` | |
691 | 609 | <<<<<<< TREE | ||
692 | 478 | |:Upstream state: Open (checked on 2014-03-17) | | 610 | |:Upstream state: Open (checked on 2014-03-17) | |
693 | 611 | ======= | ||
694 | 612 | |:Upstream state: Open (checked on 2014-02-05) | | ||
695 | 613 | >>>>>>> MERGE-SOURCE | ||
696 | 479 | |:Fix Released: :rn:`5.6.5-60.0` | | 614 | |:Fix Released: :rn:`5.6.5-60.0` | |
697 | 480 | |:Upstream fix: N/A | | 615 | |:Upstream fix: N/A | |
698 | 481 | +-------------------------------------------------------------------------------------------------------------+ | 616 | +-------------------------------------------------------------------------------------------------------------+ |
699 | 482 | 617 | ||
700 | === modified file 'mysql-test/r/backup_locks_mysqldump.result' | |||
701 | --- mysql-test/r/backup_locks_mysqldump.result 2014-02-27 12:29:47 +0000 | |||
702 | +++ mysql-test/r/backup_locks_mysqldump.result 2014-05-06 08:36:28 +0000 | |||
703 | @@ -1,3 +1,4 @@ | |||
704 | 1 | <<<<<<< TREE | ||
705 | 1 | SHOW VARIABLES LIKE 'have_backup_locks'; | 2 | SHOW VARIABLES LIKE 'have_backup_locks'; |
706 | 2 | Variable_name Value | 3 | Variable_name Value |
707 | 3 | have_backup_locks YES | 4 | have_backup_locks YES |
708 | @@ -149,3 +150,148 @@ | |||
709 | 149 | SET GLOBAL log_output = @old_log_output; | 150 | SET GLOBAL log_output = @old_log_output; |
710 | 150 | SET GLOBAL general_log = @old_general_log; | 151 | SET GLOBAL general_log = @old_general_log; |
711 | 151 | DROP TABLE t1, t2; | 152 | DROP TABLE t1, t2; |
712 | 153 | ======= | ||
713 | 154 | SHOW VARIABLES LIKE 'have_backup_locks'; | ||
714 | 155 | Variable_name Value | ||
715 | 156 | have_backup_locks YES | ||
716 | 157 | CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
717 | 158 | CREATE TABLE t2 (a INT) ENGINE=MyISAM; | ||
718 | 159 | SET @old_general_log = @@general_log; | ||
719 | 160 | SET @old_log_output = @@log_output; | ||
720 | 161 | TRUNCATE TABLE mysql.general_log; | ||
721 | 162 | SET GLOBAL log_output = 'TABLE'; | ||
722 | 163 | SET GLOBAL general_log = ON; | ||
723 | 164 | # Check that --lock-for-backup is converted to --lock-all-tables if | ||
724 | 165 | # --single-transaction is not specified | ||
725 | 166 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
726 | 167 | argument | ||
727 | 168 | SET GLOBAL general_log = ON | ||
728 | 169 | root@localhost on | ||
729 | 170 | /*!40100 SET @@SQL_MODE='' */ | ||
730 | 171 | /*!40103 SET TIME_ZONE='+00:00' */ | ||
731 | 172 | FLUSH TABLES | ||
732 | 173 | FLUSH TABLES WITH READ LOCK | ||
733 | 174 | SHOW VARIABLES LIKE 'gtid\_mode' | ||
734 | 175 | SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test'))) GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE ORDER BY LOGFILE_GROUP_NAME | ||
735 | 176 | SELECT DISTINCT TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test')) ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME | ||
736 | 177 | SHOW VARIABLES LIKE 'ndbinfo\_version' | ||
737 | 178 | test | ||
738 | 179 | show tables | ||
739 | 180 | show table status like 't1' | ||
740 | 181 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
741 | 182 | SET SESSION character_set_results = 'binary' | ||
742 | 183 | show create table `t1` | ||
743 | 184 | SET SESSION character_set_results = 'utf8' | ||
744 | 185 | show fields from `t1` | ||
745 | 186 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` | ||
746 | 187 | SET SESSION character_set_results = 'binary' | ||
747 | 188 | use `test` | ||
748 | 189 | select @@collation_database | ||
749 | 190 | SHOW TRIGGERS LIKE 't1' | ||
750 | 191 | SET SESSION character_set_results = 'utf8' | ||
751 | 192 | show table status like 't2' | ||
752 | 193 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
753 | 194 | SET SESSION character_set_results = 'binary' | ||
754 | 195 | show create table `t2` | ||
755 | 196 | SET SESSION character_set_results = 'utf8' | ||
756 | 197 | show fields from `t2` | ||
757 | 198 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2` | ||
758 | 199 | SET SESSION character_set_results = 'binary' | ||
759 | 200 | use `test` | ||
760 | 201 | select @@collation_database | ||
761 | 202 | SHOW TRIGGERS LIKE 't2' | ||
762 | 203 | SET SESSION character_set_results = 'utf8' | ||
763 | 204 | SELECT argument FROM mysql.general_log WHERE argument != '' | ||
764 | 205 | TRUNCATE TABLE mysql.general_log; | ||
765 | 206 | # Check that --lock-for-backup --single-transaction uses LOCK TABLES FOR | ||
766 | 207 | # BACKUP | ||
767 | 208 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
768 | 209 | argument | ||
769 | 210 | root@localhost on | ||
770 | 211 | /*!40100 SET @@SQL_MODE='' */ | ||
771 | 212 | /*!40103 SET TIME_ZONE='+00:00' */ | ||
772 | 213 | SHOW VARIABLES LIKE 'have_backup_locks' | ||
773 | 214 | LOCK TABLES FOR BACKUP | ||
774 | 215 | SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ | ||
775 | 216 | START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */ | ||
776 | 217 | SHOW VARIABLES LIKE 'gtid\_mode' | ||
777 | 218 | SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test'))) GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE ORDER BY LOGFILE_GROUP_NAME | ||
778 | 219 | SELECT DISTINCT TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test')) ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME | ||
779 | 220 | SHOW VARIABLES LIKE 'ndbinfo\_version' | ||
780 | 221 | test | ||
781 | 222 | show tables | ||
782 | 223 | show table status like 't1' | ||
783 | 224 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
784 | 225 | SET SESSION character_set_results = 'binary' | ||
785 | 226 | show create table `t1` | ||
786 | 227 | SET SESSION character_set_results = 'utf8' | ||
787 | 228 | show fields from `t1` | ||
788 | 229 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` | ||
789 | 230 | SET SESSION character_set_results = 'binary' | ||
790 | 231 | use `test` | ||
791 | 232 | select @@collation_database | ||
792 | 233 | SHOW TRIGGERS LIKE 't1' | ||
793 | 234 | SET SESSION character_set_results = 'utf8' | ||
794 | 235 | show table status like 't2' | ||
795 | 236 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
796 | 237 | SET SESSION character_set_results = 'binary' | ||
797 | 238 | show create table `t2` | ||
798 | 239 | SET SESSION character_set_results = 'utf8' | ||
799 | 240 | show fields from `t2` | ||
800 | 241 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2` | ||
801 | 242 | SET SESSION character_set_results = 'binary' | ||
802 | 243 | use `test` | ||
803 | 244 | select @@collation_database | ||
804 | 245 | SHOW TRIGGERS LIKE 't2' | ||
805 | 246 | SET SESSION character_set_results = 'utf8' | ||
806 | 247 | SELECT argument FROM mysql.general_log WHERE argument != '' | ||
807 | 248 | TRUNCATE TABLE mysql.general_log; | ||
808 | 249 | # Check that --master-data does not disable --lock-for-backup | ||
809 | 250 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
810 | 251 | argument | ||
811 | 252 | root@localhost on | ||
812 | 253 | /*!40100 SET @@SQL_MODE='' */ | ||
813 | 254 | /*!40103 SET TIME_ZONE='+00:00' */ | ||
814 | 255 | SHOW VARIABLES LIKE 'have_backup_locks' | ||
815 | 256 | SHOW STATUS LIKE 'binlog_snapshot_%' | ||
816 | 257 | LOCK TABLES FOR BACKUP | ||
817 | 258 | SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ | ||
818 | 259 | START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */ | ||
819 | 260 | SHOW VARIABLES LIKE 'gtid\_mode' | ||
820 | 261 | SHOW STATUS LIKE 'binlog_snapshot_%' | ||
821 | 262 | UNLOCK TABLES | ||
822 | 263 | SELECT LOGFILE_GROUP_NAME, FILE_NAME, TOTAL_EXTENTS, INITIAL_SIZE, ENGINE, EXTRA FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'UNDO LOG' AND FILE_NAME IS NOT NULL AND LOGFILE_GROUP_NAME IN (SELECT DISTINCT LOGFILE_GROUP_NAME FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test'))) GROUP BY LOGFILE_GROUP_NAME, FILE_NAME, ENGINE ORDER BY LOGFILE_GROUP_NAME | ||
823 | 264 | SELECT DISTINCT TABLESPACE_NAME, FILE_NAME, LOGFILE_GROUP_NAME, EXTENT_SIZE, INITIAL_SIZE, ENGINE FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE = 'DATAFILE' AND TABLESPACE_NAME IN (SELECT DISTINCT TABLESPACE_NAME FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA IN ('test')) ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME | ||
824 | 265 | SHOW VARIABLES LIKE 'ndbinfo\_version' | ||
825 | 266 | test | ||
826 | 267 | show tables | ||
827 | 268 | show table status like 't1' | ||
828 | 269 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
829 | 270 | SET SESSION character_set_results = 'binary' | ||
830 | 271 | show create table `t1` | ||
831 | 272 | SET SESSION character_set_results = 'utf8' | ||
832 | 273 | show fields from `t1` | ||
833 | 274 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` | ||
834 | 275 | SET SESSION character_set_results = 'binary' | ||
835 | 276 | use `test` | ||
836 | 277 | select @@collation_database | ||
837 | 278 | SHOW TRIGGERS LIKE 't1' | ||
838 | 279 | SET SESSION character_set_results = 'utf8' | ||
839 | 280 | show table status like 't2' | ||
840 | 281 | SET SQL_QUOTE_SHOW_CREATE=1 | ||
841 | 282 | SET SESSION character_set_results = 'binary' | ||
842 | 283 | show create table `t2` | ||
843 | 284 | SET SESSION character_set_results = 'utf8' | ||
844 | 285 | show fields from `t2` | ||
845 | 286 | SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2` | ||
846 | 287 | SET SESSION character_set_results = 'binary' | ||
847 | 288 | use `test` | ||
848 | 289 | select @@collation_database | ||
849 | 290 | SHOW TRIGGERS LIKE 't2' | ||
850 | 291 | SET SESSION character_set_results = 'utf8' | ||
851 | 292 | SELECT argument FROM mysql.general_log WHERE argument != '' | ||
852 | 293 | TRUNCATE TABLE mysql.general_log; | ||
853 | 294 | SET GLOBAL log_output = @old_log_output; | ||
854 | 295 | SET GLOBAL general_log = @old_general_log; | ||
855 | 296 | DROP TABLE t1, t2; | ||
856 | 297 | >>>>>>> MERGE-SOURCE | ||
857 | 152 | 298 | ||
858 | === modified file 'mysql-test/r/mysqldump-max.result' | |||
859 | --- mysql-test/r/mysqldump-max.result 2010-10-25 09:20:53 +0000 | |||
860 | +++ mysql-test/r/mysqldump-max.result 2014-05-06 08:36:28 +0000 | |||
861 | @@ -290,3 +290,60 @@ | |||
862 | 290 | DROP VIEW v1; | 290 | DROP VIEW v1; |
863 | 291 | DROP TABLE t1; | 291 | DROP TABLE t1; |
864 | 292 | SET GLOBAL default_storage_engine=@old_engine; | 292 | SET GLOBAL default_storage_engine=@old_engine; |
865 | 293 | # Connection default | ||
866 | 294 | SET binlog_format= mixed; | ||
867 | 295 | RESET MASTER; | ||
868 | 296 | CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; | ||
869 | 297 | INSERT INTO t1 VALUES (1),(2); | ||
870 | 298 | CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; | ||
871 | 299 | INSERT INTO t2 VALUES (1,0), (2,0); | ||
872 | 300 | SELECT GET_LOCK("block_queries_1", 120); | ||
873 | 301 | GET_LOCK("block_queries_1", 120) | ||
874 | 302 | 1 | ||
875 | 303 | # Connection c3 | ||
876 | 304 | SELECT GET_LOCK("block_queries_2", 120); | ||
877 | 305 | GET_LOCK("block_queries_2", 120) | ||
878 | 306 | 1 | ||
879 | 307 | # Connection c1 | ||
880 | 308 | SET @c= 0; | ||
881 | 309 | SELECT IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) FROM t1 ORDER BY a; | ||
882 | 310 | # Connection c2 | ||
883 | 311 | SET binlog_format="row"; | ||
884 | 312 | SET @d= 10; | ||
885 | 313 | UPDATE t2 SET b=IF(@d<=10, @d:=@d+1, GET_LOCK("block_queries_2", 120)) ORDER BY a; | ||
886 | 314 | # Connection default | ||
887 | 315 | # Make sure other queries are running (and waiting). | ||
888 | 316 | SELECT RELEASE_LOCK("block_queries_1"); | ||
889 | 317 | RELEASE_LOCK("block_queries_1") | ||
890 | 318 | 1 | ||
891 | 319 | # Connection c3 | ||
892 | 320 | SELECT RELEASE_LOCK("block_queries_2"); | ||
893 | 321 | RELEASE_LOCK("block_queries_2") | ||
894 | 322 | 1 | ||
895 | 323 | # Connection c1 | ||
896 | 324 | IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) | ||
897 | 325 | 1 | ||
898 | 326 | 1 | ||
899 | 327 | # Connection c2 | ||
900 | 328 | # Connection default | ||
901 | 329 | SELECT * FROM t2 ORDER BY a; | ||
902 | 330 | a b | ||
903 | 331 | 1 11 | ||
904 | 332 | 2 1 | ||
905 | 333 | DROP TABLE t1; | ||
906 | 334 | DROP TABLE t2; | ||
907 | 335 | SHOW BINLOG EVENTS LIMIT 7,3; | ||
908 | 336 | Log_name Pos Event_type Server_id End_log_pos Info | ||
909 | 337 | master-bin.000001 665 Query 1 773 use `test`; INSERT INTO t2 VALUES (1,0), (2,0) | ||
910 | 338 | master-bin.000001 773 Xid 1 804 COMMIT /* XID */ | ||
911 | 339 | master-bin.000001 804 Query 1 876 BEGIN | ||
912 | 340 | -- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=804; | ||
913 | 341 | SELECT * FROM t1 ORDER BY a; | ||
914 | 342 | a | ||
915 | 343 | 1 | ||
916 | 344 | 2 | ||
917 | 345 | SELECT * FROM t2 ORDER BY a; | ||
918 | 346 | a b | ||
919 | 347 | 1 0 | ||
920 | 348 | 2 0 | ||
921 | 349 | DROP TABLE t1,t2; | ||
922 | 293 | 350 | ||
923 | === added file 'mysql-test/suite/binlog/r/binlog_consistent.result' | |||
924 | --- mysql-test/suite/binlog/r/binlog_consistent.result 1970-01-01 00:00:00 +0000 | |||
925 | +++ mysql-test/suite/binlog/r/binlog_consistent.result 2014-05-06 08:36:28 +0000 | |||
926 | @@ -0,0 +1,103 @@ | |||
927 | 1 | RESET MASTER; | ||
928 | 2 | # Connection default | ||
929 | 3 | CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb; | ||
930 | 4 | SHOW MASTER STATUS; | ||
931 | 5 | File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set | ||
932 | 6 | master-bin.000001 266 | ||
933 | 7 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
934 | 8 | Variable_name Value | ||
935 | 9 | Binlog_snapshot_file master-bin.000001 | ||
936 | 10 | Binlog_snapshot_position 266 | ||
937 | 11 | BEGIN; | ||
938 | 12 | INSERT INTO t1 VALUES (0, ""); | ||
939 | 13 | # Connection con1 | ||
940 | 14 | BEGIN; | ||
941 | 15 | INSERT INTO t1 VALUES (1, ""); | ||
942 | 16 | # Connection con2 | ||
943 | 17 | CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam; | ||
944 | 18 | BEGIN; | ||
945 | 19 | INSERT INTO t1 VALUES (2, "first"); | ||
946 | 20 | INSERT INTO t2 VALUES (2); | ||
947 | 21 | INSERT INTO t1 VALUES (2, "second"); | ||
948 | 22 | # Connection default | ||
949 | 23 | COMMIT; | ||
950 | 24 | SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; | ||
951 | 25 | START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
952 | 26 | # Connection con3 | ||
953 | 27 | BEGIN; | ||
954 | 28 | INSERT INTO t1 VALUES (3, ""); | ||
955 | 29 | INSERT INTO t2 VALUES (3); | ||
956 | 30 | # Connection con4 | ||
957 | 31 | BEGIN; | ||
958 | 32 | INSERT INTO t1 VALUES (4, ""); | ||
959 | 33 | COMMIT; | ||
960 | 34 | # Connection default | ||
961 | 35 | SELECT * FROM t1 ORDER BY a,b; | ||
962 | 36 | a b | ||
963 | 37 | 0 | ||
964 | 38 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
965 | 39 | Variable_name Value | ||
966 | 40 | Binlog_snapshot_file master-bin.000001 | ||
967 | 41 | Binlog_snapshot_position 860 | ||
968 | 42 | SHOW MASTER STATUS; | ||
969 | 43 | File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set | ||
970 | 44 | master-bin.000001 1331 | ||
971 | 45 | SELECT * FROM t2 ORDER BY a; | ||
972 | 46 | a | ||
973 | 47 | 2 | ||
974 | 48 | 3 | ||
975 | 49 | # Connection con1 | ||
976 | 50 | COMMIT; | ||
977 | 51 | # Connection con2 | ||
978 | 52 | COMMIT; | ||
979 | 53 | # Connection con3 | ||
980 | 54 | COMMIT; | ||
981 | 55 | FLUSH LOGS; | ||
982 | 56 | # Connection default | ||
983 | 57 | SELECT * FROM t1 ORDER BY a,b; | ||
984 | 58 | a b | ||
985 | 59 | 0 | ||
986 | 60 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
987 | 61 | Variable_name Value | ||
988 | 62 | Binlog_snapshot_file master-bin.000001 | ||
989 | 63 | Binlog_snapshot_position 860 | ||
990 | 64 | SHOW MASTER STATUS; | ||
991 | 65 | File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set | ||
992 | 66 | master-bin.000002 120 | ||
993 | 67 | COMMIT; | ||
994 | 68 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
995 | 69 | Variable_name Value | ||
996 | 70 | Binlog_snapshot_file master-bin.000002 | ||
997 | 71 | Binlog_snapshot_position 120 | ||
998 | 72 | SHOW MASTER STATUS; | ||
999 | 73 | File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set | ||
1000 | 74 | master-bin.000002 120 | ||
1001 | 75 | SHOW BINLOG EVENTS; | ||
1002 | 76 | Log_name Pos Event_type Server_id End_log_pos Info | ||
1003 | 77 | master-bin.000001 4 Format_desc 1 120 Server ver: #, Binlog ver: # | ||
1004 | 78 | master-bin.000001 120 Query 1 266 use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb | ||
1005 | 79 | master-bin.000001 266 Query 1 389 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam | ||
1006 | 80 | master-bin.000001 389 Query 1 468 BEGIN | ||
1007 | 81 | master-bin.000001 468 Query 1 567 use `test`; INSERT INTO t2 VALUES (2) | ||
1008 | 82 | master-bin.000001 567 Query 1 647 COMMIT | ||
1009 | 83 | master-bin.000001 647 Query 1 726 BEGIN | ||
1010 | 84 | master-bin.000001 726 Query 1 829 use `test`; INSERT INTO t1 VALUES (0, "") | ||
1011 | 85 | master-bin.000001 829 Xid 1 860 COMMIT /* XID */ | ||
1012 | 86 | master-bin.000001 860 Query 1 939 BEGIN | ||
1013 | 87 | master-bin.000001 939 Query 1 1038 use `test`; INSERT INTO t2 VALUES (3) | ||
1014 | 88 | master-bin.000001 1038 Query 1 1118 COMMIT | ||
1015 | 89 | master-bin.000001 1118 Query 1 1197 BEGIN | ||
1016 | 90 | master-bin.000001 1197 Query 1 1300 use `test`; INSERT INTO t1 VALUES (4, "") | ||
1017 | 91 | master-bin.000001 1300 Xid 1 1331 COMMIT /* XID */ | ||
1018 | 92 | master-bin.000001 1331 Query 1 1410 BEGIN | ||
1019 | 93 | master-bin.000001 1410 Query 1 1513 use `test`; INSERT INTO t1 VALUES (1, "") | ||
1020 | 94 | master-bin.000001 1513 Xid 1 1544 COMMIT /* XID */ | ||
1021 | 95 | master-bin.000001 1544 Query 1 1623 BEGIN | ||
1022 | 96 | master-bin.000001 1623 Query 1 1731 use `test`; INSERT INTO t1 VALUES (2, "first") | ||
1023 | 97 | master-bin.000001 1731 Query 1 1840 use `test`; INSERT INTO t1 VALUES (2, "second") | ||
1024 | 98 | master-bin.000001 1840 Xid 1 1871 COMMIT /* XID */ | ||
1025 | 99 | master-bin.000001 1871 Query 1 1950 BEGIN | ||
1026 | 100 | master-bin.000001 1950 Query 1 2053 use `test`; INSERT INTO t1 VALUES (3, "") | ||
1027 | 101 | master-bin.000001 2053 Xid 1 2084 COMMIT /* XID */ | ||
1028 | 102 | master-bin.000001 2084 Rotate 1 2132 master-bin.000002;pos=4 | ||
1029 | 103 | DROP TABLE t1,t2; | ||
1030 | 0 | 104 | ||
1031 | === added file 'mysql-test/suite/binlog/t/binlog_consistent.test' | |||
1032 | --- mysql-test/suite/binlog/t/binlog_consistent.test 1970-01-01 00:00:00 +0000 | |||
1033 | +++ mysql-test/suite/binlog/t/binlog_consistent.test 2014-05-06 08:36:28 +0000 | |||
1034 | @@ -0,0 +1,88 @@ | |||
1035 | 1 | --source include/have_innodb.inc | ||
1036 | 2 | --source include/have_log_bin.inc | ||
1037 | 3 | --source include/have_binlog_format_mixed_or_statement.inc | ||
1038 | 4 | |||
1039 | 5 | RESET MASTER; | ||
1040 | 6 | |||
1041 | 7 | # Test that we get the correct binlog position from START TRANSACTION WITH | ||
1042 | 8 | # CONSISTENT SNAPSHOT even when other transactions are active. | ||
1043 | 9 | |||
1044 | 10 | connect(con1,localhost,root,,); | ||
1045 | 11 | connect(con2,localhost,root,,); | ||
1046 | 12 | connect(con3,localhost,root,,); | ||
1047 | 13 | connect(con4,localhost,root,,); | ||
1048 | 14 | |||
1049 | 15 | connection default; | ||
1050 | 16 | --echo # Connection default | ||
1051 | 17 | |||
1052 | 18 | CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb; | ||
1053 | 19 | SHOW MASTER STATUS; | ||
1054 | 20 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
1055 | 21 | BEGIN; | ||
1056 | 22 | INSERT INTO t1 VALUES (0, ""); | ||
1057 | 23 | |||
1058 | 24 | connection con1; | ||
1059 | 25 | --echo # Connection con1 | ||
1060 | 26 | BEGIN; | ||
1061 | 27 | INSERT INTO t1 VALUES (1, ""); | ||
1062 | 28 | |||
1063 | 29 | connection con2; | ||
1064 | 30 | --echo # Connection con2 | ||
1065 | 31 | CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam; | ||
1066 | 32 | BEGIN; | ||
1067 | 33 | INSERT INTO t1 VALUES (2, "first"); | ||
1068 | 34 | INSERT INTO t2 VALUES (2); | ||
1069 | 35 | INSERT INTO t1 VALUES (2, "second"); | ||
1070 | 36 | |||
1071 | 37 | connection default; | ||
1072 | 38 | --echo # Connection default | ||
1073 | 39 | COMMIT; | ||
1074 | 40 | |||
1075 | 41 | SET TRANSACTION ISOLATION LEVEL REPEATABLE READ; | ||
1076 | 42 | START TRANSACTION WITH CONSISTENT SNAPSHOT; | ||
1077 | 43 | |||
1078 | 44 | connection con3; | ||
1079 | 45 | --echo # Connection con3 | ||
1080 | 46 | BEGIN; | ||
1081 | 47 | INSERT INTO t1 VALUES (3, ""); | ||
1082 | 48 | INSERT INTO t2 VALUES (3); | ||
1083 | 49 | |||
1084 | 50 | connection con4; | ||
1085 | 51 | --echo # Connection con4 | ||
1086 | 52 | BEGIN; | ||
1087 | 53 | INSERT INTO t1 VALUES (4, ""); | ||
1088 | 54 | COMMIT; | ||
1089 | 55 | |||
1090 | 56 | connection default; | ||
1091 | 57 | --echo # Connection default | ||
1092 | 58 | SELECT * FROM t1 ORDER BY a,b; | ||
1093 | 59 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
1094 | 60 | SHOW MASTER STATUS; | ||
1095 | 61 | SELECT * FROM t2 ORDER BY a; | ||
1096 | 62 | |||
1097 | 63 | connection con1; | ||
1098 | 64 | --echo # Connection con1 | ||
1099 | 65 | COMMIT; | ||
1100 | 66 | |||
1101 | 67 | connection con2; | ||
1102 | 68 | --echo # Connection con2 | ||
1103 | 69 | COMMIT; | ||
1104 | 70 | |||
1105 | 71 | connection con3; | ||
1106 | 72 | --echo # Connection con3 | ||
1107 | 73 | COMMIT; | ||
1108 | 74 | FLUSH LOGS; | ||
1109 | 75 | |||
1110 | 76 | connection default; | ||
1111 | 77 | --echo # Connection default | ||
1112 | 78 | SELECT * FROM t1 ORDER BY a,b; | ||
1113 | 79 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
1114 | 80 | SHOW MASTER STATUS; | ||
1115 | 81 | COMMIT; | ||
1116 | 82 | SHOW STATUS LIKE 'binlog_snapshot_%'; | ||
1117 | 83 | SHOW MASTER STATUS; | ||
1118 | 84 | |||
1119 | 85 | --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ | ||
1120 | 86 | SHOW BINLOG EVENTS; | ||
1121 | 87 | |||
1122 | 88 | DROP TABLE t1,t2; | ||
1123 | 0 | 89 | ||
1124 | === modified file 'mysql-test/suite/perfschema/r/dml_setup_instruments.result' | |||
1125 | --- mysql-test/suite/perfschema/r/dml_setup_instruments.result 2013-12-05 17:23:10 +0000 | |||
1126 | +++ mysql-test/suite/perfschema/r/dml_setup_instruments.result 2014-05-06 08:36:28 +0000 | |||
1127 | @@ -23,12 +23,12 @@ | |||
1128 | 23 | wait/synch/rwlock/sql/Binlog_storage_delegate::lock YES YES | 23 | wait/synch/rwlock/sql/Binlog_storage_delegate::lock YES YES |
1129 | 24 | wait/synch/rwlock/sql/Binlog_transmit_delegate::lock YES YES | 24 | wait/synch/rwlock/sql/Binlog_transmit_delegate::lock YES YES |
1130 | 25 | wait/synch/rwlock/sql/gtid_commit_rollback YES YES | 25 | wait/synch/rwlock/sql/gtid_commit_rollback YES YES |
1131 | 26 | wait/synch/rwlock/sql/LOCK_consistent_snapshot YES YES | ||
1132 | 26 | wait/synch/rwlock/sql/LOCK_dboptions YES YES | 27 | wait/synch/rwlock/sql/LOCK_dboptions YES YES |
1133 | 27 | wait/synch/rwlock/sql/LOCK_grant YES YES | 28 | wait/synch/rwlock/sql/LOCK_grant YES YES |
1134 | 28 | wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES | 29 | wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES |
1135 | 29 | wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES | 30 | wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES |
1136 | 30 | wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES | 31 | wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES |
1137 | 31 | wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES | ||
1138 | 32 | select * from performance_schema.setup_instruments | 32 | select * from performance_schema.setup_instruments |
1139 | 33 | where name like 'Wait/Synch/Cond/sql/%' | 33 | where name like 'Wait/Synch/Cond/sql/%' |
1140 | 34 | and name not in ( | 34 | and name not in ( |
1141 | 35 | 35 | ||
1142 | === modified file 'mysql-test/t/backup_locks_mysqldump.test' | |||
1143 | --- mysql-test/t/backup_locks_mysqldump.test 2014-02-25 07:30:22 +0000 | |||
1144 | +++ mysql-test/t/backup_locks_mysqldump.test 2014-05-06 08:36:28 +0000 | |||
1145 | @@ -1,3 +1,4 @@ | |||
1146 | 1 | <<<<<<< TREE | ||
1147 | 1 | ######################################################################## | 2 | ######################################################################## |
1148 | 2 | # mysqldump --lock-for-backup tests | 3 | # mysqldump --lock-for-backup tests |
1149 | 3 | ######################################################################## | 4 | ######################################################################## |
1150 | @@ -56,3 +57,63 @@ | |||
1151 | 56 | SET GLOBAL general_log = @old_general_log; | 57 | SET GLOBAL general_log = @old_general_log; |
1152 | 57 | 58 | ||
1153 | 58 | DROP TABLE t1, t2; | 59 | DROP TABLE t1, t2; |
1154 | 60 | ======= | ||
1155 | 61 | ######################################################################## | ||
1156 | 62 | # mysqldump --lock-for-backup tests | ||
1157 | 63 | ######################################################################## | ||
1158 | 64 | |||
1159 | 65 | --source include/have_log_bin.inc | ||
1160 | 66 | --source include/have_innodb.inc | ||
1161 | 67 | --source include/not_embedded.inc | ||
1162 | 68 | |||
1163 | 69 | SHOW VARIABLES LIKE 'have_backup_locks'; | ||
1164 | 70 | |||
1165 | 71 | CREATE TABLE t1 (a INT) ENGINE=InnoDB; | ||
1166 | 72 | CREATE TABLE t2 (a INT) ENGINE=MyISAM; | ||
1167 | 73 | |||
1168 | 74 | SET @old_general_log = @@general_log; | ||
1169 | 75 | SET @old_log_output = @@log_output; | ||
1170 | 76 | |||
1171 | 77 | TRUNCATE TABLE mysql.general_log; | ||
1172 | 78 | |||
1173 | 79 | SET GLOBAL log_output = 'TABLE'; | ||
1174 | 80 | SET GLOBAL general_log = ON; | ||
1175 | 81 | |||
1176 | 82 | --let $file=$MYSQLTEST_VARDIR/tmp/dump.sql | ||
1177 | 83 | |||
1178 | 84 | --error 1 | ||
1179 | 85 | --exec $MYSQL_DUMP --lock-for-backup --lock-all-tables >$file | ||
1180 | 86 | |||
1181 | 87 | --echo # Check that --lock-for-backup is converted to --lock-all-tables if | ||
1182 | 88 | --echo # --single-transaction is not specified | ||
1183 | 89 | |||
1184 | 90 | --exec $MYSQL_DUMP --lock-for-backup test >$file | ||
1185 | 91 | |||
1186 | 92 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
1187 | 93 | |||
1188 | 94 | TRUNCATE TABLE mysql.general_log; | ||
1189 | 95 | |||
1190 | 96 | --echo # Check that --lock-for-backup --single-transaction uses LOCK TABLES FOR | ||
1191 | 97 | --echo # BACKUP | ||
1192 | 98 | |||
1193 | 99 | --exec $MYSQL_DUMP --lock-for-backup --single-transaction test >$file | ||
1194 | 100 | |||
1195 | 101 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
1196 | 102 | |||
1197 | 103 | TRUNCATE TABLE mysql.general_log; | ||
1198 | 104 | |||
1199 | 105 | --echo # Check that --master-data does not disable --lock-for-backup | ||
1200 | 106 | |||
1201 | 107 | --exec $MYSQL_DUMP --lock-for-backup --single-transaction --master-data test >$file | ||
1202 | 108 | |||
1203 | 109 | SELECT argument FROM mysql.general_log WHERE argument != ''; | ||
1204 | 110 | |||
1205 | 111 | TRUNCATE TABLE mysql.general_log; | ||
1206 | 112 | |||
1207 | 113 | --remove_file $file | ||
1208 | 114 | |||
1209 | 115 | SET GLOBAL log_output = @old_log_output; | ||
1210 | 116 | SET GLOBAL general_log = @old_general_log; | ||
1211 | 117 | |||
1212 | 118 | DROP TABLE t1, t2; | ||
1213 | 119 | >>>>>>> MERGE-SOURCE | ||
1214 | 59 | 120 | ||
1215 | === modified file 'mysql-test/t/mysqldump-max.test' | |||
1216 | --- mysql-test/t/mysqldump-max.test 2010-10-25 09:20:53 +0000 | |||
1217 | +++ mysql-test/t/mysqldump-max.test 2014-05-06 08:36:28 +0000 | |||
1218 | @@ -2,6 +2,7 @@ | |||
1219 | 2 | --source include/not_embedded.inc | 2 | --source include/not_embedded.inc |
1220 | 3 | --source include/have_innodb.inc | 3 | --source include/have_innodb.inc |
1221 | 4 | --source include/have_archive.inc | 4 | --source include/have_archive.inc |
1222 | 5 | --source include/have_log_bin.inc | ||
1223 | 5 | 6 | ||
1224 | 6 | --disable_warnings | 7 | --disable_warnings |
1225 | 7 | drop table if exists t1, t2, t3, t4, t5, t6; | 8 | drop table if exists t1, t2, t3, t4, t5, t6; |
1226 | @@ -1124,3 +1125,85 @@ | |||
1227 | 1124 | DROP TABLE t1; | 1125 | DROP TABLE t1; |
1228 | 1125 | 1126 | ||
1229 | 1126 | SET GLOBAL default_storage_engine=@old_engine; | 1127 | SET GLOBAL default_storage_engine=@old_engine; |
1230 | 1128 | |||
1231 | 1129 | # Test fully non-locking mysqldump with consistent binlog position (MWL#136). | ||
1232 | 1130 | |||
1233 | 1131 | connect(c1,127.0.0.1,root,,test,$MASTER_MYPORT,); | ||
1234 | 1132 | connect(c2,127.0.0.1,root,,test,$MASTER_MYPORT,); | ||
1235 | 1133 | connect(c3,127.0.0.1,root,,test,$MASTER_MYPORT,); | ||
1236 | 1134 | |||
1237 | 1135 | connection default; | ||
1238 | 1136 | --echo # Connection default | ||
1239 | 1137 | SET binlog_format= mixed; | ||
1240 | 1138 | RESET MASTER; | ||
1241 | 1139 | CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; | ||
1242 | 1140 | INSERT INTO t1 VALUES (1),(2); | ||
1243 | 1141 | CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB; | ||
1244 | 1142 | INSERT INTO t2 VALUES (1,0), (2,0); | ||
1245 | 1143 | SELECT GET_LOCK("block_queries_1", 120); | ||
1246 | 1144 | |||
1247 | 1145 | connection c3; | ||
1248 | 1146 | --echo # Connection c3 | ||
1249 | 1147 | SELECT GET_LOCK("block_queries_2", 120); | ||
1250 | 1148 | |||
1251 | 1149 | # Start two queries that will be running on the tables during mysqldump | ||
1252 | 1150 | connection c1; | ||
1253 | 1151 | --echo # Connection c1 | ||
1254 | 1152 | SET @c= 0; | ||
1255 | 1153 | send SELECT IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) FROM t1 ORDER BY a; | ||
1256 | 1154 | |||
1257 | 1155 | connection c2; | ||
1258 | 1156 | --echo # Connection c2 | ||
1259 | 1157 | SET binlog_format="row"; | ||
1260 | 1158 | SET @d= 10; | ||
1261 | 1159 | send UPDATE t2 SET b=IF(@d<=10, @d:=@d+1, GET_LOCK("block_queries_2", 120)) ORDER BY a; | ||
1262 | 1160 | |||
1263 | 1161 | connection default; | ||
1264 | 1162 | --echo # Connection default | ||
1265 | 1163 | --echo # Make sure other queries are running (and waiting). | ||
1266 | 1164 | let $wait_condition= | ||
1267 | 1165 | SELECT COUNT(*) FROM information_schema.processlist | ||
1268 | 1166 | WHERE state = "User lock" AND info LIKE 'SELECT%block_queries_1%'; | ||
1269 | 1167 | --source include/wait_condition.inc | ||
1270 | 1168 | let $wait_condition= | ||
1271 | 1169 | SELECT COUNT(*) FROM information_schema.processlist | ||
1272 | 1170 | WHERE state = "User lock" AND info LIKE 'UPDATE%block_queries_2%'; | ||
1273 | 1171 | --source include/wait_condition.inc | ||
1274 | 1172 | |||
1275 | 1173 | --exec $MYSQL_DUMP --master-data=2 --single-transaction test t1 t2 > $MYSQLTEST_VARDIR/tmp/mwl136.sql | ||
1276 | 1174 | |||
1277 | 1175 | SELECT RELEASE_LOCK("block_queries_1"); | ||
1278 | 1176 | |||
1279 | 1177 | connection c3; | ||
1280 | 1178 | --echo # Connection c3 | ||
1281 | 1179 | SELECT RELEASE_LOCK("block_queries_2"); | ||
1282 | 1180 | |||
1283 | 1181 | connection c1; | ||
1284 | 1182 | --echo # Connection c1 | ||
1285 | 1183 | reap; | ||
1286 | 1184 | |||
1287 | 1185 | connection c2; | ||
1288 | 1186 | --echo # Connection c2 | ||
1289 | 1187 | reap; | ||
1290 | 1188 | |||
1291 | 1189 | connection default; | ||
1292 | 1190 | --echo # Connection default | ||
1293 | 1191 | SELECT * FROM t2 ORDER BY a; | ||
1294 | 1192 | DROP TABLE t1; | ||
1295 | 1193 | DROP TABLE t2; | ||
1296 | 1194 | --exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mwl136.sql | ||
1297 | 1195 | |||
1298 | 1196 | --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ | ||
1299 | 1197 | SHOW BINLOG EVENTS LIMIT 7,3; | ||
1300 | 1198 | |||
1301 | 1199 | --perl | ||
1302 | 1200 | my $f= "$ENV{MYSQLTEST_VARDIR}/tmp/mwl136.sql"; | ||
1303 | 1201 | open F, '<', $f or die "Failed to open $f: $!\n"; | ||
1304 | 1202 | while (<F>) { | ||
1305 | 1203 | print if /CHANGE MASTER TO/; | ||
1306 | 1204 | } | ||
1307 | 1205 | EOF | ||
1308 | 1206 | SELECT * FROM t1 ORDER BY a; | ||
1309 | 1207 | SELECT * FROM t2 ORDER BY a; | ||
1310 | 1208 | |||
1311 | 1209 | DROP TABLE t1,t2; | ||
1312 | 1127 | 1210 | ||
1313 | === modified file 'sql/binlog.cc' | |||
1314 | --- sql/binlog.cc 2014-04-24 05:16:52 +0000 | |||
1315 | +++ sql/binlog.cc 2014-05-06 08:36:28 +0000 | |||
1316 | @@ -79,7 +79,19 @@ | |||
1317 | 79 | static int binlog_commit(handlerton *hton, THD *thd, bool all); | 79 | static int binlog_commit(handlerton *hton, THD *thd, bool all); |
1318 | 80 | static int binlog_rollback(handlerton *hton, THD *thd, bool all); | 80 | static int binlog_rollback(handlerton *hton, THD *thd, bool all); |
1319 | 81 | static int binlog_prepare(handlerton *hton, THD *thd, bool all); | 81 | static int binlog_prepare(handlerton *hton, THD *thd, bool all); |
1321 | 82 | 82 | static int binlog_start_consistent_snapshot(handlerton *hton, THD *thd); | |
1322 | 83 | |||
1323 | 84 | static char binlog_snapshot_file[FN_REFLEN]; | ||
1324 | 85 | static ulonglong binlog_snapshot_position; | ||
1325 | 86 | |||
1326 | 87 | static SHOW_VAR binlog_status_vars_detail[]= | ||
1327 | 88 | { | ||
1328 | 89 | {"snapshot_file", | ||
1329 | 90 | (char *)&binlog_snapshot_file, SHOW_CHAR}, | ||
1330 | 91 | {"snapshot_position", | ||
1331 | 92 | (char *)&binlog_snapshot_position, SHOW_LONGLONG}, | ||
1332 | 93 | {NullS, NullS, SHOW_LONG} | ||
1333 | 94 | }; | ||
1334 | 83 | 95 | ||
1335 | 84 | /** | 96 | /** |
1336 | 85 | Helper class to hold a mutex for the duration of the | 97 | Helper class to hold a mutex for the duration of the |
1337 | @@ -788,6 +800,8 @@ | |||
1338 | 788 | binlog_stmt_cache_data stmt_cache; | 800 | binlog_stmt_cache_data stmt_cache; |
1339 | 789 | binlog_trx_cache_data trx_cache; | 801 | binlog_trx_cache_data trx_cache; |
1340 | 790 | 802 | ||
1341 | 803 | LOG_INFO binlog_info; | ||
1342 | 804 | |||
1343 | 791 | private: | 805 | private: |
1344 | 792 | 806 | ||
1345 | 793 | binlog_cache_mngr& operator=(const binlog_cache_mngr& info); | 807 | binlog_cache_mngr& operator=(const binlog_cache_mngr& info); |
1346 | @@ -914,6 +928,7 @@ | |||
1347 | 914 | binlog_hton->commit= binlog_commit; | 928 | binlog_hton->commit= binlog_commit; |
1348 | 915 | binlog_hton->rollback= binlog_rollback; | 929 | binlog_hton->rollback= binlog_rollback; |
1349 | 916 | binlog_hton->prepare= binlog_prepare; | 930 | binlog_hton->prepare= binlog_prepare; |
1350 | 931 | binlog_hton->start_consistent_snapshot= binlog_start_consistent_snapshot; | ||
1351 | 917 | binlog_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN; | 932 | binlog_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN; |
1352 | 918 | return 0; | 933 | return 0; |
1353 | 919 | } | 934 | } |
1354 | @@ -1325,6 +1340,25 @@ | |||
1355 | 1325 | return 0; | 1340 | return 0; |
1356 | 1326 | } | 1341 | } |
1357 | 1327 | 1342 | ||
1358 | 1343 | static int binlog_start_consistent_snapshot(handlerton *hton, THD *thd) | ||
1359 | 1344 | { | ||
1360 | 1345 | int err= 0; | ||
1361 | 1346 | LOG_INFO li; | ||
1362 | 1347 | DBUG_ENTER("binlog_start_consistent_snapshot"); | ||
1363 | 1348 | |||
1364 | 1349 | if ((err= thd->binlog_setup_trx_data())) | ||
1365 | 1350 | DBUG_RETURN(err); | ||
1366 | 1351 | |||
1367 | 1352 | binlog_cache_mngr * const cache_mngr= thd_get_cache_mngr(thd); | ||
1368 | 1353 | |||
1369 | 1354 | /* Server layer calls us with LOCK_log locked, so this is safe. */ | ||
1370 | 1355 | mysql_bin_log.raw_get_current_log(&cache_mngr->binlog_info); | ||
1371 | 1356 | |||
1372 | 1357 | trans_register_ha(thd, TRUE, hton); | ||
1373 | 1358 | |||
1374 | 1359 | DBUG_RETURN(err); | ||
1375 | 1360 | } | ||
1376 | 1361 | |||
1377 | 1328 | /** | 1362 | /** |
1378 | 1329 | This function is called once after each statement. | 1363 | This function is called once after each statement. |
1379 | 1330 | 1364 | ||
1380 | @@ -1567,8 +1601,18 @@ | |||
1381 | 1567 | rollback. | 1601 | rollback. |
1382 | 1568 | */ | 1602 | */ |
1383 | 1569 | if (thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT) | 1603 | if (thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT) |
1384 | 1604 | { | ||
1385 | 1605 | /* | ||
1386 | 1606 | Reset binlog_snapshot_% variables for the current connection so that the | ||
1387 | 1607 | current coordinates are shown after committing a consistent snapshot | ||
1388 | 1608 | transaction. | ||
1389 | 1609 | */ | ||
1390 | 1610 | if (cache_mngr != NULL) | ||
1391 | 1611 | cache_mngr->binlog_info.log_file_name[0]= '\0'; | ||
1392 | 1612 | |||
1393 | 1570 | if ((error= ha_rollback_low(thd, all))) | 1613 | if ((error= ha_rollback_low(thd, all))) |
1394 | 1571 | goto end; | 1614 | goto end; |
1395 | 1615 | } | ||
1396 | 1572 | 1616 | ||
1397 | 1573 | /* | 1617 | /* |
1398 | 1574 | If there is no cache manager, or if there is nothing in the | 1618 | If there is no cache manager, or if there is nothing in the |
1399 | @@ -2436,7 +2480,7 @@ | |||
1400 | 2436 | is_relay_log(0), signal_cnt(0), | 2480 | is_relay_log(0), signal_cnt(0), |
1401 | 2437 | checksum_alg_reset(BINLOG_CHECKSUM_ALG_UNDEF), | 2481 | checksum_alg_reset(BINLOG_CHECKSUM_ALG_UNDEF), |
1402 | 2438 | relay_log_checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF), | 2482 | relay_log_checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF), |
1404 | 2439 | previous_gtid_set(0) | 2483 | previous_gtid_set(0), snapshot_lock_acquired(false) |
1405 | 2440 | { | 2484 | { |
1406 | 2441 | /* | 2485 | /* |
1407 | 2442 | We don't want to initialize locks here as such initialization depends on | 2486 | We don't want to initialize locks here as such initialization depends on |
1408 | @@ -6313,6 +6357,14 @@ | |||
1409 | 6313 | DBUG_RETURN(RESULT_SUCCESS); | 6357 | DBUG_RETURN(RESULT_SUCCESS); |
1410 | 6314 | } | 6358 | } |
1411 | 6315 | 6359 | ||
1412 | 6360 | /* | ||
1413 | 6361 | Reset binlog_snapshot_% variables for the current connection so that the | ||
1414 | 6362 | current coordinates are shown after committing a consistent snapshot | ||
1415 | 6363 | transaction. | ||
1416 | 6364 | */ | ||
1417 | 6365 | if (all) | ||
1418 | 6366 | cache_mngr->binlog_info.log_file_name[0]= '\0'; | ||
1419 | 6367 | |||
1420 | 6316 | THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt; | 6368 | THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt; |
1421 | 6317 | 6369 | ||
1422 | 6318 | DBUG_PRINT("debug", ("in_transaction: %s, no_2pc: %s, rw_ha_count: %d", | 6370 | DBUG_PRINT("debug", ("in_transaction: %s, no_2pc: %s, rw_ha_count: %d", |
1423 | @@ -6810,9 +6862,22 @@ | |||
1424 | 6810 | /* | 6862 | /* |
1425 | 6811 | storage engine commit | 6863 | storage engine commit |
1426 | 6812 | */ | 6864 | */ |
1430 | 6813 | if (thd->commit_error == THD::CE_NONE && | 6865 | if (thd->commit_error == THD::CE_NONE) |
1431 | 6814 | ha_commit_low(thd, all, false)) | 6866 | { |
1432 | 6815 | thd->commit_error= THD::CE_COMMIT_ERROR; | 6867 | /* |
1433 | 6868 | Acquire a shared lock to block commits until START TRANSACTION WITH | ||
1434 | 6869 | CONSISTENT SNAPSHOT completes snapshot creation for all storage | ||
1435 | 6870 | engines. We only reach this code if binlog_order_commits=0. | ||
1436 | 6871 | */ | ||
1437 | 6872 | DBUG_ASSERT(opt_binlog_order_commits == 0); | ||
1438 | 6873 | |||
1439 | 6874 | slock(); | ||
1440 | 6875 | |||
1441 | 6876 | if (ha_commit_low(thd, all, false)) | ||
1442 | 6877 | thd->commit_error= THD::CE_COMMIT_ERROR; | ||
1443 | 6878 | |||
1444 | 6879 | sunlock(); | ||
1445 | 6880 | } | ||
1446 | 6816 | /* | 6881 | /* |
1447 | 6817 | Decrement the prepared XID counter after storage engine commit | 6882 | Decrement the prepared XID counter after storage engine commit |
1448 | 6818 | */ | 6883 | */ |
1449 | @@ -7201,6 +7266,99 @@ | |||
1450 | 7201 | return 1; | 7266 | return 1; |
1451 | 7202 | } | 7267 | } |
1452 | 7203 | 7268 | ||
1453 | 7269 | /* | ||
1454 | 7270 | Copy out the non-directory part of binlog position filename for the | ||
1455 | 7271 | `binlog_snapshot_file' status variable, same way as it is done for | ||
1456 | 7272 | SHOW MASTER STATUS. | ||
1457 | 7273 | */ | ||
1458 | 7274 | static void set_binlog_snapshot_file(const char *src) | ||
1459 | 7275 | { | ||
1460 | 7276 | int dir_len = dirname_length(src); | ||
1461 | 7277 | strmake(binlog_snapshot_file, src + dir_len, | ||
1462 | 7278 | sizeof(binlog_snapshot_file) - 1); | ||
1463 | 7279 | } | ||
1464 | 7280 | |||
1465 | 7281 | /* | ||
1466 | 7282 | Copy out current values of status variables, for SHOW STATUS or | ||
1467 | 7283 | information_schema.global_status. | ||
1468 | 7284 | |||
1469 | 7285 | This is called only under LOCK_status, so we can fill in a static array. | ||
1470 | 7286 | */ | ||
1471 | 7287 | void MYSQL_BIN_LOG::set_status_variables(THD *thd) | ||
1472 | 7288 | { | ||
1473 | 7289 | binlog_cache_mngr *cache_mngr; | ||
1474 | 7290 | |||
1475 | 7291 | if (thd && opt_bin_log) | ||
1476 | 7292 | cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); | ||
1477 | 7293 | else | ||
1478 | 7294 | cache_mngr= 0; | ||
1479 | 7295 | |||
1480 | 7296 | bool have_snapshot= (cache_mngr && | ||
1481 | 7297 | cache_mngr->binlog_info.log_file_name[0] != '\0'); | ||
1482 | 7298 | mysql_mutex_lock(&LOCK_log); | ||
1483 | 7299 | if (!have_snapshot) | ||
1484 | 7300 | { | ||
1485 | 7301 | set_binlog_snapshot_file(log_file_name); | ||
1486 | 7302 | binlog_snapshot_position= my_b_tell(&log_file); | ||
1487 | 7303 | } | ||
1488 | 7304 | mysql_mutex_unlock(&LOCK_log); | ||
1489 | 7305 | |||
1490 | 7306 | if (have_snapshot) | ||
1491 | 7307 | { | ||
1492 | 7308 | set_binlog_snapshot_file(cache_mngr->binlog_info.log_file_name); | ||
1493 | 7309 | binlog_snapshot_position= cache_mngr->binlog_info.pos; | ||
1494 | 7310 | } | ||
1495 | 7311 | } | ||
1496 | 7312 | |||
1497 | 7313 | |||
1498 | 7314 | void MYSQL_BIN_LOG::xlock(void) | ||
1499 | 7315 | { | ||
1500 | 7316 | DBUG_ASSERT(!snapshot_lock_acquired); | ||
1501 | 7317 | |||
1502 | 7318 | mysql_mutex_lock(&LOCK_log); | ||
1503 | 7319 | |||
1504 | 7320 | /* | ||
1505 | 7321 | We must ensure that no writes to binlog and no commits to storage engines | ||
1506 | 7322 | occur after function is called for START TRANSACTION FOR CONSISTENT | ||
1507 | 7323 | SNAPSHOT. With binlog_order_commits=1 (the default) flushing to binlog is | ||
1508 | 7324 | performed under the LOCK_log mutex and commits are done under the | ||
1509 | 7325 | LOCK_commit mutex, both in the stage leader thread. So acquiring those 2 | ||
1510 | 7326 | mutexes is sufficient to guarantee atomicity. | ||
1511 | 7327 | |||
1512 | 7328 | With binlog_order_commits=0 commits are performed in parallel by separate | ||
1513 | 7329 | threads with each acquiring a shared lock on LOCK_consistent_snapshot. | ||
1514 | 7330 | |||
1515 | 7331 | binlog_order_commits is a dynamic variable, so we have to keep track what | ||
1516 | 7332 | primitives should be used in unlock_for_snapshot(). | ||
1517 | 7333 | */ | ||
1518 | 7334 | if (opt_binlog_order_commits) | ||
1519 | 7335 | { | ||
1520 | 7336 | mysql_mutex_lock(&LOCK_commit); | ||
1521 | 7337 | } | ||
1522 | 7338 | else | ||
1523 | 7339 | { | ||
1524 | 7340 | snapshot_lock_acquired= true; | ||
1525 | 7341 | mysql_rwlock_wrlock(&LOCK_consistent_snapshot); | ||
1526 | 7342 | } | ||
1527 | 7343 | } | ||
1528 | 7344 | |||
1529 | 7345 | |||
1530 | 7346 | void MYSQL_BIN_LOG::xunlock(void) | ||
1531 | 7347 | { | ||
1532 | 7348 | if (!snapshot_lock_acquired) | ||
1533 | 7349 | { | ||
1534 | 7350 | mysql_mutex_unlock(&LOCK_commit); | ||
1535 | 7351 | } | ||
1536 | 7352 | else | ||
1537 | 7353 | { | ||
1538 | 7354 | mysql_rwlock_unlock(&LOCK_consistent_snapshot); | ||
1539 | 7355 | snapshot_lock_acquired= false; | ||
1540 | 7356 | } | ||
1541 | 7357 | |||
1542 | 7358 | mysql_mutex_unlock(&LOCK_log); | ||
1543 | 7359 | } | ||
1544 | 7360 | |||
1545 | 7361 | |||
1546 | 7204 | Group_cache *THD::get_group_cache(bool is_transactional) | 7362 | Group_cache *THD::get_group_cache(bool is_transactional) |
1547 | 7205 | { | 7363 | { |
1548 | 7206 | DBUG_ENTER("THD::get_group_cache(bool)"); | 7364 | DBUG_ENTER("THD::get_group_cache(bool)"); |
1549 | @@ -9052,6 +9210,25 @@ | |||
1550 | 9052 | 9210 | ||
1551 | 9053 | #endif /* !defined(MYSQL_CLIENT) */ | 9211 | #endif /* !defined(MYSQL_CLIENT) */ |
1552 | 9054 | 9212 | ||
1553 | 9213 | static int show_binlog_vars(THD *thd, SHOW_VAR *var, char *buff) | ||
1554 | 9214 | { | ||
1555 | 9215 | if (mysql_bin_log.is_open()) | ||
1556 | 9216 | mysql_bin_log.set_status_variables(thd); | ||
1557 | 9217 | else | ||
1558 | 9218 | { | ||
1559 | 9219 | binlog_snapshot_file[0]= '\0'; | ||
1560 | 9220 | binlog_snapshot_position= 0; | ||
1561 | 9221 | } | ||
1562 | 9222 | var->type= SHOW_ARRAY; | ||
1563 | 9223 | var->value= (char *)&binlog_status_vars_detail; | ||
1564 | 9224 | return 0; | ||
1565 | 9225 | } | ||
1566 | 9226 | |||
1567 | 9227 | static SHOW_VAR binlog_status_vars_top[]= { | ||
1568 | 9228 | {"Binlog", (char *) &show_binlog_vars, SHOW_FUNC}, | ||
1569 | 9229 | {NullS, NullS, SHOW_LONG} | ||
1570 | 9230 | }; | ||
1571 | 9231 | |||
1572 | 9055 | struct st_mysql_storage_engine binlog_storage_engine= | 9232 | struct st_mysql_storage_engine binlog_storage_engine= |
1573 | 9056 | { MYSQL_HANDLERTON_INTERFACE_VERSION }; | 9233 | { MYSQL_HANDLERTON_INTERFACE_VERSION }; |
1574 | 9057 | 9234 | ||
1575 | @@ -9068,7 +9245,7 @@ | |||
1576 | 9068 | binlog_init, /* Plugin Init */ | 9245 | binlog_init, /* Plugin Init */ |
1577 | 9069 | NULL, /* Plugin Deinit */ | 9246 | NULL, /* Plugin Deinit */ |
1578 | 9070 | 0x0100 /* 1.0 */, | 9247 | 0x0100 /* 1.0 */, |
1580 | 9071 | NULL, /* status variables */ | 9248 | binlog_status_vars_top, /* status variables */ |
1581 | 9072 | NULL, /* system variables */ | 9249 | NULL, /* system variables */ |
1582 | 9073 | NULL, /* config options */ | 9250 | NULL, /* config options */ |
1583 | 9074 | 0, | 9251 | 0, |
1584 | 9075 | 9252 | ||
1585 | === modified file 'sql/binlog.h' | |||
1586 | --- sql/binlog.h 2014-02-17 11:12:40 +0000 | |||
1587 | +++ sql/binlog.h 2014-05-06 08:36:28 +0000 | |||
1588 | @@ -501,6 +501,8 @@ | |||
1589 | 501 | private: | 501 | private: |
1590 | 502 | Gtid_set* previous_gtid_set; | 502 | Gtid_set* previous_gtid_set; |
1591 | 503 | 503 | ||
1592 | 504 | bool snapshot_lock_acquired; | ||
1593 | 505 | |||
1594 | 504 | int open(const char *opt_name) { return open_binlog(opt_name); } | 506 | int open(const char *opt_name) { return open_binlog(opt_name); } |
1595 | 505 | bool change_stage(THD *thd, Stage_manager::StageID stage, | 507 | bool change_stage(THD *thd, Stage_manager::StageID stage, |
1596 | 506 | THD* queue, mysql_mutex_t *leave, | 508 | THD* queue, mysql_mutex_t *leave, |
1597 | @@ -528,7 +530,15 @@ | |||
1598 | 528 | void update_thd_next_event_pos(THD *thd); | 530 | void update_thd_next_event_pos(THD *thd); |
1599 | 529 | int flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event, | 531 | int flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event, |
1600 | 530 | bool is_transactional); | 532 | bool is_transactional); |
1602 | 531 | 533 | void xlock(void); | |
1603 | 534 | void xunlock(void); | ||
1604 | 535 | void slock(void) { mysql_rwlock_rdlock(&LOCK_consistent_snapshot); } | ||
1605 | 536 | void sunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); } | ||
1606 | 537 | #else | ||
1607 | 538 | void xlock(void) { } | ||
1608 | 539 | void xunlock(void) { } | ||
1609 | 540 | void slock(void) { } | ||
1610 | 541 | void sunlock(void) { } | ||
1611 | 532 | #endif /* !defined(MYSQL_CLIENT) */ | 542 | #endif /* !defined(MYSQL_CLIENT) */ |
1612 | 533 | void add_bytes_written(ulonglong inc) | 543 | void add_bytes_written(ulonglong inc) |
1613 | 534 | { | 544 | { |
1614 | @@ -674,6 +684,7 @@ | |||
1615 | 674 | inline void unlock_index() { mysql_mutex_unlock(&LOCK_index);} | 684 | inline void unlock_index() { mysql_mutex_unlock(&LOCK_index);} |
1616 | 675 | inline IO_CACHE *get_index_file() { return &index_file;} | 685 | inline IO_CACHE *get_index_file() { return &index_file;} |
1617 | 676 | inline uint32 get_open_count() { return open_count; } | 686 | inline uint32 get_open_count() { return open_count; } |
1618 | 687 | void set_status_variables(THD *thd); | ||
1619 | 677 | }; | 688 | }; |
1620 | 678 | 689 | ||
1621 | 679 | typedef struct st_load_file_info | 690 | typedef struct st_load_file_info |
1622 | 680 | 691 | ||
1623 | === modified file 'sql/handler.cc' | |||
1624 | --- sql/handler.cc 2014-04-24 05:16:52 +0000 | |||
1625 | +++ sql/handler.cc 2014-05-06 08:36:28 +0000 | |||
1626 | @@ -2270,8 +2270,18 @@ | |||
1627 | 2270 | { | 2270 | { |
1628 | 2271 | bool warn= true; | 2271 | bool warn= true; |
1629 | 2272 | 2272 | ||
1630 | 2273 | /* | ||
1631 | 2274 | Blocking commits and binlog updates ensures that we get the same snapshot | ||
1632 | 2275 | for all engines (including the binary log). This allows us among other | ||
1633 | 2276 | things to do backups with START TRANSACTION WITH CONSISTENT SNAPSHOT and | ||
1634 | 2277 | have a consistent binlog position. | ||
1635 | 2278 | */ | ||
1636 | 2279 | tc_log->xlock(); | ||
1637 | 2280 | |||
1638 | 2273 | plugin_foreach(thd, snapshot_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &warn); | 2281 | plugin_foreach(thd, snapshot_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &warn); |
1639 | 2274 | 2282 | ||
1640 | 2283 | tc_log->xunlock(); | ||
1641 | 2284 | |||
1642 | 2275 | /* | 2285 | /* |
1643 | 2276 | Same idea as when one wants to CREATE TABLE in one engine which does not | 2286 | Same idea as when one wants to CREATE TABLE in one engine which does not |
1644 | 2277 | exist: | 2287 | exist: |
1645 | 2278 | 2288 | ||
1646 | === modified file 'sql/handler.h' | |||
1647 | --- sql/handler.h 2014-04-24 05:16:52 +0000 | |||
1648 | +++ sql/handler.h 2014-05-06 08:36:28 +0000 | |||
1649 | @@ -1024,6 +1024,7 @@ | |||
1650 | 1024 | 1024 | ||
1651 | 1025 | #define HTON_SUPPORTS_EXTENDED_KEYS (1 << 10) | 1025 | #define HTON_SUPPORTS_EXTENDED_KEYS (1 << 10) |
1652 | 1026 | 1026 | ||
1653 | 1027 | <<<<<<< TREE | ||
1654 | 1027 | /** | 1028 | /** |
1655 | 1028 | Set if the storage engine supports 'online' backups. This means that there | 1029 | Set if the storage engine supports 'online' backups. This means that there |
1656 | 1029 | exists a way to create a consistent copy of its tables without blocking | 1030 | exists a way to create a consistent copy of its tables without blocking |
1657 | @@ -1036,6 +1037,15 @@ | |||
1658 | 1036 | Engine supports secondary clustered keys. | 1037 | Engine supports secondary clustered keys. |
1659 | 1037 | */ | 1038 | */ |
1660 | 1038 | #define HTON_SUPPORTS_CLUSTERED_KEYS (1 << 12) | 1039 | #define HTON_SUPPORTS_CLUSTERED_KEYS (1 << 12) |
1661 | 1040 | ======= | ||
1662 | 1041 | /** | ||
1663 | 1042 | Set if the storage engine supports 'online' backups. This means that there | ||
1664 | 1043 | exists a way to create a consistent copy of its tables without blocking | ||
1665 | 1044 | updates to them. If so, statements that update such tables will not be | ||
1666 | 1045 | affected by an active LOCK TABLES FOR BACKUP. | ||
1667 | 1046 | */ | ||
1668 | 1047 | #define HTON_SUPPORTS_ONLINE_BACKUPS (1 << 11) | ||
1669 | 1048 | >>>>>>> MERGE-SOURCE | ||
1670 | 1039 | 1049 | ||
1671 | 1040 | enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED, | 1050 | enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED, |
1672 | 1041 | ISO_REPEATABLE_READ, ISO_SERIALIZABLE}; | 1051 | ISO_REPEATABLE_READ, ISO_SERIALIZABLE}; |
1673 | 1042 | 1052 | ||
1674 | === modified file 'sql/log.cc' | |||
1675 | --- sql/log.cc 2014-04-25 10:55:01 +0000 | |||
1676 | +++ sql/log.cc 2014-05-06 08:36:28 +0000 | |||
1677 | @@ -53,6 +53,7 @@ | |||
1678 | 53 | #include "rpl_handler.h" | 53 | #include "rpl_handler.h" |
1679 | 54 | #include "debug_sync.h" | 54 | #include "debug_sync.h" |
1680 | 55 | #include "sql_show.h" | 55 | #include "sql_show.h" |
1681 | 56 | #include "mysqld.h" | ||
1682 | 56 | 57 | ||
1683 | 57 | /* max size of the log message */ | 58 | /* max size of the log message */ |
1684 | 58 | #define MAX_LOG_BUFFER_SIZE 1024 | 59 | #define MAX_LOG_BUFFER_SIZE 1024 |
1685 | @@ -2899,12 +2900,21 @@ | |||
1686 | 2899 | DBUG_ENTER("TC_LOG_MMAP::commit"); | 2900 | DBUG_ENTER("TC_LOG_MMAP::commit"); |
1687 | 2900 | unsigned long cookie= 0; | 2901 | unsigned long cookie= 0; |
1688 | 2901 | my_xid xid= thd->transaction.xid_state.xid.get_my_xid(); | 2902 | my_xid xid= thd->transaction.xid_state.xid.get_my_xid(); |
1689 | 2903 | int rc; | ||
1690 | 2902 | 2904 | ||
1691 | 2903 | if (all && xid) | 2905 | if (all && xid) |
1692 | 2904 | if (!(cookie= log_xid(thd, xid))) | 2906 | if (!(cookie= log_xid(thd, xid))) |
1693 | 2905 | DBUG_RETURN(RESULT_ABORTED); // Failed to log the transaction | 2907 | DBUG_RETURN(RESULT_ABORTED); // Failed to log the transaction |
1694 | 2906 | 2908 | ||
1696 | 2907 | if (ha_commit_low(thd, all)) | 2909 | /* |
1697 | 2910 | Acquire a shared lock to block commits until START TRANSACTION WITH | ||
1698 | 2911 | CONSISTENT SNAPSHOT completes snapshot creation for all storage engines. | ||
1699 | 2912 | */ | ||
1700 | 2913 | slock(); | ||
1701 | 2914 | rc= ha_commit_low(thd, all); | ||
1702 | 2915 | sunlock(); | ||
1703 | 2916 | |||
1704 | 2917 | if (rc) | ||
1705 | 2908 | DBUG_RETURN(RESULT_INCONSISTENT); // Transaction logged, but not committed | 2918 | DBUG_RETURN(RESULT_INCONSISTENT); // Transaction logged, but not committed |
1706 | 2909 | 2919 | ||
1707 | 2910 | /* If cookie is non-zero, something was logged */ | 2920 | /* If cookie is non-zero, something was logged */ |
1708 | 2911 | 2921 | ||
1709 | === modified file 'sql/log.h' | |||
1710 | --- sql/log.h 2014-02-17 11:12:40 +0000 | |||
1711 | +++ sql/log.h 2014-05-06 08:36:28 +0000 | |||
1712 | @@ -102,6 +102,26 @@ | |||
1713 | 102 | @return Error code on failure, zero on success. | 102 | @return Error code on failure, zero on success. |
1714 | 103 | */ | 103 | */ |
1715 | 104 | virtual int prepare(THD *thd, bool all) = 0; | 104 | virtual int prepare(THD *thd, bool all) = 0; |
1716 | 105 | |||
1717 | 106 | /** | ||
1718 | 107 | Acquire an exclusive lock to block binary log updates and commits. This is | ||
1719 | 108 | used by START TRANSACTION WITH CONSISTENT SNAPSHOT to create an atomic | ||
1720 | 109 | snapshot. | ||
1721 | 110 | */ | ||
1722 | 111 | virtual void xlock(void) = 0; | ||
1723 | 112 | |||
1724 | 113 | /** Release lock acquired with xlock(). */ | ||
1725 | 114 | virtual void xunlock(void) = 0; | ||
1726 | 115 | |||
1727 | 116 | /** | ||
1728 | 117 | Acquire a shared lock to block commits. This is used when calling | ||
1729 | 118 | ha_commit_low() to block commits if there's an exclusive lock acquired by | ||
1730 | 119 | START TRANSACTION WITH CONSISTENT SNAPSHOT. | ||
1731 | 120 | */ | ||
1732 | 121 | virtual void slock(void) = 0; | ||
1733 | 122 | |||
1734 | 123 | /** Release lock acquired with slock(). */ | ||
1735 | 124 | virtual void sunlock(void) = 0; | ||
1736 | 105 | }; | 125 | }; |
1737 | 106 | 126 | ||
1738 | 107 | 127 | ||
1739 | @@ -120,6 +140,10 @@ | |||
1740 | 120 | int prepare(THD *thd, bool all) { | 140 | int prepare(THD *thd, bool all) { |
1741 | 121 | return ha_prepare_low(thd, all); | 141 | return ha_prepare_low(thd, all); |
1742 | 122 | } | 142 | } |
1743 | 143 | void xlock(void) {} | ||
1744 | 144 | void xunlock(void) {} | ||
1745 | 145 | void slock(void) {} | ||
1746 | 146 | void sunlock(void) {} | ||
1747 | 123 | }; | 147 | }; |
1748 | 124 | 148 | ||
1749 | 125 | #ifdef HAVE_MMAP | 149 | #ifdef HAVE_MMAP |
1750 | @@ -166,6 +190,10 @@ | |||
1751 | 166 | enum_result commit(THD *thd, bool all); | 190 | enum_result commit(THD *thd, bool all); |
1752 | 167 | int rollback(THD *thd, bool all) { return ha_rollback_low(thd, all); } | 191 | int rollback(THD *thd, bool all) { return ha_rollback_low(thd, all); } |
1753 | 168 | int prepare(THD *thd, bool all) { return ha_prepare_low(thd, all); } | 192 | int prepare(THD *thd, bool all) { return ha_prepare_low(thd, all); } |
1754 | 193 | void xlock(void) { mysql_rwlock_wrlock(&LOCK_consistent_snapshot); } | ||
1755 | 194 | void xunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); } | ||
1756 | 195 | void slock(void) { mysql_rwlock_rdlock(&LOCK_consistent_snapshot); } | ||
1757 | 196 | void sunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); } | ||
1758 | 169 | int recover(); | 197 | int recover(); |
1759 | 170 | uint size() const; | 198 | uint size() const; |
1760 | 171 | 199 | ||
1761 | 172 | 200 | ||
1762 | === modified file 'sql/mysqld.cc' | |||
1763 | --- sql/mysqld.cc 2014-04-25 10:55:01 +0000 | |||
1764 | +++ sql/mysqld.cc 2014-05-06 08:36:28 +0000 | |||
1765 | @@ -781,6 +781,8 @@ | |||
1766 | 781 | mysql_mutex_t LOCK_server_started; | 781 | mysql_mutex_t LOCK_server_started; |
1767 | 782 | mysql_cond_t COND_server_started; | 782 | mysql_cond_t COND_server_started; |
1768 | 783 | 783 | ||
1769 | 784 | mysql_rwlock_t LOCK_consistent_snapshot; | ||
1770 | 785 | |||
1771 | 784 | int mysqld_server_started= 0; | 786 | int mysqld_server_started= 0; |
1772 | 785 | 787 | ||
1773 | 786 | File_parser_dummy_hook file_parser_dummy_hook; | 788 | File_parser_dummy_hook file_parser_dummy_hook; |
1774 | @@ -2062,6 +2064,7 @@ | |||
1775 | 2062 | mysql_mutex_destroy(&LOCK_global_user_client_stats); | 2064 | mysql_mutex_destroy(&LOCK_global_user_client_stats); |
1776 | 2063 | mysql_mutex_destroy(&LOCK_global_table_stats); | 2065 | mysql_mutex_destroy(&LOCK_global_table_stats); |
1777 | 2064 | mysql_mutex_destroy(&LOCK_global_index_stats); | 2066 | mysql_mutex_destroy(&LOCK_global_index_stats); |
1778 | 2067 | mysql_rwlock_destroy(&LOCK_consistent_snapshot); | ||
1779 | 2065 | } | 2068 | } |
1780 | 2066 | #endif /*EMBEDDED_LIBRARY*/ | 2069 | #endif /*EMBEDDED_LIBRARY*/ |
1781 | 2067 | 2070 | ||
1782 | @@ -4322,6 +4325,8 @@ | |||
1783 | 4322 | mysql_rwlock_init(key_rwlock_LOCK_sys_init_connect, &LOCK_sys_init_connect); | 4325 | mysql_rwlock_init(key_rwlock_LOCK_sys_init_connect, &LOCK_sys_init_connect); |
1784 | 4323 | mysql_rwlock_init(key_rwlock_LOCK_sys_init_slave, &LOCK_sys_init_slave); | 4326 | mysql_rwlock_init(key_rwlock_LOCK_sys_init_slave, &LOCK_sys_init_slave); |
1785 | 4324 | mysql_rwlock_init(key_rwlock_LOCK_grant, &LOCK_grant); | 4327 | mysql_rwlock_init(key_rwlock_LOCK_grant, &LOCK_grant); |
1786 | 4328 | mysql_rwlock_init(key_rwlock_LOCK_consistent_snapshot, | ||
1787 | 4329 | &LOCK_consistent_snapshot); | ||
1788 | 4325 | mysql_cond_init(key_COND_thread_count, &COND_thread_count, NULL); | 4330 | mysql_cond_init(key_COND_thread_count, &COND_thread_count, NULL); |
1789 | 4326 | mysql_cond_init(key_COND_thread_cache, &COND_thread_cache, NULL); | 4331 | mysql_cond_init(key_COND_thread_cache, &COND_thread_cache, NULL); |
1790 | 4327 | mysql_cond_init(key_COND_flush_thread_cache, &COND_flush_thread_cache, NULL); | 4332 | mysql_cond_init(key_COND_flush_thread_cache, &COND_flush_thread_cache, NULL); |
1791 | @@ -9727,7 +9732,7 @@ | |||
1792 | 9727 | PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, | 9732 | PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, |
1793 | 9728 | key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, | 9733 | key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, |
1794 | 9729 | key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock, | 9734 | key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock, |
1796 | 9730 | key_rwlock_global_sid_lock; | 9735 | key_rwlock_global_sid_lock, key_rwlock_LOCK_consistent_snapshot; |
1797 | 9731 | 9736 | ||
1798 | 9732 | PSI_rwlock_key key_rwlock_Trans_delegate_lock; | 9737 | PSI_rwlock_key key_rwlock_Trans_delegate_lock; |
1799 | 9733 | PSI_rwlock_key key_rwlock_Binlog_storage_delegate_lock; | 9738 | PSI_rwlock_key key_rwlock_Binlog_storage_delegate_lock; |
1800 | @@ -9753,7 +9758,8 @@ | |||
1801 | 9753 | { &key_rwlock_query_cache_query_lock, "Query_cache_query::lock", 0}, | 9758 | { &key_rwlock_query_cache_query_lock, "Query_cache_query::lock", 0}, |
1802 | 9754 | { &key_rwlock_global_sid_lock, "gtid_commit_rollback", PSI_FLAG_GLOBAL}, | 9759 | { &key_rwlock_global_sid_lock, "gtid_commit_rollback", PSI_FLAG_GLOBAL}, |
1803 | 9755 | { &key_rwlock_Trans_delegate_lock, "Trans_delegate::lock", PSI_FLAG_GLOBAL}, | 9760 | { &key_rwlock_Trans_delegate_lock, "Trans_delegate::lock", PSI_FLAG_GLOBAL}, |
1805 | 9756 | { &key_rwlock_Binlog_storage_delegate_lock, "Binlog_storage_delegate::lock", PSI_FLAG_GLOBAL} | 9761 | { &key_rwlock_Binlog_storage_delegate_lock, "Binlog_storage_delegate::lock", PSI_FLAG_GLOBAL}, |
1806 | 9762 | { &key_rwlock_LOCK_consistent_snapshot, "LOCK_consistent_snapshot", PSI_FLAG_GLOBAL} | ||
1807 | 9757 | }; | 9763 | }; |
1808 | 9758 | 9764 | ||
1809 | 9759 | #ifdef HAVE_MMAP | 9765 | #ifdef HAVE_MMAP |
1810 | 9760 | 9766 | ||
1811 | === modified file 'sql/mysqld.h' | |||
1812 | --- sql/mysqld.h 2014-04-25 10:55:01 +0000 | |||
1813 | +++ sql/mysqld.h 2014-05-06 08:36:28 +0000 | |||
1814 | @@ -386,7 +386,7 @@ | |||
1815 | 386 | extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, | 386 | extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger, |
1816 | 387 | key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, | 387 | key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave, |
1817 | 388 | key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock, | 388 | key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock, |
1819 | 389 | key_rwlock_global_sid_lock; | 389 | key_rwlock_global_sid_lock, key_rwlock_LOCK_consistent_snapshot; |
1820 | 390 | 390 | ||
1821 | 391 | #ifdef HAVE_MMAP | 391 | #ifdef HAVE_MMAP |
1822 | 392 | extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool; | 392 | extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool; |
1823 | @@ -620,6 +620,7 @@ | |||
1824 | 620 | extern mysql_cond_t COND_server_started; | 620 | extern mysql_cond_t COND_server_started; |
1825 | 621 | extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; | 621 | extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; |
1826 | 622 | extern mysql_rwlock_t LOCK_system_variables_hash; | 622 | extern mysql_rwlock_t LOCK_system_variables_hash; |
1827 | 623 | extern mysql_rwlock_t LOCK_consistent_snapshot; | ||
1828 | 623 | extern mysql_cond_t COND_manager; | 624 | extern mysql_cond_t COND_manager; |
1829 | 624 | extern int32 thread_running; | 625 | extern int32 thread_running; |
1830 | 625 | extern my_atomic_rwlock_t thread_running_lock; | 626 | extern my_atomic_rwlock_t thread_running_lock; |
1831 | 626 | 627 | ||
1832 | === modified file 'sql/share/errmsg-utf8.txt' | |||
1833 | --- sql/share/errmsg-utf8.txt 2014-04-24 05:16:52 +0000 | |||
1834 | +++ sql/share/errmsg-utf8.txt 2014-05-06 08:36:28 +0000 | |||
1835 | @@ -7088,6 +7088,7 @@ | |||
1836 | 7088 | ER_TEMP_FILE_WRITE_FAILURE | 7088 | ER_TEMP_FILE_WRITE_FAILURE |
1837 | 7089 | eng "Temporary file write failure." | 7089 | eng "Temporary file write failure." |
1838 | 7090 | 7090 | ||
1839 | 7091 | <<<<<<< TREE | ||
1840 | 7091 | ER_INNODB_FT_AUX_NOT_HEX_ID | 7092 | ER_INNODB_FT_AUX_NOT_HEX_ID |
1841 | 7092 | eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index." | 7093 | eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index." |
1842 | 7093 | 7094 | ||
1843 | @@ -7108,6 +7109,12 @@ | |||
1844 | 7108 | eng "Can’t execute the query because you have a conflicting backup lock" | 7109 | eng "Can’t execute the query because you have a conflicting backup lock" |
1845 | 7109 | rus "Запрос не может быть выполнен из-за конфликтующей блокировки резервного копирования" | 7110 | rus "Запрос не может быть выполнен из-за конфликтующей блокировки резервного копирования" |
1846 | 7110 | 7111 | ||
1847 | 7112 | ======= | ||
1848 | 7113 | ER_CANT_EXECUTE_WITH_BACKUP_LOCK | ||
1849 | 7114 | eng "Can’t execute the query because you have a conflicting backup lock" | ||
1850 | 7115 | rus "Запрос не может быть выполнен из-за конфликтующей блокировки резервного копирования" | ||
1851 | 7116 | |||
1852 | 7117 | >>>>>>> MERGE-SOURCE | ||
1853 | 7111 | # | 7118 | # |
1854 | 7112 | # End of 5.6 error messages. | 7119 | # End of 5.6 error messages. |
1855 | 7113 | # | 7120 | # |
1856 | 7114 | 7121 | ||
1857 | === modified file 'storage/innobase/buf/buf0flu.cc' | |||
1858 | --- storage/innobase/buf/buf0flu.cc 2014-04-24 05:16:52 +0000 | |||
1859 | +++ storage/innobase/buf/buf0flu.cc 2014-05-06 08:36:28 +0000 | |||
1860 | @@ -1376,10 +1376,17 @@ | |||
1861 | 1376 | 1376 | ||
1862 | 1377 | /* These fields are protected by the buf_page_get_mutex() | 1377 | /* These fields are protected by the buf_page_get_mutex() |
1863 | 1378 | mutex. */ | 1378 | mutex. */ |
1864 | 1379 | <<<<<<< TREE | ||
1865 | 1379 | /* Read the fields directly in order to avoid asserting on | 1380 | /* Read the fields directly in order to avoid asserting on |
1866 | 1380 | BUF_BLOCK_REMOVE_HASH pages. */ | 1381 | BUF_BLOCK_REMOVE_HASH pages. */ |
1867 | 1381 | ulint space = bpage->space; | 1382 | ulint space = bpage->space; |
1868 | 1382 | ulint offset = bpage->offset; | 1383 | ulint offset = bpage->offset; |
1869 | 1384 | ======= | ||
1870 | 1385 | /* Read the fields directly in order to avoid asserting on | ||
1871 | 1386 | BUF_BLOCK_REMOVE_HASH pages. */ | ||
1872 | 1387 | space = bpage->space; | ||
1873 | 1388 | offset = bpage->offset; | ||
1874 | 1389 | >>>>>>> MERGE-SOURCE | ||
1875 | 1383 | 1390 | ||
1876 | 1384 | if (flush_type == BUF_FLUSH_LRU) { | 1391 | if (flush_type == BUF_FLUSH_LRU) { |
1877 | 1385 | mutex_exit(block_mutex); | 1392 | mutex_exit(block_mutex); |
- mysqlbinlog. c:check_ consistent_ binlog_ pos: shouldn't the first t_binlog_ pos returns 1 for position found, 0 for events[ 2].inc in MTR LOG::get_ commit_ lock is unused.
exit from the function return 0 not 1?
- check_consisten
not found. Most other mysqldump.c functions return 0 for
success, 1 failure. Don't have a strong opinion whether this
should be fixed, just pointing out.
- Might be a good idea to include show_binlog_
instead of direct replace_regex/SHOW BINLOG EVENTS, to save any
future regexp maintenance, and, if we ever do MTR collections
runs, make the testcase more compatible with GTID mode I guess.
- MYSQL_BIN_
- Diff lines 1077/1078: spurious change?