3378 Marc Alff 2010-11-21 [merge]
Merge mysql-5.5-bugteam --> mysql-trunk-bugfixing
added:
storage/perfschema/unittest/stub_server_misc.h
modified:
sql/mysqld.cc
storage/perfschema/pfs_lock.h
storage/perfschema/unittest/pfs-t.cc
storage/perfschema/unittest/pfs_instr-oom-t.cc
storage/perfschema/unittest/pfs_instr-t.cc
storage/perfschema/unittest/pfs_instr_class-oom-t.cc
storage/perfschema/unittest/pfs_instr_class-t.cc
3377 Davi Arnaut 2010-11-20
Merge of mysql-5.5-bugteam into mysql-trunk-bugfixing.
removed:
BUILD/Makefile.am
Docs/Makefile.am
Makefile.am
client/Makefile.am
cmake/Makefile.am
cmd-line-utils/Makefile.am
cmd-line-utils/libedit/Makefile.am
cmd-line-utils/readline/Makefile.am
config/
config/ac-macros/
config/ac-macros/alloca.m4
config/ac-macros/character_sets.m4
config/ac-macros/check_cpu.m4
config/ac-macros/compiler_flag.m4
config/ac-macros/dtrace.m4
config/ac-macros/gtest.m4
config/ac-macros/large_file.m4
config/ac-macros/maintainer.m4
config/ac-macros/misc.m4
config/ac-macros/plugins.m4
config/ac-macros/readline.m4
config/ac-macros/ssl.m4
config/ac-macros/zlib.m4
configure.in
dbug/Makefile.am
extra/Makefile.am
extra/yassl/Makefile.am
extra/yassl/src/Makefile.am
extra/yassl/taocrypt/Makefile.am
extra/yassl/taocrypt/benchmark/Makefile.am
extra/yassl/taocrypt/src/Makefile.am
extra/yassl/taocrypt/test/Makefile.am
extra/yassl/testsuite/Makefile.am
include/Makefile.am
libmysql/Makefile.am
libmysql/Makefile.shared
libmysql/acinclude.m4
libmysql_r/
libmysql_r/Makefile.am
libmysqld/Makefile.am
libmysqld/examples/Makefile.am
libservices/Makefile.am
man/Makefile.am
mysql-test/Makefile.am
mysql-test/lib/My/SafeProcess/Makefile.am
mysql-test/suite/perfschema/r/ddl_threads.result
mysql-test/suite/perfschema/r/dml_threads.result
mysql-test/suite/perfschema/r/thread_cache.result
mysql-test/suite/perfschema/t/ddl_threads.test
mysql-test/suite/perfschema/t/dml_threads.test
mysql-test/suite/perfschema/t/thread_cache.test
mysql-test/t/join_optimizer.test
mysys/Makefile.am
packaging/Makefile.am
plugin/Makefile.am
plugin/audit_null/Makefile.am
plugin/audit_null/plug.in
plugin/auth/Makefile.am
plugin/auth/plug.in
plugin/daemon_example/Makefile.am
plugin/daemon_example/configure.in
plugin/daemon_example/plug.in
plugin/fulltext/Makefile.am
plugin/fulltext/configure.in
plugin/fulltext/plug.in
plugin/semisync/Makefile.am
plugin/semisync/configure.in
plugin/semisync/plug.in
regex/Makefile.am
scripts/Makefile.am
scripts/make_sharedlib_distribution.sh
sql-bench/Makefile.am
sql-common/Makefile.am
sql/Makefile.am
sql/share/Makefile.am
storage/Makefile.am
storage/archive/Makefile.am
storage/archive/plug.in
storage/blackhole/Makefile.am
storage/blackhole/plug.in
storage/csv/Makefile.am
storage/csv/plug.in
storage/example/Makefile.am
storage/example/plug.in
storage/federated/Makefile.am
storage/federated/plug.in
storage/heap/Makefile.am
storage/heap/plug.in
storage/innobase/Makefile.am
storage/innobase/plug.in
storage/myisam/Makefile.am
storage/myisam/plug.in
storage/myisammrg/Makefile.am
storage/myisammrg/plug.in
storage/perfschema/Makefile.am
storage/perfschema/plug.in
storage/perfschema/unittest/Makefile.am
strings/Makefile.am
support-files/MacOSX/Makefile.am
support-files/Makefile.am
support-files/RHEL4-SElinux/Makefile.am
tests/Makefile.am
unittest/Makefile.am
unittest/examples/Makefile.am
unittest/gunit/Makefile.am
unittest/mysys/Makefile.am
unittest/mytap/Makefile.am
unittest/mytap/t/Makefile.am
unittest/strings/Makefile.am
vio/Makefile.am
win/Makefile.am
zlib/Makefile.am
added:
VERSION
modified:
BUILD/FINISH.sh
BUILD/autorun.sh
BUILD/cmake_configure.sh
cmake/make_dist.cmake.in
cmake/mysql_version.cmake
cmake/versioninfo.rc.in
include/m_string.h
packaging/WiX/create_msi.cmake.in
packaging/WiX/mysql_server.wxs.in
sql/CMakeLists.txt
support-files/MySQL-shared-compat.spec.sh
support-files/mysql.spec.sh
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2010-11-18 16:34:56 +0000
+++ b/sql/mysqld.cc 2010-11-21 13:48:44 +0000
@@ -323,7 +323,8 @@ static PSI_rwlock_key key_rwlock_openssl
/* the default log output is log tables */
static bool lower_case_table_names_used= 0;
static bool volatile select_thread_in_use, signal_thread_in_use;
-static bool volatile ready_to_exit;
+/* See Bug#56666 and Bug#56760 */;
+volatile bool ready_to_exit;
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
static my_bool opt_short_log_format= 0;
static uint kill_cached_threads, wake_thread;
=== modified file 'storage/perfschema/pfs_lock.h'
--- a/storage/perfschema/pfs_lock.h 2010-07-23 19:03:52 +0000
+++ b/storage/perfschema/pfs_lock.h 2010-11-21 13:48:44 +0000
@@ -146,7 +146,25 @@ struct pfs_lock
*/
void allocated_to_free(void)
{
- DBUG_ASSERT(m_state == PFS_LOCK_ALLOCATED);
+#ifndef DBUG_OFF
+ extern volatile bool ready_to_exit;
+#endif
+
+ /*
+ If this record is not in the ALLOCATED state and the caller is trying
+ to free it, this is a bug: the caller is confused,
+ and potentially damaging data owned by another thread or object.
+ The correct assert to use here to guarantee data integrity is simply:
+ DBUG_ASSERT(m_state == PFS_LOCK_ALLOCATED);
+ Now, because of Bug#56666 (Race condition between the server main thread
+ and the kill server thread), this assert actually fails during shutdown,
+ and the failure is legitimate, on concurrent calls to mysql_*_destroy(),
+ when destroying the instrumentation of an object ... twice.
+ During shutdown this has no consequences for the performance schema,
+ so the assert is relaxed with the "|| ready_to_exit" condition as a work
+ around until Bug#56666 is fixed.
+ */
+ DBUG_ASSERT((m_state == PFS_LOCK_ALLOCATED) || ready_to_exit);
PFS_atomic::store_32(&m_state, PFS_LOCK_FREE);
}
=== modified file 'storage/perfschema/unittest/pfs-t.cc'
--- a/storage/perfschema/unittest/pfs-t.cc 2010-07-23 19:03:52 +0000
+++ b/storage/perfschema/unittest/pfs-t.cc 2010-11-21 13:48:44 +0000
@@ -25,6 +25,7 @@
#include <memory.h>
#include "stub_print_error.h"
+#include "stub_server_misc.h"
/* test helpers, to simulate the setup */
=== modified file 'storage/perfschema/unittest/pfs_instr-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc 2010-07-23 19:03:52 +0000
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc 2010-11-21 13:48:44 +0000
@@ -21,6 +21,7 @@
#include <tap.h>
#include "stub_pfs_global.h"
+#include "stub_server_misc.h"
void test_oom()
{
=== modified file 'storage/perfschema/unittest/pfs_instr-t.cc'
--- a/storage/perfschema/unittest/pfs_instr-t.cc 2010-07-30 09:02:32 +0000
+++ b/storage/perfschema/unittest/pfs_instr-t.cc 2010-11-21 13:48:44 +0000
@@ -22,6 +22,8 @@
#include <memory.h>
+#include "stub_server_misc.h"
+
void test_no_instruments()
{
int rc;
=== modified file 'storage/perfschema/unittest/pfs_instr_class-oom-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc 2010-07-16 01:28:30 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc 2010-11-21 13:48:44 +0000
@@ -20,6 +20,7 @@
#include <tap.h>
#include "stub_pfs_global.h"
+#include "stub_server_misc.h"
void test_oom()
{
=== modified file 'storage/perfschema/unittest/pfs_instr_class-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc 2010-07-23 17:08:41 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc 2010-11-21 13:48:44 +0000
@@ -21,6 +21,8 @@
#include <pfs_global.h>
#include <tap.h>
+#include "stub_server_misc.h"
+
void test_no_registration()
{
int rc;
=== added file 'storage/perfschema/unittest/stub_server_misc.h'
--- a/storage/perfschema/unittest/stub_server_misc.h 1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/unittest/stub_server_misc.h 2010-11-16 08:36:42 +0000
@@ -0,0 +1,21 @@
+/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ Minimal code to be able to link a unit test.
+*/
+
+volatile bool ready_to_exit= false;
+
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-bugfixing branch (marc.alff:3377 to 3378) | Marc Alff | 21 Nov |