Merge lp:~stewart/percona-server/5.5.28 into lp:percona-server/5.5

Proposed by Stewart Smith
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 328
Proposed branch: lp:~stewart/percona-server/5.5.28
Merge into: lp:percona-server/5.5
Diff against target: 7306 lines (+3362/-738)
131 files modified
Makefile (+2/-2)
Percona-Server/CMakeLists.txt (+3/-0)
Percona-Server/Docs/INSTALL-BINARY (+3/-3)
Percona-Server/VERSION (+1/-1)
Percona-Server/client/mysql.cc (+14/-6)
Percona-Server/client/mysql_upgrade.c (+2/-2)
Percona-Server/client/mysqladmin.cc (+4/-3)
Percona-Server/client/mysqlbinlog.cc (+13/-1)
Percona-Server/client/mysqlcheck.c (+2/-2)
Percona-Server/client/mysqldump.c (+5/-3)
Percona-Server/client/mysqlimport.c (+2/-4)
Percona-Server/client/mysqlshow.c (+2/-2)
Percona-Server/client/mysqlslap.c (+2/-2)
Percona-Server/client/mysqltest.cc (+1/-1)
Percona-Server/client/sql_string.h (+7/-3)
Percona-Server/cmake/ssl.cmake (+1/-1)
Percona-Server/extra/perror.c (+3/-2)
Percona-Server/extra/yassl/README (+10/-1)
Percona-Server/extra/yassl/include/lock.hpp (+5/-4)
Percona-Server/extra/yassl/include/openssl/ssl.h (+1/-1)
Percona-Server/extra/yassl/include/yassl_error.hpp (+1/-1)
Percona-Server/extra/yassl/src/cert_wrapper.cpp (+1/-2)
Percona-Server/extra/yassl/src/lock.cpp (+2/-2)
Percona-Server/extra/yassl/src/ssl.cpp (+2/-3)
Percona-Server/extra/yassl/src/yassl_error.cpp (+1/-6)
Percona-Server/extra/yassl/taocrypt/include/aes.hpp (+0/-1)
Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp (+3/-1)
Percona-Server/extra/yassl/taocrypt/src/asn.cpp (+3/-1)
Percona-Server/extra/yassl/taocrypt/src/coding.cpp (+21/-0)
Percona-Server/extra/yassl/taocrypt/src/crypto.cpp (+0/-37)
Percona-Server/extra/yassl/taocrypt/taocrypt.dsw (+16/-1)
Percona-Server/extra/yassl/taocrypt/test.dsp (+0/-102)
Percona-Server/extra/yassl/taocrypt/test/memory.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/test/test.dsp (+102/-0)
Percona-Server/extra/yassl/yassl.dsw (+1/-4)
Percona-Server/include/mysql/thread_pool_priv.h (+6/-0)
Percona-Server/include/welcome_copyright_notice.h (+13/-8)
Percona-Server/libmysqld/lib_sql.cc (+1/-0)
Percona-Server/mysql-test/r/information_schema.result (+2/-0)
Percona-Server/mysql-test/r/log_state.result (+6/-6)
Percona-Server/mysql-test/r/mysqlshow.result (+10/-4)
Percona-Server/mysql-test/r/openssl_1.result (+3/-3)
Percona-Server/mysql-test/r/subselect.result (+0/-2)
Percona-Server/mysql-test/r/variables.result (+2/-2)
Percona-Server/mysql-test/suite/federated/federated.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_archive.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_bug_13118.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_bug_25714.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_bug_35333.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_debug.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_innodb.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_server.test (+2/-2)
Percona-Server/mysql-test/suite/federated/federated_transactions.test (+2/-2)
Percona-Server/mysql-test/suite/federated/include/federated.inc (+1/-1)
Percona-Server/mysql-test/suite/funcs_1/t/is_engines_federated.test (+1/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result (+130/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_skip_innodb_i_s.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test (+76/-0)
Percona-Server/mysql-test/suite/perfschema/t/disabled.def (+0/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result (+3/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_bug41902.test (+2/-2)
Percona-Server/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test (+6/-1)
Percona-Server/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result (+28/-28)
Percona-Server/mysql-test/suite/sys_vars/r/log_basic.result (+3/-3)
Percona-Server/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result (+9/-9)
Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result (+17/-17)
Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result (+17/-17)
Percona-Server/mysql-test/suite/sys_vars/r/sql_big_selects_func.result (+1/-1)
Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result (+5/-5)
Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result (+7/-7)
Percona-Server/mysql-test/t/openssl_1.test (+6/-0)
Percona-Server/mysql-test/t/partition_federated.test (+1/-1)
Percona-Server/mysys/mf_iocache.c (+6/-1)
Percona-Server/mysys/my_getopt.c (+5/-0)
Percona-Server/scripts/mysql_secure_installation.pl.in (+7/-3)
Percona-Server/scripts/mysql_secure_installation.sh (+13/-5)
Percona-Server/scripts/mysqlhotcopy.sh (+71/-21)
Percona-Server/sql/filesort.cc (+2/-4)
Percona-Server/sql/gen_lex_hash.cc (+2/-2)
Percona-Server/sql/ha_partition.cc (+90/-43)
Percona-Server/sql/ha_partition.h (+2/-10)
Percona-Server/sql/handler.cc (+27/-2)
Percona-Server/sql/item.cc (+6/-1)
Percona-Server/sql/item.h (+1/-0)
Percona-Server/sql/item_strfunc.cc (+35/-18)
Percona-Server/sql/item_subselect.cc (+1/-1)
Percona-Server/sql/log.cc (+4/-4)
Percona-Server/sql/log_event.h (+1/-1)
Percona-Server/sql/mdl.cc (+112/-8)
Percona-Server/sql/mdl.h (+6/-0)
Percona-Server/sql/mysqld.cc (+16/-1)
Percona-Server/sql/opt_range.cc (+24/-16)
Percona-Server/sql/set_var.cc (+17/-20)
Percona-Server/sql/set_var.h (+2/-2)
Percona-Server/sql/share/charsets/Index.xml (+1/-1)
Percona-Server/sql/share/errmsg-utf8.txt (+2/-2)
Percona-Server/sql/spatial.cc (+6/-5)
Percona-Server/sql/spatial.h (+8/-0)
Percona-Server/sql/sql_base.cc (+15/-8)
Percona-Server/sql/sql_class.cc (+23/-0)
Percona-Server/sql/sql_list.h (+4/-0)
Percona-Server/sql/sql_plugin.cc (+3/-2)
Percona-Server/sql/sql_prepare.cc (+8/-0)
Percona-Server/sql/sql_select.cc (+35/-18)
Percona-Server/sql/sql_string.h (+7/-3)
Percona-Server/sql/sys_vars.cc (+6/-6)
Percona-Server/sql/sys_vars.h (+40/-40)
Percona-Server/storage/archive/ha_archive.cc (+3/-3)
Percona-Server/storage/federated/ha_federated.cc (+1/-1)
Percona-Server/storage/innobase/btr/btr0btr.c (+15/-6)
Percona-Server/storage/innobase/btr/btr0cur.c (+22/-17)
Percona-Server/storage/innobase/btr/btr0pcur.c (+31/-36)
Percona-Server/storage/innobase/buf/buf0buf.c (+1/-10)
Percona-Server/storage/innobase/buf/buf0lru.c (+1/-1)
Percona-Server/storage/innobase/buf/buf0rea.c (+2/-2)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+4/-1)
Percona-Server/storage/innobase/handler/i_s.cc (+1852/-2)
Percona-Server/storage/innobase/handler/i_s.h (+3/-0)
Percona-Server/storage/innobase/ibuf/ibuf0ibuf.c (+12/-5)
Percona-Server/storage/innobase/include/buf0buf.h (+31/-2)
Percona-Server/storage/innobase/include/buf0buf.ic (+19/-0)
Percona-Server/storage/innobase/include/fil0fil.h (+2/-0)
Percona-Server/storage/innobase/include/log0log.h (+3/-0)
Percona-Server/storage/innobase/page/page0page.c (+11/-10)
Percona-Server/storage/innobase/row/row0ins.c (+8/-1)
Percona-Server/storage/innobase/row/row0merge.c (+14/-0)
Percona-Server/storage/myisam/ha_myisam.cc (+2/-1)
Percona-Server/support-files/mysql.spec.sh (+28/-0)
Percona-Server/tests/mysql_client_fw.c (+11/-5)
Percona-Server/tests/mysql_client_test.c (+5/-2)
Percona-Server/vio/viosslfactories.c (+59/-41)
To merge this branch: bzr merge lp:~stewart/percona-server/5.5.28
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Needs Fixing
Alexey Kopytov (community) Approve
Review via email: mp+130457@code.launchpad.net

This proposal supersedes a proposal from 2012-10-12.

Description of the change

Merge MySQL 5.5.28

review comments done, resubmitted jenkins run:

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/559/

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

   Locking in i_s_innodb_fill_buffer_pool() is suspicious. We cannot
   just take the buffer pool mutex. In this case we probably need to
   lock the individual pages as we access them but please please
   please check this.

   Locking in i_s_innodb_fill_buffer_lru() is obviously wrong, please
   take the LRU list mutex.

   Please include (in a separate commit) a fix for another merge
   regression (bug
   https://bugs.launchpad.net/percona-server/5.5/+bug/1042640).

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

For updated tree:

Rev 309:

- buf_page_get_mutex return value NULL must be handled. I think it's easiest to use buf_page_get_mutex_enter() instead.
- No need to comment out removed upstream code, that style is from patch times when it was avoided to add or remove source lines without absolute necessity.
- Comment at 2971 should be removed.

Rev 310:

- Line 3512 fixes upstream bug, can you report it there, here and track that this is fixed?
- Comment at 3510 should be removed
- Same comments as for revision 309.

review: Needs Fixing
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

I am sorry, the above review is all for revision 309.

For rev 310:

- Same comments as for 309 re. commenting out code
- Please replace the commented out ut_ad() in buf_LRU_free_one_page with assert that LRU list mutex is held. The current code also introduces an unused variable buf_pool in debug builds.

review: Needs Fixing
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote : Posted in a previous version of this proposal

Finally, rev 309 should be merged with 5.5.28 merge revision.

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) wrote : Posted in a previous version of this proposal

> - Please replace the commented out ut_ad() in buf_LRU_free_one_page with
> assert that LRU list mutex is held. The current code also introduces an unused
> variable buf_pool in debug builds.

It's actually not unused in debug, there's a ut_ad() in the else block that uses it.

(and will be used by asserting LRU mutex is held)

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

Conflict in Makefile.

review: Needs Fixing
Revision history for this message
Stewart Smith (stewart) wrote :

> Conflict in Makefile.

fixed.

Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

My previous review comment was misleading, sorry about that: buf_page_get_mutex_enter() is better than buf_page_get_mutex() and mutex_enter() combination by preventing a race condition between the calls and not calling mutex_enter on NULL. But it still might return NULL, thus mutex_exit() still has to be conditional in i_s_innodb_fill_buffer_pool().

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2012-10-05 04:46:35 +0000
3+++ Makefile 2012-10-19 05:18:21 +0000
4@@ -1,7 +1,7 @@
5 FETCH_CMD=wget
6 MASTER_SITE=http://s3.amazonaws.com/percona.com/downloads/community
7-MYSQL_VERSION=5.5.27
8-PERCONA_SERVER_VERSION=rel29.0
9+MYSQL_VERSION=5.5.28
10+PERCONA_SERVER_VERSION=rel29.1
11 PERCONA_SERVER ?=Percona-Server-$(MYSQL_VERSION)-$(PERCONA_SERVER_VERSION)
12 PERCONA_SERVER_SHORT_1 ?=Percona-Server-$(MYSQL_VERSION)
13 PERCONA_SERVER_SHORT_2 ?=Percona-Server
14
15=== modified file 'Percona-Server/CMakeLists.txt'
16--- Percona-Server/CMakeLists.txt 2012-09-26 13:20:49 +0000
17+++ Percona-Server/CMakeLists.txt 2012-10-19 05:18:21 +0000
18@@ -334,6 +334,9 @@
19 IF(UNIX)
20 ADD_SUBDIRECTORY(man)
21 ENDIF()
22+ IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
23+ ADD_SUBDIRECTORY(internal)
24+ ENDIF()
25 ENDIF()
26
27 INCLUDE(cmake/abi_check.cmake)
28
29=== modified file 'Percona-Server/Docs/INSTALL-BINARY'
30--- Percona-Server/Docs/INSTALL-BINARY 2012-08-20 00:29:22 +0000
31+++ Percona-Server/Docs/INSTALL-BINARY 2012-10-19 05:18:21 +0000
32@@ -1,8 +1,8 @@
33
34-You can find information about how to install binary distributions at
35+You can find information about installing MySQL at
36
37- http://dev.mysql.com/doc/refman/5.1/en/quick-standard-installation.html
38+ http://dev.mysql.com/doc/refman/5.5/en/installing.html
39
40 The MySQL Reference Manual is also available in various formats on
41 http://dev.mysql.com/doc; if you're interested in the DocBook XML
42-sources go to http://svn.mysql.com.
43+sources go to http://dev.mysql.com/doc/index-other.html.
44
45=== modified file 'Percona-Server/VERSION'
46--- Percona-Server/VERSION 2012-08-07 06:10:00 +0000
47+++ Percona-Server/VERSION 2012-10-19 05:18:21 +0000
48@@ -1,4 +1,4 @@
49 MYSQL_VERSION_MAJOR=5
50 MYSQL_VERSION_MINOR=5
51-MYSQL_VERSION_PATCH=27
52+MYSQL_VERSION_PATCH=28
53 MYSQL_VERSION_EXTRA=
54
55=== modified file 'Percona-Server/client/mysql.cc'
56--- Percona-Server/client/mysql.cc 2012-08-07 06:10:00 +0000
57+++ Percona-Server/client/mysql.cc 2012-10-19 05:18:21 +0000
58@@ -1,5 +1,5 @@
59 /*
60- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
61+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
62
63 This program is free software; you can redistribute it and/or modify
64 it under the terms of the GNU General Public License as published by
65@@ -1187,7 +1187,7 @@
66 mysql_thread_id(&mysql), server_version_string(&mysql));
67 put_info((char*) glob_buffer.ptr(),INFO_INFO);
68
69- put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"), INFO_INFO);
70+ put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
71
72 #ifdef HAVE_READLINE
73 initialize_readline((char*) my_progname);
74@@ -1617,7 +1617,7 @@
75
76 if (version)
77 return;
78- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
79+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
80 printf("Usage: %s [OPTIONS] [database]\n", my_progname);
81 my_print_help(my_long_options);
82 print_defaults("my", load_default_groups);
83@@ -2827,7 +2827,7 @@
84 char *line __attribute__((unused)), char *help_arg)
85 {
86 MYSQL_ROW cur;
87- const char *server_cmd= buffer->ptr();
88+ const char *server_cmd;
89 char cmd_buf[100 + 1];
90 MYSQL_RES *result;
91 int error;
92@@ -2842,9 +2842,12 @@
93 *++end_arg= '\0';
94 }
95 (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
96- server_cmd= cmd_buf;
97 }
98-
99+ else
100+ (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help ", help_arg, NullS);
101+
102+ server_cmd= cmd_buf;
103+
104 if (!status.batch)
105 {
106 old_buffer= *buffer;
107@@ -2912,6 +2915,11 @@
108 else
109 {
110 put_info("\nNothing found", INFO_INFO);
111+ if (strncasecmp(server_cmd, "help 'contents'", 15) == 0)
112+ {
113+ put_info("\nPlease check if 'help tables' are loaded.\n", INFO_INFO);
114+ goto err;
115+ }
116 put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
117 }
118 }
119
120=== modified file 'Percona-Server/client/mysql_upgrade.c'
121--- Percona-Server/client/mysql_upgrade.c 2011-12-21 15:26:11 +0000
122+++ Percona-Server/client/mysql_upgrade.c 2012-10-19 05:18:21 +0000
123@@ -1,5 +1,5 @@
124 /*
125- Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
126+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
127
128 This program is free software; you can redistribute it and/or modify
129 it under the terms of the GNU General Public License as published by
130@@ -245,7 +245,7 @@
131 case '?':
132 printf("%s Ver %s Distrib %s, for %s (%s)\n",
133 my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
134- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
135+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
136 puts("MySQL utility for upgrading databases to new MySQL versions.\n");
137 my_print_help(my_long_options);
138 exit(0);
139
140=== modified file 'Percona-Server/client/mysqladmin.cc'
141--- Percona-Server/client/mysqladmin.cc 2012-07-05 06:55:20 +0000
142+++ Percona-Server/client/mysqladmin.cc 2012-10-19 05:18:21 +0000
143@@ -1,4 +1,5 @@
144-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
145+/*
146+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
147
148 This program is free software; you can redistribute it and/or modify
149 it under the terms of the GNU General Public License as published by
150@@ -701,7 +702,7 @@
151 case ADMIN_VER:
152 new_line=1;
153 print_version();
154- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
155+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
156 printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
157 printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
158 printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
159@@ -1099,7 +1100,7 @@
160 static void usage(void)
161 {
162 print_version();
163- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
164+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
165 puts("Administration program for the mysqld daemon.");
166 printf("Usage: %s [OPTIONS] command command....\n", my_progname);
167 my_print_help(my_long_options);
168
169=== modified file 'Percona-Server/client/mysqlbinlog.cc'
170--- Percona-Server/client/mysqlbinlog.cc 2012-09-17 13:08:32 +0000
171+++ Percona-Server/client/mysqlbinlog.cc 2012-10-19 05:18:21 +0000
172@@ -36,6 +36,7 @@
173 #include "sql_priv.h"
174 #include "log_event.h"
175 #include "sql_common.h"
176+#include "my_dir.h"
177 #include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
178
179 #define BIN_LOG_HEADER_SIZE 4
180@@ -1285,7 +1286,7 @@
181 static void usage()
182 {
183 print_version();
184- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
185+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
186 printf("\
187 Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
188 the mysql command line client.\n\n");
189@@ -1775,6 +1776,7 @@
190 uchar header[BIN_LOG_HEADER_SIZE];
191 uchar buf[PROBE_HEADER_LEN];
192 my_off_t tmp_pos, pos;
193+ MY_STAT my_file_stat;
194
195 delete glob_description_event;
196 if (!(glob_description_event= new Format_description_log_event(3)))
197@@ -1785,6 +1787,16 @@
198
199 pos= my_b_tell(file);
200 DBUG_ASSERT(pos == 0);
201+
202+ /* fstat the file to check if the file is a regular file. */
203+ if (my_fstat(file->file, &my_file_stat, MYF(0)) == -1)
204+ {
205+ error("Unable to stat the file.");
206+ return ERROR_STOP;
207+ }
208+ if ((my_file_stat.st_mode & S_IFMT) == S_IFREG)
209+ my_b_seek(file, (my_off_t)0);
210+
211 if (my_b_read(file, header, sizeof(header)))
212 {
213 error("Failed reading header; probably an empty file.");
214
215=== modified file 'Percona-Server/client/mysqlcheck.c'
216--- Percona-Server/client/mysqlcheck.c 2011-07-22 07:50:44 +0000
217+++ Percona-Server/client/mysqlcheck.c 2012-10-19 05:18:21 +0000
218@@ -1,5 +1,5 @@
219 /*
220- Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
221+ Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
222
223 This program is free software; you can redistribute it and/or modify
224 it under the terms of the GNU General Public License as published by
225@@ -224,7 +224,7 @@
226 static void usage(void)
227 {
228 print_version();
229- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
230+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
231 puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
232 puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
233 puts("used at the same time. Not all options are supported by all storage engines.");
234
235=== modified file 'Percona-Server/client/mysqldump.c'
236--- Percona-Server/client/mysqldump.c 2012-09-17 13:08:32 +0000
237+++ Percona-Server/client/mysqldump.c 2012-10-19 05:18:21 +0000
238@@ -56,8 +56,6 @@
239
240 #include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
241
242-#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
243-
244 /* Exit codes */
245
246 #define EX_USAGE 1
247@@ -629,7 +627,7 @@
248 static void usage(void)
249 {
250 print_version();
251- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
252+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
253 puts("Dumping structure and contents of MySQL databases and tables.");
254 short_usage_sub();
255 print_defaults("my",load_default_groups);
256@@ -1888,7 +1886,9 @@
257 const char *str_create)
258 {
259 uint i;
260+#ifndef DBUG_OFF
261 my_bool body_found= 0;
262+#endif
263 char *create_stmt_ptr= NULL;
264 ulong create_stmt_len= 0;
265 MYSQL_FIELD *field;
266@@ -1906,7 +1906,9 @@
267 {
268 create_stmt_ptr= (*row)[i];
269 create_stmt_len= lengths[i];
270+#ifndef DBUG_OFF
271 body_found= 1;
272+#endif
273 }
274 else
275 {
276
277=== modified file 'Percona-Server/client/mysqlimport.c'
278--- Percona-Server/client/mysqlimport.c 2011-07-22 07:50:44 +0000
279+++ Percona-Server/client/mysqlimport.c 2012-10-19 05:18:21 +0000
280@@ -1,5 +1,5 @@
281 /*
282- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
283+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
284
285 This program is free software; you can redistribute it and/or modify
286 it under the terms of the GNU General Public License as published by
287@@ -38,8 +38,6 @@
288 pthread_cond_t count_threshhold;
289 #endif
290
291-#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
292-
293 static void db_error_with_table(MYSQL *mysql, char *table);
294 static void db_error(MYSQL *mysql);
295 static char *field_escape(char *to,const char *from,uint length);
296@@ -199,7 +197,7 @@
297 static void usage(void)
298 {
299 print_version();
300- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
301+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
302 printf("\
303 Loads tables from text files in various formats. The base name of the\n\
304 text file must be the name of the table that should be used.\n\
305
306=== modified file 'Percona-Server/client/mysqlshow.c'
307--- Percona-Server/client/mysqlshow.c 2011-07-22 07:50:44 +0000
308+++ Percona-Server/client/mysqlshow.c 2012-10-19 05:18:21 +0000
309@@ -1,5 +1,5 @@
310 /*
311- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
312+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
313
314 This program is free software; you can redistribute it and/or modify
315 it under the terms of the GNU General Public License as published by
316@@ -264,7 +264,7 @@
317 static void usage(void)
318 {
319 print_version();
320- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011)"));
321+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
322 puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
323 printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
324 puts("\n\
325
326=== modified file 'Percona-Server/client/mysqlslap.c'
327--- Percona-Server/client/mysqlslap.c 2012-07-05 06:55:20 +0000
328+++ Percona-Server/client/mysqlslap.c 2012-10-19 05:18:21 +0000
329@@ -1,5 +1,5 @@
330 /*
331- Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
332+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
333
334 This program is free software; you can redistribute it and/or modify
335 it under the terms of the GNU General Public License as published by
336@@ -710,7 +710,7 @@
337 static void usage(void)
338 {
339 print_version();
340- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
341+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005"));
342 puts("Run a query multiple times against the server.\n");
343 printf("Usage: %s [OPTIONS]\n",my_progname);
344 print_defaults("my",load_default_groups);
345
346=== modified file 'Percona-Server/client/mysqltest.cc'
347--- Percona-Server/client/mysqltest.cc 2012-09-17 13:08:32 +0000
348+++ Percona-Server/client/mysqltest.cc 2012-10-19 05:18:21 +0000
349@@ -6605,7 +6605,7 @@
350 void usage()
351 {
352 print_version();
353- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
354+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
355 printf("Runs a test against the mysql server and compares output with a results file.\n\n");
356 printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
357 my_print_help(my_long_options);
358
359=== modified file 'Percona-Server/client/sql_string.h'
360--- Percona-Server/client/sql_string.h 2012-05-10 07:49:14 +0000
361+++ Percona-Server/client/sql_string.h 2012-10-19 05:18:21 +0000
362@@ -1,7 +1,7 @@
363 #ifndef CLIENT_SQL_STRING_INCLUDED
364 #define CLIENT_SQL_STRING_INCLUDED
365
366-/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
367+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
368
369 This program is free software; you can redistribute it and/or modify
370 it under the terms of the GNU General Public License as published by
371@@ -192,8 +192,12 @@
372 }
373 bool real_alloc(uint32 arg_length); // Empties old string
374 bool realloc(uint32 arg_length);
375- inline void shrink(uint32 arg_length) // Shrink buffer
376+
377+ // Shrink the buffer, but only if it is allocated on the heap.
378+ inline void shrink(uint32 arg_length)
379 {
380+ if (!is_alloced())
381+ return;
382 if (arg_length < Alloced_length)
383 {
384 char *new_ptr;
385@@ -209,7 +213,7 @@
386 }
387 }
388 }
389- bool is_alloced() { return alloced; }
390+ bool is_alloced() const { return alloced; }
391 inline String& operator = (const String &s)
392 {
393 if (&s != this)
394
395=== modified file 'Percona-Server/cmake/ssl.cmake'
396--- Percona-Server/cmake/ssl.cmake 2011-06-30 15:46:53 +0000
397+++ Percona-Server/cmake/ssl.cmake 2012-10-19 05:18:21 +0000
398@@ -25,7 +25,7 @@
399 SET(SSL_LIBRARIES yassl taocrypt)
400 SET(SSL_INCLUDE_DIRS ${INC_DIRS})
401 SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
402- SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DYASSL_THREAD_SAFE")
403+ SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
404 CHANGE_SSL_SETTINGS("bundled")
405 #Remove -fno-implicit-templates
406 #(yassl sources cannot be compiled with it)
407
408=== modified file 'Percona-Server/extra/perror.c'
409--- Percona-Server/extra/perror.c 2011-07-03 23:48:19 +0000
410+++ Percona-Server/extra/perror.c 2012-10-19 05:18:21 +0000
411@@ -1,5 +1,5 @@
412 /*
413- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
414+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
415
416 This program is free software; you can redistribute it and/or modify
417 it under the terms of the GNU General Public License as published by
418@@ -28,6 +28,7 @@
419 #include "../storage/ndb/src/kernel/error/ndbd_exit_codes.c"
420 #include "../storage/ndb/include/mgmapi/mgmapi_error.h"
421 #endif
422+#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
423
424 static my_bool verbose, print_all_codes;
425
426@@ -114,7 +115,7 @@
427 static void usage(void)
428 {
429 print_version();
430- puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
431+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
432 printf("Print a description for a system error code or a MySQL error code.\n");
433 printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
434 printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
435
436=== modified file 'Percona-Server/extra/yassl/README'
437--- Percona-Server/extra/yassl/README 2012-03-02 12:12:07 +0000
438+++ Percona-Server/extra/yassl/README 2012-10-19 05:18:21 +0000
439@@ -12,7 +12,16 @@
440
441 *** end Note ***
442
443-yaSSL Release notes, version 2.1.2 (9/2/2011)
444+yaSSL Release notes, version 2.2.2 (7/5/2012)
445+
446+ This release of yaSSL contains bug fixes and more security checks around
447+ malicious certificates.
448+
449+See normal build instructions below under 1.0.6.
450+See libcurl build instructions below under 1.3.0 and note in 1.5.8.
451+
452+
453+*****************yaSSL Release notes, version 2.1.2 (9/2/2011)
454
455 This release of yaSSL contains bug fixes, better non-blocking support with
456 SSL_write, and OpenSSL RSA public key format support.
457
458=== modified file 'Percona-Server/extra/yassl/include/lock.hpp'
459--- Percona-Server/extra/yassl/include/lock.hpp 2010-12-28 23:47:05 +0000
460+++ Percona-Server/extra/yassl/include/lock.hpp 2012-10-19 05:18:21 +0000
461@@ -27,7 +27,7 @@
462 Visual Studio Source Annotations header (sourceannotations.h) fails
463 to compile if outside of the global namespace.
464 */
465-#ifdef YASSL_THREAD_SAFE
466+#ifdef MULTI_THREADED
467 #ifdef _WIN32
468 #include <windows.h>
469 #endif
470@@ -36,8 +36,9 @@
471 namespace yaSSL {
472
473
474-#ifdef YASSL_THREAD_SAFE
475+#ifdef MULTI_THREADED
476 #ifdef _WIN32
477+ #include <windows.h>
478
479 class Mutex {
480 CRITICAL_SECTION cs_;
481@@ -77,7 +78,7 @@
482 };
483
484 #endif // _WIN32
485-#else // YASSL_THREAD_SAFE (WE'RE SINGLE)
486+#else // MULTI_THREADED (WE'RE SINGLE)
487
488 class Mutex {
489 public:
490@@ -87,7 +88,7 @@
491 };
492 };
493
494-#endif // YASSL_THREAD_SAFE
495+#endif // MULTI_THREADED
496
497
498
499
500=== modified file 'Percona-Server/extra/yassl/include/openssl/ssl.h'
501--- Percona-Server/extra/yassl/include/openssl/ssl.h 2012-03-02 12:23:52 +0000
502+++ Percona-Server/extra/yassl/include/openssl/ssl.h 2012-10-19 05:18:21 +0000
503@@ -35,7 +35,7 @@
504 #include "rsa.h"
505
506
507-#define YASSL_VERSION "2.2.0"
508+#define YASSL_VERSION "2.2.2"
509
510
511 #if defined(__cplusplus)
512
513=== modified file 'Percona-Server/extra/yassl/include/yassl_error.hpp'
514--- Percona-Server/extra/yassl/include/yassl_error.hpp 2012-02-10 09:41:54 +0000
515+++ Percona-Server/extra/yassl/include/yassl_error.hpp 2012-10-19 05:18:21 +0000
516@@ -65,7 +65,7 @@
517 enum Library { yaSSL_Lib = 0, CryptoLib, SocketLib };
518 enum { MAX_ERROR_SZ = 80 };
519
520-void SetErrorString(unsigned long, char*);
521+void SetErrorString(YasslError, char*);
522
523 /* remove for now, if go back to exceptions use this wrapper
524 // Base class for all yaSSL exceptions
525
526=== modified file 'Percona-Server/extra/yassl/src/cert_wrapper.cpp'
527--- Percona-Server/extra/yassl/src/cert_wrapper.cpp 2012-02-13 12:44:54 +0000
528+++ Percona-Server/extra/yassl/src/cert_wrapper.cpp 2012-10-19 05:18:21 +0000
529@@ -250,8 +250,7 @@
530 TaoCrypt::Source source((*last)->get_buffer(), (*last)->get_length());
531 TaoCrypt::CertDecoder cert(source, true, &signers_, verifyNone_);
532
533- int err = cert.GetError().What();
534- if ( err )
535+ if (int err = cert.GetError().What())
536 return err;
537
538 const TaoCrypt::PublicKey& key = cert.GetPublicKey();
539
540=== modified file 'Percona-Server/extra/yassl/src/lock.cpp'
541--- Percona-Server/extra/yassl/src/lock.cpp 2010-12-28 18:57:23 +0000
542+++ Percona-Server/extra/yassl/src/lock.cpp 2012-10-19 05:18:21 +0000
543@@ -26,7 +26,7 @@
544 namespace yaSSL {
545
546
547-#ifdef YASSL_THREAD_SAFE
548+#ifdef MULTI_THREADED
549 #ifdef _WIN32
550
551 Mutex::Mutex()
552@@ -79,7 +79,7 @@
553
554
555 #endif // _WIN32
556-#endif // YASSL_THREAD_SAFE
557+#endif // MULTI_THREADED
558
559
560
561
562=== modified file 'Percona-Server/extra/yassl/src/ssl.cpp'
563--- Percona-Server/extra/yassl/src/ssl.cpp 2012-02-13 12:44:54 +0000
564+++ Percona-Server/extra/yassl/src/ssl.cpp 2012-10-19 05:18:21 +0000
565@@ -27,7 +27,6 @@
566
567
568
569-
570 /* see man pages for function descriptions */
571
572 #include "runtime.hpp"
573@@ -747,7 +746,7 @@
574 int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
575 const char* path)
576 {
577- int ret = SSL_SUCCESS;
578+ int ret = SSL_FAILURE;
579 const int HALF_PATH = 128;
580
581 if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA);
582@@ -1014,7 +1013,7 @@
583 static char* msg = (char*)"Please supply a buffer for error string";
584
585 if (buffer) {
586- SetErrorString(errNumber, buffer);
587+ SetErrorString(YasslError(errNumber), buffer);
588 return buffer;
589 }
590
591
592=== modified file 'Percona-Server/extra/yassl/src/yassl_error.cpp'
593--- Percona-Server/extra/yassl/src/yassl_error.cpp 2012-02-13 12:44:54 +0000
594+++ Percona-Server/extra/yassl/src/yassl_error.cpp 2012-10-19 05:18:21 +0000
595@@ -31,11 +31,6 @@
596 #pragma warning(disable: 4996)
597 #endif
598
599-#ifdef _MSC_VER
600- // 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy
601- #pragma warning(disable: 4996)
602-#endif
603-
604 namespace yaSSL {
605
606
607@@ -60,7 +55,7 @@
608 */
609
610
611-void SetErrorString(unsigned long error, char* buffer)
612+void SetErrorString(YasslError error, char* buffer)
613 {
614 using namespace TaoCrypt;
615 const int max = MAX_ERROR_SZ; // shorthand
616
617=== modified file 'Percona-Server/extra/yassl/taocrypt/include/aes.hpp'
618--- Percona-Server/extra/yassl/taocrypt/include/aes.hpp 2007-01-29 15:54:40 +0000
619+++ Percona-Server/extra/yassl/taocrypt/include/aes.hpp 2012-10-19 05:18:21 +0000
620@@ -92,7 +92,6 @@
621 typedef BlockCipher<DECRYPTION, AES, CBC> AES_CBC_Decryption;
622
623
624-
625 } // naemspace
626
627 #endif // TAO_CRYPT_AES_HPP
628
629=== modified file 'Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp'
630--- Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp 2012-02-10 14:33:27 +0000
631+++ Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp 2012-10-19 05:18:21 +0000
632@@ -48,9 +48,11 @@
633 word32 pLen, const byte* salt, word32 sLen,
634 word32 iterations) const
635 {
636- if (dLen > MaxDerivedKeyLength())
637+ if (dLen > MaxDerivedKeyLength())
638 return 0;
639
640+ if (iterations < 0)
641+ return 0;
642
643 ByteBlock buffer(T::DIGEST_SIZE);
644 HMAC<T> hmac;
645
646=== modified file 'Percona-Server/extra/yassl/taocrypt/src/asn.cpp'
647--- Percona-Server/extra/yassl/taocrypt/src/asn.cpp 2012-09-17 13:08:32 +0000
648+++ Percona-Server/extra/yassl/taocrypt/src/asn.cpp 2012-10-19 05:18:21 +0000
649@@ -154,6 +154,8 @@
650 else
651 length = b;
652
653+ if (source.IsLeft(length) == false) return 0;
654+
655 return length;
656 }
657
658@@ -832,7 +834,7 @@
659 if (email) {
660 if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length))) {
661 source_.SetError(CONTENT_E);
662- return;
663+ return;
664 }
665 }
666
667
668=== modified file 'Percona-Server/extra/yassl/taocrypt/src/coding.cpp'
669--- Percona-Server/extra/yassl/taocrypt/src/coding.cpp 2012-02-13 12:44:54 +0000
670+++ Percona-Server/extra/yassl/taocrypt/src/coding.cpp 2012-10-19 05:18:21 +0000
671@@ -103,6 +103,16 @@
672 byte b = coded_.next() - 0x30; // 0 starts at 0x30
673 byte b2 = coded_.next() - 0x30;
674
675+ // sanity checks
676+ if (b >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
677+ coded_.SetError(PEM_E);
678+ return;
679+ }
680+ if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0])) {
681+ coded_.SetError(PEM_E);
682+ return;
683+ }
684+
685 b = hexDecode[b];
686 b2 = hexDecode[b2];
687
688@@ -178,6 +188,7 @@
689 {
690 word32 bytes = coded_.size();
691 word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz);
692+ const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1;
693 plainSz = ((plainSz * 3) / 4) + 3;
694 decoded_.New(plainSz);
695
696@@ -200,6 +211,16 @@
697 if (e4 == pad)
698 pad4 = true;
699
700+ if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) {
701+ coded_.SetError(PEM_E);
702+ return;
703+ }
704+
705+ if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) {
706+ coded_.SetError(PEM_E);
707+ return;
708+ }
709+
710 e1 = base64Decode[e1 - 0x2B];
711 e2 = base64Decode[e2 - 0x2B];
712 e3 = (e3 == pad) ? 0 : base64Decode[e3 - 0x2B];
713
714=== removed file 'Percona-Server/extra/yassl/taocrypt/src/crypto.cpp'
715--- Percona-Server/extra/yassl/taocrypt/src/crypto.cpp 2007-08-28 08:35:55 +0000
716+++ Percona-Server/extra/yassl/taocrypt/src/crypto.cpp 1970-01-01 00:00:00 +0000
717@@ -1,37 +0,0 @@
718-/*
719- Copyright (C) 2000-2007 MySQL AB
720-
721- This program is free software; you can redistribute it and/or modify
722- it under the terms of the GNU General Public License as published by
723- the Free Software Foundation; version 2 of the License.
724-
725- This program is distributed in the hope that it will be useful,
726- but WITHOUT ANY WARRANTY; without even the implied warranty of
727- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
728- GNU General Public License for more details.
729-
730- You should have received a copy of the GNU General Public License
731- along with this program; see the file COPYING. If not, write to the
732- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
733- MA 02110-1301 USA.
734-*/
735-
736-/* put features that other apps expect from OpenSSL type crypto */
737-
738-
739-
740-extern "C" {
741-
742- // for libcurl configure test, these are the signatures they use
743- // locking handled internally by library
744- char CRYPTO_lock() { return 0;}
745- char CRYPTO_add_lock() { return 0;}
746-
747-
748- // for openvpn, test are the signatures they use
749- char EVP_CIPHER_CTX_init() { return 0; }
750- char CRYPTO_mem_ctrl() { return 0; }
751-} // extern "C"
752-
753-
754-
755
756=== modified file 'Percona-Server/extra/yassl/taocrypt/taocrypt.dsw'
757--- Percona-Server/extra/yassl/taocrypt/taocrypt.dsw 2005-04-28 13:23:27 +0000
758+++ Percona-Server/extra/yassl/taocrypt/taocrypt.dsw 2012-10-19 05:18:21 +0000
759@@ -3,6 +3,21 @@
760
761 ###############################################################################
762
763+Project: "benchmark"=.\benchmark\benchmark.dsp - Package Owner=<4>
764+
765+Package=<5>
766+{{{
767+}}}
768+
769+Package=<4>
770+{{{
771+ Begin Project Dependency
772+ Project_Dep_Name taocrypt
773+ End Project Dependency
774+}}}
775+
776+###############################################################################
777+
778 Project: "taocrypt"=.\taocrypt.dsp - Package Owner=<4>
779
780 Package=<5>
781@@ -15,7 +30,7 @@
782
783 ###############################################################################
784
785-Project: "test"=.\test.dsp - Package Owner=<4>
786+Project: "test"=.\test\test.dsp - Package Owner=<4>
787
788 Package=<5>
789 {{{
790
791=== removed file 'Percona-Server/extra/yassl/taocrypt/test.dsp'
792--- Percona-Server/extra/yassl/taocrypt/test.dsp 2006-11-29 13:35:59 +0000
793+++ Percona-Server/extra/yassl/taocrypt/test.dsp 1970-01-01 00:00:00 +0000
794@@ -1,102 +0,0 @@
795-# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4>
796-# Microsoft Developer Studio Generated Build File, Format Version 6.00
797-# ** DO NOT EDIT **
798-
799-# TARGTYPE "Win32 (x86) Console Application" 0x0103
800-
801-CFG=test - Win32 Debug
802-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
803-!MESSAGE use the Export Makefile command and run
804-!MESSAGE
805-!MESSAGE NMAKE /f "test.mak".
806-!MESSAGE
807-!MESSAGE You can specify a configuration when running NMAKE
808-!MESSAGE by defining the macro CFG on the command line. For example:
809-!MESSAGE
810-!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
811-!MESSAGE
812-!MESSAGE Possible choices for configuration are:
813-!MESSAGE
814-!MESSAGE "test - Win32 Release" (based on "Win32 (x86) Console Application")
815-!MESSAGE "test - Win32 Debug" (based on "Win32 (x86) Console Application")
816-!MESSAGE
817-
818-# Begin Project
819-# PROP AllowPerConfigDependencies 0
820-# PROP Scc_ProjName ""
821-# PROP Scc_LocalPath ""
822-CPP=cl.exe
823-RSC=rc.exe
824-
825-!IF "$(CFG)" == "test - Win32 Release"
826-
827-# PROP BASE Use_MFC 0
828-# PROP BASE Use_Debug_Libraries 0
829-# PROP BASE Output_Dir "test___Win32_Release"
830-# PROP BASE Intermediate_Dir "test___Win32_Release"
831-# PROP BASE Target_Dir ""
832-# PROP Use_MFC 0
833-# PROP Use_Debug_Libraries 0
834-# PROP Output_Dir "test\Release"
835-# PROP Intermediate_Dir "test\Release"
836-# PROP Ignore_Export_Lib 0
837-# PROP Target_Dir ""
838-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
839-# ADD CPP /nologo /MT /W3 /O2 /I "include" /I "mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
840-# ADD BASE RSC /l 0x409 /d "NDEBUG"
841-# ADD RSC /l 0x409 /d "NDEBUG"
842-BSC32=bscmake.exe
843-# ADD BASE BSC32 /nologo
844-# ADD BSC32 /nologo
845-LINK32=link.exe
846-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
847-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
848-
849-!ELSEIF "$(CFG)" == "test - Win32 Debug"
850-
851-# PROP BASE Use_MFC 0
852-# PROP BASE Use_Debug_Libraries 1
853-# PROP BASE Output_Dir "test___Win32_Debug"
854-# PROP BASE Intermediate_Dir "test___Win32_Debug"
855-# PROP BASE Target_Dir ""
856-# PROP Use_MFC 0
857-# PROP Use_Debug_Libraries 1
858-# PROP Output_Dir "test\Debug"
859-# PROP Intermediate_Dir "test\Debug"
860-# PROP Ignore_Export_Lib 0
861-# PROP Target_Dir ""
862-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
863-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "include" /I "mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
864-# ADD BASE RSC /l 0x409 /d "_DEBUG"
865-# ADD RSC /l 0x409 /d "_DEBUG"
866-BSC32=bscmake.exe
867-# ADD BASE BSC32 /nologo
868-# ADD BSC32 /nologo
869-LINK32=link.exe
870-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
871-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
872-
873-!ENDIF
874-
875-# Begin Target
876-
877-# Name "test - Win32 Release"
878-# Name "test - Win32 Debug"
879-# Begin Group "Source Files"
880-
881-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
882-# Begin Source File
883-
884-SOURCE=.\test\test.cpp
885-# End Source File
886-# End Group
887-# Begin Group "Header Files"
888-
889-# PROP Default_Filter "h;hpp;hxx;hm;inl"
890-# End Group
891-# Begin Group "Resource Files"
892-
893-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
894-# End Group
895-# End Target
896-# End Project
897
898=== modified file 'Percona-Server/extra/yassl/taocrypt/test/memory.cpp'
899--- Percona-Server/extra/yassl/taocrypt/test/memory.cpp 2012-02-10 14:33:27 +0000
900+++ Percona-Server/extra/yassl/taocrypt/test/memory.cpp 2012-10-19 05:18:21 +0000
901@@ -31,7 +31,7 @@
902 To use MemoryTracker merely add this file to your project
903 No need to instantiate anything
904
905-If your app is multi threaded define YASSL_THREAD_SAFE
906+If your app is multi threaded define MULTI_THREADED
907
908 *********************************************************************/
909
910
911=== added file 'Percona-Server/extra/yassl/taocrypt/test/test.dsp'
912--- Percona-Server/extra/yassl/taocrypt/test/test.dsp 1970-01-01 00:00:00 +0000
913+++ Percona-Server/extra/yassl/taocrypt/test/test.dsp 2012-10-19 05:18:21 +0000
914@@ -0,0 +1,102 @@
915+# Microsoft Developer Studio Project File - Name="test" - Package Owner=<4>
916+# Microsoft Developer Studio Generated Build File, Format Version 6.00
917+# ** DO NOT EDIT **
918+
919+# TARGTYPE "Win32 (x86) Console Application" 0x0103
920+
921+CFG=test - Win32 Debug
922+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
923+!MESSAGE use the Export Makefile command and run
924+!MESSAGE
925+!MESSAGE NMAKE /f "test.mak".
926+!MESSAGE
927+!MESSAGE You can specify a configuration when running NMAKE
928+!MESSAGE by defining the macro CFG on the command line. For example:
929+!MESSAGE
930+!MESSAGE NMAKE /f "test.mak" CFG="test - Win32 Debug"
931+!MESSAGE
932+!MESSAGE Possible choices for configuration are:
933+!MESSAGE
934+!MESSAGE "test - Win32 Release" (based on "Win32 (x86) Console Application")
935+!MESSAGE "test - Win32 Debug" (based on "Win32 (x86) Console Application")
936+!MESSAGE
937+
938+# Begin Project
939+# PROP AllowPerConfigDependencies 0
940+# PROP Scc_ProjName ""
941+# PROP Scc_LocalPath ""
942+CPP=cl.exe
943+RSC=rc.exe
944+
945+!IF "$(CFG)" == "test - Win32 Release"
946+
947+# PROP BASE Use_MFC 0
948+# PROP BASE Use_Debug_Libraries 0
949+# PROP BASE Output_Dir "test___Win32_Release"
950+# PROP BASE Intermediate_Dir "test___Win32_Release"
951+# PROP BASE Target_Dir ""
952+# PROP Use_MFC 0
953+# PROP Use_Debug_Libraries 0
954+# PROP Output_Dir "Release"
955+# PROP Intermediate_Dir "Release"
956+# PROP Ignore_Export_Lib 0
957+# PROP Target_Dir ""
958+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
959+# ADD CPP /nologo /MD /W3 /O2 /I "../include" /I "../mySTL" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /c
960+# ADD BASE RSC /l 0x409 /d "NDEBUG"
961+# ADD RSC /l 0x409 /d "NDEBUG"
962+BSC32=bscmake.exe
963+# ADD BASE BSC32 /nologo
964+# ADD BSC32 /nologo
965+LINK32=link.exe
966+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
967+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
968+
969+!ELSEIF "$(CFG)" == "test - Win32 Debug"
970+
971+# PROP BASE Use_MFC 0
972+# PROP BASE Use_Debug_Libraries 1
973+# PROP BASE Output_Dir "test___Win32_Debug"
974+# PROP BASE Intermediate_Dir "test___Win32_Debug"
975+# PROP BASE Target_Dir ""
976+# PROP Use_MFC 0
977+# PROP Use_Debug_Libraries 1
978+# PROP Output_Dir "Debug"
979+# PROP Intermediate_Dir "Debug"
980+# PROP Ignore_Export_Lib 0
981+# PROP Target_Dir ""
982+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
983+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "../include" /I "../mySTL" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
984+# ADD BASE RSC /l 0x409 /d "_DEBUG"
985+# ADD RSC /l 0x409 /d "_DEBUG"
986+BSC32=bscmake.exe
987+# ADD BASE BSC32 /nologo
988+# ADD BSC32 /nologo
989+LINK32=link.exe
990+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
991+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
992+
993+!ENDIF
994+
995+# Begin Target
996+
997+# Name "test - Win32 Release"
998+# Name "test - Win32 Debug"
999+# Begin Group "Source Files"
1000+
1001+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
1002+# Begin Source File
1003+
1004+SOURCE=.\test.cpp
1005+# End Source File
1006+# End Group
1007+# Begin Group "Header Files"
1008+
1009+# PROP Default_Filter "h;hpp;hxx;hm;inl"
1010+# End Group
1011+# Begin Group "Resource Files"
1012+
1013+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
1014+# End Group
1015+# End Target
1016+# End Project
1017
1018=== modified file 'Percona-Server/extra/yassl/yassl.dsw'
1019--- Percona-Server/extra/yassl/yassl.dsw 2006-04-07 09:35:12 +0000
1020+++ Percona-Server/extra/yassl/yassl.dsw 2012-10-19 05:18:21 +0000
1021@@ -90,7 +90,7 @@
1022
1023 ###############################################################################
1024
1025-Project: "test"=.\taocrypt\test.dsp - Package Owner=<4>
1026+Project: "test"=.\taocrypt\test\test.dsp - Package Owner=<4>
1027
1028 Package=<5>
1029 {{{
1030@@ -114,9 +114,6 @@
1031 Package=<4>
1032 {{{
1033 Begin Project Dependency
1034- Project_Dep_Name taocrypt
1035- End Project Dependency
1036- Begin Project Dependency
1037 Project_Dep_Name yassl
1038 End Project Dependency
1039 }}}
1040
1041=== modified file 'Percona-Server/include/mysql/thread_pool_priv.h'
1042--- Percona-Server/include/mysql/thread_pool_priv.h 2011-06-30 15:46:53 +0000
1043+++ Percona-Server/include/mysql/thread_pool_priv.h 2012-10-19 05:18:21 +0000
1044@@ -35,6 +35,7 @@
1045 #include <debug_sync.h>
1046 #include <sql_profile.h>
1047 #include <table.h>
1048+#include <sql_list.h>
1049
1050 /* Needed to get access to scheduler variables */
1051 void* thd_get_scheduler_data(THD *thd);
1052@@ -56,9 +57,14 @@
1053 bool thd_is_transaction_active(THD *thd);
1054 int thd_connection_has_data(THD *thd);
1055 void thd_set_net_read_write(THD *thd, uint val);
1056+uint thd_get_net_read_write(THD *thd);
1057 void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
1058+ulong thd_get_net_wait_timeout(THD *thd);
1059 my_socket thd_get_fd(THD *thd);
1060
1061+THD *first_global_thread();
1062+THD *next_global_thread(THD *thd);
1063+
1064 /* Print to the MySQL error log */
1065 void sql_print_error(const char *format, ...);
1066
1067
1068=== modified file 'Percona-Server/include/welcome_copyright_notice.h'
1069--- Percona-Server/include/welcome_copyright_notice.h 2012-02-16 09:48:16 +0000
1070+++ Percona-Server/include/welcome_copyright_notice.h 2012-10-19 05:18:21 +0000
1071@@ -1,4 +1,4 @@
1072-/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
1073+/* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
1074
1075 This program is free software; you can redistribute it and/or modify
1076 it under the terms of the GNU General Public License as published by
1077@@ -16,16 +16,21 @@
1078 #ifndef _welcome_copyright_notice_h_
1079 #define _welcome_copyright_notice_h_
1080
1081+#define COPYRIGHT_NOTICE_CURRENT_YEAR "2012"
1082+
1083 /*
1084 This define specifies copyright notice which is displayed by every MySQL
1085 program on start, or on help screen.
1086 */
1087-
1088-#define ORACLE_WELCOME_COPYRIGHT_NOTICE(years) \
1089- "Copyright (c) " years ", Oracle and/or its affiliates. All rights reserved.\n" \
1090- "\n" \
1091- "Oracle is a registered trademark of Oracle Corporation and/or its\n" \
1092- "affiliates. Other names may be trademarks of their respective\n" \
1093- "owners.\n"
1094+#define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \
1095+ (strcmp(first_year, COPYRIGHT_NOTICE_CURRENT_YEAR) ? \
1096+ "Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR ", " \
1097+ "Oracle and/or its affiliates. All rights reserved.\n\nOracle is a " \
1098+ "registered trademark of Oracle Corporation and/or its\naffiliates. " \
1099+ "Other names may be trademarks of their respective\nowners.\n" : \
1100+ "Copyright (c) " first_year ", Oracle and/or its affiliates. " \
1101+ "All rights reserved.\n\nOracle is a registered trademark of " \
1102+ "Oracle Corporation and/or its\naffiliates. Other names may be " \
1103+ "trademarks of their respective\nowners.\n")
1104
1105 #endif /* _welcome_copyright_notice_h_ */
1106
1107=== modified file 'Percona-Server/libmysqld/lib_sql.cc'
1108--- Percona-Server/libmysqld/lib_sql.cc 2012-09-17 13:08:32 +0000
1109+++ Percona-Server/libmysqld/lib_sql.cc 2012-10-19 05:18:21 +0000
1110@@ -790,6 +790,7 @@
1111 cur_data= 0;
1112 }
1113
1114+
1115 static char *dup_str_aux(MEM_ROOT *root, const char *from, uint length,
1116 CHARSET_INFO *fromcs, CHARSET_INFO *tocs)
1117 {
1118
1119=== modified file 'Percona-Server/mysql-test/r/information_schema.result'
1120--- Percona-Server/mysql-test/r/information_schema.result 2012-09-17 13:08:32 +0000
1121+++ Percona-Server/mysql-test/r/information_schema.result 2012-10-19 05:18:21 +0000
1122@@ -888,6 +888,8 @@
1123 FILES TABLE_NAME select
1124 GLOBAL_TEMPORARY_TABLES TABLE_NAME select
1125 INDEX_STATISTICS TABLE_NAME select
1126+INNODB_BUFFER_PAGE TABLE_NAME select
1127+INNODB_BUFFER_PAGE_LRU TABLE_NAME select
1128 INNODB_INDEX_STATS table_name select
1129 INNODB_TABLE_STATS table_name select
1130 KEY_COLUMN_USAGE TABLE_NAME select
1131
1132=== modified file 'Percona-Server/mysql-test/r/log_state.result'
1133--- Percona-Server/mysql-test/r/log_state.result 2010-06-22 20:32:29 +0000
1134+++ Percona-Server/mysql-test/r/log_state.result 2012-10-19 05:18:21 +0000
1135@@ -199,7 +199,7 @@
1136 1 1
1137 SET GLOBAL log = 0;
1138 Warnings:
1139-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1140+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1141 SHOW VARIABLES LIKE 'general_log';
1142 Variable_name Value
1143 general_log OFF
1144@@ -230,7 +230,7 @@
1145 0 0
1146 SET GLOBAL log_slow_queries = 0;
1147 Warnings:
1148-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
1149+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
1150 SHOW VARIABLES LIKE 'slow_query_log';
1151 Variable_name Value
1152 slow_query_log OFF
1153@@ -283,16 +283,16 @@
1154 deprecated:
1155 SET GLOBAL log = 0;
1156 Warnings:
1157-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1158+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1159 SET GLOBAL log_slow_queries = 0;
1160 Warnings:
1161-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
1162+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
1163 SET GLOBAL log = DEFAULT;
1164 Warnings:
1165-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1166+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1167 SET GLOBAL log_slow_queries = DEFAULT;
1168 Warnings:
1169-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
1170+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
1171 not deprecated:
1172 SELECT @@global.general_log_file INTO @my_glf;
1173 SELECT @@global.slow_query_log_file INTO @my_sqlf;
1174
1175=== modified file 'Percona-Server/mysql-test/r/mysqlshow.result'
1176--- Percona-Server/mysql-test/r/mysqlshow.result 2012-09-17 13:08:32 +0000
1177+++ Percona-Server/mysql-test/r/mysqlshow.result 2012-10-19 05:18:21 +0000
1178@@ -125,8 +125,8 @@
1179 | INNODB_LOCK_WAITS |
1180 | INNODB_INDEX_STATS |
1181 | INNODB_CMP |
1182-| INNODB_SYS_FOREIGN_COLS |
1183 | INNODB_CMP_RESET |
1184+| INNODB_CHANGED_PAGES |
1185 | INNODB_BUFFER_POOL_PAGES |
1186 | INNODB_TRX |
1187 | INNODB_BUFFER_POOL_PAGES_INDEX |
1188@@ -135,12 +135,15 @@
1189 | INNODB_SYS_TABLES |
1190 | INNODB_SYS_FIELDS |
1191 | INNODB_SYS_COLUMNS |
1192-| INNODB_CHANGED_PAGES |
1193+| INNODB_BUFFER_PAGE |
1194 | INNODB_SYS_STATS |
1195 | INNODB_SYS_FOREIGN |
1196 | INNODB_SYS_INDEXES |
1197 | XTRADB_ADMIN_COMMAND |
1198 | INNODB_TABLE_STATS |
1199+| INNODB_SYS_FOREIGN_COLS |
1200+| INNODB_BUFFER_PAGE_LRU |
1201+| INNODB_BUFFER_POOL_STATS |
1202 +---------------------------------------+
1203 Database: INFORMATION_SCHEMA
1204 +---------------------------------------+
1205@@ -192,8 +195,8 @@
1206 | INNODB_LOCK_WAITS |
1207 | INNODB_INDEX_STATS |
1208 | INNODB_CMP |
1209-| INNODB_SYS_FOREIGN_COLS |
1210 | INNODB_CMP_RESET |
1211+| INNODB_CHANGED_PAGES |
1212 | INNODB_BUFFER_POOL_PAGES |
1213 | INNODB_TRX |
1214 | INNODB_BUFFER_POOL_PAGES_INDEX |
1215@@ -202,12 +205,15 @@
1216 | INNODB_SYS_TABLES |
1217 | INNODB_SYS_FIELDS |
1218 | INNODB_SYS_COLUMNS |
1219-| INNODB_CHANGED_PAGES |
1220+| INNODB_BUFFER_PAGE |
1221 | INNODB_SYS_STATS |
1222 | INNODB_SYS_FOREIGN |
1223 | INNODB_SYS_INDEXES |
1224 | XTRADB_ADMIN_COMMAND |
1225 | INNODB_TABLE_STATS |
1226+| INNODB_SYS_FOREIGN_COLS |
1227+| INNODB_BUFFER_PAGE_LRU |
1228+| INNODB_BUFFER_POOL_STATS |
1229 +---------------------------------------+
1230 Wildcard: inf_rmation_schema
1231 +--------------------+
1232
1233=== modified file 'Percona-Server/mysql-test/r/openssl_1.result'
1234--- Percona-Server/mysql-test/r/openssl_1.result 2011-05-19 09:47:43 +0000
1235+++ Percona-Server/mysql-test/r/openssl_1.result 2012-10-19 05:18:21 +0000
1236@@ -44,9 +44,9 @@
1237 drop user ssl_user1@localhost, ssl_user2@localhost,
1238 ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
1239 drop table t1;
1240-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
1241-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
1242-mysqltest: Could not open connection 'default': 2026 SSL connection error: ASN: bad other signature confirmation
1243+mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
1244+mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
1245+mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
1246 SSL error: Unable to get private key from ''
1247 mysqltest: Could not open connection 'default': 2026 SSL connection error: Unable to get private key
1248 SSL error: Unable to get certificate from ''
1249
1250=== modified file 'Percona-Server/mysql-test/r/subselect.result'
1251--- Percona-Server/mysql-test/r/subselect.result 2012-04-10 11:23:17 +0000
1252+++ Percona-Server/mysql-test/r/subselect.result 2012-10-19 05:18:21 +0000
1253@@ -4562,8 +4562,6 @@
1254 WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
1255 pk a
1256 1 10
1257-3 30
1258-2 20
1259 DROP TABLE t1,t2;
1260 CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), KEY b (b));
1261 INSERT INTO t1 VALUES (1,NULL), (9,NULL);
1262
1263=== modified file 'Percona-Server/mysql-test/r/variables.result'
1264--- Percona-Server/mysql-test/r/variables.result 2011-03-28 10:57:54 +0000
1265+++ Percona-Server/mysql-test/r/variables.result 2012-10-19 05:18:21 +0000
1266@@ -545,7 +545,7 @@
1267 set read_rnd_buffer_size=100;
1268 set global rpl_recovery_rank=100;
1269 Warnings:
1270-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
1271+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
1272 set global server_id=100;
1273 set global slow_launch_time=100;
1274 set sort_buffer_size=100;
1275@@ -1068,7 +1068,7 @@
1276 set global query_cache_type =@my_query_cache_type;
1277 set global rpl_recovery_rank =@my_rpl_recovery_rank;
1278 Warnings:
1279-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
1280+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
1281 set global server_id =@my_server_id;
1282 set global slow_launch_time =@my_slow_launch_time;
1283 set global default_storage_engine =@my_storage_engine;
1284
1285=== modified file 'Percona-Server/mysql-test/suite/federated/federated.test'
1286--- Percona-Server/mysql-test/suite/federated/federated.test 2011-11-21 11:28:35 +0000
1287+++ Percona-Server/mysql-test/suite/federated/federated.test 2012-10-19 05:18:21 +0000
1288@@ -4,7 +4,7 @@
1289 #
1290
1291
1292---source federated.inc
1293+--source suite/federated/include/federated.inc
1294
1295 connection default;
1296
1297@@ -1997,4 +1997,4 @@
1298 SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
1299
1300 connection default;
1301-source federated_cleanup.inc;
1302+source suite/federated/include/federated_cleanup.inc;
1303
1304=== modified file 'Percona-Server/mysql-test/suite/federated/federated_archive.test'
1305--- Percona-Server/mysql-test/suite/federated/federated_archive.test 2007-12-12 17:19:24 +0000
1306+++ Percona-Server/mysql-test/suite/federated/federated_archive.test 2012-10-19 05:18:21 +0000
1307@@ -1,5 +1,5 @@
1308 source include/have_archive.inc;
1309-source federated.inc;
1310+source suite/federated/include/federated.inc;
1311
1312
1313 connection slave;
1314@@ -54,5 +54,5 @@
1315 DROP TABLE federated.archive_table;
1316
1317
1318-source federated_cleanup.inc;
1319+source suite/federated/include/federated_cleanup.inc;
1320
1321
1322=== modified file 'Percona-Server/mysql-test/suite/federated/federated_bug_13118.test'
1323--- Percona-Server/mysql-test/suite/federated/federated_bug_13118.test 2007-12-12 17:19:24 +0000
1324+++ Percona-Server/mysql-test/suite/federated/federated_bug_13118.test 2012-10-19 05:18:21 +0000
1325@@ -1,4 +1,4 @@
1326-source federated.inc;
1327+source suite/federated/include/federated.inc;
1328
1329 connection slave;
1330 --disable_warnings
1331@@ -37,5 +37,5 @@
1332 DROP TABLE federated.bug_13118_table;
1333
1334
1335-source federated_cleanup.inc;
1336+source suite/federated/include/federated_cleanup.inc;
1337
1338
1339=== modified file 'Percona-Server/mysql-test/suite/federated/federated_bug_25714.test'
1340--- Percona-Server/mysql-test/suite/federated/federated_bug_25714.test 2010-11-17 10:16:13 +0000
1341+++ Percona-Server/mysql-test/suite/federated/federated_bug_25714.test 2012-10-19 05:18:21 +0000
1342@@ -4,7 +4,7 @@
1343 skip Need bug25714 test program;
1344 }
1345
1346-source federated.inc;
1347+source suite/federated/include/federated.inc;
1348
1349 connection master;
1350 # Disable concurrent inserts to avoid test failures when reading
1351@@ -59,4 +59,4 @@
1352
1353
1354
1355-source federated_cleanup.inc;
1356+source suite/federated/include/federated_cleanup.inc;
1357
1358=== modified file 'Percona-Server/mysql-test/suite/federated/federated_bug_35333.test'
1359--- Percona-Server/mysql-test/suite/federated/federated_bug_35333.test 2010-11-30 17:20:56 +0000
1360+++ Percona-Server/mysql-test/suite/federated/federated_bug_35333.test 2012-10-19 05:18:21 +0000
1361@@ -9,7 +9,7 @@
1362 --echo # to complete while still indicating a problem. This fix applies to any non-fatal system
1363 --echo # error that occurs during a query against I_S.TABLES.de
1364
1365---source federated.inc
1366+--source suite/federated/include/federated.inc
1367
1368 --disable_warnings
1369 CREATE DATABASE IF NOT EXISTS realdb;
1370@@ -71,4 +71,4 @@
1371 DROP DATABASE realdb;
1372 --enable_warnings
1373
1374---source federated_cleanup.inc
1375+--source suite/federated/include/federated_cleanup.inc
1376
1377=== modified file 'Percona-Server/mysql-test/suite/federated/federated_debug.test'
1378--- Percona-Server/mysql-test/suite/federated/federated_debug.test 2009-10-23 08:02:17 +0000
1379+++ Percona-Server/mysql-test/suite/federated/federated_debug.test 2012-10-19 05:18:21 +0000
1380@@ -1,5 +1,5 @@
1381 --source include/have_debug.inc
1382---source federated.inc
1383+--source suite/federated/include/federated.inc
1384
1385 --echo #
1386 --echo # Bug#47525: MySQL crashed (Federated)
1387@@ -36,4 +36,4 @@
1388
1389 connection default;
1390 --echo # Federated cleanup
1391-source federated_cleanup.inc;
1392+source suite/federated/include/federated_cleanup.inc;
1393
1394=== modified file 'Percona-Server/mysql-test/suite/federated/federated_innodb.test'
1395--- Percona-Server/mysql-test/suite/federated/federated_innodb.test 2008-12-13 19:42:12 +0000
1396+++ Percona-Server/mysql-test/suite/federated/federated_innodb.test 2012-10-19 05:18:21 +0000
1397@@ -4,7 +4,7 @@
1398 # See Bug #40645 Test main.federated_innodb does not always clean up after itself
1399
1400 source include/have_innodb.inc;
1401-source federated.inc;
1402+source suite/federated/include/federated.inc;
1403
1404 #
1405 # Bug#25513 Federated transaction failures
1406@@ -36,4 +36,4 @@
1407 drop table federated.t1;
1408
1409
1410-source federated_cleanup.inc;
1411+source suite/federated/include/federated_cleanup.inc;
1412
1413=== modified file 'Percona-Server/mysql-test/suite/federated/federated_server.test'
1414--- Percona-Server/mysql-test/suite/federated/federated_server.test 2012-05-10 07:49:14 +0000
1415+++ Percona-Server/mysql-test/suite/federated/federated_server.test 2012-10-19 05:18:21 +0000
1416@@ -1,6 +1,6 @@
1417 # WL #3031 This test tests the new servers table as well as
1418 # if federated can utilise the servers table
1419--- source federated.inc
1420+-- source suite/federated/include/federated.inc
1421
1422 connection slave;
1423 create database first_db;
1424@@ -333,4 +333,4 @@
1425 drop server if exists s;
1426
1427
1428-source federated_cleanup.inc;
1429+source suite/federated/include/federated_cleanup.inc;
1430
1431=== modified file 'Percona-Server/mysql-test/suite/federated/federated_transactions.test'
1432--- Percona-Server/mysql-test/suite/federated/federated_transactions.test 2007-12-12 17:19:24 +0000
1433+++ Percona-Server/mysql-test/suite/federated/federated_transactions.test 2012-10-19 05:18:21 +0000
1434@@ -1,5 +1,5 @@
1435 source include/have_innodb.inc;
1436-source federated.inc;
1437+source suite/federated/include/federated.inc;
1438
1439 connection slave;
1440 DROP TABLE IF EXISTS federated.t1;
1441@@ -35,4 +35,4 @@
1442 SELECT * FROM federated.t1;
1443 DELETE FROM federated.t1;
1444
1445-source federated_cleanup.inc;
1446+source suite/federated/include/federated_cleanup.inc;
1447
1448=== added directory 'Percona-Server/mysql-test/suite/federated/include'
1449=== renamed file 'Percona-Server/mysql-test/suite/federated/federated.inc' => 'Percona-Server/mysql-test/suite/federated/include/federated.inc'
1450--- Percona-Server/mysql-test/suite/federated/federated.inc 2009-02-02 11:36:03 +0000
1451+++ Percona-Server/mysql-test/suite/federated/include/federated.inc 2012-10-19 05:18:21 +0000
1452@@ -1,5 +1,5 @@
1453 --source include/not_embedded.inc
1454---source have_federated_db.inc
1455+--source suite/federated/include/have_federated_db.inc
1456
1457 connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
1458 connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
1459
1460=== renamed file 'Percona-Server/mysql-test/suite/federated/federated_cleanup.inc' => 'Percona-Server/mysql-test/suite/federated/include/federated_cleanup.inc'
1461=== renamed file 'Percona-Server/mysql-test/suite/federated/have_federated_db.inc' => 'Percona-Server/mysql-test/suite/federated/include/have_federated_db.inc'
1462=== modified file 'Percona-Server/mysql-test/suite/funcs_1/t/is_engines_federated.test'
1463--- Percona-Server/mysql-test/suite/funcs_1/t/is_engines_federated.test 2009-01-31 19:22:59 +0000
1464+++ Percona-Server/mysql-test/suite/funcs_1/t/is_engines_federated.test 2012-10-19 05:18:21 +0000
1465@@ -9,7 +9,7 @@
1466 #
1467
1468 let $engine_type= FEDERATED;
1469---source suite/federated/have_federated_db.inc
1470+--source suite/federated/include/have_federated_db.inc
1471 --vertical_results
1472 eval SELECT * FROM information_schema.engines
1473 WHERE ENGINE = '$engine_type';
1474
1475=== added file 'Percona-Server/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result'
1476--- Percona-Server/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result 1970-01-01 00:00:00 +0000
1477+++ Percona-Server/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result 2012-10-19 05:18:21 +0000
1478@@ -0,0 +1,130 @@
1479+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
1480+SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
1481+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
1482+SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
1483+CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
1484+INSERT INTO infoschema_buffer_test VALUES(9);
1485+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1486+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1487+WHERE TABLE_NAME like "%infoschema_buffer_test"
1488+ and PAGE_STATE="file_page" and PAGE_TYPE="index";
1489+TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
1490+test/infoschema_buffer_test GEN_CLUST_INDEX 1 29 FILE_PAGE INDEX
1491+INSERT INTO infoschema_buffer_test VALUES(19);
1492+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1493+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1494+WHERE TABLE_NAME like "%infoschema_buffer_test"
1495+and PAGE_STATE="file_page" and PAGE_TYPE="index";
1496+TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
1497+test/infoschema_buffer_test GEN_CLUST_INDEX 2 58 FILE_PAGE INDEX
1498+CREATE INDEX idx ON infoschema_buffer_test(col1);
1499+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1500+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1501+WHERE TABLE_NAME like "%infoschema_buffer_test"
1502+and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
1503+TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
1504+test/infoschema_buffer_test idx 2 32 FILE_PAGE INDEX
1505+DROP TABLE infoschema_buffer_test;
1506+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1507+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1508+WHERE TABLE_NAME like "%infoschema_buffer_test";
1509+TABLE_NAME INDEX_NAME NUMBER_RECORDS DATA_SIZE PAGE_STATE PAGE_TYPE
1510+CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
1511+ENGINE=INNODB;
1512+CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
1513+FOREIGN KEY (parent_id)
1514+REFERENCES infoschema_parent(id)
1515+ON DELETE CASCADE)
1516+ENGINE=INNODB;
1517+SELECT count(*)
1518+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1519+WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
1520+and PAGE_TYPE="index";
1521+count(*)
1522+2
1523+DROP TABLE infoschema_child;
1524+DROP TABLE infoschema_parent;
1525+show create table information_schema.innodb_buffer_page;
1526+Table Create Table
1527+INNODB_BUFFER_PAGE CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE` (
1528+ `POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
1529+ `BLOCK_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
1530+ `SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
1531+ `PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
1532+ `PAGE_TYPE` varchar(64) DEFAULT NULL,
1533+ `FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
1534+ `FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
1535+ `IS_HASHED` varchar(3) DEFAULT NULL,
1536+ `NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
1537+ `OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
1538+ `ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
1539+ `TABLE_NAME` varchar(1024) DEFAULT NULL,
1540+ `INDEX_NAME` varchar(1024) DEFAULT NULL,
1541+ `NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
1542+ `DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
1543+ `COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
1544+ `PAGE_STATE` varchar(64) DEFAULT NULL,
1545+ `IO_FIX` varchar(64) DEFAULT NULL,
1546+ `IS_OLD` varchar(3) DEFAULT NULL,
1547+ `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
1548+) ENGINE=MEMORY DEFAULT CHARSET=utf8
1549+show create table information_schema.innodb_buffer_page_lru;
1550+Table Create Table
1551+INNODB_BUFFER_PAGE_LRU CREATE TEMPORARY TABLE `INNODB_BUFFER_PAGE_LRU` (
1552+ `POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
1553+ `LRU_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
1554+ `SPACE` bigint(21) unsigned NOT NULL DEFAULT '0',
1555+ `PAGE_NUMBER` bigint(21) unsigned NOT NULL DEFAULT '0',
1556+ `PAGE_TYPE` varchar(64) DEFAULT NULL,
1557+ `FLUSH_TYPE` bigint(21) unsigned NOT NULL DEFAULT '0',
1558+ `FIX_COUNT` bigint(21) unsigned NOT NULL DEFAULT '0',
1559+ `IS_HASHED` varchar(3) DEFAULT NULL,
1560+ `NEWEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
1561+ `OLDEST_MODIFICATION` bigint(21) unsigned NOT NULL DEFAULT '0',
1562+ `ACCESS_TIME` bigint(21) unsigned NOT NULL DEFAULT '0',
1563+ `TABLE_NAME` varchar(1024) DEFAULT NULL,
1564+ `INDEX_NAME` varchar(1024) DEFAULT NULL,
1565+ `NUMBER_RECORDS` bigint(21) unsigned NOT NULL DEFAULT '0',
1566+ `DATA_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
1567+ `COMPRESSED_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
1568+ `COMPRESSED` varchar(3) DEFAULT NULL,
1569+ `IO_FIX` varchar(64) DEFAULT NULL,
1570+ `IS_OLD` varchar(3) DEFAULT NULL,
1571+ `FREE_PAGE_CLOCK` bigint(21) unsigned NOT NULL DEFAULT '0'
1572+) ENGINE=MEMORY DEFAULT CHARSET=utf8
1573+show create table information_schema.innodb_buffer_pool_stats;
1574+Table Create Table
1575+INNODB_BUFFER_POOL_STATS CREATE TEMPORARY TABLE `INNODB_BUFFER_POOL_STATS` (
1576+ `POOL_ID` bigint(21) unsigned NOT NULL DEFAULT '0',
1577+ `POOL_SIZE` bigint(21) unsigned NOT NULL DEFAULT '0',
1578+ `FREE_BUFFERS` bigint(21) unsigned NOT NULL DEFAULT '0',
1579+ `DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
1580+ `OLD_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
1581+ `MODIFIED_DATABASE_PAGES` bigint(21) unsigned NOT NULL DEFAULT '0',
1582+ `PENDING_DECOMPRESS` bigint(21) unsigned NOT NULL DEFAULT '0',
1583+ `PENDING_READS` bigint(21) unsigned NOT NULL DEFAULT '0',
1584+ `PENDING_FLUSH_LRU` bigint(21) unsigned NOT NULL DEFAULT '0',
1585+ `PENDING_FLUSH_LIST` bigint(21) unsigned NOT NULL DEFAULT '0',
1586+ `PAGES_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
1587+ `PAGES_NOT_MADE_YOUNG` bigint(21) unsigned NOT NULL DEFAULT '0',
1588+ `PAGES_MADE_YOUNG_RATE` double NOT NULL DEFAULT '0',
1589+ `PAGES_MADE_NOT_YOUNG_RATE` double NOT NULL DEFAULT '0',
1590+ `NUMBER_PAGES_READ` bigint(21) unsigned NOT NULL DEFAULT '0',
1591+ `NUMBER_PAGES_CREATED` bigint(21) unsigned NOT NULL DEFAULT '0',
1592+ `NUMBER_PAGES_WRITTEN` bigint(21) unsigned NOT NULL DEFAULT '0',
1593+ `PAGES_READ_RATE` double NOT NULL DEFAULT '0',
1594+ `PAGES_CREATE_RATE` double NOT NULL DEFAULT '0',
1595+ `PAGES_WRITTEN_RATE` double NOT NULL DEFAULT '0',
1596+ `NUMBER_PAGES_GET` bigint(21) unsigned NOT NULL DEFAULT '0',
1597+ `HIT_RATE` bigint(21) unsigned NOT NULL DEFAULT '0',
1598+ `YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
1599+ `NOT_YOUNG_MAKE_PER_THOUSAND_GETS` bigint(21) unsigned NOT NULL DEFAULT '0',
1600+ `NUMBER_PAGES_READ_AHEAD` bigint(21) unsigned NOT NULL DEFAULT '0',
1601+ `NUMBER_READ_AHEAD_EVICTED` bigint(21) unsigned NOT NULL DEFAULT '0',
1602+ `READ_AHEAD_RATE` double NOT NULL DEFAULT '0',
1603+ `READ_AHEAD_EVICTED_RATE` double NOT NULL DEFAULT '0',
1604+ `LRU_IO_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
1605+ `LRU_IO_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0',
1606+ `UNCOMPRESS_TOTAL` bigint(21) unsigned NOT NULL DEFAULT '0',
1607+ `UNCOMPRESS_CURRENT` bigint(21) unsigned NOT NULL DEFAULT '0'
1608+) ENGINE=MEMORY DEFAULT CHARSET=utf8
1609
1610=== modified file 'Percona-Server/mysql-test/suite/innodb/r/percona_skip_innodb_i_s.result'
1611--- Percona-Server/mysql-test/suite/innodb/r/percona_skip_innodb_i_s.result 2012-09-17 13:08:32 +0000
1612+++ Percona-Server/mysql-test/suite/innodb/r/percona_skip_innodb_i_s.result 2012-10-19 05:18:21 +0000
1613@@ -1,8 +1,11 @@
1614 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='INFORMATION_SCHEMA' AND TABLE_NAME LIKE 'INNODB%' ORDER BY TABLE_NAME;
1615 TABLE_NAME
1616+INNODB_BUFFER_PAGE
1617+INNODB_BUFFER_PAGE_LRU
1618 INNODB_BUFFER_POOL_PAGES
1619 INNODB_BUFFER_POOL_PAGES_BLOB
1620 INNODB_BUFFER_POOL_PAGES_INDEX
1621+INNODB_BUFFER_POOL_STATS
1622 INNODB_CHANGED_PAGES
1623 INNODB_CMP
1624 INNODB_CMPMEM
1625
1626=== added file 'Percona-Server/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test'
1627--- Percona-Server/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test 1970-01-01 00:00:00 +0000
1628+++ Percona-Server/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test 2012-10-19 05:18:21 +0000
1629@@ -0,0 +1,76 @@
1630+# Exercise the code path for INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS
1631+# and INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1632+
1633+-- source include/have_innodb.inc
1634+
1635+-- disable_result_log
1636+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
1637+
1638+# How many buffer pools we have
1639+SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
1640+
1641+SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
1642+
1643+# This gives the over all buffer pool size
1644+SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
1645+
1646+-- enable_result_log
1647+
1648+# Create a table and check its page info behave correctly in the pool
1649+CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE = INNODB;
1650+
1651+INSERT INTO infoschema_buffer_test VALUES(9);
1652+
1653+# We should be able to see this table in the buffer pool if we check
1654+# right away
1655+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1656+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1657+WHERE TABLE_NAME like "%infoschema_buffer_test"
1658+ and PAGE_STATE="file_page" and PAGE_TYPE="index";
1659+
1660+# The NUMBER_RECORDS and DATA_SIZE should check with each insertion
1661+INSERT INTO infoschema_buffer_test VALUES(19);
1662+
1663+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1664+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1665+WHERE TABLE_NAME like "%infoschema_buffer_test"
1666+and PAGE_STATE="file_page" and PAGE_TYPE="index";
1667+
1668+CREATE INDEX idx ON infoschema_buffer_test(col1);
1669+
1670+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1671+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1672+WHERE TABLE_NAME like "%infoschema_buffer_test"
1673+and PAGE_STATE="file_page" and INDEX_NAME = "idx" and PAGE_TYPE="index";
1674+
1675+
1676+# Check the buffer after dropping the table
1677+DROP TABLE infoschema_buffer_test;
1678+
1679+SELECT TABLE_NAME, INDEX_NAME, NUMBER_RECORDS, DATA_SIZE, PAGE_STATE, PAGE_TYPE
1680+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1681+WHERE TABLE_NAME like "%infoschema_buffer_test";
1682+
1683+# Do one more test
1684+#--replace_regex /'*[0-9]*'/'NUM'/
1685+CREATE TABLE infoschema_parent (id INT NOT NULL, PRIMARY KEY (id))
1686+ENGINE=INNODB;
1687+
1688+CREATE TABLE infoschema_child (id INT, parent_id INT, INDEX par_ind (parent_id),
1689+ FOREIGN KEY (parent_id)
1690+ REFERENCES infoschema_parent(id)
1691+ ON DELETE CASCADE)
1692+ENGINE=INNODB;
1693+
1694+SELECT count(*)
1695+FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE
1696+WHERE TABLE_NAME like "%infoschema_child" and PAGE_STATE="file_page"
1697+and PAGE_TYPE="index";
1698+
1699+DROP TABLE infoschema_child;
1700+DROP TABLE infoschema_parent;
1701+
1702+show create table information_schema.innodb_buffer_page;
1703+show create table information_schema.innodb_buffer_page_lru;
1704+show create table information_schema.innodb_buffer_pool_stats;
1705+
1706
1707=== modified file 'Percona-Server/mysql-test/suite/perfschema/t/disabled.def'
1708--- Percona-Server/mysql-test/suite/perfschema/t/disabled.def 2012-05-25 10:14:27 +0000
1709+++ Percona-Server/mysql-test/suite/perfschema/t/disabled.def 2012-10-19 05:18:21 +0000
1710@@ -9,4 +9,3 @@
1711 # Do not use any TAB characters for whitespace.
1712 #
1713 ##############################################################################
1714-misc : bug#14113704 24/04/2012 Mayank issue reported causing failure.
1715
1716=== modified file 'Percona-Server/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result'
1717--- Percona-Server/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result 2012-01-31 15:07:44 +0000
1718+++ Percona-Server/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result 2012-10-19 05:18:21 +0000
1719@@ -15,5 +15,7 @@
1720 reset master;
1721 stop slave;
1722 reset slave;
1723-drop table t;
1724+drop table if exists t;
1725+reset master;
1726 End of the tests
1727+include/rpl_end.inc
1728
1729=== modified file 'Percona-Server/mysql-test/suite/rpl/t/rpl_bug41902.test'
1730--- Percona-Server/mysql-test/suite/rpl/t/rpl_bug41902.test 2010-12-19 17:15:12 +0000
1731+++ Percona-Server/mysql-test/suite/rpl/t/rpl_bug41902.test 2012-10-19 05:18:21 +0000
1732@@ -52,10 +52,10 @@
1733
1734 --disable_query_log
1735 call mtr.add_suppression("Failed to locate old binlog or relay log files");
1736-call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ./master-bin.000001 not listed in the index");
1737+call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index");
1738 connection slave;
1739 call mtr.add_suppression("Failed to locate old binlog or relay log files");
1740-call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ./master-bin.000001 not listed in the index");
1741+call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index");
1742 --enable_query_log
1743
1744 --echo ==== clean up ====
1745
1746=== modified file 'Percona-Server/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test'
1747--- Percona-Server/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test 2012-01-19 16:56:43 +0000
1748+++ Percona-Server/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test 2012-10-19 05:18:21 +0000
1749@@ -60,6 +60,11 @@
1750 --connection slave
1751 stop slave;
1752 reset slave;
1753-drop table t; # table was created from binlog. it does not exist on master.
1754+# Table was created from binlog, it may not be created if SQL thread is running
1755+# slowly and IO thread reaches incident before SQL thread applies it.
1756+drop table if exists t;
1757+reset master;
1758
1759 --echo End of the tests
1760+--let $rpl_only_running_threads= 1
1761+--source include/rpl_end.inc
1762
1763=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result'
1764--- Percona-Server/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result 2010-01-06 10:54:45 +0000
1765+++ Percona-Server/mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result 2012-10-19 05:18:21 +0000
1766@@ -13,26 +13,26 @@
1767 '#--------------------FN_DYNVARS_028_01------------------------#'
1768 SET @@session.engine_condition_pushdown = 0;
1769 Warnings:
1770-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1771+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1772 SET @@session.engine_condition_pushdown = DEFAULT;
1773 Warnings:
1774-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1775+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1776 SELECT @@session.engine_condition_pushdown;
1777 @@session.engine_condition_pushdown
1778 1
1779 SET @@global.engine_condition_pushdown = 0;
1780 Warnings:
1781-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1782+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1783 SET @@global.engine_condition_pushdown = DEFAULT;
1784 Warnings:
1785-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1786+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1787 SELECT @@global.engine_condition_pushdown;
1788 @@global.engine_condition_pushdown
1789 1
1790 '#---------------------FN_DYNVARS_028_02-------------------------#'
1791 SET engine_condition_pushdown = 1;
1792 Warnings:
1793-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1794+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1795 SELECT @@engine_condition_pushdown;
1796 @@engine_condition_pushdown
1797 1
1798@@ -44,38 +44,38 @@
1799 ERROR 42S02: Unknown table 'global' in field list
1800 SET session engine_condition_pushdown = 0;
1801 Warnings:
1802-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1803+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1804 SELECT @@session.engine_condition_pushdown;
1805 @@session.engine_condition_pushdown
1806 0
1807 SET global engine_condition_pushdown = 0;
1808 Warnings:
1809-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1810+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1811 SELECT @@global.engine_condition_pushdown;
1812 @@global.engine_condition_pushdown
1813 0
1814 '#--------------------FN_DYNVARS_028_03------------------------#'
1815 SET @@session.engine_condition_pushdown = 0;
1816 Warnings:
1817-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1818+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1819 SELECT @@session.engine_condition_pushdown;
1820 @@session.engine_condition_pushdown
1821 0
1822 SET @@session.engine_condition_pushdown = 1;
1823 Warnings:
1824-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1825+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1826 SELECT @@session.engine_condition_pushdown;
1827 @@session.engine_condition_pushdown
1828 1
1829 SET @@global.engine_condition_pushdown = 0;
1830 Warnings:
1831-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1832+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1833 SELECT @@global.engine_condition_pushdown;
1834 @@global.engine_condition_pushdown
1835 0
1836 SET @@global.engine_condition_pushdown = 1;
1837 Warnings:
1838-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1839+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1840 SELECT @@global.engine_condition_pushdown;
1841 @@global.engine_condition_pushdown
1842 1
1843@@ -115,16 +115,16 @@
1844 '#-------------------FN_DYNVARS_028_05----------------------------#'
1845 SET @@global.engine_condition_pushdown = 0;
1846 Warnings:
1847-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1848+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1849 SET @@session.engine_condition_pushdown = 1;
1850 Warnings:
1851-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1852+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1853 SELECT @@global.engine_condition_pushdown AS res_is_0;
1854 res_is_0
1855 0
1856 SET @@global.engine_condition_pushdown = 0;
1857 Warnings:
1858-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1859+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1860 SELECT @@session.engine_condition_pushdown AS res_is_1;
1861 res_is_1
1862 1
1863@@ -159,50 +159,50 @@
1864 '#---------------------FN_DYNVARS_028_08-------------------------#'
1865 SET @@session.engine_condition_pushdown = OFF;
1866 Warnings:
1867-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1868+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1869 SELECT @@session.engine_condition_pushdown;
1870 @@session.engine_condition_pushdown
1871 0
1872 SET @@session.engine_condition_pushdown = ON;
1873 Warnings:
1874-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1875+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1876 SELECT @@session.engine_condition_pushdown;
1877 @@session.engine_condition_pushdown
1878 1
1879 SET @@global.engine_condition_pushdown = OFF;
1880 Warnings:
1881-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1882+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1883 SELECT @@global.engine_condition_pushdown;
1884 @@global.engine_condition_pushdown
1885 0
1886 SET @@global.engine_condition_pushdown = ON;
1887 Warnings:
1888-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1889+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1890 SELECT @@global.engine_condition_pushdown;
1891 @@global.engine_condition_pushdown
1892 1
1893 '#---------------------FN_DYNVARS_028_09----------------------#'
1894 SET @@session.engine_condition_pushdown = TRUE;
1895 Warnings:
1896-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1897+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1898 SELECT @@session.engine_condition_pushdown;
1899 @@session.engine_condition_pushdown
1900 1
1901 SET @@session.engine_condition_pushdown = FALSE;
1902 Warnings:
1903-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1904+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1905 SELECT @@session.engine_condition_pushdown;
1906 @@session.engine_condition_pushdown
1907 0
1908 SET @@global.engine_condition_pushdown = TRUE;
1909 Warnings:
1910-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1911+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1912 SELECT @@global.engine_condition_pushdown;
1913 @@global.engine_condition_pushdown
1914 1
1915 SET @@global.engine_condition_pushdown = FALSE;
1916 Warnings:
1917-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1918+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1919 SELECT @@global.engine_condition_pushdown;
1920 @@global.engine_condition_pushdown
1921 0
1922@@ -215,7 +215,7 @@
1923 0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
1924 set @@session.engine_condition_pushdown = TRUE;
1925 Warnings:
1926-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1927+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1928 select @@session.engine_condition_pushdown,
1929 @@global.engine_condition_pushdown,
1930 @@session.optimizer_switch, @@global.optimizer_switch;
1931@@ -223,7 +223,7 @@
1932 1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
1933 set @@session.engine_condition_pushdown = FALSE;
1934 Warnings:
1935-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1936+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1937 select @@session.engine_condition_pushdown,
1938 @@global.engine_condition_pushdown,
1939 @@session.optimizer_switch, @@global.optimizer_switch;
1940@@ -231,7 +231,7 @@
1941 0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
1942 set @@global.engine_condition_pushdown = TRUE;
1943 Warnings:
1944-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1945+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1946 select @@session.engine_condition_pushdown,
1947 @@global.engine_condition_pushdown,
1948 @@session.optimizer_switch, @@global.optimizer_switch;
1949@@ -239,7 +239,7 @@
1950 0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on
1951 set @@global.engine_condition_pushdown = FALSE;
1952 Warnings:
1953-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1954+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1955 select @@session.engine_condition_pushdown,
1956 @@global.engine_condition_pushdown,
1957 @@session.optimizer_switch, @@global.optimizer_switch;
1958@@ -271,13 +271,13 @@
1959 0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off
1960 SET @@session.engine_condition_pushdown = @session_start_value;
1961 Warnings:
1962-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1963+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1964 SELECT @@session.engine_condition_pushdown;
1965 @@session.engine_condition_pushdown
1966 1
1967 SET @@global.engine_condition_pushdown = @global_start_value;
1968 Warnings:
1969-Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MySQL 7.0. Please use '@@optimizer_switch' instead
1970+Warning 1287 '@@engine_condition_pushdown' is deprecated and will be removed in a future release. Please use '@@optimizer_switch' instead
1971 SELECT @@global.engine_condition_pushdown;
1972 @@global.engine_condition_pushdown
1973 1
1974
1975=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/log_basic.result'
1976--- Percona-Server/mysql-test/suite/sys_vars/r/log_basic.result 2010-02-24 13:52:27 +0000
1977+++ Percona-Server/mysql-test/suite/sys_vars/r/log_basic.result 2012-10-19 05:18:21 +0000
1978@@ -8,10 +8,10 @@
1979 1
1980 SET @@global.log = ON;
1981 Warnings:
1982-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1983+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1984 SET global log = 0;
1985 Warnings:
1986-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1987+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1988 '#--------------------FN_DYNVARS_062_02-------------------------#'
1989 SELECT VARIABLE_VALUE
1990 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
1991@@ -20,4 +20,4 @@
1992 OFF
1993 SET @@global.log= @start_log;
1994 Warnings:
1995-Warning 1287 The syntax '@@log' is deprecated and will be removed in MySQL 7.0. Please use '@@general_log' instead
1996+Warning 1287 '@@log' is deprecated and will be removed in a future release. Please use '@@general_log' instead
1997
1998=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result'
1999--- Percona-Server/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result 2010-01-29 06:33:00 +0000
2000+++ Percona-Server/mysql-test/suite/sys_vars/r/log_slow_queries_basic.result 2012-10-19 05:18:21 +0000
2001@@ -5,20 +5,20 @@
2002 '#---------------------FN_DYNVARS_004_01-------------------------#'
2003 SET @@global.log_slow_queries = DEFAULT;
2004 Warnings:
2005-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2006+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2007 SELECT @@global.log_slow_queries = 0;
2008 @@global.log_slow_queries = 0
2009 1
2010 '#--------------------FN_DYNVARS_004_02------------------------#'
2011 SET @@global.log_slow_queries = ON;
2012 Warnings:
2013-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2014+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2015 SELECT @@global.log_slow_queries;
2016 @@global.log_slow_queries
2017 1
2018 SET @@global.log_slow_queries = OFF;
2019 Warnings:
2020-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2021+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2022 SELECT @@global.log_slow_queries;
2023 @@global.log_slow_queries
2024 0
2025@@ -61,7 +61,7 @@
2026 '#---------------------FN_DYNVARS_004_06----------------------#'
2027 SET @@global.log_slow_queries = 0;
2028 Warnings:
2029-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2030+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2031 SELECT @@global.log_slow_queries;
2032 @@global.log_slow_queries
2033 0
2034@@ -72,7 +72,7 @@
2035 1
2036 SET @@global.log_slow_queries = 1;
2037 Warnings:
2038-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2039+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2040 SELECT @@global.log_slow_queries;
2041 @@global.log_slow_queries
2042 1
2043@@ -84,7 +84,7 @@
2044 '#---------------------FN_DYNVARS_004_07----------------------#'
2045 SET @@global.log_slow_queries = TRUE;
2046 Warnings:
2047-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2048+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2049 SELECT @@global.log_slow_queries;
2050 @@global.log_slow_queries
2051 1
2052@@ -95,7 +95,7 @@
2053 1
2054 SET @@global.log_slow_queries = FALSE;
2055 Warnings:
2056-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2057+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2058 SELECT @@global.log_slow_queries;
2059 @@global.log_slow_queries
2060 0
2061@@ -107,7 +107,7 @@
2062 '#---------------------FN_DYNVARS_004_08----------------------#'
2063 SET @@global.log_slow_queries = ON;
2064 Warnings:
2065-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2066+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2067 SELECT @@log_slow_queries = @@global.log_slow_queries;
2068 @@log_slow_queries = @@global.log_slow_queries
2069 1
2070@@ -126,7 +126,7 @@
2071 ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
2072 SET @@global.log_slow_queries = @start_value;
2073 Warnings:
2074-Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '@@slow_query_log' instead
2075+Warning 1287 '@@log_slow_queries' is deprecated and will be removed in a future release. Please use '@@slow_query_log' instead
2076 SELECT @@global.log_slow_queries;
2077 @@global.log_slow_queries
2078 1
2079
2080=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result'
2081--- Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result 2009-12-22 09:35:56 +0000
2082+++ Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result 2012-10-19 05:18:21 +0000
2083@@ -5,42 +5,42 @@
2084 '#--------------------FN_DYNVARS_142_01-------------------------#'
2085 SET @@global.rpl_recovery_rank = 500000;
2086 Warnings:
2087-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2088+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2089 SET @@global.rpl_recovery_rank = DEFAULT;
2090 Warnings:
2091-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2092+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2093 SELECT @@global.rpl_recovery_rank;
2094 @@global.rpl_recovery_rank
2095 0
2096 '#--------------------FN_DYNVARS_142_02-------------------------#'
2097 SET @@global.rpl_recovery_rank = 0;
2098 Warnings:
2099-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2100+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2101 SELECT @@global.rpl_recovery_rank;
2102 @@global.rpl_recovery_rank
2103 0
2104 SET @@global.rpl_recovery_rank = 1024;
2105 Warnings:
2106-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2107+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2108 SELECT @@global.rpl_recovery_rank;
2109 @@global.rpl_recovery_rank
2110 1024
2111 SET @@global.rpl_recovery_rank = 123456789;
2112 Warnings:
2113-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2114+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2115 SELECT @@global.rpl_recovery_rank;
2116 @@global.rpl_recovery_rank
2117 123456789
2118 SET @@global.rpl_recovery_rank = 2147483648*2;
2119 Warnings:
2120-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2121+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2122 Warning 1292 Truncated incorrect rpl_recovery_rank value: '4294967296'
2123 SELECT @@global.rpl_recovery_rank;
2124 @@global.rpl_recovery_rank
2125 4294967295
2126 SET @@global.rpl_recovery_rank = 2147483648*1024;
2127 Warnings:
2128-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2129+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2130 Warning 1292 Truncated incorrect rpl_recovery_rank value: '2199023255552'
2131 SELECT @@global.rpl_recovery_rank;
2132 @@global.rpl_recovery_rank
2133@@ -50,7 +50,7 @@
2134 4294967295
2135 SET @@global.rpl_recovery_rank = 2147483648*2147483648;
2136 Warnings:
2137-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2138+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2139 Warning 1292 Truncated incorrect rpl_recovery_rank value: '4611686018427387904'
2140 SELECT @@global.rpl_recovery_rank;
2141 @@global.rpl_recovery_rank
2142@@ -65,21 +65,21 @@
2143 '#------------------FN_DYNVARS_142_04-----------------------#'
2144 SET @@global.rpl_recovery_rank = -1;
2145 Warnings:
2146-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2147+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2148 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
2149 SELECT @@global.rpl_recovery_rank;
2150 @@global.rpl_recovery_rank
2151 0
2152 SET @@global.rpl_recovery_rank = -2147483648;
2153 Warnings:
2154-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2155+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2156 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
2157 SELECT @@global.rpl_recovery_rank;
2158 @@global.rpl_recovery_rank
2159 0
2160 SET @@global.rpl_recovery_rank = -2147483649;
2161 Warnings:
2162-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2163+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2164 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
2165 SELECT @@global.rpl_recovery_rank;
2166 @@global.rpl_recovery_rank
2167@@ -93,7 +93,7 @@
2168 '#------------------FN_DYNVARS_142_05-----------------------#'
2169 SET @@global.rpl_recovery_rank = 3000;
2170 Warnings:
2171-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2172+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2173 SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
2174 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
2175 WHERE VARIABLE_NAME='rpl_recovery_rank';
2176@@ -108,20 +108,20 @@
2177 '#------------------FN_DYNVARS_142_07-----------------------#'
2178 SET @@global.rpl_recovery_rank = TRUE;
2179 Warnings:
2180-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2181+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2182 SELECT @@global.rpl_recovery_rank;
2183 @@global.rpl_recovery_rank
2184 1
2185 SET @@global.rpl_recovery_rank = FALSE;
2186 Warnings:
2187-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2188+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2189 SELECT @@global.rpl_recovery_rank;
2190 @@global.rpl_recovery_rank
2191 0
2192 '#---------------------FN_DYNVARS_001_08----------------------#'
2193 SET @@global.rpl_recovery_rank = 512;
2194 Warnings:
2195-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2196+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2197 SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
2198 @@rpl_recovery_rank = @@global.rpl_recovery_rank
2199 1
2200@@ -135,10 +135,10 @@
2201 512
2202 SET global rpl_recovery_rank = 64;
2203 Warnings:
2204-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2205+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2206 SET @@global.rpl_recovery_rank = @start_global_value;
2207 Warnings:
2208-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2209+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2210 SELECT @@global.rpl_recovery_rank;
2211 @@global.rpl_recovery_rank
2212 0
2213
2214=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result'
2215--- Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result 2009-12-22 09:35:56 +0000
2216+++ Percona-Server/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_64.result 2012-10-19 05:18:21 +0000
2217@@ -5,41 +5,41 @@
2218 '#--------------------FN_DYNVARS_142_01-------------------------#'
2219 SET @@global.rpl_recovery_rank = 500000;
2220 Warnings:
2221-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2222+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2223 SET @@global.rpl_recovery_rank = DEFAULT;
2224 Warnings:
2225-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2226+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2227 SELECT @@global.rpl_recovery_rank;
2228 @@global.rpl_recovery_rank
2229 0
2230 '#--------------------FN_DYNVARS_142_02-------------------------#'
2231 SET @@global.rpl_recovery_rank = 0;
2232 Warnings:
2233-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2234+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2235 SELECT @@global.rpl_recovery_rank;
2236 @@global.rpl_recovery_rank
2237 0
2238 SET @@global.rpl_recovery_rank = 1024;
2239 Warnings:
2240-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2241+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2242 SELECT @@global.rpl_recovery_rank;
2243 @@global.rpl_recovery_rank
2244 1024
2245 SET @@global.rpl_recovery_rank = 123456789;
2246 Warnings:
2247-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2248+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2249 SELECT @@global.rpl_recovery_rank;
2250 @@global.rpl_recovery_rank
2251 123456789
2252 SET @@global.rpl_recovery_rank = 2147483648*2;
2253 Warnings:
2254-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2255+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2256 SELECT @@global.rpl_recovery_rank;
2257 @@global.rpl_recovery_rank
2258 4294967296
2259 SET @@global.rpl_recovery_rank = 2147483648*1024;
2260 Warnings:
2261-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2262+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2263 SELECT @@global.rpl_recovery_rank;
2264 @@global.rpl_recovery_rank
2265 2199023255552
2266@@ -48,7 +48,7 @@
2267 2199023255552
2268 SET @@global.rpl_recovery_rank = 2147483648*2147483648;
2269 Warnings:
2270-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2271+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2272 SELECT @@global.rpl_recovery_rank;
2273 @@global.rpl_recovery_rank
2274 4611686018427387904
2275@@ -62,21 +62,21 @@
2276 '#------------------FN_DYNVARS_142_04-----------------------#'
2277 SET @@global.rpl_recovery_rank = -1;
2278 Warnings:
2279-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2280+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2281 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
2282 SELECT @@global.rpl_recovery_rank;
2283 @@global.rpl_recovery_rank
2284 0
2285 SET @@global.rpl_recovery_rank = -2147483648;
2286 Warnings:
2287-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2288+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2289 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
2290 SELECT @@global.rpl_recovery_rank;
2291 @@global.rpl_recovery_rank
2292 0
2293 SET @@global.rpl_recovery_rank = -2147483649;
2294 Warnings:
2295-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2296+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2297 Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
2298 SELECT @@global.rpl_recovery_rank;
2299 @@global.rpl_recovery_rank
2300@@ -90,7 +90,7 @@
2301 '#------------------FN_DYNVARS_142_05-----------------------#'
2302 SET @@global.rpl_recovery_rank = 3000;
2303 Warnings:
2304-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2305+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2306 SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
2307 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
2308 WHERE VARIABLE_NAME='rpl_recovery_rank';
2309@@ -105,20 +105,20 @@
2310 '#------------------FN_DYNVARS_142_07-----------------------#'
2311 SET @@global.rpl_recovery_rank = TRUE;
2312 Warnings:
2313-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2314+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2315 SELECT @@global.rpl_recovery_rank;
2316 @@global.rpl_recovery_rank
2317 1
2318 SET @@global.rpl_recovery_rank = FALSE;
2319 Warnings:
2320-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2321+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2322 SELECT @@global.rpl_recovery_rank;
2323 @@global.rpl_recovery_rank
2324 0
2325 '#---------------------FN_DYNVARS_001_08----------------------#'
2326 SET @@global.rpl_recovery_rank = 512;
2327 Warnings:
2328-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2329+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2330 SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
2331 @@rpl_recovery_rank = @@global.rpl_recovery_rank
2332 1
2333@@ -132,10 +132,10 @@
2334 512
2335 SET global rpl_recovery_rank = 64;
2336 Warnings:
2337-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2338+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2339 SET @@global.rpl_recovery_rank = @start_global_value;
2340 Warnings:
2341-Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MySQL 7.0.
2342+Warning 1287 '@@rpl_recovery_rank' is deprecated and will be removed in a future release.
2343 SELECT @@global.rpl_recovery_rank;
2344 @@global.rpl_recovery_rank
2345 0
2346
2347=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/sql_big_selects_func.result'
2348--- Percona-Server/mysql-test/suite/sys_vars/r/sql_big_selects_func.result 2011-09-28 11:24:15 +0000
2349+++ Percona-Server/mysql-test/suite/sys_vars/r/sql_big_selects_func.result 2012-10-19 05:18:21 +0000
2350@@ -5,7 +5,7 @@
2351 SET @global_max_join_size = @@GLOBAL.max_join_size;
2352 SET SQL_MAX_JOIN_SIZE=9;
2353 Warnings:
2354-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2355+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2356 CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20));
2357 CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20));
2358 INSERT INTO t1 VALUES('aa','bb');
2359
2360=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result'
2361--- Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result 2010-01-29 06:33:00 +0000
2362+++ Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result 2012-10-19 05:18:21 +0000
2363@@ -22,10 +22,10 @@
2364 SQL_MAX_JOIN_SIZE 18446744073709551615
2365 set global sql_max_join_size=10;
2366 Warnings:
2367-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2368+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2369 set session sql_max_join_size=20;
2370 Warnings:
2371-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2372+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2373 select @@global.sql_max_join_size;
2374 @@global.sql_max_join_size
2375 10
2376@@ -55,19 +55,19 @@
2377 0
2378 set sql_max_join_size=cast(-1 as unsigned int);
2379 Warnings:
2380-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2381+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2382 select @@sql_big_selects;
2383 @@sql_big_selects
2384 1
2385 set sql_max_join_size=100;
2386 Warnings:
2387-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2388+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2389 select @@sql_big_selects;
2390 @@sql_big_selects
2391 0
2392 SET @@global.sql_max_join_size = @start_global_value;
2393 Warnings:
2394-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2395+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2396 SELECT @@global.sql_max_join_size;
2397 @@global.sql_max_join_size
2398 18446744073709551615
2399
2400=== modified file 'Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result'
2401--- Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result 2011-09-28 11:24:15 +0000
2402+++ Percona-Server/mysql-test/suite/sys_vars/r/sql_max_join_size_func.result 2012-10-19 05:18:21 +0000
2403@@ -17,7 +17,7 @@
2404 '#--------------------FN_DYNVARS_161_01-------------------------#'
2405 SET SESSION sql_max_join_size=9;
2406 Warnings:
2407-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2408+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2409 SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
2410 ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
2411 Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
2412@@ -33,7 +33,7 @@
2413 This should work
2414 SET SESSION sql_max_join_size=DEFAULT;
2415 Warnings:
2416-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2417+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2418 DELETE FROM t2 WHERE a = 'aa4';
2419 SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
2420 a b a b
2421@@ -45,7 +45,7 @@
2422 '#----------------------------FN_DYNVARS_136_05-------------------------#'
2423 SET GLOBAL sql_max_join_size = 4;
2424 Warnings:
2425-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2426+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2427 ** Connecting con_int1 using root **
2428 ** Connection con_int1 **
2429 SELECT @@SESSION.sql_max_join_size;
2430@@ -54,7 +54,7 @@
2431 4 Expected
2432 SET SESSION sql_max_join_size = 2;
2433 Warnings:
2434-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2435+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2436 ** Connecting con_int2 using root **
2437 ** Connection con_int2 **
2438 SELECT @@SESSION.sql_max_join_size;
2439@@ -63,7 +63,7 @@
2440 4 Expected
2441 SET SESSION sql_max_join_size = 10;
2442 Warnings:
2443-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2444+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2445 ** Connection con_int2 **
2446 SELECT @@SESSION.sql_max_join_size;
2447 @@SESSION.sql_max_join_size
2448@@ -82,10 +82,10 @@
2449 Disconnecting Connections con_int1, con_int2
2450 SET @@SESSION.sql_max_join_size = @session_max_join_size;
2451 Warnings:
2452-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2453+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2454 SET @@GLOBAL.sql_max_join_size = @global_max_join_size ;
2455 Warnings:
2456-Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MySQL 7.0.
2457+Warning 1287 '@@sql_max_join_size' is deprecated and will be removed in a future release.
2458 SET @@SESSION.sql_big_selects = @session_sql_big_selects;
2459 DROP TABLE t1;
2460 DROP TABLE t2;
2461
2462=== modified file 'Percona-Server/mysql-test/t/openssl_1.test'
2463--- Percona-Server/mysql-test/t/openssl_1.test 2010-04-13 15:04:45 +0000
2464+++ Percona-Server/mysql-test/t/openssl_1.test 2012-10-19 05:18:21 +0000
2465@@ -73,22 +73,28 @@
2466 # a different cacert
2467 #
2468 --exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
2469+--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
2470 --error 1
2471 --exec $MYSQL_TEST --ssl-ca=$MYSQL_TEST_DIR/std_data/untrusted-cacert.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
2472+--echo
2473
2474 #
2475 # Test that we can't open connection to server if we are using
2476 # a blank ca
2477 #
2478+--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
2479 --error 1
2480 --exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
2481+--echo
2482
2483 #
2484 # Test that we can't open connection to server if we are using
2485 # a nonexistent ca file
2486 #
2487+--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
2488 --error 1
2489 --exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
2490+--echo
2491
2492 #
2493 # Test that we can't open connection to server if we are using
2494
2495=== modified file 'Percona-Server/mysql-test/t/partition_federated.test'
2496--- Percona-Server/mysql-test/t/partition_federated.test 2007-12-12 17:19:24 +0000
2497+++ Percona-Server/mysql-test/t/partition_federated.test 2012-10-19 05:18:21 +0000
2498@@ -3,7 +3,7 @@
2499 #
2500 -- source include/have_partition.inc
2501 -- source include/not_embedded.inc
2502--- source suite/federated/have_federated_db.inc
2503+-- source suite/federated/include/have_federated_db.inc
2504
2505 --disable_warnings
2506 drop table if exists t1;
2507
2508=== modified file 'Percona-Server/mysys/mf_iocache.c'
2509--- Percona-Server/mysys/mf_iocache.c 2011-06-30 15:46:53 +0000
2510+++ Percona-Server/mysys/mf_iocache.c 2012-10-19 05:18:21 +0000
2511@@ -1528,8 +1528,13 @@
2512 int _my_b_write(register IO_CACHE *info, const uchar *Buffer, size_t Count)
2513 {
2514 size_t rest_length,length;
2515+ my_off_t pos_in_file= info->pos_in_file;
2516
2517- if (info->pos_in_file+info->buffer_length > info->end_of_file)
2518+ DBUG_EXECUTE_IF("simulate_huge_load_data_file",
2519+ {
2520+ pos_in_file=(my_off_t)(5000000000ULL);
2521+ });
2522+ if (pos_in_file+info->buffer_length > info->end_of_file)
2523 {
2524 my_errno=errno=EFBIG;
2525 return info->error = -1;
2526
2527=== modified file 'Percona-Server/mysys/my_getopt.c'
2528--- Percona-Server/mysys/my_getopt.c 2012-08-07 18:49:16 +0000
2529+++ Percona-Server/mysys/my_getopt.c 2012-10-19 05:18:21 +0000
2530@@ -980,6 +980,11 @@
2531 }
2532 *(ulong*)value= arg;
2533 }
2534+ else if (type < 0)
2535+ {
2536+ res= EXIT_AMBIGUOUS_OPTION;
2537+ goto ret;
2538+ }
2539 else
2540 *(ulong*)value= type - 1;
2541 }
2542
2543=== modified file 'Percona-Server/scripts/mysql_secure_installation.pl.in'
2544--- Percona-Server/scripts/mysql_secure_installation.pl.in 2011-06-30 15:37:13 +0000
2545+++ Percona-Server/scripts/mysql_secure_installation.pl.in 2012-10-19 05:18:21 +0000
2546@@ -1,7 +1,7 @@
2547 #!/usr/bin/perl
2548 # -*- cperl -*-
2549 #
2550-# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
2551+# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
2552 #
2553 # This program is free software; you can redistribute it and/or modify
2554 # it under the terms of the GNU General Public License as published by
2555@@ -28,7 +28,7 @@
2556 my $rootpass = "";
2557
2558
2559-$SIG{QUIT} = $SIG{INT} = sub {
2560+$SIG{QUIT} = $SIG{INT} = $SIG{TERM} = $SIG{ABRT} = $SIG{HUP} = sub {
2561 print "\nAborting!\n\n";
2562 echo_on();
2563 cleanup();
2564@@ -242,7 +242,11 @@
2565 }
2566
2567 sub cleanup {
2568- unlink($config,$command);
2569+ print "Cleaning up...\n";
2570+
2571+ foreach my $file ($config, $command) {
2572+ unlink $file or warn "Warning: Could not unlink $file: $!\n";
2573+ }
2574 }
2575
2576
2577
2578=== modified file 'Percona-Server/scripts/mysql_secure_installation.sh'
2579--- Percona-Server/scripts/mysql_secure_installation.sh 2011-06-30 15:37:13 +0000
2580+++ Percona-Server/scripts/mysql_secure_installation.sh 2012-10-19 05:18:21 +0000
2581@@ -1,6 +1,6 @@
2582 #!/bin/sh
2583
2584-# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
2585+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
2586 #
2587 # This program is free software; you can redistribute it and/or modify
2588 # it under the terms of the GNU General Public License as published by
2589@@ -19,7 +19,7 @@
2590 command=".mysql.$$"
2591 mysql_client=""
2592
2593-trap "interrupt" 2
2594+trap "interrupt" 1 2 3 6 15
2595
2596 rootpass=""
2597 echo_n=
2598@@ -139,13 +139,16 @@
2599 if [ $? -eq 0 ]; then
2600 echo "Password updated successfully!"
2601 echo "Reloading privilege tables.."
2602- reload_privilege_tables || exit 1
2603+ reload_privilege_tables
2604+ if [ $? -eq 1 ]; then
2605+ clean_and_exit
2606+ fi
2607 echo
2608 rootpass=$password1
2609 make_config
2610 else
2611 echo "Password update failed!"
2612- exit 1
2613+ clean_and_exit
2614 fi
2615
2616 return 0
2617@@ -157,7 +160,7 @@
2618 echo " ... Success!"
2619 else
2620 echo " ... Failed!"
2621- exit 1
2622+ clean_and_exit
2623 fi
2624
2625 return 0
2626@@ -217,6 +220,11 @@
2627 rm -f $config $command
2628 }
2629
2630+# Remove the files before exiting.
2631+clean_and_exit() {
2632+ cleanup
2633+ exit 1
2634+}
2635
2636 # The actual script starts here
2637
2638
2639=== modified file 'Percona-Server/scripts/mysqlhotcopy.sh'
2640--- Percona-Server/scripts/mysqlhotcopy.sh 2011-06-30 15:46:53 +0000
2641+++ Percona-Server/scripts/mysqlhotcopy.sh 2012-10-19 05:18:21 +0000
2642@@ -272,23 +272,28 @@
2643 }
2644 }
2645
2646-# --- get list of tables to hotcopy ---
2647+# --- get list of tables and views to hotcopy ---
2648
2649 my $hc_locks = "";
2650 my $hc_tables = "";
2651+my $hc_base_tables = "";
2652+my $hc_views = "";
2653+my $num_base_tables = 0;
2654+my $num_views = 0;
2655 my $num_tables = 0;
2656 my $num_files = 0;
2657
2658 foreach my $rdb ( @db_desc ) {
2659 my $db = $rdb->{src};
2660- my @dbh_tables = get_list_of_tables( $db );
2661+ my @dbh_base_tables = get_list_of_tables( $db );
2662+ my @dbh_views = get_list_of_views( $db );
2663
2664 ## filter out certain system non-lockable tables.
2665 ## keep in sync with mysqldump.
2666 if ($db =~ m/^mysql$/i)
2667 {
2668- @dbh_tables = grep
2669- { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_tables
2670+ @dbh_base_tables = grep
2671+ { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
2672 }
2673
2674 ## generate regex for tables/files
2675@@ -303,11 +308,20 @@
2676
2677 ## filter (out) tables specified in t_regex
2678 print "Filtering tables with '$t_regex'\n" if $opt{debug};
2679- @dbh_tables = ( $negated
2680- ? grep { $_ !~ $t_regex } @dbh_tables
2681- : grep { $_ =~ $t_regex } @dbh_tables );
2682+ @dbh_base_tables = ( $negated
2683+ ? grep { $_ !~ $t_regex } @dbh_base_tables
2684+ : grep { $_ =~ $t_regex } @dbh_base_tables );
2685+
2686+ ## filter (out) views specified in t_regex
2687+ print "Filtering tables with '$t_regex'\n" if $opt{debug};
2688+ @dbh_views = ( $negated
2689+ ? grep { $_ !~ $t_regex } @dbh_views
2690+ : grep { $_ =~ $t_regex } @dbh_views );
2691 }
2692
2693+ ## Now concatenate the base table and view arrays.
2694+ my @dbh_tables = (@dbh_base_tables, @dbh_views);
2695+
2696 ## get list of files to copy
2697 my $db_dir = "$datadir/$db";
2698 opendir(DBDIR, $db_dir )
2699@@ -347,15 +361,25 @@
2700
2701 $rdb->{files} = [ @db_files ];
2702 $rdb->{index} = [ @index_files ];
2703- my @hc_tables = map { quote_names("$db.$_") } @dbh_tables;
2704+ my @hc_base_tables = map { quote_names("$db.$_") } @dbh_base_tables;
2705+ my @hc_views = map { quote_names("$db.$_") } @dbh_views;
2706+
2707+ my @hc_tables = (@hc_base_tables, @hc_views);
2708 $rdb->{tables} = [ @hc_tables ];
2709
2710 $hc_locks .= ", " if ( length $hc_locks && @hc_tables );
2711 $hc_locks .= join ", ", map { "$_ READ" } @hc_tables;
2712- $hc_tables .= ", " if ( length $hc_tables && @hc_tables );
2713- $hc_tables .= join ", ", @hc_tables;
2714-
2715- $num_tables += scalar @hc_tables;
2716+
2717+ $hc_base_tables .= ", " if ( length $hc_base_tables && @hc_base_tables );
2718+ $hc_base_tables .= join ", ", @hc_base_tables;
2719+ $hc_views .= ", " if ( length $hc_views && @hc_views );
2720+ $hc_views .= join " READ, ", @hc_views;
2721+
2722+ @hc_tables = (@hc_base_tables, @hc_views);
2723+
2724+ $num_base_tables += scalar @hc_base_tables;
2725+ $num_views += scalar @hc_views;
2726+ $num_tables += $num_base_tables + $num_views;
2727 $num_files += scalar @{$rdb->{files}};
2728 }
2729
2730@@ -467,7 +491,10 @@
2731 print "FLUSH TABLES /*!32323 $hc_tables */\n";
2732 }
2733 else {
2734- print "FLUSH TABLES $hc_tables WITH READ LOCK\n";
2735+ # Lock base tables and views separately.
2736+ print "FLUSH TABLES $hc_base_tables WITH READ LOCK\n"
2737+ if ( $hc_base_tables );
2738+ print "LOCK TABLES $hc_views READ\n" if ( $hc_views );
2739 }
2740
2741 print "FLUSH LOGS\n" if ( $opt{flushlog} );
2742@@ -484,16 +511,24 @@
2743 # flush tables to make on-disk copy up to date
2744 $start = time;
2745 $dbh->do("FLUSH TABLES /*!32323 $hc_tables */");
2746+ printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
2747 }
2748 else {
2749- $dbh->do("FLUSH TABLES $hc_tables WITH READ LOCK");
2750- printf "Locked $num_tables tables in %d seconds.\n", time-$start unless $opt{quiet};
2751+ # Lock base tables and views separately, as 'FLUSH TABLES <tbl_name>
2752+ # ... WITH READ LOCK' (introduced in 5.5) would fail for views.
2753+ # Also, flush tables to make on-disk copy up to date
2754+ $dbh->do("FLUSH TABLES $hc_base_tables WITH READ LOCK")
2755+ if ( $hc_base_tables );
2756+ printf "Flushed $num_base_tables tables with read lock ($hc_base_tables) in %d seconds.\n",
2757+ time-$start unless $opt{quiet};
2758+
2759+ $start = time;
2760+ $dbh->do("LOCK TABLES $hc_views READ") if ( $hc_views );
2761+ printf "Locked $num_views views ($hc_views) in %d seconds.\n",
2762+ time-$start unless $opt{quiet};
2763+
2764 $hc_started = time; # count from time lock is granted
2765-
2766- # flush tables to make on-disk copy up to date
2767- $start = time;
2768 }
2769- printf "Flushed tables ($hc_tables) in %d seconds.\n", time-$start unless $opt{quiet};
2770 $dbh->do( "FLUSH LOGS" ) if ( $opt{flushlog} );
2771 $dbh->do( "RESET MASTER" ) if ( $opt{resetmaster} );
2772 $dbh->do( "RESET SLAVE" ) if ( $opt{resetslave} );
2773@@ -802,14 +837,29 @@
2774
2775 my $tables =
2776 eval {
2777- $dbh->selectall_arrayref('SHOW TABLES FROM ' .
2778- $dbh->quote_identifier($db))
2779+ $dbh->selectall_arrayref('SHOW FULL TABLES FROM ' .
2780+ $dbh->quote_identifier($db) .
2781+ ' WHERE Table_type = \'BASE TABLE\'')
2782 } || [];
2783 warn "Unable to retrieve list of tables in $db: $@" if $@;
2784
2785 return (map { $_->[0] } @$tables);
2786 }
2787
2788+sub get_list_of_views {
2789+ my ( $db ) = @_;
2790+
2791+ my $views =
2792+ eval {
2793+ $dbh->selectall_arrayref('SHOW FULL TABLES FROM ' .
2794+ $dbh->quote_identifier($db) .
2795+ ' WHERE Table_type = \'VIEW\'')
2796+ } || [];
2797+ warn "Unable to retrieve list of views in $db: $@" if $@;
2798+
2799+ return (map { $_->[0] } @$views);
2800+}
2801+
2802 sub quote_names {
2803 my ( $name ) = @_;
2804 # given a db.table name, add quotes
2805
2806=== modified file 'Percona-Server/sql/filesort.cc'
2807--- Percona-Server/sql/filesort.cc 2012-05-18 04:37:44 +0000
2808+++ Percona-Server/sql/filesort.cc 2012-10-19 05:18:21 +0000
2809@@ -1,4 +1,4 @@
2810-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2811+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
2812
2813 This program is free software; you can redistribute it and/or modify
2814 it under the terms of the GNU General Public License as published by
2815@@ -284,9 +284,7 @@
2816 Use also the space previously used by string pointers in sort_buffer
2817 for temporary key storage.
2818 */
2819- param.keys=((param.keys *
2820- (param.rec_length+sizeof(char*))) /
2821- param.rec_length - 1);
2822+ param.keys= table_sort.sort_keys_size / param.rec_length;
2823 maxbuffer--; // Offset from 0
2824 if (merge_many_buff(&param,(uchar*) sort_keys,buffpek,&maxbuffer,
2825 &tempfile))
2826
2827=== modified file 'Percona-Server/sql/gen_lex_hash.cc'
2828--- Percona-Server/sql/gen_lex_hash.cc 2011-07-22 07:50:44 +0000
2829+++ Percona-Server/sql/gen_lex_hash.cc 2012-10-19 05:18:21 +0000
2830@@ -1,5 +1,5 @@
2831 /*
2832- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
2833+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
2834
2835 This program is free software; you can redistribute it and/or modify
2836 it under the terms of the GNU General Public License as published by
2837@@ -378,7 +378,7 @@
2838 printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
2839
2840 puts("/*");
2841- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
2842+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
2843 puts("*/");
2844
2845 /* Broken up to indicate that it's not advice to you, gentle reader. */
2846
2847=== modified file 'Percona-Server/sql/ha_partition.cc'
2848--- Percona-Server/sql/ha_partition.cc 2012-05-15 10:45:52 +0000
2849+++ Percona-Server/sql/ha_partition.cc 2012-10-19 05:18:21 +0000
2850@@ -320,7 +320,7 @@
2851 for (i= 0; i < m_tot_parts; i++)
2852 delete m_file[i];
2853 }
2854- my_free(m_ordered_rec_buffer);
2855+ destroy_record_priority_queue();
2856 my_free(m_part_ids_sorted_by_num_of_records);
2857
2858 clear_handler_file();
2859@@ -2638,7 +2638,6 @@
2860 {
2861 char *name_buffer_ptr;
2862 int error= HA_ERR_INITIALIZATION;
2863- uint alloc_len;
2864 handler **file;
2865 char name_buff[FN_REFLEN];
2866 bool is_not_tmp_table= (table_share->tmp_table == NO_TMP_TABLE);
2867@@ -2656,32 +2655,6 @@
2868 m_start_key.length= 0;
2869 m_rec0= table->record[0];
2870 m_rec_length= table_share->reclength;
2871- alloc_len= m_tot_parts * (m_rec_length + PARTITION_BYTES_IN_POS);
2872- alloc_len+= table_share->max_key_length;
2873- if (!m_ordered_rec_buffer)
2874- {
2875- if (!(m_ordered_rec_buffer= (uchar*)my_malloc(alloc_len, MYF(MY_WME))))
2876- {
2877- DBUG_RETURN(error);
2878- }
2879- {
2880- /*
2881- We set-up one record per partition and each record has 2 bytes in
2882- front where the partition id is written. This is used by ordered
2883- index_read.
2884- We also set-up a reference to the first record for temporary use in
2885- setting up the scan.
2886- */
2887- char *ptr= (char*)m_ordered_rec_buffer;
2888- uint i= 0;
2889- do
2890- {
2891- int2store(ptr, i);
2892- ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
2893- } while (++i < m_tot_parts);
2894- m_start_key.key= (const uchar*)ptr;
2895- }
2896- }
2897 if (!m_part_ids_sorted_by_num_of_records)
2898 {
2899 if (!(m_part_ids_sorted_by_num_of_records=
2900@@ -2711,7 +2684,7 @@
2901
2902 if (m_is_clone_of)
2903 {
2904- uint i;
2905+ uint i, alloc_len;
2906 DBUG_ASSERT(m_clone_mem_root);
2907 /* Allocate an array of handler pointers for the partitions handlers. */
2908 alloc_len= (m_tot_parts + 1) * sizeof(handler*);
2909@@ -2787,12 +2760,6 @@
2910 being opened once.
2911 */
2912 clear_handler_file();
2913- /*
2914- Initialize priority queue, initialized to reading forward.
2915- */
2916- if ((error= init_queue(&m_queue, m_tot_parts, (uint) PARTITION_BYTES_IN_POS,
2917- 0, key_rec_cmp, (void*)this)))
2918- goto err_handler;
2919
2920 /*
2921 Use table_share->ha_part_data to share auto_increment_value among
2922@@ -2917,7 +2884,7 @@
2923 DBUG_ENTER("ha_partition::close");
2924
2925 DBUG_ASSERT(table->s == table_share);
2926- delete_queue(&m_queue);
2927+ destroy_record_priority_queue();
2928 bitmap_free(&m_bulk_insert_started);
2929 if (!m_is_clone_of)
2930 bitmap_free(&(m_part_info->used_partitions));
2931@@ -4213,6 +4180,78 @@
2932 subset of the partitions are used, then only use those partitions.
2933 */
2934
2935+
2936+/**
2937+ Setup the ordered record buffer and the priority queue.
2938+*/
2939+
2940+bool ha_partition::init_record_priority_queue()
2941+{
2942+ DBUG_ENTER("ha_partition::init_record_priority_queue");
2943+ DBUG_ASSERT(!m_ordered_rec_buffer);
2944+ /*
2945+ Initialize the ordered record buffer.
2946+ */
2947+ if (!m_ordered_rec_buffer)
2948+ {
2949+ uint alloc_len;
2950+ uint used_parts= bitmap_bits_set(&m_part_info->used_partitions);
2951+ /* Allocate record buffer for each used partition. */
2952+ alloc_len= used_parts * (m_rec_length + PARTITION_BYTES_IN_POS);
2953+ /* Allocate a key for temporary use when setting up the scan. */
2954+ alloc_len+= table_share->max_key_length;
2955+
2956+ if (!(m_ordered_rec_buffer= (uchar*)my_malloc(alloc_len, MYF(MY_WME))))
2957+ DBUG_RETURN(true);
2958+
2959+ /*
2960+ We set-up one record per partition and each record has 2 bytes in
2961+ front where the partition id is written. This is used by ordered
2962+ index_read.
2963+ We also set-up a reference to the first record for temporary use in
2964+ setting up the scan.
2965+ */
2966+ char *ptr= (char*) m_ordered_rec_buffer;
2967+ uint16 i= 0;
2968+ do
2969+ {
2970+ if (bitmap_is_set(&m_part_info->used_partitions, i))
2971+ {
2972+ int2store(ptr, i);
2973+ ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
2974+ }
2975+ } while (++i < m_tot_parts);
2976+ m_start_key.key= (const uchar*)ptr;
2977+ /* Initialize priority queue, initialized to reading forward. */
2978+ if (init_queue(&m_queue, used_parts, (uint) PARTITION_BYTES_IN_POS,
2979+ 0, key_rec_cmp, (void*)m_curr_key_info))
2980+ {
2981+ my_free(m_ordered_rec_buffer);
2982+ m_ordered_rec_buffer= NULL;
2983+ DBUG_RETURN(true);
2984+ }
2985+ }
2986+ DBUG_RETURN(false);
2987+}
2988+
2989+
2990+/**
2991+ Destroy the ordered record buffer and the priority queue.
2992+*/
2993+
2994+void ha_partition::destroy_record_priority_queue()
2995+{
2996+ DBUG_ENTER("ha_partition::destroy_record_priority_queue");
2997+ if (m_ordered_rec_buffer)
2998+ {
2999+ delete_queue(&m_queue);
3000+ my_free(m_ordered_rec_buffer);
3001+ m_ordered_rec_buffer= NULL;
3002+ }
3003+ DBUG_VOID_RETURN;
3004+}
3005+
3006+
3007 /*
3008 Initialize handler before start of index scan
3009
3010@@ -4254,6 +4293,10 @@
3011 }
3012 else
3013 m_curr_key_info[1]= NULL;
3014+
3015+ if (init_record_priority_queue())
3016+ DBUG_RETURN(HA_ERR_OUT_OF_MEM);
3017+
3018 /*
3019 Some handlers only read fields as specified by the bitmap for the
3020 read set. For partitioned handlers we always require that the
3021@@ -4328,11 +4371,11 @@
3022 do
3023 {
3024 int tmp;
3025- /* TODO RONM: Change to index_end() when code is stable */
3026 if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
3027 if ((tmp= (*file)->ha_index_end()))
3028 error= tmp;
3029 } while (*(++file));
3030+ destroy_record_priority_queue();
3031 DBUG_RETURN(error);
3032 }
3033
3034@@ -5071,6 +5114,7 @@
3035 uint i;
3036 uint j= 0;
3037 bool found= FALSE;
3038+ uchar *part_rec_buf_ptr= m_ordered_rec_buffer;
3039 DBUG_ENTER("ha_partition::handle_ordered_index_scan");
3040
3041 m_top_entry= NO_CURRENT_PART_ID;
3042@@ -5081,7 +5125,7 @@
3043 {
3044 if (!(bitmap_is_set(&(m_part_info->used_partitions), i)))
3045 continue;
3046- uchar *rec_buf_ptr= rec_buf(i);
3047+ uchar *rec_buf_ptr= part_rec_buf_ptr + PARTITION_BYTES_IN_POS;
3048 int error;
3049 handler *file= m_file[i];
3050
3051@@ -5128,12 +5172,13 @@
3052 /*
3053 Initialize queue without order first, simply insert
3054 */
3055- queue_element(&m_queue, j++)= (uchar*)queue_buf(i);
3056+ queue_element(&m_queue, j++)= part_rec_buf_ptr;
3057 }
3058 else if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
3059 {
3060 DBUG_RETURN(error);
3061 }
3062+ part_rec_buf_ptr+= m_rec_length + PARTITION_BYTES_IN_POS;
3063 }
3064 if (found)
3065 {
3066@@ -5196,18 +5241,19 @@
3067 {
3068 int error;
3069 uint part_id= m_top_entry;
3070+ uchar *rec_buf= queue_top(&m_queue) + PARTITION_BYTES_IN_POS;
3071 handler *file= m_file[part_id];
3072 DBUG_ENTER("ha_partition::handle_ordered_next");
3073
3074 if (m_index_scan_type == partition_read_range)
3075 {
3076 error= file->read_range_next();
3077- memcpy(rec_buf(part_id), table->record[0], m_rec_length);
3078+ memcpy(rec_buf, table->record[0], m_rec_length);
3079 }
3080 else if (!is_next_same)
3081- error= file->index_next(rec_buf(part_id));
3082+ error= file->index_next(rec_buf);
3083 else
3084- error= file->index_next_same(rec_buf(part_id), m_start_key.key,
3085+ error= file->index_next_same(rec_buf, m_start_key.key,
3086 m_start_key.length);
3087 if (error)
3088 {
3089@@ -5250,10 +5296,11 @@
3090 {
3091 int error;
3092 uint part_id= m_top_entry;
3093+ uchar *rec_buf= queue_top(&m_queue) + PARTITION_BYTES_IN_POS;
3094 handler *file= m_file[part_id];
3095 DBUG_ENTER("ha_partition::handle_ordered_prev");
3096
3097- if ((error= file->index_prev(rec_buf(part_id))))
3098+ if ((error= file->index_prev(rec_buf)))
3099 {
3100 if (error == HA_ERR_END_OF_FILE)
3101 {
3102
3103=== modified file 'Percona-Server/sql/ha_partition.h'
3104--- Percona-Server/sql/ha_partition.h 2012-03-14 20:57:15 +0000
3105+++ Percona-Server/sql/ha_partition.h 2012-10-19 05:18:21 +0000
3106@@ -511,21 +511,13 @@
3107 virtual int read_range_next();
3108
3109 private:
3110+ bool init_record_priority_queue();
3111+ void destroy_record_priority_queue();
3112 int common_index_read(uchar * buf, bool have_start_key);
3113 int common_first_last(uchar * buf);
3114 int partition_scan_set_up(uchar * buf, bool idx_read_flag);
3115 int handle_unordered_next(uchar * buf, bool next_same);
3116 int handle_unordered_scan_next_partition(uchar * buf);
3117- uchar *queue_buf(uint part_id)
3118- {
3119- return (m_ordered_rec_buffer +
3120- (part_id * (m_rec_length + PARTITION_BYTES_IN_POS)));
3121- }
3122- uchar *rec_buf(uint part_id)
3123- {
3124- return (queue_buf(part_id) +
3125- PARTITION_BYTES_IN_POS);
3126- }
3127 int handle_ordered_index_scan(uchar * buf, bool reverse_order);
3128 int handle_ordered_next(uchar * buf, bool next_same);
3129 int handle_ordered_prev(uchar * buf);
3130
3131=== modified file 'Percona-Server/sql/handler.cc'
3132--- Percona-Server/sql/handler.cc 2012-09-17 13:08:32 +0000
3133+++ Percona-Server/sql/handler.cc 2012-10-19 05:18:21 +0000
3134@@ -4860,7 +4860,19 @@
3135 ? HA_ERR_END_OF_FILE
3136 : result);
3137
3138- DBUG_RETURN (compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
3139+ if (compare_key(end_range) <= 0)
3140+ {
3141+ DBUG_RETURN(0);
3142+ }
3143+ else
3144+ {
3145+ /*
3146+ The last read row does not fall in the range. So request
3147+ storage engine to release row lock if possible.
3148+ */
3149+ unlock_row();
3150+ DBUG_RETURN(HA_ERR_END_OF_FILE);
3151+ }
3152 }
3153
3154
3155@@ -4892,7 +4904,20 @@
3156 result= index_next(table->record[0]);
3157 if (result)
3158 DBUG_RETURN(result);
3159- DBUG_RETURN(compare_key(end_range) <= 0 ? 0 : HA_ERR_END_OF_FILE);
3160+
3161+ if (compare_key(end_range) <= 0)
3162+ {
3163+ DBUG_RETURN(0);
3164+ }
3165+ else
3166+ {
3167+ /*
3168+ The last read row does not fall in the range. So request
3169+ storage engine to release row lock if possible.
3170+ */
3171+ unlock_row();
3172+ DBUG_RETURN(HA_ERR_END_OF_FILE);
3173+ }
3174 }
3175
3176
3177
3178=== modified file 'Percona-Server/sql/item.cc'
3179--- Percona-Server/sql/item.cc 2012-09-17 13:08:32 +0000
3180+++ Percona-Server/sql/item.cc 2012-10-19 05:18:21 +0000
3181@@ -6429,7 +6429,12 @@
3182 if (from_field != not_found_field)
3183 {
3184 Item_field* fld;
3185- if (!(fld= new Item_field(thd, last_checked_context, from_field)))
3186+ Query_arena backup, *arena;
3187+ arena= thd->activate_stmt_arena_if_needed(&backup);
3188+ fld= new Item_field(thd, last_checked_context, from_field);
3189+ if (arena)
3190+ thd->restore_active_arena(arena, &backup);
3191+ if (!fld)
3192 goto error;
3193 thd->change_item_tree(reference, fld);
3194 mark_as_dependent(thd, last_checked_context->select_lex,
3195
3196=== modified file 'Percona-Server/sql/item.h'
3197--- Percona-Server/sql/item.h 2012-02-29 08:45:15 +0000
3198+++ Percona-Server/sql/item.h 2012-10-19 05:18:21 +0000
3199@@ -2676,6 +2676,7 @@
3200 resolved is a grouping one. After it has been fixed the ref field will point
3201 to either an Item_ref or an Item_direct_ref object which will be used to
3202 access the field.
3203+ The ref field may also point to an Item_field instance.
3204 See also comments for the fix_inner_refs() and the
3205 Item_field::fix_outer_field() functions.
3206 */
3207
3208=== modified file 'Percona-Server/sql/item_strfunc.cc'
3209--- Percona-Server/sql/item_strfunc.cc 2012-02-16 09:48:16 +0000
3210+++ Percona-Server/sql/item_strfunc.cc 2012-10-19 05:18:21 +0000
3211@@ -3295,23 +3295,21 @@
3212 String* Item_func_export_set::val_str(String* str)
3213 {
3214 DBUG_ASSERT(fixed == 1);
3215- ulonglong the_set = (ulonglong) args[0]->val_int();
3216- String yes_buf, *yes;
3217- yes = args[1]->val_str(&yes_buf);
3218- String no_buf, *no;
3219- no = args[2]->val_str(&no_buf);
3220- String *sep = NULL, sep_buf ;
3221+ String yes_buf, no_buf, sep_buf;
3222+ const ulonglong the_set = (ulonglong) args[0]->val_int();
3223+ const String *yes= args[1]->val_str(&yes_buf);
3224+ const String *no= args[2]->val_str(&no_buf);
3225+ const String *sep= NULL;
3226
3227 uint num_set_values = 64;
3228- ulonglong mask = 0x1;
3229 str->length(0);
3230 str->set_charset(collation.collation);
3231
3232 /* Check if some argument is a NULL value */
3233 if (args[0]->null_value || args[1]->null_value || args[2]->null_value)
3234 {
3235- null_value=1;
3236- return 0;
3237+ null_value= true;
3238+ return NULL;
3239 }
3240 /*
3241 Arg count can only be 3, 4 or 5 here. This is guaranteed from the
3242@@ -3324,37 +3322,56 @@
3243 num_set_values=64;
3244 if (args[4]->null_value)
3245 {
3246- null_value=1;
3247- return 0;
3248+ null_value= true;
3249+ return NULL;
3250 }
3251 /* Fall through */
3252 case 4:
3253 if (!(sep = args[3]->val_str(&sep_buf))) // Only true if NULL
3254 {
3255- null_value=1;
3256- return 0;
3257+ null_value= true;
3258+ return NULL;
3259 }
3260 break;
3261 case 3:
3262 {
3263 /* errors is not checked - assume "," can always be converted */
3264 uint errors;
3265- sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin, collation.collation, &errors);
3266+ sep_buf.copy(STRING_WITH_LEN(","), &my_charset_bin,
3267+ collation.collation, &errors);
3268 sep = &sep_buf;
3269 }
3270 break;
3271 default:
3272 DBUG_ASSERT(0); // cannot happen
3273 }
3274- null_value=0;
3275-
3276- for (uint i = 0; i < num_set_values; i++, mask = (mask << 1))
3277+ null_value= false;
3278+
3279+ const ulong max_allowed_packet= current_thd->variables.max_allowed_packet;
3280+ const uint num_separators= num_set_values > 0 ? num_set_values - 1 : 0;
3281+ const ulonglong max_total_length=
3282+ num_set_values * max(yes->length(), no->length()) +
3283+ num_separators * sep->length();
3284+
3285+ if (unlikely(max_total_length > max_allowed_packet))
3286+ {
3287+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3288+ ER_WARN_ALLOWED_PACKET_OVERFLOWED,
3289+ ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
3290+ func_name(), max_allowed_packet);
3291+ null_value= true;
3292+ return NULL;
3293+ }
3294+
3295+ uint ix;
3296+ ulonglong mask;
3297+ for (ix= 0, mask=0x1; ix < num_set_values; ++ix, mask = (mask << 1))
3298 {
3299 if (the_set & mask)
3300 str->append(*yes);
3301 else
3302 str->append(*no);
3303- if (i != num_set_values - 1)
3304+ if (ix != num_separators)
3305 str->append(*sep);
3306 }
3307 return str;
3308
3309=== modified file 'Percona-Server/sql/item_subselect.cc'
3310--- Percona-Server/sql/item_subselect.cc 2012-05-07 20:20:42 +0000
3311+++ Percona-Server/sql/item_subselect.cc 2012-10-19 05:18:21 +0000
3312@@ -1146,7 +1146,7 @@
3313 }
3314 else
3315 {
3316- Item *item= (Item*) select_lex->item_list.head();
3317+ Item *item= (Item*) select_lex->item_list.head()->real_item();
3318
3319 if (select_lex->table_list.elements)
3320 {
3321
3322=== modified file 'Percona-Server/sql/log.cc'
3323--- Percona-Server/sql/log.cc 2012-09-28 01:36:45 +0000
3324+++ Percona-Server/sql/log.cc 2012-10-19 05:18:21 +0000
3325@@ -290,7 +290,7 @@
3326 before_stmt_pos= MY_OFF_T_UNDEF;
3327 }
3328
3329- void set_binlog_cache_info(ulong param_max_binlog_cache_size,
3330+ void set_binlog_cache_info(my_off_t param_max_binlog_cache_size,
3331 ulong *param_ptr_binlog_cache_use,
3332 ulong *param_ptr_binlog_cache_disk_use)
3333 {
3334@@ -367,7 +367,7 @@
3335 is configured. This corresponds to either
3336 . max_binlog_cache_size or max_binlog_stmt_cache_size.
3337 */
3338- ulong saved_max_binlog_cache_size;
3339+ my_off_t saved_max_binlog_cache_size;
3340
3341 /*
3342 Stores a pointer to the status variable that keeps track of the in-memory
3343@@ -419,8 +419,8 @@
3344
3345 class binlog_cache_mngr {
3346 public:
3347- binlog_cache_mngr(ulong param_max_binlog_stmt_cache_size,
3348- ulong param_max_binlog_cache_size,
3349+ binlog_cache_mngr(my_off_t param_max_binlog_stmt_cache_size,
3350+ my_off_t param_max_binlog_cache_size,
3351 ulong *param_ptr_binlog_stmt_cache_use,
3352 ulong *param_ptr_binlog_stmt_cache_disk_use,
3353 ulong *param_ptr_binlog_cache_use,
3354
3355=== modified file 'Percona-Server/sql/log_event.h'
3356--- Percona-Server/sql/log_event.h 2012-10-08 18:17:10 +0000
3357+++ Percona-Server/sql/log_event.h 2012-10-19 05:18:21 +0000
3358@@ -2572,7 +2572,7 @@
3359 User_var_log_event(THD* thd_arg, char *name_arg, uint name_len_arg,
3360 char *val_arg, ulong val_len_arg, Item_result type_arg,
3361 uint charset_number_arg, uchar flags_arg)
3362- :Log_event(), name(name_arg), name_len(name_len_arg), val(val_arg),
3363+ :Log_event(thd_arg,0,0), name(name_arg), name_len(name_len_arg), val(val_arg),
3364 val_len(val_len_arg), type(type_arg), charset_number(charset_number_arg),
3365 flags(flags_arg), deferred(false)
3366 { is_null= !val; }
3367
3368=== modified file 'Percona-Server/sql/mdl.cc'
3369--- Percona-Server/sql/mdl.cc 2011-11-15 18:00:14 +0000
3370+++ Percona-Server/sql/mdl.cc 2012-10-19 05:18:21 +0000
3371@@ -378,7 +378,8 @@
3372
3373 bool has_pending_conflicting_lock(enum_mdl_type type);
3374
3375- bool can_grant_lock(enum_mdl_type type, MDL_context *requstor_ctx) const;
3376+ bool can_grant_lock(enum_mdl_type type, MDL_context *requstor_ctx,
3377+ bool ignore_lock_priority) const;
3378
3379 inline static MDL_lock *create(const MDL_key *key);
3380
3381@@ -392,14 +393,24 @@
3382 virtual bool needs_notification(const MDL_ticket *ticket) const = 0;
3383 virtual void notify_conflicting_locks(MDL_context *ctx) = 0;
3384
3385+ virtual bitmap_t hog_lock_types_bitmap() const = 0;
3386+
3387 /** List of granted tickets for this lock. */
3388 Ticket_list m_granted;
3389 /** Tickets for contexts waiting to acquire a lock. */
3390 Ticket_list m_waiting;
3391+
3392+ /**
3393+ Number of times high priority lock requests have been granted while
3394+ low priority lock requests were waiting.
3395+ */
3396+ ulong m_hog_lock_count;
3397+
3398 public:
3399
3400 MDL_lock(const MDL_key *key_arg)
3401 : key(key_arg),
3402+ m_hog_lock_count(0),
3403 m_ref_usage(0),
3404 m_ref_release(0),
3405 m_is_destroyed(FALSE),
3406@@ -484,6 +495,15 @@
3407 }
3408 virtual void notify_conflicting_locks(MDL_context *ctx);
3409
3410+ /*
3411+ In scoped locks, only IX lock request would starve because of X/S. But that
3412+ is practically very rare case. So just return 0 from this function.
3413+ */
3414+ virtual bitmap_t hog_lock_types_bitmap() const
3415+ {
3416+ return 0;
3417+ }
3418+
3419 private:
3420 static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
3421 static const bitmap_t m_waiting_incompatible[MDL_TYPE_END];
3422@@ -536,6 +556,18 @@
3423 }
3424 virtual void notify_conflicting_locks(MDL_context *ctx);
3425
3426+ /*
3427+ To prevent starvation, these lock types that are only granted
3428+ max_write_lock_count times in a row while other lock types are
3429+ waiting.
3430+ */
3431+ virtual bitmap_t hog_lock_types_bitmap() const
3432+ {
3433+ return (MDL_BIT(MDL_SHARED_NO_WRITE) |
3434+ MDL_BIT(MDL_SHARED_NO_READ_WRITE) |
3435+ MDL_BIT(MDL_EXCLUSIVE));
3436+ }
3437+
3438 private:
3439 static const bitmap_t m_granted_incompatible[MDL_TYPE_END];
3440 static const bitmap_t m_waiting_incompatible[MDL_TYPE_END];
3441@@ -1267,6 +1299,41 @@
3442 {
3443 MDL_lock::Ticket_iterator it(m_waiting);
3444 MDL_ticket *ticket;
3445+ bool skip_high_priority= false;
3446+ bitmap_t hog_lock_types= hog_lock_types_bitmap();
3447+
3448+ if (m_hog_lock_count >= max_write_lock_count)
3449+ {
3450+ /*
3451+ If number of successively granted high-prio, strong locks has exceeded
3452+ max_write_lock_count give a way to low-prio, weak locks to avoid their
3453+ starvation.
3454+ */
3455+
3456+ if ((m_waiting.bitmap() & ~hog_lock_types) != 0)
3457+ {
3458+ /*
3459+ Even though normally when m_hog_lock_count is non-0 there is
3460+ some pending low-prio lock, we still can encounter situation
3461+ when m_hog_lock_count is non-0 and there are no pending low-prio
3462+ locks. This, for example, can happen when a ticket for pending
3463+ low-prio lock was removed from waiters list due to timeout,
3464+ and reschedule_waiters() is called after that to update the
3465+ waiters queue. m_hog_lock_count will be reset to 0 at the
3466+ end of this call in such case.
3467+
3468+ Note that it is not an issue if we fail to wake up any pending
3469+ waiters for weak locks in the loop below. This would mean that
3470+ all of them are either killed, timed out or chosen as a victim
3471+ by deadlock resolver, but have not managed to remove ticket
3472+ from the waiters list yet. After tickets will be removed from
3473+ the waiters queue there will be another call to
3474+ reschedule_waiters() with pending bitmap updated to reflect new
3475+ state of waiters queue.
3476+ */
3477+ skip_high_priority= true;
3478+ }
3479+ }
3480
3481 /*
3482 Find the first (and hence the oldest) waiting request which
3483@@ -1288,7 +1355,16 @@
3484 */
3485 while ((ticket= it++))
3486 {
3487- if (can_grant_lock(ticket->get_type(), ticket->get_ctx()))
3488+ /*
3489+ Skip high-prio, strong locks if earlier we have decided to give way to
3490+ low-prio, weaker locks.
3491+ */
3492+ if (skip_high_priority &&
3493+ ((MDL_BIT(ticket->get_type()) & hog_lock_types) != 0))
3494+ continue;
3495+
3496+ if (can_grant_lock(ticket->get_type(), ticket->get_ctx(),
3497+ skip_high_priority))
3498 {
3499 if (! ticket->get_ctx()->m_wait.set_status(MDL_wait::GRANTED))
3500 {
3501@@ -1302,6 +1378,13 @@
3502 */
3503 m_waiting.remove_ticket(ticket);
3504 m_granted.add_ticket(ticket);
3505+
3506+ /*
3507+ Increase counter of successively granted high-priority strong locks,
3508+ if we have granted one.
3509+ */
3510+ if ((MDL_BIT(ticket->get_type()) & hog_lock_types) != 0)
3511+ m_hog_lock_count++;
3512 }
3513 /*
3514 If we could not update the wait slot of the waiter,
3515@@ -1313,6 +1396,24 @@
3516 */
3517 }
3518 }
3519+
3520+ if ((m_waiting.bitmap() & ~hog_lock_types) == 0)
3521+ {
3522+ /*
3523+ Reset number of successively granted high-prio, strong locks
3524+ if there are no pending low-prio, weak locks.
3525+ This ensures:
3526+ - That m_hog_lock_count is correctly reset after strong lock
3527+ is released and weak locks are granted (or there are no
3528+ other lock requests).
3529+ - That situation when SNW lock is granted along with some SR
3530+ locks, but SW locks are still blocked are handled correctly.
3531+ - That m_hog_lock_count is zero in most cases when there are no pending
3532+ weak locks (see comment at the start of this method for example of
3533+ exception). This allows to save on checks at the start of this method.
3534+ */
3535+ m_hog_lock_count= 0;
3536+ }
3537 }
3538
3539
3540@@ -1467,8 +1568,9 @@
3541 Check if request for the metadata lock can be satisfied given its
3542 current state.
3543
3544- @param type_arg The requested lock type.
3545- @param requestor_ctx The MDL context of the requestor.
3546+ @param type_arg The requested lock type.
3547+ @param requestor_ctx The MDL context of the requestor.
3548+ @param ignore_lock_priority Ignore lock priority.
3549
3550 @retval TRUE Lock request can be satisfied
3551 @retval FALSE There is some conflicting lock.
3552@@ -1480,19 +1582,21 @@
3553
3554 bool
3555 MDL_lock::can_grant_lock(enum_mdl_type type_arg,
3556- MDL_context *requestor_ctx) const
3557+ MDL_context *requestor_ctx,
3558+ bool ignore_lock_priority) const
3559 {
3560 bool can_grant= FALSE;
3561 bitmap_t waiting_incompat_map= incompatible_waiting_types_bitmap()[type_arg];
3562 bitmap_t granted_incompat_map= incompatible_granted_types_bitmap()[type_arg];
3563+
3564 /*
3565 New lock request can be satisfied iff:
3566 - There are no incompatible types of satisfied requests
3567 in other contexts
3568 - There are no waiting requests which have higher priority
3569- than this request.
3570+ than this request when priority was not ignored.
3571 */
3572- if (! (m_waiting.bitmap() & waiting_incompat_map))
3573+ if (ignore_lock_priority || !(m_waiting.bitmap() & waiting_incompat_map))
3574 {
3575 if (! (m_granted.bitmap() & granted_incompat_map))
3576 can_grant= TRUE;
3577@@ -1788,7 +1892,7 @@
3578
3579 ticket->m_lock= lock;
3580
3581- if (lock->can_grant_lock(mdl_request->type, this))
3582+ if (lock->can_grant_lock(mdl_request->type, this, false))
3583 {
3584 lock->m_granted.add_ticket(ticket);
3585
3586
3587=== modified file 'Percona-Server/sql/mdl.h'
3588--- Percona-Server/sql/mdl.h 2011-11-15 18:00:14 +0000
3589+++ Percona-Server/sql/mdl.h 2012-10-19 05:18:21 +0000
3590@@ -859,4 +859,10 @@
3591 extern ulong mdl_locks_cache_size;
3592 static const ulong MDL_LOCKS_CACHE_SIZE_DEFAULT = 1024;
3593
3594+/*
3595+ Metadata locking subsystem tries not to grant more than
3596+ max_write_lock_count high-prio, strong locks successively,
3597+ to avoid starving out weak, low-prio locks.
3598+*/
3599+extern "C" ulong max_write_lock_count;
3600 #endif
3601
3602=== modified file 'Percona-Server/sql/mysqld.cc'
3603--- Percona-Server/sql/mysqld.cc 2012-09-28 01:36:45 +0000
3604+++ Percona-Server/sql/mysqld.cc 2012-10-19 05:18:21 +0000
3605@@ -622,6 +622,21 @@
3606 Rpl_filter* rpl_filter;
3607 Rpl_filter* binlog_filter;
3608
3609+THD *first_global_thread()
3610+{
3611+ if (threads.is_empty())
3612+ return NULL;
3613+ return threads.head();
3614+}
3615+
3616+THD *next_global_thread(THD *thd)
3617+{
3618+ if (threads.is_last(thd))
3619+ return NULL;
3620+ struct ilink *next= thd->next;
3621+ return static_cast<THD*>(next);
3622+}
3623+
3624 struct system_variables global_system_variables;
3625 struct system_variables max_system_variables;
3626 struct system_status_var global_status_var;
3627@@ -6904,7 +6919,7 @@
3628 if (!default_collation_name)
3629 default_collation_name= (char*) default_charset_info->name;
3630 print_version();
3631- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
3632+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
3633 puts("Starts the MySQL database server.\n");
3634 printf("Usage: %s [OPTIONS]\n", my_progname);
3635 if (!opt_verbose)
3636
3637=== modified file 'Percona-Server/sql/opt_range.cc'
3638--- Percona-Server/sql/opt_range.cc 2012-08-07 06:10:00 +0000
3639+++ Percona-Server/sql/opt_range.cc 2012-10-19 05:18:21 +0000
3640@@ -3077,27 +3077,28 @@
3641 ppar->cur_subpart_fields+= ppar->is_subpart_keypart[key_tree_part];
3642 *(ppar->arg_stack_end++)= key_tree;
3643
3644+ if (ignore_part_fields)
3645+ {
3646+ /*
3647+ We come here when a condition on the first partitioning
3648+ fields led to evaluating the partitioning condition
3649+ (due to finding a condition of the type a < const or
3650+ b > const). Thus we must ignore the rest of the
3651+ partitioning fields but we still want to analyse the
3652+ subpartitioning fields.
3653+ */
3654+ if (key_tree->next_key_part)
3655+ res= find_used_partitions(ppar, key_tree->next_key_part);
3656+ else
3657+ res= -1;
3658+ goto pop_and_go_right;
3659+ }
3660+
3661 if (key_tree->type == SEL_ARG::KEY_RANGE)
3662 {
3663 if (ppar->part_info->get_part_iter_for_interval &&
3664 key_tree->part <= ppar->last_part_partno)
3665 {
3666- if (ignore_part_fields)
3667- {
3668- /*
3669- We come here when a condition on the first partitioning
3670- fields led to evaluating the partitioning condition
3671- (due to finding a condition of the type a < const or
3672- b > const). Thus we must ignore the rest of the
3673- partitioning fields but we still want to analyse the
3674- subpartitioning fields.
3675- */
3676- if (key_tree->next_key_part)
3677- res= find_used_partitions(ppar, key_tree->next_key_part);
3678- else
3679- res= -1;
3680- goto pop_and_go_right;
3681- }
3682 /* Collect left and right bound, their lengths and flags */
3683 uchar *min_key= ppar->cur_min_key;
3684 uchar *max_key= ppar->cur_max_key;
3685@@ -3338,6 +3339,13 @@
3686 res= -1;
3687 goto pop_and_go_right;
3688 }
3689+ /*
3690+ No meaning in continuing with rest of partitioning key parts.
3691+ Will try to continue with subpartitioning key parts.
3692+ */
3693+ ppar->ignore_part_fields= true;
3694+ did_set_ignore_part_fields= true;
3695+ goto process_next_key_part;
3696 }
3697 }
3698
3699
3700=== modified file 'Percona-Server/sql/set_var.cc'
3701--- Percona-Server/sql/set_var.cc 2012-09-18 05:11:08 +0000
3702+++ Percona-Server/sql/set_var.cc 2012-10-19 05:18:21 +0000
3703@@ -134,9 +134,9 @@
3704 put your additional checks here
3705 @param on_update_func a function to be called at the end of sys_var::update,
3706 any post-update activity should happen here
3707- @param deprecated_version if not 0 - when this variable will go away
3708- @param substitute if not 0 - what one should use instead when this
3709- deprecated variable
3710+ @param substitute If non-NULL, this variable is deprecated and the
3711+ string describes what one should use instead. If an empty string,
3712+ the variable is deprecated but no replacement is offered.
3713 @param parse_flag either PARSE_EARLY or PARSE_NORMAL
3714 */
3715 sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
3716@@ -146,12 +146,12 @@
3717 PolyLock *lock, enum binlog_status_enum binlog_status_arg,
3718 on_check_function on_check_func,
3719 on_update_function on_update_func,
3720- uint deprecated_version, const char *substitute,
3721- int parse_flag) :
3722+ const char *substitute, int parse_flag) :
3723 next(0),
3724 binlog_status(binlog_status_arg),
3725 flags(flags_arg), m_parse_flag(parse_flag), show_val_type(show_val_type_arg),
3726 guard(lock), offset(off), on_check(on_check_func), on_update(on_update_func),
3727+ deprecation_substitute(substitute),
3728 is_os_charset(FALSE)
3729 {
3730 /*
3731@@ -177,12 +177,6 @@
3732 option.value= (uchar **)global_var_ptr();
3733 option.def_value= def_val;
3734
3735- deprecated.version= deprecated_version;
3736- deprecated.substitute= substitute;
3737- DBUG_ASSERT((deprecated_version != 0) || (substitute == 0));
3738- DBUG_ASSERT(deprecated_version % 100 == 0);
3739- DBUG_ASSERT(!deprecated_version || MYSQL_VERSION_ID < deprecated_version);
3740-
3741 if (chain->last)
3742 chain->last->next= this;
3743 else
3744@@ -277,21 +271,24 @@
3745
3746 void sys_var::do_deprecated_warning(THD *thd)
3747 {
3748- if (deprecated.version)
3749+ if (deprecation_substitute != NULL)
3750 {
3751- char buf1[NAME_CHAR_LEN + 3], buf2[10];
3752+ char buf1[NAME_CHAR_LEN + 3];
3753 strxnmov(buf1, sizeof(buf1)-1, "@@", name.str, 0);
3754- my_snprintf(buf2, sizeof(buf2), "%d.%d", deprecated.version/100/100,
3755- deprecated.version/100%100);
3756- uint errmsg= deprecated.substitute
3757- ? ER_WARN_DEPRECATED_SYNTAX_WITH_VER
3758- : ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT;
3759+
3760+ /*
3761+ if deprecation_substitute is an empty string,
3762+ there is no replacement for the syntax
3763+ */
3764+ uint errmsg= deprecation_substitute[0] == '\0'
3765+ ? ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
3766+ : ER_WARN_DEPRECATED_SYNTAX;
3767 if (thd)
3768 push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
3769 ER_WARN_DEPRECATED_SYNTAX, ER(errmsg),
3770- buf1, buf2, deprecated.substitute);
3771+ buf1, deprecation_substitute);
3772 else
3773- sql_print_warning(ER_DEFAULT(errmsg), buf1, buf2, deprecated.substitute);
3774+ sql_print_warning(ER_DEFAULT(errmsg), buf1, deprecation_substitute);
3775 }
3776 }
3777
3778
3779=== modified file 'Percona-Server/sql/set_var.h'
3780--- Percona-Server/sql/set_var.h 2012-08-28 19:36:04 +0000
3781+++ Percona-Server/sql/set_var.h 2012-10-19 05:18:21 +0000
3782@@ -82,7 +82,7 @@
3783 ptrdiff_t offset; ///< offset to the value from global_system_variables
3784 on_check_function on_check;
3785 on_update_function on_update;
3786- struct { uint version; const char *substitute; } deprecated;
3787+ const char *const deprecation_substitute;
3788 bool is_os_charset; ///< true if the value is in character_set_filesystem
3789
3790 public:
3791@@ -91,7 +91,7 @@
3792 enum get_opt_arg_type getopt_arg_type, SHOW_TYPE show_val_type_arg,
3793 longlong def_val, PolyLock *lock, enum binlog_status_enum binlog_status_arg,
3794 on_check_function on_check_func, on_update_function on_update_func,
3795- uint deprecated_version, const char *substitute, int parse_flag);
3796+ const char *substitute, int parse_flag);
3797
3798 virtual ~sys_var() {}
3799
3800
3801=== modified file 'Percona-Server/sql/share/charsets/Index.xml'
3802--- Percona-Server/sql/share/charsets/Index.xml 2006-12-23 19:20:40 +0000
3803+++ Percona-Server/sql/share/charsets/Index.xml 2012-10-19 05:18:21 +0000
3804@@ -3,7 +3,7 @@
3805 <charsets max-id="99">
3806
3807 <copyright>
3808- Copyright (C) 2003 MySQL AB
3809+ Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
3810
3811 This program is free software; you can redistribute it and/or modify
3812 it under the terms of the GNU General Public License as published by
3813
3814=== modified file 'Percona-Server/sql/share/errmsg-utf8.txt'
3815--- Percona-Server/sql/share/errmsg-utf8.txt 2012-05-07 20:20:42 +0000
3816+++ Percona-Server/sql/share/errmsg-utf8.txt 2012-10-19 05:18:21 +0000
3817@@ -6343,8 +6343,8 @@
3818 ER_PATH_LENGTH
3819 eng "The path specified for %.64s is too long."
3820 ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT
3821- eng "The syntax '%s' is deprecated and will be removed in MySQL %s."
3822- ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt."
3823+ eng "'%s' is deprecated and will be removed in a future release."
3824+ ger "'%s' ist veraltet und wird in einer zukünftigen Version entfernt werden."
3825
3826 ER_WRONG_NATIVE_TABLE_STRUCTURE
3827 eng "Native table '%-.64s'.'%-.64s' has the wrong structure"
3828
3829=== modified file 'Percona-Server/sql/spatial.cc'
3830--- Percona-Server/sql/spatial.cc 2012-05-07 20:20:42 +0000
3831+++ Percona-Server/sql/spatial.cc 2012-10-19 05:18:21 +0000
3832@@ -507,12 +507,13 @@
3833 const char *wkb_end;
3834 Gis_point p;
3835
3836- if (len < 4)
3837+ if (len < 4 ||
3838+ (n_points= wkb_get_uint(wkb, bo)) < 1 ||
3839+ n_points > max_n_points)
3840 return 0;
3841- n_points= wkb_get_uint(wkb, bo);
3842 proper_length= 4 + n_points * POINT_DATA_SIZE;
3843
3844- if (!n_points || len < proper_length || res->reserve(proper_length))
3845+ if (len < proper_length || res->reserve(proper_length))
3846 return 0;
3847
3848 res->q_append(n_points);
3849@@ -1054,9 +1055,9 @@
3850 Gis_point p;
3851 const char *wkb_end;
3852
3853- if (len < 4)
3854+ if (len < 4 ||
3855+ (n_points= wkb_get_uint(wkb, bo)) > max_n_points)
3856 return 0;
3857- n_points= wkb_get_uint(wkb, bo);
3858 proper_size= 4 + n_points * (WKB_HEADER_SIZE + POINT_DATA_SIZE);
3859
3860 if (len < proper_size || res->reserve(proper_size))
3861
3862=== modified file 'Percona-Server/sql/spatial.h'
3863--- Percona-Server/sql/spatial.h 2011-06-30 15:46:53 +0000
3864+++ Percona-Server/sql/spatial.h 2012-10-19 05:18:21 +0000
3865@@ -383,6 +383,10 @@
3866
3867 class Gis_line_string: public Geometry
3868 {
3869+ // Maximum number of points in LineString that can fit into String
3870+ static const uint32 max_n_points=
3871+ (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
3872+ POINT_DATA_SIZE;
3873 public:
3874 Gis_line_string() {} /* Remove gcc warning */
3875 virtual ~Gis_line_string() {} /* Remove gcc warning */
3876@@ -439,6 +443,10 @@
3877
3878 class Gis_multi_point: public Geometry
3879 {
3880+ // Maximum number of points in MultiPoint that can fit into String
3881+ static const uint32 max_n_points=
3882+ (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) /
3883+ (WKB_HEADER_SIZE + POINT_DATA_SIZE);
3884 public:
3885 Gis_multi_point() {} /* Remove gcc warning */
3886 virtual ~Gis_multi_point() {} /* Remove gcc warning */
3887
3888=== modified file 'Percona-Server/sql/sql_base.cc'
3889--- Percona-Server/sql/sql_base.cc 2012-09-17 13:08:32 +0000
3890+++ Percona-Server/sql/sql_base.cc 2012-10-19 05:18:21 +0000
3891@@ -4979,8 +4979,6 @@
3892 */
3893 if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
3894 {
3895- bool need_prelocking= FALSE;
3896- TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
3897 /*
3898 Process elements of the prelocking set which are present there
3899 since parsing stage or were added to it by invocations of
3900@@ -4993,10 +4991,19 @@
3901 for (Sroutine_hash_entry *rt= *sroutine_to_open; rt;
3902 sroutine_to_open= &rt->next, rt= rt->next)
3903 {
3904+ bool need_prelocking= false;
3905+ TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
3906+
3907 error= open_and_process_routine(thd, thd->lex, rt, prelocking_strategy,
3908 has_prelocking_list, &ot_ctx,
3909 &need_prelocking);
3910
3911+ if (need_prelocking && ! thd->lex->requires_prelocking())
3912+ thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
3913+
3914+ if (need_prelocking && ! *start)
3915+ *start= thd->lex->query_tables;
3916+
3917 if (error)
3918 {
3919 if (ot_ctx.can_recover_from_failed_open())
3920@@ -5017,12 +5024,6 @@
3921 goto err;
3922 }
3923 }
3924-
3925- if (need_prelocking && ! thd->lex->requires_prelocking())
3926- thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
3927-
3928- if (need_prelocking && ! *start)
3929- *start= thd->lex->query_tables;
3930 }
3931 }
3932
3933@@ -5296,6 +5297,12 @@
3934 DBUG_ENTER("check_lock_and_start_stmt");
3935
3936 /*
3937+ Prelocking placeholder is not set for TABLE_LIST that
3938+ are directly used by TOP level statement.
3939+ */
3940+ DBUG_ASSERT(table_list->prelocking_placeholder == false);
3941+
3942+ /*
3943 TL_WRITE_DEFAULT and TL_READ_DEFAULT are supposed to be parser only
3944 types of locks so they should be converted to appropriate other types
3945 to be passed to storage engine. The exact lock type passed to the
3946
3947=== modified file 'Percona-Server/sql/sql_class.cc'
3948--- Percona-Server/sql/sql_class.cc 2012-09-17 13:08:32 +0000
3949+++ Percona-Server/sql/sql_class.cc 2012-10-19 05:18:21 +0000
3950@@ -255,6 +255,18 @@
3951 }
3952
3953 /**
3954+ Get net_wait_timeout for THD object
3955+
3956+ @param thd THD object
3957+
3958+ @retval net_wait_timeout value for thread on THD
3959+*/
3960+ulong thd_get_net_wait_timeout(THD* thd)
3961+{
3962+ return thd->variables.net_wait_timeout;
3963+}
3964+
3965+/**
3966 Set reference to Performance Schema object for THD object
3967
3968 @param thd THD object
3969@@ -423,6 +435,17 @@
3970 }
3971
3972 /**
3973+ Get reading/writing on socket from THD object
3974+ @param thd THD object
3975+
3976+ @retval net.reading_or_writing value for thread on THD.
3977+*/
3978+uint thd_get_net_read_write(THD *thd)
3979+{
3980+ return thd->net.reading_or_writing;
3981+}
3982+
3983+/**
3984 Set reference to mysys variable in THD object
3985
3986 @param thd THD object
3987
3988=== modified file 'Percona-Server/sql/sql_list.h'
3989--- Percona-Server/sql/sql_list.h 2011-06-30 15:46:53 +0000
3990+++ Percona-Server/sql/sql_list.h 2012-10-19 05:18:21 +0000
3991@@ -585,6 +585,9 @@
3992 inline void empty() { first= &last; last.prev= &first; }
3993 base_ilist() { empty(); }
3994 inline bool is_empty() { return first == &last; }
3995+ // Returns true if p is the last "real" object in the list,
3996+ // i.e. p->next points to the sentinel.
3997+ inline bool is_last(ilink *p) { return p->next == NULL || p->next == &last; }
3998 inline void append(ilink *a)
3999 {
4000 first->prev= &a->next;
4001@@ -660,6 +663,7 @@
4002 {
4003 public:
4004 I_List() :base_ilist() {}
4005+ inline bool is_last(T *p) { return base_ilist::is_last(p); }
4006 inline void empty() { base_ilist::empty(); }
4007 inline bool is_empty() { return base_ilist::is_empty(); }
4008 inline void append(T* a) { base_ilist::append(a); }
4009
4010=== modified file 'Percona-Server/sql/sql_plugin.cc'
4011--- Percona-Server/sql/sql_plugin.cc 2012-08-13 00:36:54 +0000
4012+++ Percona-Server/sql/sql_plugin.cc 2012-10-19 05:18:21 +0000
4013@@ -223,7 +223,7 @@
4014 (plugin_var_arg->flags & PLUGIN_VAR_THDLOCAL ? SESSION : GLOBAL) |
4015 (plugin_var_arg->flags & PLUGIN_VAR_READONLY ? READONLY : 0),
4016 0, -1, NO_ARG, pluginvar_show_type(plugin_var_arg), 0, 0,
4017- VARIABLE_NOT_IN_BINLOG, 0, 0, 0, 0, PARSE_NORMAL),
4018+ VARIABLE_NOT_IN_BINLOG, NULL, NULL, NULL, PARSE_NORMAL),
4019 plugin_var(plugin_var_arg), orig_pluginvar_name(plugin_var_arg->name)
4020 { plugin_var->name= name_arg; }
4021 sys_var_pluginvar *cast_pluginvar() { return this; }
4022@@ -1900,7 +1900,8 @@
4023 mysql_audit_acquire_plugins(thd, MYSQL_AUDIT_GENERAL_CLASS);
4024
4025 mysql_mutex_lock(&LOCK_plugin);
4026- if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
4027+ if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)) ||
4028+ plugin->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DYING))
4029 {
4030 my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PLUGIN", name->str);
4031 goto err;
4032
4033=== modified file 'Percona-Server/sql/sql_prepare.cc'
4034--- Percona-Server/sql/sql_prepare.cc 2012-09-17 13:08:32 +0000
4035+++ Percona-Server/sql/sql_prepare.cc 2012-10-19 05:18:21 +0000
4036@@ -878,6 +878,14 @@
4037 param->set_param_func(param, &read_pos, (uint) (data_end - read_pos));
4038 if (param->state == Item_param::NO_VALUE)
4039 DBUG_RETURN(1);
4040+
4041+ if (param->limit_clause_param && param->item_type != Item::INT_ITEM)
4042+ {
4043+ param->set_int(param->val_int(), MY_INT64_NUM_DECIMAL_DIGITS);
4044+ param->item_type= Item::INT_ITEM;
4045+ if (!param->unsigned_flag && param->value.integer < 0)
4046+ DBUG_RETURN(1);
4047+ }
4048 }
4049 }
4050 /*
4051
4052=== modified file 'Percona-Server/sql/sql_select.cc'
4053--- Percona-Server/sql/sql_select.cc 2012-09-17 13:08:32 +0000
4054+++ Percona-Server/sql/sql_select.cc 2012-10-19 05:18:21 +0000
4055@@ -578,8 +578,6 @@
4056
4057 if (having)
4058 {
4059- Query_arena backup, *arena;
4060- arena= thd->activate_stmt_arena_if_needed(&backup);
4061 nesting_map save_allow_sum_func= thd->lex->allow_sum_func;
4062 thd->where="having clause";
4063 thd->lex->allow_sum_func|= 1 << select_lex_arg->nest_level;
4064@@ -589,8 +587,6 @@
4065 having->check_cols(1)));
4066 select_lex->having_fix_field= 0;
4067 select_lex->having= having;
4068- if (arena)
4069- thd->restore_active_arena(arena, &backup);
4070
4071 if (having_fix_rc || thd->is_error())
4072 DBUG_RETURN(-1); /* purecov: inspected */
4073@@ -1541,12 +1537,19 @@
4074 DBUG_RETURN(1);
4075 }
4076 }
4077-
4078+ /*
4079+ Calculate a possible 'limit' of table rows for 'GROUP BY': 'need_tmp'
4080+ implies that there will be more postprocessing so the specified
4081+ 'limit' should not be enforced yet in the call to
4082+ 'test_if_skip_sort_order'.
4083+ */
4084+ const ha_rows limit = need_tmp ? HA_POS_ERROR : unit->select_limit_cnt;
4085+
4086 if (!(select_options & SELECT_BIG_RESULT) &&
4087 ((group_list &&
4088 (!simple_group ||
4089 !test_if_skip_sort_order(&join_tab[const_tables], group_list,
4090- unit->select_limit_cnt, 0,
4091+ limit, 0,
4092 &join_tab[const_tables].table->
4093 keys_in_use_for_group_by))) ||
4094 select_distinct) &&
4095@@ -6042,19 +6045,33 @@
4096 key_part->length,
4097 keyuse->val);
4098 }
4099- else if (keyuse->val->type() == Item::FIELD_ITEM ||
4100- (keyuse->val->type() == Item::REF_ITEM &&
4101- ((Item_ref*)keyuse->val)->ref_type() == Item_ref::OUTER_REF &&
4102- (*(Item_ref**)((Item_ref*)keyuse->val)->ref)->ref_type() ==
4103- Item_ref::DIRECT_REF &&
4104- keyuse->val->real_item()->type() == Item::FIELD_ITEM))
4105+
4106+ Item_field *field_item= NULL;
4107+ if (keyuse->val->type() == Item::FIELD_ITEM)
4108+ field_item= static_cast<Item_field*>(keyuse->val->real_item());
4109+ else if (keyuse->val->type() == Item::REF_ITEM)
4110+ {
4111+ Item_ref *item_ref= static_cast<Item_ref*>(keyuse->val);
4112+ if (item_ref->ref_type() == Item_ref::OUTER_REF)
4113+ {
4114+ if ((*item_ref->ref)->type() == Item::FIELD_ITEM)
4115+ field_item= static_cast<Item_field*>(item_ref->real_item());
4116+ else if ((*(Item_ref**)(item_ref)->ref)->ref_type()
4117+ == Item_ref::DIRECT_REF
4118+ &&
4119+ item_ref->real_item()->type() == Item::FIELD_ITEM)
4120+ field_item= static_cast<Item_field*>(item_ref->real_item());
4121+ }
4122+ }
4123+ if (field_item)
4124 return new store_key_field(thd,
4125- key_part->field,
4126- key_buff + maybe_null,
4127- maybe_null ? key_buff : 0,
4128- key_part->length,
4129- ((Item_field*) keyuse->val->real_item())->field,
4130- keyuse->val->full_name());
4131+ key_part->field,
4132+ key_buff + maybe_null,
4133+ maybe_null ? key_buff : 0,
4134+ key_part->length,
4135+ field_item->field,
4136+ keyuse->val->full_name());
4137+
4138 return new store_key_item(thd,
4139 key_part->field,
4140 key_buff + maybe_null,
4141
4142=== modified file 'Percona-Server/sql/sql_string.h'
4143--- Percona-Server/sql/sql_string.h 2012-05-10 07:49:14 +0000
4144+++ Percona-Server/sql/sql_string.h 2012-10-19 05:18:21 +0000
4145@@ -1,7 +1,7 @@
4146 #ifndef SQL_STRING_INCLUDED
4147 #define SQL_STRING_INCLUDED
4148
4149-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
4150+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
4151
4152 This program is free software; you can redistribute it and/or modify
4153 it under the terms of the GNU General Public License as published by
4154@@ -235,8 +235,12 @@
4155 }
4156 bool real_alloc(uint32 arg_length); // Empties old string
4157 bool realloc(uint32 arg_length);
4158- inline void shrink(uint32 arg_length) // Shrink buffer
4159+
4160+ // Shrink the buffer, but only if it is allocated on the heap.
4161+ inline void shrink(uint32 arg_length)
4162 {
4163+ if (!is_alloced())
4164+ return;
4165 if (arg_length < Alloced_length)
4166 {
4167 char *new_ptr;
4168@@ -252,7 +256,7 @@
4169 }
4170 }
4171 }
4172- bool is_alloced() { return alloced; }
4173+ bool is_alloced() const { return alloced; }
4174 inline String& operator = (const String &s)
4175 {
4176 if (&s != this)
4177
4178=== modified file 'Percona-Server/sql/sys_vars.cc'
4179--- Percona-Server/sql/sys_vars.cc 2012-09-28 01:36:45 +0000
4180+++ Percona-Server/sql/sys_vars.cc 2012-10-19 05:18:21 +0000
4181@@ -143,7 +143,7 @@
4182
4183 #define PFS_TRAILING_PROPERTIES \
4184 NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL), ON_UPDATE(NULL), \
4185- 0, NULL, sys_var::PARSE_EARLY
4186+ NULL, sys_var::PARSE_EARLY
4187
4188 static Sys_var_mybool Sys_pfs_enabled(
4189 "performance_schema",
4190@@ -1335,7 +1335,7 @@
4191 SESSION_VAR(max_join_size), NO_CMD_LINE,
4192 VALID_RANGE(1, HA_POS_ERROR), DEFAULT(HA_POS_ERROR), BLOCK_SIZE(1),
4193 NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
4194- ON_UPDATE(fix_max_join_size), DEPRECATED(70000, 0));
4195+ ON_UPDATE(fix_max_join_size), DEPRECATED(""));
4196
4197 static Sys_var_ulong Sys_max_long_data_size(
4198 "max_long_data_size",
4199@@ -1774,7 +1774,7 @@
4200 GLOBAL_VAR(rpl_recovery_rank), CMD_LINE(REQUIRED_ARG),
4201 VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1),
4202 NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
4203- DEPRECATED(70000, 0));
4204+ DEPRECATED(""));
4205
4206 static Sys_var_ulong Sys_range_alloc_block_size(
4207 "range_alloc_block_size",
4208@@ -2394,7 +2394,7 @@
4209 CMD_LINE(OPT_ARG, OPT_ENGINE_CONDITION_PUSHDOWN),
4210 DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
4211 ON_UPDATE(fix_engine_condition_pushdown),
4212- DEPRECATED(70000, "'@@optimizer_switch'"));
4213+ DEPRECATED("'@@optimizer_switch'"));
4214
4215 static Sys_var_plugin Sys_default_storage_engine(
4216 "default_storage_engine", "The default storage engine for new tables",
4217@@ -3081,7 +3081,7 @@
4218 "log", "Alias for --general-log. Deprecated",
4219 GLOBAL_VAR(opt_log), NO_CMD_LINE,
4220 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
4221- ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@general_log'"));
4222+ ON_UPDATE(fix_log_state), DEPRECATED("'@@general_log'"));
4223
4224 static Sys_var_mybool Sys_slow_query_log(
4225 "slow_query_log",
4226@@ -3226,7 +3226,7 @@
4227 "Alias for --slow-query-log. Deprecated",
4228 GLOBAL_VAR(opt_slow_log), NO_CMD_LINE,
4229 DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
4230- ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@slow_query_log'"));
4231+ ON_UPDATE(fix_log_state), DEPRECATED("'@@slow_query_log'"));
4232
4233 static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type)
4234 {
4235
4236=== modified file 'Percona-Server/sql/sys_vars.h'
4237--- Percona-Server/sql/sys_vars.h 2012-08-13 00:36:54 +0000
4238+++ Percona-Server/sql/sys_vars.h 2012-10-19 05:18:21 +0000
4239@@ -58,7 +58,7 @@
4240 @@foreign_key_checks <-> OPTION_NO_FOREIGN_KEY_CHECKS
4241 */
4242 #define REVERSE(X) ~(X)
4243-#define DEPRECATED(X, Y) X, Y
4244+#define DEPRECATED(X) X
4245
4246 #define session_var(THD, TYPE) (*(TYPE*)session_var_ptr(THD))
4247 #define global_var(TYPE) (*(TYPE*)global_var_ptr())
4248@@ -108,11 +108,11 @@
4249 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4250 on_check_function on_check_func=0,
4251 on_update_function on_update_func=0,
4252- uint deprecated_version=0, const char *substitute=0,
4253+ const char *substitute=0,
4254 int parse_flag= PARSE_NORMAL)
4255 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4256 getopt.arg_type, SHOWT, def_val, lock, binlog_status_arg,
4257- on_check_func, on_update_func, deprecated_version,
4258+ on_check_func, on_update_func,
4259 substitute, parse_flag)
4260 {
4261 option.var_type= ARGT;
4262@@ -201,11 +201,11 @@
4263 ulonglong def_val, PolyLock *lock,
4264 enum binlog_status_enum binlog_status_arg,
4265 on_check_function on_check_func, on_update_function on_update_func,
4266- uint deprecated_version, const char *substitute, int parse_flag= PARSE_NORMAL)
4267+ const char *substitute, int parse_flag= PARSE_NORMAL)
4268 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4269 getopt.arg_type, show_val_type_arg, def_val, lock,
4270 binlog_status_arg, on_check_func,
4271- on_update_func, deprecated_version, substitute, parse_flag)
4272+ on_update_func, substitute, parse_flag)
4273 {
4274 for (typelib.count= 0; values[typelib.count]; typelib.count++) /*no-op */;
4275 typelib.name="";
4276@@ -268,11 +268,11 @@
4277 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4278 on_check_function on_check_func=0,
4279 on_update_function on_update_func=0,
4280- uint deprecated_version=0, const char *substitute=0)
4281+ const char *substitute=0)
4282 : Sys_var_typelib(name_arg, comment, flag_args, off, getopt,
4283 SHOW_CHAR, values, def_val, lock,
4284 binlog_status_arg, on_check_func, on_update_func,
4285- deprecated_version, substitute)
4286+ substitute)
4287 {
4288 option.var_type= GET_ENUM;
4289 global_var(ulong)= def_val;
4290@@ -315,12 +315,12 @@
4291 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4292 on_check_function on_check_func=0,
4293 on_update_function on_update_func=0,
4294- uint deprecated_version=0, const char *substitute=0,
4295+ const char *substitute=0,
4296 int parse_flag= PARSE_NORMAL)
4297 : Sys_var_typelib(name_arg, comment, flag_args, off, getopt,
4298 SHOW_MY_BOOL, bool_values, def_val, lock,
4299 binlog_status_arg, on_check_func, on_update_func,
4300- deprecated_version, substitute, parse_flag)
4301+ substitute, parse_flag)
4302 {
4303 option.var_type= GET_BOOL;
4304 global_var(my_bool)= def_val;
4305@@ -371,12 +371,12 @@
4306 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4307 on_check_function on_check_func=0,
4308 on_update_function on_update_func=0,
4309- uint deprecated_version=0, const char *substitute=0,
4310+ const char *substitute=0,
4311 int parse_flag= PARSE_NORMAL)
4312 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4313 getopt.arg_type, SHOW_CHAR_PTR, (intptr)def_val,
4314 lock, binlog_status_arg, on_check_func, on_update_func,
4315- deprecated_version, substitute, parse_flag)
4316+ substitute, parse_flag)
4317 {
4318 is_os_charset= is_os_charset_arg == IN_FS_CHARSET;
4319 /*
4320@@ -465,7 +465,7 @@
4321 : sys_var(&all_sys_vars, name_arg, comment,
4322 sys_var::READONLY+sys_var::ONLY_SESSION, 0, -1,
4323 NO_ARG, SHOW_CHAR, 0, NULL, VARIABLE_NOT_IN_BINLOG,
4324- NULL, NULL, 0, NULL, PARSE_NORMAL)
4325+ NULL, NULL, NULL, PARSE_NORMAL)
4326 {
4327 is_os_charset= is_os_charset_arg == IN_FS_CHARSET;
4328 option.var_type= GET_STR;
4329@@ -538,10 +538,10 @@
4330 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4331 on_check_function on_check_func=0,
4332 on_update_function on_update_func=0,
4333- uint deprecated_version=0, const char *substitute=0)
4334+ const char *substitute=0)
4335 : Sys_var_charptr(name_arg, comment, flag_args, off, sizeof(char*),
4336 getopt, is_os_charset_arg, def_val, lock, binlog_status_arg,
4337- on_check_func, on_update_func, deprecated_version, substitute)
4338+ on_check_func, on_update_func, substitute)
4339 {
4340 global_var(LEX_STRING).length= strlen(def_val);
4341 DBUG_ASSERT(size == sizeof(LEX_STRING));
4342@@ -578,12 +578,12 @@
4343 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4344 on_check_function on_check_func=0,
4345 on_update_function on_update_func=0,
4346- uint deprecated_version=0, const char *substitute=0,
4347+ const char *substitute=0,
4348 int parse_flag= PARSE_NORMAL)
4349 : sys_var(&all_sys_vars, name_arg, comment, flag_args, 0, getopt.id,
4350 getopt.arg_type, SHOW_CHAR, (intptr)def_val,
4351 lock, binlog_status_arg, on_check_func, on_update_func,
4352- deprecated_version, substitute, parse_flag)
4353+ substitute, parse_flag)
4354 { option.var_type= GET_NO_ARG; }
4355 bool do_check(THD *thd, set_var *var)
4356 {
4357@@ -663,11 +663,11 @@
4358 enum binlog_status_enum binlog_status_arg,
4359 on_check_function on_check_func,
4360 keycache_update_function on_update_func,
4361- uint deprecated_version=0, const char *substitute=0)
4362+ const char *substitute=0)
4363 : Sys_var_ulonglong(name_arg, comment, flag_args, off, size,
4364 getopt, min_val, max_val, def_val,
4365 block_size, lock, binlog_status_arg, on_check_func, 0,
4366- deprecated_version, substitute),
4367+ substitute),
4368 keycache_update(on_update_func)
4369 {
4370 option.var_type|= GET_ASK_ADDR;
4371@@ -731,12 +731,12 @@
4372 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4373 on_check_function on_check_func=0,
4374 on_update_function on_update_func=0,
4375- uint deprecated_version=0, const char *substitute=0,
4376+ const char *substitute=0,
4377 int parse_flag= PARSE_NORMAL)
4378 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4379 getopt.arg_type, SHOW_DOUBLE, (longlong) double2ulonglong(def_val),
4380 lock, binlog_status_arg, on_check_func, on_update_func,
4381- deprecated_version, substitute, parse_flag)
4382+ substitute, parse_flag)
4383 {
4384 option.var_type= GET_DOUBLE;
4385 option.min_value= (longlong) double2ulonglong(min_val);
4386@@ -806,11 +806,11 @@
4387 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4388 on_check_function on_check_func=0,
4389 on_update_function on_update_func=0,
4390- uint deprecated_version=0, const char *substitute=0)
4391+ const char *substitute=0)
4392 : Sys_var_uint(name_arg, comment, SESSION, off, size, getopt,
4393 min_val, max_val, def_val, block_size,
4394 lock, binlog_status_arg, on_check_func, on_update_func,
4395- deprecated_version, substitute)
4396+ substitute)
4397 { }
4398 uchar *session_value_ptr(THD *thd, LEX_STRING *base)
4399 {
4400@@ -848,11 +848,11 @@
4401 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4402 on_check_function on_check_func=0,
4403 on_update_function on_update_func=0,
4404- uint deprecated_version=0, const char *substitute=0)
4405+ const char *substitute=0)
4406 : Sys_var_typelib(name_arg, comment, flag_args, off, getopt,
4407 SHOW_CHAR, values, def_val, lock,
4408 binlog_status_arg, on_check_func, on_update_func,
4409- deprecated_version, substitute)
4410+ substitute)
4411 {
4412 option.var_type= GET_FLAGSET;
4413 global_var(ulonglong)= def_val;
4414@@ -959,11 +959,11 @@
4415 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4416 on_check_function on_check_func=0,
4417 on_update_function on_update_func=0,
4418- uint deprecated_version=0, const char *substitute=0)
4419+ const char *substitute=0)
4420 : Sys_var_typelib(name_arg, comment, flag_args, off, getopt,
4421 SHOW_CHAR, values, def_val, lock,
4422 binlog_status_arg, on_check_func, on_update_func,
4423- deprecated_version, substitute)
4424+ substitute)
4425 {
4426 option.var_type= GET_SET;
4427 global_var(ulonglong)= def_val;
4428@@ -1065,12 +1065,12 @@
4429 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4430 on_check_function on_check_func=0,
4431 on_update_function on_update_func=0,
4432- uint deprecated_version=0, const char *substitute=0,
4433+ const char *substitute=0,
4434 int parse_flag= PARSE_NORMAL)
4435 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4436 getopt.arg_type, SHOW_CHAR, (intptr)def_val,
4437 lock, binlog_status_arg, on_check_func, on_update_func,
4438- deprecated_version, substitute, parse_flag),
4439+ substitute, parse_flag),
4440 plugin_type(plugin_type_arg)
4441 {
4442 option.var_type= GET_STR;
4443@@ -1179,12 +1179,12 @@
4444 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4445 on_check_function on_check_func=0,
4446 on_update_function on_update_func=0,
4447- uint deprecated_version=0, const char *substitute=0,
4448+ const char *substitute=0,
4449 int parse_flag= PARSE_NORMAL)
4450 : sys_var(&all_sys_vars, name_arg, comment, flag_args, 0, getopt.id,
4451 getopt.arg_type, SHOW_CHAR, (intptr)def_val,
4452 lock, binlog_status_arg, on_check_func, on_update_func,
4453- deprecated_version, substitute, parse_flag)
4454+ substitute, parse_flag)
4455 {
4456 DBUG_ASSERT(scope() == ONLY_SESSION);
4457 option.var_type= GET_NO_ARG;
4458@@ -1272,11 +1272,11 @@
4459 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4460 on_check_function on_check_func=0,
4461 on_update_function on_update_func=0,
4462- uint deprecated_version=0, const char *substitute=0)
4463+ const char *substitute=0)
4464 : Sys_var_typelib(name_arg, comment, flag_args, off, getopt,
4465 SHOW_MY_BOOL, bool_values, def_val, lock,
4466 binlog_status_arg, on_check_func, on_update_func,
4467- deprecated_version, substitute)
4468+ substitute)
4469 {
4470 option.var_type= GET_BOOL;
4471 reverse_semantics= my_count_bits(bitmask_arg) > 1;
4472@@ -1345,11 +1345,11 @@
4473 on_check_function on_check_func,
4474 session_special_update_function update_func_arg,
4475 session_special_read_function read_func_arg,
4476- uint deprecated_version=0, const char *substitute=0)
4477+ const char *substitute=0)
4478 : Sys_var_ulonglong(name_arg, comment, flag_args, 0,
4479 sizeof(ulonglong), getopt, min_val,
4480 max_val, 0, block_size, lock, binlog_status_arg, on_check_func, 0,
4481- deprecated_version, substitute),
4482+ substitute),
4483 read_func(read_func_arg), update_func(update_func_arg)
4484 {
4485 DBUG_ASSERT(scope() == ONLY_SESSION);
4486@@ -1398,12 +1398,12 @@
4487 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4488 on_check_function on_check_func=0,
4489 on_update_function on_update_func=0,
4490- uint deprecated_version=0, const char *substitute=0,
4491+ const char *substitute=0,
4492 int parse_flag= PARSE_NORMAL)
4493 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4494 getopt.arg_type, SHOW_CHAR, 0,
4495 lock, binlog_status_arg, on_check_func, on_update_func,
4496- deprecated_version, substitute, parse_flag)
4497+ substitute, parse_flag)
4498 {
4499 DBUG_ASSERT(scope() == GLOBAL);
4500 DBUG_ASSERT(getopt.id == -1);
4501@@ -1467,12 +1467,12 @@
4502 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4503 on_check_function on_check_func=0,
4504 on_update_function on_update_func=0,
4505- uint deprecated_version=0, const char *substitute=0,
4506+ const char *substitute=0,
4507 int parse_flag= PARSE_NORMAL)
4508 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4509 getopt.arg_type, SHOW_CHAR, (intptr)def_val,
4510 lock, binlog_status_arg, on_check_func, on_update_func,
4511- deprecated_version, substitute, parse_flag),
4512+ substitute, parse_flag),
4513 name_offset(name_off)
4514 {
4515 option.var_type= GET_STR;
4516@@ -1540,12 +1540,12 @@
4517 enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
4518 on_check_function on_check_func=0,
4519 on_update_function on_update_func=0,
4520- uint deprecated_version=0, const char *substitute=0,
4521+ const char *substitute=0,
4522 int parse_flag= PARSE_NORMAL)
4523 : sys_var(&all_sys_vars, name_arg, comment, flag_args, off, getopt.id,
4524 getopt.arg_type, SHOW_CHAR, (intptr)def_val,
4525 lock, binlog_status_arg, on_check_func, on_update_func,
4526- deprecated_version, substitute, parse_flag)
4527+ substitute, parse_flag)
4528 {
4529 DBUG_ASSERT(getopt.id == -1);
4530 DBUG_ASSERT(size == sizeof(Time_zone *));
4531
4532=== modified file 'Percona-Server/storage/archive/ha_archive.cc'
4533--- Percona-Server/storage/archive/ha_archive.cc 2012-05-31 09:47:13 +0000
4534+++ Percona-Server/storage/archive/ha_archive.cc 2012-10-19 05:18:21 +0000
4535@@ -277,7 +277,7 @@
4536
4537 build_table_filename(az_file, sizeof(az_file) - 1, db, name, ARZ, 0);
4538
4539- if (!(mysql_file_stat(arch_key_file_data, az_file, &file_stat, MYF(0))))
4540+ if (!(mysql_file_stat(/* arch_key_file_data */ 0, az_file, &file_stat, MYF(0))))
4541 goto err;
4542
4543 if (!(azopen(&frm_stream, az_file, O_RDONLY|O_BINARY)))
4544@@ -727,7 +727,7 @@
4545 There is a chance that the file was "discovered". In this case
4546 just use whatever file is there.
4547 */
4548- if (!(mysql_file_stat(arch_key_file_data, name_buff, &file_stat, MYF(0))))
4549+ if (!(mysql_file_stat(/* arch_key_file_data */ 0, name_buff, &file_stat, MYF(0))))
4550 {
4551 my_errno= 0;
4552 if (!(azopen(&create_stream, name_buff, O_CREAT|O_RDWR|O_BINARY)))
4553@@ -1622,7 +1622,7 @@
4554 {
4555 MY_STAT file_stat; // Stat information for the data file
4556
4557- (void) mysql_file_stat(arch_key_file_data, share->data_file_name, &file_stat, MYF(MY_WME));
4558+ (void) mysql_file_stat(/* arch_key_file_data */ 0, share->data_file_name, &file_stat, MYF(MY_WME));
4559
4560 if (flag & HA_STATUS_TIME)
4561 stats.update_time= (ulong) file_stat.st_mtime;
4562
4563=== modified file 'Percona-Server/storage/federated/ha_federated.cc'
4564--- Percona-Server/storage/federated/ha_federated.cc 2012-05-10 07:49:14 +0000
4565+++ Percona-Server/storage/federated/ha_federated.cc 2012-10-19 05:18:21 +0000
4566@@ -1397,7 +1397,7 @@
4567 break;
4568 }
4569 DBUG_PRINT("info", ("federated HA_READ_AFTER_KEY %d", i));
4570- if (store_length >= length) /* end key */
4571+ if ((store_length >= length) || (i > 0)) /* for all parts of end key*/
4572 {
4573 if (emit_key_part_name(&tmp, key_part))
4574 goto err;
4575
4576=== modified file 'Percona-Server/storage/innobase/btr/btr0btr.c'
4577--- Percona-Server/storage/innobase/btr/btr0btr.c 2012-09-28 07:53:51 +0000
4578+++ Percona-Server/storage/innobase/btr/btr0btr.c 2012-10-19 05:18:21 +0000
4579@@ -1891,6 +1891,7 @@
4580 root = btr_cur_get_page(cursor);
4581 root_block = btr_cur_get_block(cursor);
4582 root_page_zip = buf_block_get_page_zip(root_block);
4583+ ut_ad(page_get_n_recs(root) > 0);
4584 #ifdef UNIV_ZIP_DEBUG
4585 ut_a(!root_page_zip || page_zip_validate(root_page_zip, root));
4586 #endif /* UNIV_ZIP_DEBUG */
4587@@ -2371,12 +2372,20 @@
4588 BTR_CONT_MODIFY_TREE,
4589 &cursor, 0, file, line, mtr);
4590
4591- err = btr_cur_pessimistic_insert(BTR_NO_LOCKING_FLAG
4592- | BTR_KEEP_SYS_FLAG
4593- | BTR_NO_UNDO_LOG_FLAG,
4594- &cursor, tuple, &rec,
4595- &dummy_big_rec, 0, NULL, mtr);
4596- ut_a(err == DB_SUCCESS);
4597+ ut_ad(cursor.flag == BTR_CUR_BINARY);
4598+
4599+ err = btr_cur_optimistic_insert(
4600+ BTR_NO_LOCKING_FLAG | BTR_KEEP_SYS_FLAG
4601+ | BTR_NO_UNDO_LOG_FLAG, &cursor, tuple, &rec,
4602+ &dummy_big_rec, 0, NULL, mtr);
4603+
4604+ if (err == DB_FAIL) {
4605+ err = btr_cur_pessimistic_insert(
4606+ BTR_NO_LOCKING_FLAG | BTR_KEEP_SYS_FLAG
4607+ | BTR_NO_UNDO_LOG_FLAG,
4608+ &cursor, tuple, &rec, &dummy_big_rec, 0, NULL, mtr);
4609+ ut_a(err == DB_SUCCESS);
4610+ }
4611 }
4612
4613 /**************************************************************//**
4614
4615=== modified file 'Percona-Server/storage/innobase/btr/btr0cur.c'
4616--- Percona-Server/storage/innobase/btr/btr0cur.c 2012-09-17 13:08:32 +0000
4617+++ Percona-Server/storage/innobase/btr/btr0cur.c 2012-10-19 05:18:21 +0000
4618@@ -1412,7 +1412,12 @@
4619
4620 if (UNIV_UNLIKELY(reorg)) {
4621 ut_a(zip_size);
4622- ut_a(*rec);
4623+ /* It's possible for rec to be NULL if the
4624+ page is compressed. This is because a
4625+ reorganized page may become incompressible. */
4626+ if (!*rec) {
4627+ goto fail;
4628+ }
4629 }
4630 }
4631
4632@@ -1548,20 +1553,9 @@
4633 ut_ad((thr && thr_get_trx(thr)->fake_changes) || mtr_memo_contains(mtr, btr_cur_get_block(cursor),
4634 MTR_MEMO_PAGE_X_FIX));
4635
4636- /* Try first an optimistic insert; reset the cursor flag: we do not
4637- assume anything of how it was positioned */
4638-
4639 cursor->flag = BTR_CUR_BINARY;
4640
4641- err = btr_cur_optimistic_insert(flags, cursor, entry, rec,
4642- big_rec, n_ext, thr, mtr);
4643- if (err != DB_FAIL) {
4644-
4645- return(err);
4646- }
4647-
4648- /* Retry with a pessimistic insert. Check locks and write to undo log,
4649- if specified */
4650+ /* Check locks and write to undo log, if specified */
4651
4652 err = btr_cur_ins_lock_and_undo(flags, cursor, entry,
4653 thr, mtr, &dummy_inh);
4654@@ -2188,8 +2182,12 @@
4655 goto err_exit;
4656 }
4657
4658- max_size = old_rec_size
4659- + page_get_max_insert_size_after_reorganize(page, 1);
4660+ /* We do not attempt to reorganize if the page is compressed.
4661+ This is because the page may fail to compress after reorganization. */
4662+ max_size = page_zip
4663+ ? page_get_max_insert_size(page, 1)
4664+ : (old_rec_size
4665+ + page_get_max_insert_size_after_reorganize(page, 1));
4666
4667 if (!(((max_size >= BTR_CUR_PAGE_REORGANIZE_LIMIT)
4668 && (max_size >= new_rec_size))
4669@@ -2559,7 +2557,12 @@
4670 err = DB_SUCCESS;
4671 goto return_after_reservations;
4672 } else {
4673- ut_a(optim_err != DB_UNDERFLOW);
4674+ /* If the page is compressed and it initially
4675+ compresses very well, and there is a subsequent insert
4676+ of a badly-compressing record, it is possible for
4677+ btr_cur_optimistic_update() to return DB_UNDERFLOW and
4678+ btr_cur_insert_if_possible() to return FALSE. */
4679+ ut_a(page_zip || optim_err != DB_UNDERFLOW);
4680
4681 /* Out of space: reset the free bits. */
4682 if (!dict_index_is_clust(index)
4683@@ -2588,7 +2591,9 @@
4684 was_first = page_cur_is_before_first(page_cursor);
4685
4686 /* Lock checks and undo logging were already performed by
4687- btr_cur_upd_lock_and_undo(). */
4688+ btr_cur_upd_lock_and_undo(). We do not try
4689+ btr_cur_optimistic_insert() because
4690+ btr_cur_insert_if_possible() already failed above. */
4691
4692 err = btr_cur_pessimistic_insert(BTR_NO_UNDO_LOG_FLAG
4693 | BTR_NO_LOCKING_FLAG
4694
4695=== modified file 'Percona-Server/storage/innobase/btr/btr0pcur.c'
4696--- Percona-Server/storage/innobase/btr/btr0pcur.c 2012-06-01 12:15:25 +0000
4697+++ Percona-Server/storage/innobase/btr/btr0pcur.c 2012-10-19 05:18:21 +0000
4698@@ -354,44 +354,39 @@
4699 /* Restore the old search mode */
4700 cursor->search_mode = old_mode;
4701
4702- if (btr_pcur_is_on_user_rec(cursor)) {
4703- switch (cursor->rel_pos) {
4704- case BTR_PCUR_ON:
4705- if (!cmp_dtuple_rec(
4706- tuple, btr_pcur_get_rec(cursor),
4707- rec_get_offsets(btr_pcur_get_rec(cursor),
4708- index, NULL,
4709- ULINT_UNDEFINED, &heap))) {
4710-
4711- /* We have to store the NEW value for
4712- the modify clock, since the cursor can
4713- now be on a different page! But we can
4714- retain the value of old_rec */
4715-
4716- cursor->block_when_stored =
4717- btr_pcur_get_block(cursor);
4718- cursor->modify_clock =
4719- buf_block_get_modify_clock(
4720- cursor->block_when_stored);
4721- cursor->old_stored = BTR_PCUR_OLD_STORED;
4722-
4723- mem_heap_free(heap);
4724-
4725- return(TRUE);
4726- }
4727-
4728- break;
4729- case BTR_PCUR_BEFORE:
4730- page_cur_move_to_next(btr_pcur_get_page_cur(cursor));
4731- break;
4732- case BTR_PCUR_AFTER:
4733- page_cur_move_to_prev(btr_pcur_get_page_cur(cursor));
4734- break;
4735+ switch (cursor->rel_pos) {
4736+ case BTR_PCUR_ON:
4737+ if (btr_pcur_is_on_user_rec(cursor)
4738+ && !cmp_dtuple_rec(
4739+ tuple, btr_pcur_get_rec(cursor),
4740+ rec_get_offsets(btr_pcur_get_rec(cursor),
4741+ index, NULL,
4742+ ULINT_UNDEFINED, &heap))) {
4743+
4744+ /* We have to store the NEW value for
4745+ the modify clock, since the cursor can
4746+ now be on a different page! But we can
4747+ retain the value of old_rec */
4748+
4749+ cursor->block_when_stored =
4750+ btr_pcur_get_block(cursor);
4751+ cursor->modify_clock =
4752+ buf_block_get_modify_clock(
4753+ cursor->block_when_stored);
4754+ cursor->old_stored = BTR_PCUR_OLD_STORED;
4755+
4756+ mem_heap_free(heap);
4757+
4758+ return(TRUE);
4759+ }
4760 #ifdef UNIV_DEBUG
4761- default:
4762- ut_error;
4763+ /* fall through */
4764+ case BTR_PCUR_BEFORE:
4765+ case BTR_PCUR_AFTER:
4766+ break;
4767+ default:
4768+ ut_error;
4769 #endif /* UNIV_DEBUG */
4770- }
4771 }
4772
4773 mem_heap_free(heap);
4774
4775=== modified file 'Percona-Server/storage/innobase/buf/buf0buf.c'
4776--- Percona-Server/storage/innobase/buf/buf0buf.c 2012-10-12 06:24:13 +0000
4777+++ Percona-Server/storage/innobase/buf/buf0buf.c 2012-10-19 05:18:21 +0000
4778@@ -336,15 +336,6 @@
4779 # endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
4780 #endif /* UNIV_PFS_MUTEX || UNIV_PFS_RWLOCK */
4781
4782-/** A chunk of buffers. The buffer pool is allocated in chunks. (moved to buf0buf.h)*/
4783-//struct buf_chunk_struct{
4784-// ulint mem_size; /*!< allocated size of the chunk */
4785-// ulint size; /*!< size of frames[] and blocks[] */
4786-// void* mem; /*!< pointer to the memory area which
4787-// was allocated for the frames */
4788-// buf_block_t* blocks; /*!< array of buffer control blocks */
4789-//};
4790-
4791 /********************************************************************//**
4792 Gets the smallest oldest_modification lsn for any page in the pool. Returns
4793 zero if all modified pages have been flushed to disk.
4794@@ -4973,7 +4964,7 @@
4795 Collect buffer pool stats information for a buffer pool. Also
4796 record aggregated stats if there are more than one buffer pool
4797 in the server */
4798-static
4799+UNIV_INTERN
4800 void
4801 buf_stats_get_pool_info(
4802 /*====================*/
4803
4804=== modified file 'Percona-Server/storage/innobase/buf/buf0lru.c'
4805--- Percona-Server/storage/innobase/buf/buf0lru.c 2012-10-01 00:47:22 +0000
4806+++ Percona-Server/storage/innobase/buf/buf0lru.c 2012-10-19 05:18:21 +0000
4807@@ -2384,7 +2384,7 @@
4808 #endif
4809 mutex_t* block_mutex = buf_page_get_mutex(bpage);
4810
4811- ut_ad(buf_pool_mutex_own(buf_pool));
4812+ ut_ad(mutex_own(&buf_pool->LRU_list_mutex));
4813 ut_ad(mutex_own(block_mutex));
4814
4815 if (buf_LRU_block_remove_hashed_page(bpage, TRUE)
4816
4817=== modified file 'Percona-Server/storage/innobase/buf/buf0rea.c'
4818--- Percona-Server/storage/innobase/buf/buf0rea.c 2012-08-07 06:10:00 +0000
4819+++ Percona-Server/storage/innobase/buf/buf0rea.c 2012-10-19 05:18:21 +0000
4820@@ -64,7 +64,7 @@
4821 == BUF_BLOCK_FILE_PAGE);
4822
4823 /* First unfix and release lock on the bpage */
4824- buf_pool_mutex_enter(buf_pool);
4825+ mutex_enter(&buf_pool->LRU_list_mutex);
4826 mutex_enter(buf_page_get_mutex(bpage));
4827 ut_ad(buf_page_get_io_fix(bpage) == BUF_IO_READ);
4828 ut_ad(bpage->buf_fix_count == 0);
4829@@ -85,7 +85,7 @@
4830 buf_pool->n_pend_reads--;
4831
4832 mutex_exit(buf_page_get_mutex(bpage));
4833- buf_pool_mutex_exit(buf_pool);
4834+ mutex_exit(&buf_pool->LRU_list_mutex);
4835 }
4836
4837 /********************************************************************//**
4838
4839=== modified file 'Percona-Server/storage/innobase/handler/ha_innodb.cc'
4840--- Percona-Server/storage/innobase/handler/ha_innodb.cc 2012-10-01 00:49:13 +0000
4841+++ Percona-Server/storage/innobase/handler/ha_innodb.cc 2012-10-19 05:18:21 +0000
4842@@ -13019,7 +13019,10 @@
4843 i_s_innodb_buffer_pool_pages_index,
4844 i_s_innodb_buffer_pool_pages_blob,
4845 i_s_innodb_admin_command,
4846-i_s_innodb_changed_pages
4847+i_s_innodb_changed_pages,
4848+i_s_innodb_buffer_page,
4849+i_s_innodb_buffer_page_lru,
4850+i_s_innodb_buffer_stats
4851 mysql_declare_plugin_end;
4852
4853 /** @brief Initialize the default value of innodb_commit_concurrency.
4854
4855=== modified file 'Percona-Server/storage/innobase/handler/i_s.cc'
4856--- Percona-Server/storage/innobase/handler/i_s.cc 2012-09-18 04:40:37 +0000
4857+++ Percona-Server/storage/innobase/handler/i_s.cc 2012-10-19 05:18:21 +0000
4858@@ -63,8 +63,93 @@
4859 #include "buf0lru.h" /* for XTRA_LRU_[DUMP/RESTORE] */
4860 #include "btr0btr.h" /* for btr_page_get_index_id */
4861 #include "log0online.h"
4862+#include "btr0btr.h"
4863+#include "page0zip.h"
4864+#include "log0log.h"
4865 }
4866
4867+/** structure associates a name string with a file page type and/or buffer
4868+page state. */
4869+struct buffer_page_desc_str_struct{
4870+ const char* type_str; /*!< String explain the page
4871+ type/state */
4872+ ulint type_value; /*!< Page type or page state */
4873+};
4874+
4875+typedef struct buffer_page_desc_str_struct buf_page_desc_str_t;
4876+
4877+/** Any states greater than FIL_PAGE_TYPE_LAST would be treated as unknown. */
4878+#define I_S_PAGE_TYPE_UNKNOWN (FIL_PAGE_TYPE_LAST + 1)
4879+
4880+/** We also define I_S_PAGE_TYPE_INDEX as the Index Page's position
4881+in i_s_page_type[] array */
4882+#define I_S_PAGE_TYPE_INDEX 1
4883+
4884+/** Name string for File Page Types */
4885+static buf_page_desc_str_t i_s_page_type[] = {
4886+ {"ALLOCATED", FIL_PAGE_TYPE_ALLOCATED},
4887+ {"INDEX", FIL_PAGE_INDEX},
4888+ {"UNDO_LOG", FIL_PAGE_UNDO_LOG},
4889+ {"INODE", FIL_PAGE_INODE},
4890+ {"IBUF_FREE_LIST", FIL_PAGE_IBUF_FREE_LIST},
4891+ {"IBUF_BITMAP", FIL_PAGE_IBUF_BITMAP},
4892+ {"SYSTEM", FIL_PAGE_TYPE_SYS},
4893+ {"TRX_SYSTEM", FIL_PAGE_TYPE_TRX_SYS},
4894+ {"FILE_SPACE_HEADER", FIL_PAGE_TYPE_FSP_HDR},
4895+ {"EXTENT_DESCRIPTOR", FIL_PAGE_TYPE_XDES},
4896+ {"BLOB", FIL_PAGE_TYPE_BLOB},
4897+ {"COMPRESSED_BLOB", FIL_PAGE_TYPE_ZBLOB},
4898+ {"COMPRESSED_BLOB2", FIL_PAGE_TYPE_ZBLOB2},
4899+ {"UNKNOWN", I_S_PAGE_TYPE_UNKNOWN}
4900+};
4901+
4902+/* Check if we can hold all page type in a 4 bit value */
4903+#if I_S_PAGE_TYPE_UNKNOWN > 1<<4
4904+# error "i_s_page_type[] is too large"
4905+#endif
4906+
4907+/** This structure defines information we will fetch from pages
4908+currently cached in the buffer pool. It will be used to populate
4909+table INFORMATION_SCHEMA.INNODB_BUFFER_PAGE */
4910+struct buffer_page_info_struct{
4911+ ulint block_id; /*!< Buffer Pool block ID */
4912+ unsigned space_id:32; /*!< Tablespace ID */
4913+ unsigned page_num:32; /*!< Page number/offset */
4914+ unsigned access_time:32; /*!< Time of first access */
4915+ unsigned pool_id:MAX_BUFFER_POOLS_BITS;
4916+ /*!< Buffer Pool ID. Must be less than
4917+ MAX_BUFFER_POOLS */
4918+ unsigned flush_type:2; /*!< Flush type */
4919+ unsigned io_fix:2; /*!< type of pending I/O operation */
4920+ unsigned fix_count:19; /*!< Count of how manyfold this block
4921+ is bufferfixed */
4922+ unsigned hashed:1; /*!< Whether hash index has been
4923+ built on this page */
4924+ unsigned is_old:1; /*!< TRUE if the block is in the old
4925+ blocks in buf_pool->LRU_old */
4926+ unsigned freed_page_clock:31; /*!< the value of
4927+ buf_pool->freed_page_clock */
4928+ unsigned zip_ssize:PAGE_ZIP_SSIZE_BITS;
4929+ /*!< Compressed page size */
4930+ unsigned page_state:BUF_PAGE_STATE_BITS; /*!< Page state */
4931+ unsigned page_type:4; /*!< Page type */
4932+ unsigned num_recs;
4933+ /*!< Number of records on Page */
4934+ unsigned data_size;
4935+ /*!< Sum of the sizes of the records */
4936+ lsn_t newest_mod; /*!< Log sequence number of
4937+ the youngest modification */
4938+ lsn_t oldest_mod; /*!< Log sequence number of
4939+ the oldest modification */
4940+ index_id_t index_id; /*!< Index ID if a index page */
4941+};
4942+
4943+typedef struct buffer_page_info_struct buf_page_info_t;
4944+
4945+/** maximum number of buffer page info we would cache. */
4946+#define MAX_BUF_INFO_CACHED 10000
4947+
4948+
4949 #define OK(expr) \
4950 if ((expr) != 0) { \
4951 DBUG_RETURN(1); \
4952@@ -1599,7 +1684,6 @@
4953
4954 buf_pool = buf_pool_from_array(i);
4955
4956- //buf_pool_mutex_enter(buf_pool);
4957 mutex_enter(&buf_pool->zip_free_mutex);
4958
4959 for (uint x = 0; x <= BUF_BUDDY_SIZES; x++) {
4960@@ -1630,7 +1714,6 @@
4961 }
4962 }
4963
4964- //buf_pool_mutex_exit(buf_pool);
4965 mutex_exit(&buf_pool->zip_free_mutex);
4966
4967 if (status) {
4968@@ -1812,6 +1895,1773 @@
4969 STRUCT_FLD(flags, 0UL),
4970 };
4971
4972+/* Fields of the dynamic table INNODB_BUFFER_POOL_STATS. */
4973+static ST_FIELD_INFO i_s_innodb_buffer_stats_fields_info[] =
4974+{
4975+#define IDX_BUF_STATS_POOL_ID 0
4976+ {STRUCT_FLD(field_name, "POOL_ID"),
4977+ STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
4978+ STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
4979+ STRUCT_FLD(value, 0),
4980+ STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
4981+ STRUCT_FLD(old_name, ""),
4982+ STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
4983+
4984+#define IDX_BUF_STATS_POOL_SIZE 1
4985+ {STRUCT_FLD(field_name, "POOL_SIZE"),
4986+ STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
4987+ STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
4988+ STRUCT_FLD(value, 0),
4989+ STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
4990+ STRUCT_FLD(old_name, ""),
4991+ STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
4992+
4993+#define IDX_BUF_STATS_FREE_BUFFERS 2
4994+ {STRUCT_FLD(field_name, "FREE_BUFFERS"),
4995+ STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
4996+ STRUCT_FLD(field_type, MYSQL_TYPE_LONGLONG),
4997+ STRUCT_FLD(value, 0),
4998+ STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
4999+ STRUCT_FLD(old_name, ""),
5000+ STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches