From: Marc Alff Date: November 2 2011 11:29pm Subject: bzr push into mysql-trunk branch (marc.alff:3547 to 3548) List-Archive: http://lists.mysql.com/commits/141709 Message-Id: <201111022329.pA2NToJ2005682@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3548 Marc Alff 2011-11-02 Fixed build break, when compiling without the performance schema. added: include/mysql/psi/psi_abi_v0.h include/mysql/psi/psi_abi_v0.h.pp modified: cmake/abi_check.cmake include/mysql/psi/psi.h include/mysql/psi/psi_abi_v1.h.pp include/mysql/psi/psi_abi_v2.h.pp sql/mysqld.cc sql/sql_class.h 3547 Marc Alff 2011-11-02 Bug#12981100 PERFORMANCE_SCHEMA NET IO IDLE AND RECV EVENTS NEST WITHIN THE WRONG STATEMENT Post push cleanup, to fix a remaining assert. Instrument incomplete statements as "statement/com/error", when a full network packet can not be read. modified: sql/sql_parse.cc === modified file 'cmake/abi_check.cmake' --- a/cmake/abi_check.cmake 2011-06-30 15:50:45 +0000 +++ b/cmake/abi_check.cmake 2011-11-02 23:29:01 +0000 @@ -39,6 +39,7 @@ IF(CMAKE_COMPILER_IS_GNUCC AND RUN_ABI_C ${CMAKE_SOURCE_DIR}/include/mysql/plugin_audit.h ${CMAKE_SOURCE_DIR}/include/mysql/plugin_ftparser.h ${CMAKE_SOURCE_DIR}/include/mysql.h + ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v0.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v1.h ${CMAKE_SOURCE_DIR}/include/mysql/psi/psi_abi_v2.h ${CMAKE_SOURCE_DIR}/include/mysql/client_plugin.h === modified file 'include/mysql/psi/psi.h' --- a/include/mysql/psi/psi.h 2011-11-01 16:33:58 +0000 +++ b/include/mysql/psi/psi.h 2011-11-02 23:29:01 +0000 @@ -83,6 +83,12 @@ struct PSI_thread; struct PSI_file; /** + Interface for an instrumented socket descriptor. + This is an opaque structure. +*/ +struct PSI_socket; + +/** Interface for an instrumented table operation. This is an opaque structure. */ @@ -95,10 +101,10 @@ struct PSI_table_locker; struct PSI_statement_locker; /** - Interface for an instrumented socket descriptor. + Interface for an instrumented idle operation. This is an opaque structure. */ -struct PSI_socket; +struct PSI_idle_locker; /** Entry point for the performance schema interface. */ struct PSI_bootstrap @@ -261,12 +267,6 @@ struct PSI_bootstrap #endif /** - Interface for an instrumented idle operation. - This is an opaque structure. -*/ -struct PSI_idle_locker; - -/** Interface for an instrumented mutex operation. This is an opaque structure. */ === added file 'include/mysql/psi/psi_abi_v0.h' --- a/include/mysql/psi/psi_abi_v0.h 1970-01-01 00:00:00 +0000 +++ b/include/mysql/psi/psi_abi_v0.h 2011-11-02 23:29:01 +0000 @@ -0,0 +1,24 @@ +/* Copyright (c) 2011, 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, + 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ + +/** + @file mysql/psi/psi_abi_v0.h + ABI check for mysql/psi/psi.h, when compiling without instrumentation. + This file is only used to automate detection of changes between versions. + Do not include this file, include mysql/psi/psi.h instead. +*/ +#define _global_h +#include "mysql/psi/psi.h" + === added file 'include/mysql/psi/psi_abi_v0.h.pp' --- a/include/mysql/psi/psi_abi_v0.h.pp 1970-01-01 00:00:00 +0000 +++ b/include/mysql/psi/psi_abi_v0.h.pp 2011-11-02 23:29:01 +0000 @@ -0,0 +1,32 @@ +#include "mysql/psi/psi.h" +C_MODE_START +struct TABLE_SHARE; +struct PSI_mutex; +struct PSI_rwlock; +struct PSI_cond; +struct PSI_table_share; +struct PSI_table; +struct PSI_thread; +struct PSI_file; +struct PSI_socket; +struct PSI_table_locker; +struct PSI_statement_locker; +struct PSI_idle_locker; +struct PSI_bootstrap +{ + void* (*get_interface)(int version); +}; +struct PSI_none +{ + int opaque; +}; +typedef struct PSI_none PSI; +struct PSI_stage_info_none +{ + unsigned int m_key; + const char *m_name; + int m_flags; +}; +typedef struct PSI_stage_info_none PSI_stage_info; +extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; +C_MODE_END === modified file 'include/mysql/psi/psi_abi_v1.h.pp' --- a/include/mysql/psi/psi_abi_v1.h.pp 2011-08-25 07:53:21 +0000 +++ b/include/mysql/psi/psi_abi_v1.h.pp 2011-11-02 23:29:01 +0000 @@ -8,14 +8,14 @@ struct PSI_table_share; struct PSI_table; struct PSI_thread; struct PSI_file; +struct PSI_socket; struct PSI_table_locker; struct PSI_statement_locker; -struct PSI_socket; +struct PSI_idle_locker; struct PSI_bootstrap { void* (*get_interface)(int version); }; -struct PSI_idle_locker; struct PSI_mutex_locker; struct PSI_rwlock_locker; struct PSI_cond_locker; === modified file 'include/mysql/psi/psi_abi_v2.h.pp' --- a/include/mysql/psi/psi_abi_v2.h.pp 2011-06-06 20:16:03 +0000 +++ b/include/mysql/psi/psi_abi_v2.h.pp 2011-11-02 23:29:01 +0000 @@ -8,14 +8,14 @@ struct PSI_table_share; struct PSI_table; struct PSI_thread; struct PSI_file; +struct PSI_socket; struct PSI_table_locker; struct PSI_statement_locker; -struct PSI_socket; +struct PSI_idle_locker; struct PSI_bootstrap { void* (*get_interface)(int version); }; -struct PSI_idle_locker; struct PSI_mutex_locker; struct PSI_rwlock_locker; struct PSI_cond_locker; === modified file 'sql/mysqld.cc' --- a/sql/mysqld.cc 2011-11-01 16:33:58 +0000 +++ b/sql/mysqld.cc 2011-11-02 23:29:01 +0000 @@ -695,7 +695,9 @@ void set_remaining_args(int argc, char * remaining_argv= argv; } +#ifdef HAVE_PSI_STATEMENT_INTERFACE PSI_statement_info stmt_info_new_packet; +#endif void net_before_header_psi(struct st_net *net, void *user_data, size_t /* unused: count */) { === modified file 'sql/sql_class.h' --- a/sql/sql_class.h 2011-11-01 16:33:58 +0000 +++ b/sql/sql_class.h 2011-11-02 23:29:01 +0000 @@ -2362,12 +2362,16 @@ public: /** Current statement instrumentation. */ PSI_statement_locker *m_statement_psi; +#ifdef HAVE_PSI_STATEMENT_INTERFACE /** Current statement instrumentation state. */ PSI_statement_locker_state m_statement_state; +#endif /** Idle instrumentation. */ PSI_idle_locker *m_idle_psi; +#ifdef HAVE_PSI_IDLE_INTERFACE /** Idle instrumentation state. */ PSI_idle_locker_state m_idle_state; +#endif /** True if the server code is IDLE for this connection. */ bool m_server_idle; No bundle (reason: useless for push emails).