Merge lp:~akopytov/percona-server/enhancements-for-start-transaction-with-consistent into lp:percona-server/5.6

Proposed by Alexey Kopytov
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
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+207877@code.launchpad.net

Description of the change

    Implementation of
    https://blueprints.launchpad.net/percona-server/+spec/enhancements-for-start-transaction-with-consistent.

    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_ordered, which is used by both TC_LOG_MMAP and
    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_order_commits is 0, in which case
    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_order_commits value,
    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_order_commits=1
    3) lock LOCK_log and a new global rwlock, LOCK_consistent_snapshot. A
    shared lock on it may be acquired on commits, and an exclusive lock may
    only be acquired for STWCS.
    4) use only LOCK_consistent_snapshot without LOCK_log when no binary log
    is used (i.e. in TC_LOG_MMAP).

    mysqldump changes have been merged with backup locks changes. Now
    mysqldump --lock-for-backup --single-transaction does not resort to
    FTWRL even if --master-data is also requested.

http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/527/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

    - mysqlbinlog.c:check_consistent_binlog_pos: shouldn't the first
      exit from the function return 0 not 1?
    - check_consistent_binlog_pos returns 1 for position found, 0 for
      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_events[2].inc in MTR
      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_LOG::get_commit_lock is unused.
    - Diff lines 1077/1078: spurious change?

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Hi Laurynas,

On Tue, May 06 2014 11:03:13 +0400, Laurynas Biveinis wrote:

> Review: Needs Fixing
>
> - mysqlbinlog.c:check_consistent_binlog_pos: shouldn't the first
> exit from the function return 0 not 1?

Hard to tell. The only case when we reach the first exit in
check_consistent_binlog_pos() is when the SHOW STATUS LIKE query
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_consistent_binlog_pos returns 1 for position found, 0 for
> 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_binlog_pos’. I.e. the return code of 0 actually
indicates ‘false’ rather than a failure.

> - Might be a good idea to include show_binlog_events[2].inc in MTR
> 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_events[2] also
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_LOG::get_commit_lock is unused.

Yep, fixed.

> - Diff lines 1077/1078: spurious change?

Yep, fixed.

http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/598/

Revision history for this message
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?

review: Approve
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Yep, noticed the conflicts. I will merge it to trunk and see what is.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

No conflicts occurred with bzr merge --weave (it was a criss-cross merge due to backup locks dependency).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 Section: database
6 Priority: extra
7 Maintainer: Percona Server Development Team <mysql-dev@percona.com>
8+<<<<<<< TREE
9 Uploaders: George Lorch <george.lorch@percona.com>,
10 Alexey Bychko <alexey.bychko@percona.com>
11 Build-Depends: libtool (>= 1.4.2-7),
12@@ -26,6 +27,10 @@
13 libaio-dev[linux-any],
14 libpam-dev,
15 libssl-dev
16+=======
17+Uploaders: Stewart Smith <stewart.smith@percona.com>, Alexey Bychko <alexey.bychko@percona.com>
18+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+>>>>>>> MERGE-SOURCE
20 Standards-Version: 3.9.4
21 Homepage: http://www.percona.com/software/percona-server/
22 Vcs-Bzr: lp:percona-server/5.6
23@@ -140,6 +145,7 @@
24 Package: percona-server-server-5.6
25 Architecture: any
26 Suggests: tinyca
27+<<<<<<< TREE
28 Pre-Depends: percona-server-common-5.6 (>= ${source:Version}),
29 adduser (>= 3.4.0),
30 debconf
31@@ -175,6 +181,13 @@
32 mariadb-server,
33 mariadb-server-core-5.5,
34 mariadb-server-5.5
35+=======
36+Pre-Depends: percona-server-common-5.6 (>= ${source:Version}), adduser (>= 3.4.0), debconf
37+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+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+Provides: mysql-server
40+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+>>>>>>> MERGE-SOURCE
42 Description: Percona Server database server binaries
43 Percona Server is a fast, stable and true multi-user, multi-threaded SQL
44 database server. SQL (Structured Query Language) is the most popular database
45@@ -214,10 +227,14 @@
46
47 Package: percona-server-test-5.6
48 Architecture: any
49+<<<<<<< TREE
50 Depends: percona-server-client-5.6 (>= ${source:Version}),
51 percona-server-server-5.6 (>= ${source:Version}),
52 ${misc:Depends},
53 ${shlibs:Depends}
54+=======
55+Depends: percona-server-client-5.6 (>= ${source:Version}), percona-server-server-5.6 (>= ${source:Version}), ${misc:Depends}, ${shlibs:Depends}
56+>>>>>>> MERGE-SOURCE
57 Description: Percona Server database test suite
58 Percona Server is a fast, stable and true multi-user, multi-threaded SQL
59 database server. SQL (Structured Query Language) is the most popular database
60
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 -DWITH_LIBWRAP=ON \
66 -DWITH_ZLIB=system \
67 -DWITH_SSL=system \
68+<<<<<<< TREE
69 -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \
70 -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
71 -DSYSTEM_TYPE="debian-linux-gnu" \
72@@ -85,6 +86,19 @@
73 -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
74 -DWITH_FEDERATED_STORAGE_ENGINE=ON \
75 -DWITH_PAM=ON \
76+=======
77+ -DCOMPILATION_COMMENT="($(DISTRIBUTION))" \
78+ -DMYSQL_SERVER_SUFFIX="-$(DEBVERSION)" \
79+ -DSYSTEM_TYPE="debian-linux-gnu" \
80+ -DINSTALL_LAYOUT=RPM \
81+ -DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
82+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
83+ -DWITH_EMBEDDED_SERVER=OFF \
84+ -DWITH_ARCHIVE_STORAGE_ENGINE=ON \
85+ -DWITH_BLACKHOLE_STORAGE_ENGINE=ON \
86+ -DWITH_FEDERATED_STORAGE_ENGINE=ON \
87+ -DWITH_PAM=ON \
88+>>>>>>> MERGE-SOURCE
89 -DWITH_EXTRA_CHARSETS=all ..'
90 touch $@
91
92@@ -258,8 +272,13 @@
93 dh_installinfo -a
94 dh_installlogcheck -a
95 dh_installchangelogs -a
96+<<<<<<< TREE
97 dh_strip -a --dbg-package=percona-server-5.6-dbg
98 dh_lintian
99+=======
100+ dh_strip -a
101+ dh_lintian
102+>>>>>>> MERGE-SOURCE
103 dh_link -a # .so muss nach .so.1.2.3 installier werden!
104 dh_compress -a
105 dh_fixperms -a
106
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 OPT_SERVER_PUBLIC_KEY,
112 OPT_ENABLE_CLEARTEXT_PLUGIN,
113 OPT_INNODB_OPTIMIZE_KEYS,
114+<<<<<<< TREE
115 OPT_REWRITE_DB,
116 OPT_LOCK_FOR_BACKUP,
117+=======
118+ OPT_LOCK_FOR_BACKUP,
119+>>>>>>> MERGE-SOURCE
120 OPT_MAX_CLIENT_OPTION
121 };
122
123
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 #define IGNORE_DATA 0x01 /* don't dump data for this table */
129 #define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */
130
131+/* Chars needed to store LONGLONG, excluding trailing '\0'. */
132+#define LONGLONG_LEN 20
133+
134 typedef enum {
135 KEY_TYPE_NONE,
136 KEY_TYPE_PRIMARY,
137@@ -419,9 +422,10 @@
138 "This causes the binary log position and filename to be appended to the "
139 "output. If equal to 1, will print it as a CHANGE MASTER command; if equal"
140 " to 2, that command will be prefixed with a comment symbol. "
141- "This option will turn --lock-all-tables on, unless "
142- "--single-transaction is specified too (in which case a "
143- "global read lock is only taken a short time at the beginning of the dump; "
144+ "This option will turn --lock-all-tables on, unless --single-transaction "
145+ "is specified too (on servers that don't provide Binlog_snapshot_file and "
146+ "Binlog_snapshot_position status variables this will still take a "
147+ "global read lock for a short time at the beginning of the dump; "
148 "don't forget to read about --single-transaction below). In all cases, "
149 "any action on logs will happen at the exact moment of the dump. "
150 "Option automatically turns --lock-tables off.",
151@@ -1226,6 +1230,44 @@
152 }
153
154
155+/*
156+ Check if server supports non-blocking binlog position using the
157+ binlog_snapshot_file and binlog_snapshot_position status variables. If it
158+ does, also return the position obtained if output pointers are non-NULL.
159+ Returns 1 if position available, 0 if not.
160+*/
161+static int
162+check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset)
163+{
164+ MYSQL_RES *res;
165+ MYSQL_ROW row;
166+ int found;
167+
168+ if (mysql_query_with_error_report(mysql, &res,
169+ "SHOW STATUS LIKE 'binlog_snapshot_%'"))
170+ return 1;
171+
172+ found= 0;
173+ while ((row= mysql_fetch_row(res)))
174+ {
175+ if (0 == strcmp(row[0], "Binlog_snapshot_file"))
176+ {
177+ if (binlog_pos_file)
178+ strmake(binlog_pos_file, row[1], FN_REFLEN-1);
179+ found++;
180+ }
181+ else if (0 == strcmp(row[0], "Binlog_snapshot_position"))
182+ {
183+ if (binlog_pos_offset)
184+ strmake(binlog_pos_offset, row[1], LONGLONG_LEN);
185+ found++;
186+ }
187+ }
188+ mysql_free_result(res);
189+
190+ return (found == 2);
191+}
192+
193 static char *my_case_str(const char *str,
194 uint str_len,
195 const char *token,
196@@ -5302,41 +5344,64 @@
197 } /* dump_selected_tables */
198
199
200-static int do_show_master_status(MYSQL *mysql_con)
201+static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
202 {
203 MYSQL_ROW row;
204 MYSQL_RES *master;
205+ char binlog_pos_file[FN_REFLEN];
206+ char binlog_pos_offset[LONGLONG_LEN+1];
207+ char *file, *offset;
208 const char *comment_prefix=
209 (opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : "";
210- if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS"))
211+
212+ if (consistent_binlog_pos)
213 {
214- return 1;
215+ if (!check_consistent_binlog_pos(binlog_pos_file, binlog_pos_offset))
216+ return 1;
217+
218+ file= binlog_pos_file;
219+ offset= binlog_pos_offset;
220 }
221 else
222 {
223+ if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS"))
224+ return 1;
225+
226 row= mysql_fetch_row(master);
227 if (row && row[0] && row[1])
228 {
229- /* SHOW MASTER STATUS reports file and position */
230- print_comment(md_result_file, 0,
231- "\n--\n-- Position to start replication or point-in-time "
232- "recovery from\n--\n\n");
233- fprintf(md_result_file,
234- "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
235- comment_prefix, row[0], row[1]);
236- check_io(md_result_file);
237+ file= row[0];
238+ offset= row[1];
239 }
240- else if (!ignore_errors)
241+ else
242 {
243- /* SHOW MASTER STATUS reports nothing and --force is not enabled */
244- my_printf_error(0, "Error: Binlogging on server not active",
245- MYF(0));
246 mysql_free_result(master);
247- maybe_exit(EX_MYSQLERR);
248- return 1;
249+ if (!ignore_errors)
250+ {
251+ /* SHOW MASTER STATUS reports nothing and --force is not enabled */
252+ my_printf_error(0, "Error: Binlogging on server not active", MYF(0));
253+ maybe_exit(EX_MYSQLERR);
254+ return 1;
255+ }
256+ else
257+ {
258+ return 0;
259+ }
260 }
261+ }
262+
263+ /* SHOW MASTER STATUS reports file and position */
264+ print_comment(md_result_file, 0,
265+ "\n--\n-- Position to start replication or point-in-time "
266+ "recovery from\n--\n\n");
267+ fprintf(md_result_file,
268+ "%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
269+ comment_prefix, file, offset);
270+ check_io(md_result_file);
271+
272+ if (!consistent_binlog_pos)
273 mysql_free_result(master);
274- }
275+
276 return 0;
277 }
278
279@@ -6295,6 +6360,7 @@
280 {
281 char bin_log_name[FN_REFLEN];
282 int exit_code;
283+ int consistent_binlog_pos= 0;
284 MY_INIT("mysqldump");
285
286 compatible_mode_normal_str[0]= 0;
287@@ -6343,6 +6409,7 @@
288 if (opt_slave_data && do_stop_slave_sql(mysql))
289 goto err;
290
291+<<<<<<< TREE
292 if ((opt_lock_all_tables || opt_master_data ||
293 (opt_single_transaction && flush_logs)))
294 {
295@@ -6350,6 +6417,24 @@
296 goto err;
297 }
298 else if (opt_lock_for_backup && do_lock_tables_for_backup(mysql))
299+=======
300+ if (opt_single_transaction && opt_master_data)
301+ {
302+ /*
303+ See if we can avoid FLUSH TABLES WITH READ LOCK with Binlog_snapshot_*
304+ variables.
305+ */
306+ consistent_binlog_pos= check_consistent_binlog_pos(NULL, NULL);
307+ }
308+
309+ if ((opt_lock_all_tables || (opt_master_data && !consistent_binlog_pos) ||
310+ (opt_single_transaction && flush_logs)))
311+ {
312+ if (do_flush_tables_read_lock(mysql))
313+ goto err;
314+ }
315+ else if (opt_lock_for_backup && do_lock_tables_for_backup(mysql))
316+>>>>>>> MERGE-SOURCE
317 goto err;
318
319 /*
320@@ -6390,7 +6475,7 @@
321 goto err;
322
323
324- if (opt_master_data && do_show_master_status(mysql))
325+ if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos))
326 goto err;
327 if (opt_slave_data && do_show_slave_status(mysql))
328 goto err;
329
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 =============================================================
335
336 +-------------------------------------------------------------------------------------------------------------+
337+<<<<<<< TREE
338 |:Upstream bug: :mysqlbug:`71374` - Slave IO thread won't attempt auto reconnect to the master/error-code 1159|
339 |:Launchpad bug: :bug:`1268729` |
340 |:Upstream state: Verified (checked on 2014-03-17) |
341@@ -71,6 +72,14 @@
342 |:Fix Released: :rn:`5.6.15-63.0` |
343 |:Upstream fix: N/A |
344 +-------------------------------------------------------------------------------------------------------------+
345+=======
346+|:Upstream bug: :mysqlbug:`71217` - Threadpool - add thd_wait_begin/thd_wait_end to the network IO functions |
347+|:Launchpad bug: :bug:`1159743` |
348+|:Upstream state: Open (checked on 2014-02-05) |
349+|:Fix Released: :rn:`5.6.15-63.0` |
350+|:Upstream fix: N/A |
351++-------------------------------------------------------------------------------------------------------------+
352+>>>>>>> MERGE-SOURCE
353 |:Upstream bug: :mysqlbug:`41975` - Support for SSL options not included in mysqlbinlog |
354 |:Launchpad bug: :bug:`1258154` |
355 |:Upstream state: Closed |
356@@ -81,12 +90,21 @@
357 |:Launchpad bug: :bug:`1258154` |
358 |:Upstream state: Closed |
359 |:Fix Released: :rn:`5.6.15-63.0` |
360+<<<<<<< TREE
361 |:Upstream fix: 5.6.12 |
362 +-------------------------------------------------------------------------------------------------------------+
363 |:Upstream bug: :mysqlbug:`71411` - buf_flush_LRU() does not return correct number in case of compressed pages|
364 |:Launchpad bug: :bug:`1231918` |
365 |:Upstream state: Verified (checked on 2014-03-17) |
366 |:Fix Released: :rn:`5.6.13-61.0` |
367+=======
368+|:Upstream fix: 5.6.12 |
369++-------------------------------------------------------------------------------------------------------------+
370+|:Upstream bug: :mysqlbug:`71411` - buf_flush_LRU() does not return correct number in case of compressed pages|
371+|:Launchpad bug: :bug:`1231918` |
372+|:Upstream state: Verified (checked on 2014-02-05) |
373+|:Fix Released: :rn:`5.6.13-61.0` |
374+>>>>>>> MERGE-SOURCE
375 |:Upstream fix: N/A |
376 +-------------------------------------------------------------------------------------------------------------+
377 |:Upstream bug: :mysqlbug:`70417` - rw_lock_x_lock_func_nowait() calls os_thread_get_curr_id() mostly ... |
378@@ -97,7 +115,11 @@
379 +-------------------------------------------------------------------------------------------------------------+
380 |:Upstream bug: :mysqlbug:`70490` - Suppression is too strict on some systems |
381 |:Launchpad bug: :bug:`1205196` |
382+<<<<<<< TREE
383 |:Upstream state: No Feedback (checked on 2014-03-17) |
384+=======
385+|:Upstream state: No Feedback (checked on 2014-02-05) |
386+>>>>>>> MERGE-SOURCE
387 |:Fix Released: :rn:`5.6.13-61.0` |
388 |:Upstream fix: N/A |
389 +-------------------------------------------------------------------------------------------------------------+
390@@ -109,7 +131,11 @@
391 +-------------------------------------------------------------------------------------------------------------+
392 |:Upstream bug: :mysqlbug:`70500` - Page cleaner should perform LRU flushing regardless of server activity |
393 |:Launchpad bug: :bug:`1234562` |
394+<<<<<<< TREE
395 |:Upstream state: Open (checked on 2014-03-17) |
396+=======
397+|:Upstream state: Open (checked on 2014-02-05) |
398+>>>>>>> MERGE-SOURCE
399 |:Fix Released: :rn:`5.6.13-61.0` |
400 |:Upstream fix: N/A |
401 +-------------------------------------------------------------------------------------------------------------+
402@@ -127,31 +153,51 @@
403 +-------------------------------------------------------------------------------------------------------------+
404 |:Upstream bug: :mysqlbug:`68481` - InnoDB LRU flushing for MySQL 5.6 needs work |
405 |:Launchpad bug: :bug:`1232406` |
406+<<<<<<< TREE
407 |:Upstream state: Verified (checked on 2014-03-17) |
408+=======
409+|:Upstream state: Verified (checked on 2014-02-05) |
410+>>>>>>> MERGE-SOURCE
411 |:Fix Released: :rn:`5.6.13-61.0` |
412 |:Upstream fix: N/A |
413 +-------------------------------------------------------------------------------------------------------------+
414 |:Upstream bug: :mysqlbug:`70453` - Add hard timeouts to page cleaner flushes |
415 |:Launchpad bug: :bug:`1232101` |
416+<<<<<<< TREE
417 |:Upstream state: Verified (checked on 2014-03-17) |
418+=======
419+|:Upstream state: Verified (checked on 2014-02-05) |
420+>>>>>>> MERGE-SOURCE
421 |:Fix Released: :rn:`5.6.13-61.0` |
422 |:Upstream fix: N/A |
423 +-------------------------------------------------------------------------------------------------------------+
424 |:Upstream bug: :mysqlbug:`69170` - buf_flush_LRU is lazy |
425 |:Launchpad bug: :bug:`1231918` |
426+<<<<<<< TREE
427 |:Upstream state: Verified (checked on 2014-03-17) |
428+=======
429+|:Upstream state: Verified (checked on 2014-02-05) |
430+>>>>>>> MERGE-SOURCE
431 |:Fix Released: :rn:`5.6.13-61.0` |
432 |:Upstream fix: N/A |
433 +-------------------------------------------------------------------------------------------------------------+
434 |:Upstream bug: :mysqlbug:`68555` - thread convoys from log_checkpoint_margin with innodb_buffer_pool_inst... |
435 |:Launchpad bug: :bug:`1236884` |
436+<<<<<<< TREE
437 |:Upstream state: Verified (checked on 2014-03-17) |
438+=======
439+|:Upstream state: Verified (checked on 2014-02-05) |
440+>>>>>>> MERGE-SOURCE
441 |:Fix Released: :rn:`5.6.13-61.0` |
442 |:Upstream fix: N/A |
443 +-------------------------------------------------------------------------------------------------------------+
444 |:Upstream bug: :mysqlbug:`70228` - Is buf_LRU_free_page() really supposed to make non-zip block sticky at ...|
445 |:Launchpad bug: :bug:`1220544` |
446+<<<<<<< TREE
447 |:Upstream state: Verified (checked on 2014-03-17) |
448+=======
449+|:Upstream state: Verified (checked on 2014-02-05) |
450+>>>>>>> MERGE-SOURCE
451 |:Fix Released: :rn:`5.6.13-60.6` |
452 |:Upstream fix: N/A |
453 +-------------------------------------------------------------------------------------------------------------+
454@@ -169,13 +215,21 @@
455 +-------------------------------------------------------------------------------------------------------------+
456 |:Upstream bug: :mysqlbug:`70216` - Unnecessary overhead from persistent adaptive hash index latches |
457 |:Launchpad bug: :bug:`1218347` |
458+<<<<<<< TREE
459 |:Upstream state: Verified (checked on 2014-03-17) |
460+=======
461+|:Upstream state: Verified (checked on 2014-02-05) |
462+>>>>>>> MERGE-SOURCE
463 |:Fix Released: :rn:`5.6.13-60.6` |
464 |:Upstream fix: N/A |
465 +-------------------------------------------------------------------------------------------------------------+
466 |:Upstream bug: :mysqlbug:`62018` - innodb adaptive hash index mutex contention |
467 |:Launchpad bug: :bug:`1216804` |
468+<<<<<<< TREE
469 |:Upstream state: Verified (checked on 2014-03-17) |
470+=======
471+|:Upstream state: Verified (checked on 2014-02-05) |
472+>>>>>>> MERGE-SOURCE
473 |:Fix Released: :rn:`5.6.13-60.6` |
474 |:Upstream fix: N/A |
475 +-------------------------------------------------------------------------------------------------------------+
476@@ -193,13 +247,21 @@
477 +-------------------------------------------------------------------------------------------------------------+
478 |:Upstream bug: :mysqlbug:`42415` - UPDATE/DELETE with LIMIT clause unsafe for SBL even with ORDER BY PK ... |
479 |:Launchpad bug: :bug:`1132194` |
480+<<<<<<< TREE
481 |:Upstream state: Verified (checked on 2014-03-17) |
482+=======
483+|:Upstream state: Verified (checked on 2014-02-05) |
484+>>>>>>> MERGE-SOURCE
485 |:Fix Released: :rn:`5.6.13-60.5` |
486 |:Upstream fix: N/A |
487 +-------------------------------------------------------------------------------------------------------------+
488 |:Upstream bug: :mysqlbug:`69639` - mysql failed to build with dtrace Sun D 1.11 |
489 |:Launchpad bug: :bug:`1196460` |
490+<<<<<<< TREE
491 |:Upstream state: Open (checked on 2014-03-17) |
492+=======
493+|:Upstream state: Open (checked on 2014-02-05) |
494+>>>>>>> MERGE-SOURCE
495 |:Fix Released: :rn:`5.6.13-60.5` |
496 |:Upstream fix: N/A |
497 +-------------------------------------------------------------------------------------------------------------+
498@@ -217,10 +279,15 @@
499 +-------------------------------------------------------------------------------------------------------------+
500 |:Upstream bug: :mysqlbug:`69856` - mysql_install_db does not function properly in 5.6 for debug builds |
501 |:Launchpad bug: :bug:`1179359` |
502+<<<<<<< TREE
503 |:Upstream state: Verified (checked on 2014-03-17) |
504+=======
505+|:Upstream state: Verified (checked on 2014-02-05) |
506+>>>>>>> MERGE-SOURCE
507 |:Fix Released: :rn:`5.6.12-60.4` |
508 |:Upstream fix: N/A |
509 +-------------------------------------------------------------------------------------------------------------+
510+<<<<<<< TREE
511 |:Upstream bug: :mysqlbug:`71603` - file name is not escaped in binlog for LOAD DATA INFILE statement |
512 |:Launchpad bug: :bug:`1277351` |
513 |:Upstream state: N/A |
514@@ -233,6 +300,14 @@
515 |:Fix Released: :rn:`5.6.11-60.3` |
516 |:Upstream fix: N/A |
517 +-------------------------------------------------------------------------------------------------------------+
518+=======
519+|:Upstream bug: :mysqlbug:`71183` - os_file_fsync() should handle fsync() returning EINTR |
520+|:Launchpad bug: :bug:`1262651` |
521+|:Upstream state: Verified (checked on 2014-02-05) |
522+|:Fix Released: :rn:`5.6.11-60.3` |
523+|:Upstream fix: N/A |
524++-------------------------------------------------------------------------------------------------------------+
525+>>>>>>> MERGE-SOURCE
526 |:Upstream bug: :mysqlbug:`63451` - atomic/x86-gcc.h:make_atomic_cas_body64 potential miscompilation bug |
527 |:Launchpad bug: :bug:`878022` |
528 |:Upstream state: Closed |
529@@ -247,7 +322,11 @@
530 +-------------------------------------------------------------------------------------------------------------+
531 |:Upstream bug: :mysqlbug:`69252` - All the parts.partition_max* tests are broken with MTR --parallel |
532 |:Launchpad bug: :bug:`1180481` |
533+<<<<<<< TREE
534 |:Upstream state: Closed |
535+=======
536+|:Upstream state: Verified (checked on 2014-02-05) |
537+>>>>>>> MERGE-SOURCE
538 |:Fix Released: :rn:`5.6.11-60.3` |
539 |:Upstream fix: 5.6.15 |
540 +-------------------------------------------------------------------------------------------------------------+
541@@ -259,7 +338,11 @@
542 +-------------------------------------------------------------------------------------------------------------+
543 |:Upstream bug: :mysqlbug:`68714` - Remove literal statement digest values from perfschema tests |
544 |:Launchpad bug: :bug:`1157078` |
545+<<<<<<< TREE
546 |:Upstream state: Verified (checked on 2014-03-17) |
547+=======
548+|:Upstream state: Verified (checked on 2014-02-05) |
549+>>>>>>> MERGE-SOURCE
550 |:Fix Released: :rn:`5.6.11-60.3` |
551 |:Upstream fix: N/A |
552 +-------------------------------------------------------------------------------------------------------------+
553@@ -283,13 +366,21 @@
554 +-------------------------------------------------------------------------------------------------------------+
555 |:Upstream bug: :mysqlbug:`68970` - fsp_reserve_free_extents switches from small to big tblspace handling ... |
556 |:Launchpad bug: :bug:`1169494` |
557+<<<<<<< TREE
558 |:Upstream state: Verified (checked on 2014-03-17) |
559+=======
560+|:Upstream state: Verified (checked on 2014-02-05) |
561+>>>>>>> MERGE-SOURCE
562 |:Fix Released: :rn:`5.6.11-60.3` |
563 |:Upstream fix: N/A |
564 +-------------------------------------------------------------------------------------------------------------+
565 |:Upstream bug: :mysqlbug:`68713` - create_duplicate_weedout_tmp_table() leaves key_part_flag uninitialized |
566 |:Launchpad bug: :bug:`1157037` |
567+<<<<<<< TREE
568 |:Upstream state: Verified (checked on 2014-03-17) |
569+=======
570+|:Upstream state: Verified (checked on 2014-02-05) |
571+>>>>>>> MERGE-SOURCE
572 |:Fix Released: :rn:`5.6.11-60.3` |
573 |:Upstream fix: N/A |
574 +-------------------------------------------------------------------------------------------------------------+
575@@ -301,13 +392,21 @@
576 +-------------------------------------------------------------------------------------------------------------+
577 |:Upstream bug: :mysqlbug:`68999` - SSL_OP_NO_COMPRESSION not defined |
578 |:Launchpad bug: :bug:`1183610` |
579+<<<<<<< TREE
580 |:Upstream state: No Feedback (checked on 2014-03-17) |
581+=======
582+|:Upstream state: No Feedback (checked on 2014-02-05) |
583+>>>>>>> MERGE-SOURCE
584 |:Fix Released: :rn:`5.6.11-60.3` |
585 |:Upstream fix: N/A |
586 +-------------------------------------------------------------------------------------------------------------+
587 |:Upstream bug: :mysqlbug:`68845` - Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write() |
588 |:Launchpad bug: :bug:`1163439` |
589+<<<<<<< TREE
590 |:Upstream state: Verified (checked on 2014-03-17) |
591+=======
592+|:Upstream state: Verified (checked on 2014-02-05) |
593+>>>>>>> MERGE-SOURCE
594 |:Fix Released: :rn:`5.6.11-60.3` |
595 |:Upstream fix: N/A |
596 +-------------------------------------------------------------------------------------------------------------+
597@@ -337,7 +436,11 @@
598 +-------------------------------------------------------------------------------------------------------------+
599 |:Upstream bug: :mysqlbug:`68476` - Suboptimal code in my_strnxfrm_simple() |
600 |:Launchpad bug: :bug:`1132350` |
601+<<<<<<< TREE
602 |:Upstream state: Verified (checked on 2014-03-17) |
603+=======
604+|:Upstream state: Verified (checked on 2014-02-05) |
605+>>>>>>> MERGE-SOURCE
606 |:Fix Released: :rn:`5.6.11-60.3` |
607 |:Upstream fix: N/A |
608 +-------------------------------------------------------------------------------------------------------------+
609@@ -391,13 +494,21 @@
610 +-------------------------------------------------------------------------------------------------------------+
611 |:Upstream bug: :mysqlbug:`61180` - korr/store macros in my_global.h assume the argument to be a char pointer |
612 |:Launchpad bug: :bug:`1042517` |
613+<<<<<<< TREE
614 |:Upstream state: Closed |
615+=======
616+|:Upstream state: Verified (checked on 2014-02-05) |
617+>>>>>>> MERGE-SOURCE
618 |:Fix Released: :rn:`5.6.11-60.3` |
619 |:Upstream fix: N/A |
620 +-------------------------------------------------------------------------------------------------------------+
621 |:Upstream bug: :mysqlbug:`61178` - Incorrect implementation of intersect(ulonglong) in non-optimized Bitmap..|
622 |:Launchpad bug: :bug:`1042517` |
623+<<<<<<< TREE
624 |:Upstream state: Verified (checked on 2014-03-17) |
625+=======
626+|:Upstream state: Verified (checked on 2014-02-05) |
627+>>>>>>> MERGE-SOURCE
628 |:Fix Released: :rn:`5.6.11-60.3` |
629 |:Upstream fix: N/A |
630 +-------------------------------------------------------------------------------------------------------------+
631@@ -409,7 +520,11 @@
632 +-------------------------------------------------------------------------------------------------------------+
633 |:Upstream bug: :mysqlbug:`64800` - mysqldump with --include-master-host-port putting quotes around port no. |
634 |:Launchpad bug: :bug:`1013432` |
635+<<<<<<< TREE
636 |:Upstream state: Verified (checked on 2014-03-17) |
637+=======
638+|:Upstream state: Verified (checked on 2014-02-05) |
639+>>>>>>> MERGE-SOURCE
640 |:Fix Released: :rn:`5.6.11-60.3` |
641 |:Upstream fix: N/A |
642 +-------------------------------------------------------------------------------------------------------------+
643@@ -439,13 +554,21 @@
644 +-------------------------------------------------------------------------------------------------------------+
645 |:Upstream bug: :mysqlbug:`25007` - memory tables with dynamic rows format |
646 |:Launchpad bug: N/A |
647+<<<<<<< TREE
648 |:Upstream state: Verified (checked on 2014-03-17) |
649+=======
650+|:Upstream state: Verified (checked on 2014-02-05) |
651+>>>>>>> MERGE-SOURCE
652 |:Fix Released: :rn:`5.6.11-60.3` |
653 |:Upstream fix: N/A |
654 +-------------------------------------------------------------------------------------------------------------+
655 |:Upstream bug: :mysqlbug:`61595` - mysql-test/include/wait_for_slave_param.inc timeout logic is incorrect |
656 |:Launchpad bug: :bug:`800035` |
657+<<<<<<< TREE
658 |:Upstream state: Verified (checked on 2014-03-17) |
659+=======
660+|:Upstream state: Verified (checked on 2014-02-05) |
661+>>>>>>> MERGE-SOURCE
662 |:Fix Released: :rn:`5.6.11-60.3` |
663 |:Upstream fix: N/A |
664 +-------------------------------------------------------------------------------------------------------------+
665@@ -457,7 +580,11 @@
666 +-------------------------------------------------------------------------------------------------------------+
667 |:Upstream bug: :mysqlbug:`68116` - InnoDB monitor may hit an assertion error in buf_page_get_gen in debug ...|
668 |:Launchpad bug: :bug:`1100178` |
669+<<<<<<< TREE
670 |:Upstream state: Verified (checked on 2014-03-17) |
671+=======
672+|:Upstream state: Verified (checked on 2014-02-05) |
673+>>>>>>> MERGE-SOURCE
674 |:Fix Released: :rn:`5.6.10-60.2` |
675 |:Upstream fix: N/A |
676 +-------------------------------------------------------------------------------------------------------------+
677@@ -469,13 +596,21 @@
678 +-------------------------------------------------------------------------------------------------------------+
679 |:Upstream bug: :mysqlbug:`20001` - Support for temp-tables in INFORMATION_SCHEMA |
680 |:Launchpad bug: N/A |
681+<<<<<<< TREE
682 |:Upstream state: Verified (checked on 2014-03-17) |
683+=======
684+|:Upstream state: Verified (checked on 2014-02-05) |
685+>>>>>>> MERGE-SOURCE
686 |:Fix Released: :rn:`5.6.5-60.0` |
687 |:Upstream fix: N/A |
688 +-------------------------------------------------------------------------------------------------------------+
689 |:Upstream bug: :mysqlbug:`69146` - Optimization in buf_pool_get_oldest_modification if srv_buf_pool_instances|
690 |:Launchpad bug: :bug:`1176496` |
691+<<<<<<< TREE
692 |:Upstream state: Open (checked on 2014-03-17) |
693+=======
694+|:Upstream state: Open (checked on 2014-02-05) |
695+>>>>>>> MERGE-SOURCE
696 |:Fix Released: :rn:`5.6.5-60.0` |
697 |:Upstream fix: N/A |
698 +-------------------------------------------------------------------------------------------------------------+
699
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+<<<<<<< TREE
705 SHOW VARIABLES LIKE 'have_backup_locks';
706 Variable_name Value
707 have_backup_locks YES
708@@ -149,3 +150,148 @@
709 SET GLOBAL log_output = @old_log_output;
710 SET GLOBAL general_log = @old_general_log;
711 DROP TABLE t1, t2;
712+=======
713+SHOW VARIABLES LIKE 'have_backup_locks';
714+Variable_name Value
715+have_backup_locks YES
716+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
717+CREATE TABLE t2 (a INT) ENGINE=MyISAM;
718+SET @old_general_log = @@general_log;
719+SET @old_log_output = @@log_output;
720+TRUNCATE TABLE mysql.general_log;
721+SET GLOBAL log_output = 'TABLE';
722+SET GLOBAL general_log = ON;
723+# Check that --lock-for-backup is converted to --lock-all-tables if
724+# --single-transaction is not specified
725+SELECT argument FROM mysql.general_log WHERE argument != '';
726+argument
727+SET GLOBAL general_log = ON
728+root@localhost on
729+/*!40100 SET @@SQL_MODE='' */
730+/*!40103 SET TIME_ZONE='+00:00' */
731+FLUSH TABLES
732+FLUSH TABLES WITH READ LOCK
733+SHOW VARIABLES LIKE 'gtid\_mode'
734+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+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+SHOW VARIABLES LIKE 'ndbinfo\_version'
737+test
738+show tables
739+show table status like 't1'
740+SET SQL_QUOTE_SHOW_CREATE=1
741+SET SESSION character_set_results = 'binary'
742+show create table `t1`
743+SET SESSION character_set_results = 'utf8'
744+show fields from `t1`
745+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1`
746+SET SESSION character_set_results = 'binary'
747+use `test`
748+select @@collation_database
749+SHOW TRIGGERS LIKE 't1'
750+SET SESSION character_set_results = 'utf8'
751+show table status like 't2'
752+SET SQL_QUOTE_SHOW_CREATE=1
753+SET SESSION character_set_results = 'binary'
754+show create table `t2`
755+SET SESSION character_set_results = 'utf8'
756+show fields from `t2`
757+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2`
758+SET SESSION character_set_results = 'binary'
759+use `test`
760+select @@collation_database
761+SHOW TRIGGERS LIKE 't2'
762+SET SESSION character_set_results = 'utf8'
763+SELECT argument FROM mysql.general_log WHERE argument != ''
764+TRUNCATE TABLE mysql.general_log;
765+# Check that --lock-for-backup --single-transaction uses LOCK TABLES FOR
766+# BACKUP
767+SELECT argument FROM mysql.general_log WHERE argument != '';
768+argument
769+root@localhost on
770+/*!40100 SET @@SQL_MODE='' */
771+/*!40103 SET TIME_ZONE='+00:00' */
772+SHOW VARIABLES LIKE 'have_backup_locks'
773+LOCK TABLES FOR BACKUP
774+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
775+START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */
776+SHOW VARIABLES LIKE 'gtid\_mode'
777+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+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+SHOW VARIABLES LIKE 'ndbinfo\_version'
780+test
781+show tables
782+show table status like 't1'
783+SET SQL_QUOTE_SHOW_CREATE=1
784+SET SESSION character_set_results = 'binary'
785+show create table `t1`
786+SET SESSION character_set_results = 'utf8'
787+show fields from `t1`
788+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1`
789+SET SESSION character_set_results = 'binary'
790+use `test`
791+select @@collation_database
792+SHOW TRIGGERS LIKE 't1'
793+SET SESSION character_set_results = 'utf8'
794+show table status like 't2'
795+SET SQL_QUOTE_SHOW_CREATE=1
796+SET SESSION character_set_results = 'binary'
797+show create table `t2`
798+SET SESSION character_set_results = 'utf8'
799+show fields from `t2`
800+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2`
801+SET SESSION character_set_results = 'binary'
802+use `test`
803+select @@collation_database
804+SHOW TRIGGERS LIKE 't2'
805+SET SESSION character_set_results = 'utf8'
806+SELECT argument FROM mysql.general_log WHERE argument != ''
807+TRUNCATE TABLE mysql.general_log;
808+# Check that --master-data does not disable --lock-for-backup
809+SELECT argument FROM mysql.general_log WHERE argument != '';
810+argument
811+root@localhost on
812+/*!40100 SET @@SQL_MODE='' */
813+/*!40103 SET TIME_ZONE='+00:00' */
814+SHOW VARIABLES LIKE 'have_backup_locks'
815+SHOW STATUS LIKE 'binlog_snapshot_%'
816+LOCK TABLES FOR BACKUP
817+SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
818+START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */
819+SHOW VARIABLES LIKE 'gtid\_mode'
820+SHOW STATUS LIKE 'binlog_snapshot_%'
821+UNLOCK TABLES
822+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+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+SHOW VARIABLES LIKE 'ndbinfo\_version'
825+test
826+show tables
827+show table status like 't1'
828+SET SQL_QUOTE_SHOW_CREATE=1
829+SET SESSION character_set_results = 'binary'
830+show create table `t1`
831+SET SESSION character_set_results = 'utf8'
832+show fields from `t1`
833+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1`
834+SET SESSION character_set_results = 'binary'
835+use `test`
836+select @@collation_database
837+SHOW TRIGGERS LIKE 't1'
838+SET SESSION character_set_results = 'utf8'
839+show table status like 't2'
840+SET SQL_QUOTE_SHOW_CREATE=1
841+SET SESSION character_set_results = 'binary'
842+show create table `t2`
843+SET SESSION character_set_results = 'utf8'
844+show fields from `t2`
845+SELECT /*!40001 SQL_NO_CACHE */ * FROM `t2`
846+SET SESSION character_set_results = 'binary'
847+use `test`
848+select @@collation_database
849+SHOW TRIGGERS LIKE 't2'
850+SET SESSION character_set_results = 'utf8'
851+SELECT argument FROM mysql.general_log WHERE argument != ''
852+TRUNCATE TABLE mysql.general_log;
853+SET GLOBAL log_output = @old_log_output;
854+SET GLOBAL general_log = @old_general_log;
855+DROP TABLE t1, t2;
856+>>>>>>> MERGE-SOURCE
857
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 DROP VIEW v1;
863 DROP TABLE t1;
864 SET GLOBAL default_storage_engine=@old_engine;
865+# Connection default
866+SET binlog_format= mixed;
867+RESET MASTER;
868+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
869+INSERT INTO t1 VALUES (1),(2);
870+CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
871+INSERT INTO t2 VALUES (1,0), (2,0);
872+SELECT GET_LOCK("block_queries_1", 120);
873+GET_LOCK("block_queries_1", 120)
874+1
875+# Connection c3
876+SELECT GET_LOCK("block_queries_2", 120);
877+GET_LOCK("block_queries_2", 120)
878+1
879+# Connection c1
880+SET @c= 0;
881+SELECT IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) FROM t1 ORDER BY a;
882+# Connection c2
883+SET binlog_format="row";
884+SET @d= 10;
885+UPDATE t2 SET b=IF(@d<=10, @d:=@d+1, GET_LOCK("block_queries_2", 120)) ORDER BY a;
886+# Connection default
887+# Make sure other queries are running (and waiting).
888+SELECT RELEASE_LOCK("block_queries_1");
889+RELEASE_LOCK("block_queries_1")
890+1
891+# Connection c3
892+SELECT RELEASE_LOCK("block_queries_2");
893+RELEASE_LOCK("block_queries_2")
894+1
895+# Connection c1
896+IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120))
897+1
898+1
899+# Connection c2
900+# Connection default
901+SELECT * FROM t2 ORDER BY a;
902+a b
903+1 11
904+2 1
905+DROP TABLE t1;
906+DROP TABLE t2;
907+SHOW BINLOG EVENTS LIMIT 7,3;
908+Log_name Pos Event_type Server_id End_log_pos Info
909+master-bin.000001 665 Query 1 773 use `test`; INSERT INTO t2 VALUES (1,0), (2,0)
910+master-bin.000001 773 Xid 1 804 COMMIT /* XID */
911+master-bin.000001 804 Query 1 876 BEGIN
912+-- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=804;
913+SELECT * FROM t1 ORDER BY a;
914+a
915+1
916+2
917+SELECT * FROM t2 ORDER BY a;
918+a b
919+1 0
920+2 0
921+DROP TABLE t1,t2;
922
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+RESET MASTER;
928+# Connection default
929+CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
930+SHOW MASTER STATUS;
931+File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set
932+master-bin.000001 266
933+SHOW STATUS LIKE 'binlog_snapshot_%';
934+Variable_name Value
935+Binlog_snapshot_file master-bin.000001
936+Binlog_snapshot_position 266
937+BEGIN;
938+INSERT INTO t1 VALUES (0, "");
939+# Connection con1
940+BEGIN;
941+INSERT INTO t1 VALUES (1, "");
942+# Connection con2
943+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam;
944+BEGIN;
945+INSERT INTO t1 VALUES (2, "first");
946+INSERT INTO t2 VALUES (2);
947+INSERT INTO t1 VALUES (2, "second");
948+# Connection default
949+COMMIT;
950+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
951+START TRANSACTION WITH CONSISTENT SNAPSHOT;
952+# Connection con3
953+BEGIN;
954+INSERT INTO t1 VALUES (3, "");
955+INSERT INTO t2 VALUES (3);
956+# Connection con4
957+BEGIN;
958+INSERT INTO t1 VALUES (4, "");
959+COMMIT;
960+# Connection default
961+SELECT * FROM t1 ORDER BY a,b;
962+a b
963+0
964+SHOW STATUS LIKE 'binlog_snapshot_%';
965+Variable_name Value
966+Binlog_snapshot_file master-bin.000001
967+Binlog_snapshot_position 860
968+SHOW MASTER STATUS;
969+File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set
970+master-bin.000001 1331
971+SELECT * FROM t2 ORDER BY a;
972+a
973+2
974+3
975+# Connection con1
976+COMMIT;
977+# Connection con2
978+COMMIT;
979+# Connection con3
980+COMMIT;
981+FLUSH LOGS;
982+# Connection default
983+SELECT * FROM t1 ORDER BY a,b;
984+a b
985+0
986+SHOW STATUS LIKE 'binlog_snapshot_%';
987+Variable_name Value
988+Binlog_snapshot_file master-bin.000001
989+Binlog_snapshot_position 860
990+SHOW MASTER STATUS;
991+File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set
992+master-bin.000002 120
993+COMMIT;
994+SHOW STATUS LIKE 'binlog_snapshot_%';
995+Variable_name Value
996+Binlog_snapshot_file master-bin.000002
997+Binlog_snapshot_position 120
998+SHOW MASTER STATUS;
999+File Position Binlog_Do_DB Binlog_Ignore_DB Executed_Gtid_Set
1000+master-bin.000002 120
1001+SHOW BINLOG EVENTS;
1002+Log_name Pos Event_type Server_id End_log_pos Info
1003+master-bin.000001 4 Format_desc 1 120 Server ver: #, Binlog ver: #
1004+master-bin.000001 120 Query 1 266 use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb
1005+master-bin.000001 266 Query 1 389 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam
1006+master-bin.000001 389 Query 1 468 BEGIN
1007+master-bin.000001 468 Query 1 567 use `test`; INSERT INTO t2 VALUES (2)
1008+master-bin.000001 567 Query 1 647 COMMIT
1009+master-bin.000001 647 Query 1 726 BEGIN
1010+master-bin.000001 726 Query 1 829 use `test`; INSERT INTO t1 VALUES (0, "")
1011+master-bin.000001 829 Xid 1 860 COMMIT /* XID */
1012+master-bin.000001 860 Query 1 939 BEGIN
1013+master-bin.000001 939 Query 1 1038 use `test`; INSERT INTO t2 VALUES (3)
1014+master-bin.000001 1038 Query 1 1118 COMMIT
1015+master-bin.000001 1118 Query 1 1197 BEGIN
1016+master-bin.000001 1197 Query 1 1300 use `test`; INSERT INTO t1 VALUES (4, "")
1017+master-bin.000001 1300 Xid 1 1331 COMMIT /* XID */
1018+master-bin.000001 1331 Query 1 1410 BEGIN
1019+master-bin.000001 1410 Query 1 1513 use `test`; INSERT INTO t1 VALUES (1, "")
1020+master-bin.000001 1513 Xid 1 1544 COMMIT /* XID */
1021+master-bin.000001 1544 Query 1 1623 BEGIN
1022+master-bin.000001 1623 Query 1 1731 use `test`; INSERT INTO t1 VALUES (2, "first")
1023+master-bin.000001 1731 Query 1 1840 use `test`; INSERT INTO t1 VALUES (2, "second")
1024+master-bin.000001 1840 Xid 1 1871 COMMIT /* XID */
1025+master-bin.000001 1871 Query 1 1950 BEGIN
1026+master-bin.000001 1950 Query 1 2053 use `test`; INSERT INTO t1 VALUES (3, "")
1027+master-bin.000001 2053 Xid 1 2084 COMMIT /* XID */
1028+master-bin.000001 2084 Rotate 1 2132 master-bin.000002;pos=4
1029+DROP TABLE t1,t2;
1030
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+--source include/have_innodb.inc
1036+--source include/have_log_bin.inc
1037+--source include/have_binlog_format_mixed_or_statement.inc
1038+
1039+RESET MASTER;
1040+
1041+# Test that we get the correct binlog position from START TRANSACTION WITH
1042+# CONSISTENT SNAPSHOT even when other transactions are active.
1043+
1044+connect(con1,localhost,root,,);
1045+connect(con2,localhost,root,,);
1046+connect(con3,localhost,root,,);
1047+connect(con4,localhost,root,,);
1048+
1049+connection default;
1050+--echo # Connection default
1051+
1052+CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
1053+SHOW MASTER STATUS;
1054+SHOW STATUS LIKE 'binlog_snapshot_%';
1055+BEGIN;
1056+INSERT INTO t1 VALUES (0, "");
1057+
1058+connection con1;
1059+--echo # Connection con1
1060+BEGIN;
1061+INSERT INTO t1 VALUES (1, "");
1062+
1063+connection con2;
1064+--echo # Connection con2
1065+CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam;
1066+BEGIN;
1067+INSERT INTO t1 VALUES (2, "first");
1068+INSERT INTO t2 VALUES (2);
1069+INSERT INTO t1 VALUES (2, "second");
1070+
1071+connection default;
1072+--echo # Connection default
1073+COMMIT;
1074+
1075+SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
1076+START TRANSACTION WITH CONSISTENT SNAPSHOT;
1077+
1078+connection con3;
1079+--echo # Connection con3
1080+BEGIN;
1081+INSERT INTO t1 VALUES (3, "");
1082+INSERT INTO t2 VALUES (3);
1083+
1084+connection con4;
1085+--echo # Connection con4
1086+BEGIN;
1087+INSERT INTO t1 VALUES (4, "");
1088+COMMIT;
1089+
1090+connection default;
1091+--echo # Connection default
1092+SELECT * FROM t1 ORDER BY a,b;
1093+SHOW STATUS LIKE 'binlog_snapshot_%';
1094+SHOW MASTER STATUS;
1095+SELECT * FROM t2 ORDER BY a;
1096+
1097+connection con1;
1098+--echo # Connection con1
1099+COMMIT;
1100+
1101+connection con2;
1102+--echo # Connection con2
1103+COMMIT;
1104+
1105+connection con3;
1106+--echo # Connection con3
1107+COMMIT;
1108+FLUSH LOGS;
1109+
1110+connection default;
1111+--echo # Connection default
1112+SELECT * FROM t1 ORDER BY a,b;
1113+SHOW STATUS LIKE 'binlog_snapshot_%';
1114+SHOW MASTER STATUS;
1115+COMMIT;
1116+SHOW STATUS LIKE 'binlog_snapshot_%';
1117+SHOW MASTER STATUS;
1118+
1119+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
1120+SHOW BINLOG EVENTS;
1121+
1122+DROP TABLE t1,t2;
1123
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 wait/synch/rwlock/sql/Binlog_storage_delegate::lock YES YES
1129 wait/synch/rwlock/sql/Binlog_transmit_delegate::lock YES YES
1130 wait/synch/rwlock/sql/gtid_commit_rollback YES YES
1131+wait/synch/rwlock/sql/LOCK_consistent_snapshot YES YES
1132 wait/synch/rwlock/sql/LOCK_dboptions YES YES
1133 wait/synch/rwlock/sql/LOCK_grant YES YES
1134 wait/synch/rwlock/sql/LOCK_system_variables_hash YES YES
1135 wait/synch/rwlock/sql/LOCK_sys_init_connect YES YES
1136 wait/synch/rwlock/sql/LOCK_sys_init_slave YES YES
1137-wait/synch/rwlock/sql/LOGGER::LOCK_logger YES YES
1138 select * from performance_schema.setup_instruments
1139 where name like 'Wait/Synch/Cond/sql/%'
1140 and name not in (
1141
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+<<<<<<< TREE
1147 ########################################################################
1148 # mysqldump --lock-for-backup tests
1149 ########################################################################
1150@@ -56,3 +57,63 @@
1151 SET GLOBAL general_log = @old_general_log;
1152
1153 DROP TABLE t1, t2;
1154+=======
1155+########################################################################
1156+# mysqldump --lock-for-backup tests
1157+########################################################################
1158+
1159+--source include/have_log_bin.inc
1160+--source include/have_innodb.inc
1161+--source include/not_embedded.inc
1162+
1163+SHOW VARIABLES LIKE 'have_backup_locks';
1164+
1165+CREATE TABLE t1 (a INT) ENGINE=InnoDB;
1166+CREATE TABLE t2 (a INT) ENGINE=MyISAM;
1167+
1168+SET @old_general_log = @@general_log;
1169+SET @old_log_output = @@log_output;
1170+
1171+TRUNCATE TABLE mysql.general_log;
1172+
1173+SET GLOBAL log_output = 'TABLE';
1174+SET GLOBAL general_log = ON;
1175+
1176+--let $file=$MYSQLTEST_VARDIR/tmp/dump.sql
1177+
1178+--error 1
1179+--exec $MYSQL_DUMP --lock-for-backup --lock-all-tables >$file
1180+
1181+--echo # Check that --lock-for-backup is converted to --lock-all-tables if
1182+--echo # --single-transaction is not specified
1183+
1184+--exec $MYSQL_DUMP --lock-for-backup test >$file
1185+
1186+SELECT argument FROM mysql.general_log WHERE argument != '';
1187+
1188+TRUNCATE TABLE mysql.general_log;
1189+
1190+--echo # Check that --lock-for-backup --single-transaction uses LOCK TABLES FOR
1191+--echo # BACKUP
1192+
1193+--exec $MYSQL_DUMP --lock-for-backup --single-transaction test >$file
1194+
1195+SELECT argument FROM mysql.general_log WHERE argument != '';
1196+
1197+TRUNCATE TABLE mysql.general_log;
1198+
1199+--echo # Check that --master-data does not disable --lock-for-backup
1200+
1201+--exec $MYSQL_DUMP --lock-for-backup --single-transaction --master-data test >$file
1202+
1203+SELECT argument FROM mysql.general_log WHERE argument != '';
1204+
1205+TRUNCATE TABLE mysql.general_log;
1206+
1207+--remove_file $file
1208+
1209+SET GLOBAL log_output = @old_log_output;
1210+SET GLOBAL general_log = @old_general_log;
1211+
1212+DROP TABLE t1, t2;
1213+>>>>>>> MERGE-SOURCE
1214
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 --source include/not_embedded.inc
1220 --source include/have_innodb.inc
1221 --source include/have_archive.inc
1222+--source include/have_log_bin.inc
1223
1224 --disable_warnings
1225 drop table if exists t1, t2, t3, t4, t5, t6;
1226@@ -1124,3 +1125,85 @@
1227 DROP TABLE t1;
1228
1229 SET GLOBAL default_storage_engine=@old_engine;
1230+
1231+# Test fully non-locking mysqldump with consistent binlog position (MWL#136).
1232+
1233+connect(c1,127.0.0.1,root,,test,$MASTER_MYPORT,);
1234+connect(c2,127.0.0.1,root,,test,$MASTER_MYPORT,);
1235+connect(c3,127.0.0.1,root,,test,$MASTER_MYPORT,);
1236+
1237+connection default;
1238+--echo # Connection default
1239+SET binlog_format= mixed;
1240+RESET MASTER;
1241+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
1242+INSERT INTO t1 VALUES (1),(2);
1243+CREATE TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
1244+INSERT INTO t2 VALUES (1,0), (2,0);
1245+SELECT GET_LOCK("block_queries_1", 120);
1246+
1247+connection c3;
1248+--echo # Connection c3
1249+SELECT GET_LOCK("block_queries_2", 120);
1250+
1251+# Start two queries that will be running on the tables during mysqldump
1252+connection c1;
1253+--echo # Connection c1
1254+SET @c= 0;
1255+send SELECT IF(@c<1, @c:=@c+1, GET_LOCK("block_queries_1", 120)) FROM t1 ORDER BY a;
1256+
1257+connection c2;
1258+--echo # Connection c2
1259+SET binlog_format="row";
1260+SET @d= 10;
1261+send UPDATE t2 SET b=IF(@d<=10, @d:=@d+1, GET_LOCK("block_queries_2", 120)) ORDER BY a;
1262+
1263+connection default;
1264+--echo # Connection default
1265+--echo # Make sure other queries are running (and waiting).
1266+let $wait_condition=
1267+ SELECT COUNT(*) FROM information_schema.processlist
1268+ WHERE state = "User lock" AND info LIKE 'SELECT%block_queries_1%';
1269+--source include/wait_condition.inc
1270+let $wait_condition=
1271+ SELECT COUNT(*) FROM information_schema.processlist
1272+ WHERE state = "User lock" AND info LIKE 'UPDATE%block_queries_2%';
1273+--source include/wait_condition.inc
1274+
1275+--exec $MYSQL_DUMP --master-data=2 --single-transaction test t1 t2 > $MYSQLTEST_VARDIR/tmp/mwl136.sql
1276+
1277+SELECT RELEASE_LOCK("block_queries_1");
1278+
1279+connection c3;
1280+--echo # Connection c3
1281+SELECT RELEASE_LOCK("block_queries_2");
1282+
1283+connection c1;
1284+--echo # Connection c1
1285+reap;
1286+
1287+connection c2;
1288+--echo # Connection c2
1289+reap;
1290+
1291+connection default;
1292+--echo # Connection default
1293+SELECT * FROM t2 ORDER BY a;
1294+DROP TABLE t1;
1295+DROP TABLE t2;
1296+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mwl136.sql
1297+
1298+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
1299+SHOW BINLOG EVENTS LIMIT 7,3;
1300+
1301+--perl
1302+my $f= "$ENV{MYSQLTEST_VARDIR}/tmp/mwl136.sql";
1303+open F, '<', $f or die "Failed to open $f: $!\n";
1304+while (<F>) {
1305+ print if /CHANGE MASTER TO/;
1306+}
1307+EOF
1308+SELECT * FROM t1 ORDER BY a;
1309+SELECT * FROM t2 ORDER BY a;
1310+
1311+DROP TABLE t1,t2;
1312
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 static int binlog_commit(handlerton *hton, THD *thd, bool all);
1318 static int binlog_rollback(handlerton *hton, THD *thd, bool all);
1319 static int binlog_prepare(handlerton *hton, THD *thd, bool all);
1320-
1321+static int binlog_start_consistent_snapshot(handlerton *hton, THD *thd);
1322+
1323+static char binlog_snapshot_file[FN_REFLEN];
1324+static ulonglong binlog_snapshot_position;
1325+
1326+static SHOW_VAR binlog_status_vars_detail[]=
1327+{
1328+ {"snapshot_file",
1329+ (char *)&binlog_snapshot_file, SHOW_CHAR},
1330+ {"snapshot_position",
1331+ (char *)&binlog_snapshot_position, SHOW_LONGLONG},
1332+ {NullS, NullS, SHOW_LONG}
1333+};
1334
1335 /**
1336 Helper class to hold a mutex for the duration of the
1337@@ -788,6 +800,8 @@
1338 binlog_stmt_cache_data stmt_cache;
1339 binlog_trx_cache_data trx_cache;
1340
1341+ LOG_INFO binlog_info;
1342+
1343 private:
1344
1345 binlog_cache_mngr& operator=(const binlog_cache_mngr& info);
1346@@ -914,6 +928,7 @@
1347 binlog_hton->commit= binlog_commit;
1348 binlog_hton->rollback= binlog_rollback;
1349 binlog_hton->prepare= binlog_prepare;
1350+ binlog_hton->start_consistent_snapshot= binlog_start_consistent_snapshot;
1351 binlog_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN;
1352 return 0;
1353 }
1354@@ -1325,6 +1340,25 @@
1355 return 0;
1356 }
1357
1358+static int binlog_start_consistent_snapshot(handlerton *hton, THD *thd)
1359+{
1360+ int err= 0;
1361+ LOG_INFO li;
1362+ DBUG_ENTER("binlog_start_consistent_snapshot");
1363+
1364+ if ((err= thd->binlog_setup_trx_data()))
1365+ DBUG_RETURN(err);
1366+
1367+ binlog_cache_mngr * const cache_mngr= thd_get_cache_mngr(thd);
1368+
1369+ /* Server layer calls us with LOCK_log locked, so this is safe. */
1370+ mysql_bin_log.raw_get_current_log(&cache_mngr->binlog_info);
1371+
1372+ trans_register_ha(thd, TRUE, hton);
1373+
1374+ DBUG_RETURN(err);
1375+}
1376+
1377 /**
1378 This function is called once after each statement.
1379
1380@@ -1567,8 +1601,18 @@
1381 rollback.
1382 */
1383 if (thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT)
1384+ {
1385+ /*
1386+ Reset binlog_snapshot_% variables for the current connection so that the
1387+ current coordinates are shown after committing a consistent snapshot
1388+ transaction.
1389+ */
1390+ if (cache_mngr != NULL)
1391+ cache_mngr->binlog_info.log_file_name[0]= '\0';
1392+
1393 if ((error= ha_rollback_low(thd, all)))
1394 goto end;
1395+ }
1396
1397 /*
1398 If there is no cache manager, or if there is nothing in the
1399@@ -2436,7 +2480,7 @@
1400 is_relay_log(0), signal_cnt(0),
1401 checksum_alg_reset(BINLOG_CHECKSUM_ALG_UNDEF),
1402 relay_log_checksum_alg(BINLOG_CHECKSUM_ALG_UNDEF),
1403- previous_gtid_set(0)
1404+ previous_gtid_set(0), snapshot_lock_acquired(false)
1405 {
1406 /*
1407 We don't want to initialize locks here as such initialization depends on
1408@@ -6313,6 +6357,14 @@
1409 DBUG_RETURN(RESULT_SUCCESS);
1410 }
1411
1412+ /*
1413+ Reset binlog_snapshot_% variables for the current connection so that the
1414+ current coordinates are shown after committing a consistent snapshot
1415+ transaction.
1416+ */
1417+ if (all)
1418+ cache_mngr->binlog_info.log_file_name[0]= '\0';
1419+
1420 THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt;
1421
1422 DBUG_PRINT("debug", ("in_transaction: %s, no_2pc: %s, rw_ha_count: %d",
1423@@ -6810,9 +6862,22 @@
1424 /*
1425 storage engine commit
1426 */
1427- if (thd->commit_error == THD::CE_NONE &&
1428- ha_commit_low(thd, all, false))
1429- thd->commit_error= THD::CE_COMMIT_ERROR;
1430+ if (thd->commit_error == THD::CE_NONE)
1431+ {
1432+ /*
1433+ Acquire a shared lock to block commits until START TRANSACTION WITH
1434+ CONSISTENT SNAPSHOT completes snapshot creation for all storage
1435+ engines. We only reach this code if binlog_order_commits=0.
1436+ */
1437+ DBUG_ASSERT(opt_binlog_order_commits == 0);
1438+
1439+ slock();
1440+
1441+ if (ha_commit_low(thd, all, false))
1442+ thd->commit_error= THD::CE_COMMIT_ERROR;
1443+
1444+ sunlock();
1445+ }
1446 /*
1447 Decrement the prepared XID counter after storage engine commit
1448 */
1449@@ -7201,6 +7266,99 @@
1450 return 1;
1451 }
1452
1453+/*
1454+ Copy out the non-directory part of binlog position filename for the
1455+ `binlog_snapshot_file' status variable, same way as it is done for
1456+ SHOW MASTER STATUS.
1457+*/
1458+static void set_binlog_snapshot_file(const char *src)
1459+{
1460+ int dir_len = dirname_length(src);
1461+ strmake(binlog_snapshot_file, src + dir_len,
1462+ sizeof(binlog_snapshot_file) - 1);
1463+}
1464+
1465+/*
1466+ Copy out current values of status variables, for SHOW STATUS or
1467+ information_schema.global_status.
1468+
1469+ This is called only under LOCK_status, so we can fill in a static array.
1470+*/
1471+void MYSQL_BIN_LOG::set_status_variables(THD *thd)
1472+{
1473+ binlog_cache_mngr *cache_mngr;
1474+
1475+ if (thd && opt_bin_log)
1476+ cache_mngr= (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
1477+ else
1478+ cache_mngr= 0;
1479+
1480+ bool have_snapshot= (cache_mngr &&
1481+ cache_mngr->binlog_info.log_file_name[0] != '\0');
1482+ mysql_mutex_lock(&LOCK_log);
1483+ if (!have_snapshot)
1484+ {
1485+ set_binlog_snapshot_file(log_file_name);
1486+ binlog_snapshot_position= my_b_tell(&log_file);
1487+ }
1488+ mysql_mutex_unlock(&LOCK_log);
1489+
1490+ if (have_snapshot)
1491+ {
1492+ set_binlog_snapshot_file(cache_mngr->binlog_info.log_file_name);
1493+ binlog_snapshot_position= cache_mngr->binlog_info.pos;
1494+ }
1495+}
1496+
1497+
1498+void MYSQL_BIN_LOG::xlock(void)
1499+{
1500+ DBUG_ASSERT(!snapshot_lock_acquired);
1501+
1502+ mysql_mutex_lock(&LOCK_log);
1503+
1504+ /*
1505+ We must ensure that no writes to binlog and no commits to storage engines
1506+ occur after function is called for START TRANSACTION FOR CONSISTENT
1507+ SNAPSHOT. With binlog_order_commits=1 (the default) flushing to binlog is
1508+ performed under the LOCK_log mutex and commits are done under the
1509+ LOCK_commit mutex, both in the stage leader thread. So acquiring those 2
1510+ mutexes is sufficient to guarantee atomicity.
1511+
1512+ With binlog_order_commits=0 commits are performed in parallel by separate
1513+ threads with each acquiring a shared lock on LOCK_consistent_snapshot.
1514+
1515+ binlog_order_commits is a dynamic variable, so we have to keep track what
1516+ primitives should be used in unlock_for_snapshot().
1517+ */
1518+ if (opt_binlog_order_commits)
1519+ {
1520+ mysql_mutex_lock(&LOCK_commit);
1521+ }
1522+ else
1523+ {
1524+ snapshot_lock_acquired= true;
1525+ mysql_rwlock_wrlock(&LOCK_consistent_snapshot);
1526+ }
1527+}
1528+
1529+
1530+void MYSQL_BIN_LOG::xunlock(void)
1531+{
1532+ if (!snapshot_lock_acquired)
1533+ {
1534+ mysql_mutex_unlock(&LOCK_commit);
1535+ }
1536+ else
1537+ {
1538+ mysql_rwlock_unlock(&LOCK_consistent_snapshot);
1539+ snapshot_lock_acquired= false;
1540+ }
1541+
1542+ mysql_mutex_unlock(&LOCK_log);
1543+}
1544+
1545+
1546 Group_cache *THD::get_group_cache(bool is_transactional)
1547 {
1548 DBUG_ENTER("THD::get_group_cache(bool)");
1549@@ -9052,6 +9210,25 @@
1550
1551 #endif /* !defined(MYSQL_CLIENT) */
1552
1553+static int show_binlog_vars(THD *thd, SHOW_VAR *var, char *buff)
1554+{
1555+ if (mysql_bin_log.is_open())
1556+ mysql_bin_log.set_status_variables(thd);
1557+ else
1558+ {
1559+ binlog_snapshot_file[0]= '\0';
1560+ binlog_snapshot_position= 0;
1561+ }
1562+ var->type= SHOW_ARRAY;
1563+ var->value= (char *)&binlog_status_vars_detail;
1564+ return 0;
1565+}
1566+
1567+static SHOW_VAR binlog_status_vars_top[]= {
1568+ {"Binlog", (char *) &show_binlog_vars, SHOW_FUNC},
1569+ {NullS, NullS, SHOW_LONG}
1570+};
1571+
1572 struct st_mysql_storage_engine binlog_storage_engine=
1573 { MYSQL_HANDLERTON_INTERFACE_VERSION };
1574
1575@@ -9068,7 +9245,7 @@
1576 binlog_init, /* Plugin Init */
1577 NULL, /* Plugin Deinit */
1578 0x0100 /* 1.0 */,
1579- NULL, /* status variables */
1580+ binlog_status_vars_top, /* status variables */
1581 NULL, /* system variables */
1582 NULL, /* config options */
1583 0,
1584
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 private:
1590 Gtid_set* previous_gtid_set;
1591
1592+ bool snapshot_lock_acquired;
1593+
1594 int open(const char *opt_name) { return open_binlog(opt_name); }
1595 bool change_stage(THD *thd, Stage_manager::StageID stage,
1596 THD* queue, mysql_mutex_t *leave,
1597@@ -528,7 +530,15 @@
1598 void update_thd_next_event_pos(THD *thd);
1599 int flush_and_set_pending_rows_event(THD *thd, Rows_log_event* event,
1600 bool is_transactional);
1601-
1602+ void xlock(void);
1603+ void xunlock(void);
1604+ void slock(void) { mysql_rwlock_rdlock(&LOCK_consistent_snapshot); }
1605+ void sunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); }
1606+#else
1607+ void xlock(void) { }
1608+ void xunlock(void) { }
1609+ void slock(void) { }
1610+ void sunlock(void) { }
1611 #endif /* !defined(MYSQL_CLIENT) */
1612 void add_bytes_written(ulonglong inc)
1613 {
1614@@ -674,6 +684,7 @@
1615 inline void unlock_index() { mysql_mutex_unlock(&LOCK_index);}
1616 inline IO_CACHE *get_index_file() { return &index_file;}
1617 inline uint32 get_open_count() { return open_count; }
1618+ void set_status_variables(THD *thd);
1619 };
1620
1621 typedef struct st_load_file_info
1622
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 {
1628 bool warn= true;
1629
1630+ /*
1631+ Blocking commits and binlog updates ensures that we get the same snapshot
1632+ for all engines (including the binary log). This allows us among other
1633+ things to do backups with START TRANSACTION WITH CONSISTENT SNAPSHOT and
1634+ have a consistent binlog position.
1635+ */
1636+ tc_log->xlock();
1637+
1638 plugin_foreach(thd, snapshot_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &warn);
1639
1640+ tc_log->xunlock();
1641+
1642 /*
1643 Same idea as when one wants to CREATE TABLE in one engine which does not
1644 exist:
1645
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
1651 #define HTON_SUPPORTS_EXTENDED_KEYS (1 << 10)
1652
1653+<<<<<<< TREE
1654 /**
1655 Set if the storage engine supports 'online' backups. This means that there
1656 exists a way to create a consistent copy of its tables without blocking
1657@@ -1036,6 +1037,15 @@
1658 Engine supports secondary clustered keys.
1659 */
1660 #define HTON_SUPPORTS_CLUSTERED_KEYS (1 << 12)
1661+=======
1662+/**
1663+ Set if the storage engine supports 'online' backups. This means that there
1664+ exists a way to create a consistent copy of its tables without blocking
1665+ updates to them. If so, statements that update such tables will not be
1666+ affected by an active LOCK TABLES FOR BACKUP.
1667+*/
1668+#define HTON_SUPPORTS_ONLINE_BACKUPS (1 << 11)
1669+>>>>>>> MERGE-SOURCE
1670
1671 enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED,
1672 ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
1673
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 #include "rpl_handler.h"
1679 #include "debug_sync.h"
1680 #include "sql_show.h"
1681+#include "mysqld.h"
1682
1683 /* max size of the log message */
1684 #define MAX_LOG_BUFFER_SIZE 1024
1685@@ -2899,12 +2900,21 @@
1686 DBUG_ENTER("TC_LOG_MMAP::commit");
1687 unsigned long cookie= 0;
1688 my_xid xid= thd->transaction.xid_state.xid.get_my_xid();
1689+ int rc;
1690
1691 if (all && xid)
1692 if (!(cookie= log_xid(thd, xid)))
1693 DBUG_RETURN(RESULT_ABORTED); // Failed to log the transaction
1694
1695- if (ha_commit_low(thd, all))
1696+ /*
1697+ Acquire a shared lock to block commits until START TRANSACTION WITH
1698+ CONSISTENT SNAPSHOT completes snapshot creation for all storage engines.
1699+ */
1700+ slock();
1701+ rc= ha_commit_low(thd, all);
1702+ sunlock();
1703+
1704+ if (rc)
1705 DBUG_RETURN(RESULT_INCONSISTENT); // Transaction logged, but not committed
1706
1707 /* If cookie is non-zero, something was logged */
1708
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 @return Error code on failure, zero on success.
1714 */
1715 virtual int prepare(THD *thd, bool all) = 0;
1716+
1717+ /**
1718+ Acquire an exclusive lock to block binary log updates and commits. This is
1719+ used by START TRANSACTION WITH CONSISTENT SNAPSHOT to create an atomic
1720+ snapshot.
1721+ */
1722+ virtual void xlock(void) = 0;
1723+
1724+ /** Release lock acquired with xlock(). */
1725+ virtual void xunlock(void) = 0;
1726+
1727+ /**
1728+ Acquire a shared lock to block commits. This is used when calling
1729+ ha_commit_low() to block commits if there's an exclusive lock acquired by
1730+ START TRANSACTION WITH CONSISTENT SNAPSHOT.
1731+ */
1732+ virtual void slock(void) = 0;
1733+
1734+ /** Release lock acquired with slock(). */
1735+ virtual void sunlock(void) = 0;
1736 };
1737
1738
1739@@ -120,6 +140,10 @@
1740 int prepare(THD *thd, bool all) {
1741 return ha_prepare_low(thd, all);
1742 }
1743+ void xlock(void) {}
1744+ void xunlock(void) {}
1745+ void slock(void) {}
1746+ void sunlock(void) {}
1747 };
1748
1749 #ifdef HAVE_MMAP
1750@@ -166,6 +190,10 @@
1751 enum_result commit(THD *thd, bool all);
1752 int rollback(THD *thd, bool all) { return ha_rollback_low(thd, all); }
1753 int prepare(THD *thd, bool all) { return ha_prepare_low(thd, all); }
1754+ void xlock(void) { mysql_rwlock_wrlock(&LOCK_consistent_snapshot); }
1755+ void xunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); }
1756+ void slock(void) { mysql_rwlock_rdlock(&LOCK_consistent_snapshot); }
1757+ void sunlock(void) { mysql_rwlock_unlock(&LOCK_consistent_snapshot); }
1758 int recover();
1759 uint size() const;
1760
1761
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 mysql_mutex_t LOCK_server_started;
1767 mysql_cond_t COND_server_started;
1768
1769+mysql_rwlock_t LOCK_consistent_snapshot;
1770+
1771 int mysqld_server_started= 0;
1772
1773 File_parser_dummy_hook file_parser_dummy_hook;
1774@@ -2062,6 +2064,7 @@
1775 mysql_mutex_destroy(&LOCK_global_user_client_stats);
1776 mysql_mutex_destroy(&LOCK_global_table_stats);
1777 mysql_mutex_destroy(&LOCK_global_index_stats);
1778+ mysql_rwlock_destroy(&LOCK_consistent_snapshot);
1779 }
1780 #endif /*EMBEDDED_LIBRARY*/
1781
1782@@ -4322,6 +4325,8 @@
1783 mysql_rwlock_init(key_rwlock_LOCK_sys_init_connect, &LOCK_sys_init_connect);
1784 mysql_rwlock_init(key_rwlock_LOCK_sys_init_slave, &LOCK_sys_init_slave);
1785 mysql_rwlock_init(key_rwlock_LOCK_grant, &LOCK_grant);
1786+ mysql_rwlock_init(key_rwlock_LOCK_consistent_snapshot,
1787+ &LOCK_consistent_snapshot);
1788 mysql_cond_init(key_COND_thread_count, &COND_thread_count, NULL);
1789 mysql_cond_init(key_COND_thread_cache, &COND_thread_cache, NULL);
1790 mysql_cond_init(key_COND_flush_thread_cache, &COND_flush_thread_cache, NULL);
1791@@ -9727,7 +9732,7 @@
1792 PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
1793 key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave,
1794 key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock,
1795- key_rwlock_global_sid_lock;
1796+ key_rwlock_global_sid_lock, key_rwlock_LOCK_consistent_snapshot;
1797
1798 PSI_rwlock_key key_rwlock_Trans_delegate_lock;
1799 PSI_rwlock_key key_rwlock_Binlog_storage_delegate_lock;
1800@@ -9753,7 +9758,8 @@
1801 { &key_rwlock_query_cache_query_lock, "Query_cache_query::lock", 0},
1802 { &key_rwlock_global_sid_lock, "gtid_commit_rollback", PSI_FLAG_GLOBAL},
1803 { &key_rwlock_Trans_delegate_lock, "Trans_delegate::lock", PSI_FLAG_GLOBAL},
1804- { &key_rwlock_Binlog_storage_delegate_lock, "Binlog_storage_delegate::lock", PSI_FLAG_GLOBAL}
1805+ { &key_rwlock_Binlog_storage_delegate_lock, "Binlog_storage_delegate::lock", PSI_FLAG_GLOBAL},
1806+ { &key_rwlock_LOCK_consistent_snapshot, "LOCK_consistent_snapshot", PSI_FLAG_GLOBAL}
1807 };
1808
1809 #ifdef HAVE_MMAP
1810
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 extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
1816 key_rwlock_LOCK_sys_init_connect, key_rwlock_LOCK_sys_init_slave,
1817 key_rwlock_LOCK_system_variables_hash, key_rwlock_query_cache_query_lock,
1818- key_rwlock_global_sid_lock;
1819+ key_rwlock_global_sid_lock, key_rwlock_LOCK_consistent_snapshot;
1820
1821 #ifdef HAVE_MMAP
1822 extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
1823@@ -620,6 +620,7 @@
1824 extern mysql_cond_t COND_server_started;
1825 extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
1826 extern mysql_rwlock_t LOCK_system_variables_hash;
1827+extern mysql_rwlock_t LOCK_consistent_snapshot;
1828 extern mysql_cond_t COND_manager;
1829 extern int32 thread_running;
1830 extern my_atomic_rwlock_t thread_running_lock;
1831
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 ER_TEMP_FILE_WRITE_FAILURE
1837 eng "Temporary file write failure."
1838
1839+<<<<<<< TREE
1840 ER_INNODB_FT_AUX_NOT_HEX_ID
1841 eng "Upgrade index name failed, please use create index(alter table) algorithm copy to rebuild index."
1842
1843@@ -7108,6 +7109,12 @@
1844 eng "Can’t execute the query because you have a conflicting backup lock"
1845 rus "Запрос не может быть выполнен из-за конфликтующей блокировки резервного копирования"
1846
1847+=======
1848+ER_CANT_EXECUTE_WITH_BACKUP_LOCK
1849+ eng "Can’t execute the query because you have a conflicting backup lock"
1850+ rus "Запрос не может быть выполнен из-за конфликтующей блокировки резервного копирования"
1851+
1852+>>>>>>> MERGE-SOURCE
1853 #
1854 # End of 5.6 error messages.
1855 #
1856
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
1862 /* These fields are protected by the buf_page_get_mutex()
1863 mutex. */
1864+<<<<<<< TREE
1865 /* Read the fields directly in order to avoid asserting on
1866 BUF_BLOCK_REMOVE_HASH pages. */
1867 ulint space = bpage->space;
1868 ulint offset = bpage->offset;
1869+=======
1870+ /* Read the fields directly in order to avoid asserting on
1871+ BUF_BLOCK_REMOVE_HASH pages. */
1872+ space = bpage->space;
1873+ offset = bpage->offset;
1874+>>>>>>> MERGE-SOURCE
1875
1876 if (flush_type == BUF_FLUSH_LRU) {
1877 mutex_exit(block_mutex);

Subscribers

People subscribed via source and target branches