From: Marc Alff Date: September 20 2011 3:42pm Subject: bzr push into mysql-trunk branch (marc.alff:3416 to 3417) List-Archive: http://lists.mysql.com/commits/141032 Message-Id: <201109201543.p8KFh0lc007828@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3417 Marc Alff 2011-09-20 Fixed build break when compiling without the performance schema net io instrumentation Fixed break in mtr --check-test when building without the performance schema modified: include/mysql/psi/mysql_socket.h mysql-test/include/mtr_check.sql 3416 Tor Didriksen 2011-09-20 [merge] merge 5.5 => trunk modified: mysql-test/r/func_str.result mysql-test/t/func_str.test strings/dtoa.c === modified file 'include/mysql/psi/mysql_socket.h' --- a/include/mysql/psi/mysql_socket.h 2011-08-25 07:53:21 +0000 +++ b/include/mysql/psi/mysql_socket.h 2011-09-20 15:42:23 +0000 @@ -51,8 +51,13 @@ Foundation, Inc., 51 Franklin St, Fifth @def mysql_socket_register(P1, P2, P3) Socket registration. */ -#define mysql_socket_register(P1, P2, P3) \ - inline_mysql_socket_register(P1, P2, P3) +#ifdef HAVE_PSI_SOCKET_INTERFACE + #define mysql_socket_register(P1, P2, P3) \ + inline_mysql_socket_register(P1, P2, P3) +#else + #define mysql_socket_register(P1, P2, P3) \ + do {} while (0) +#endif struct st_mysql_socket { @@ -471,7 +476,7 @@ inline_mysql_socket_set_state(MYSQL_SOCK #define mysql_socket_accept(K, FD, AP, LP) \ inline_mysql_socket_accept(__FILE__, __LINE__, K, FD, AP, LP) #else - #define mysql_socket_accept(FD, AP, LP) \ + #define mysql_socket_accept(K, FD, AP, LP) \ inline_mysql_socket_accept(FD, AP, LP) #endif @@ -504,23 +509,15 @@ inline_mysql_socket_set_state(MYSQL_SOCK inline_mysql_socket_shutdown(FD, H) #endif - -static inline void inline_mysql_socket_register( #ifdef HAVE_PSI_SOCKET_INTERFACE +static inline void inline_mysql_socket_register( const char *category, PSI_socket_info *info, - int count -#else - const char *category __attribute__ ((unused)), - PSI_socket_info *info __attribute__ ((unused)), - int count __attribute__ ((unused)) -#endif -) + int count) { -#ifdef HAVE_PSI_SOCKET_INTERFACE PSI_CALL(register_socket)(category, info, count); -#endif } +#endif /** mysql_socket_socket */ === modified file 'mysql-test/include/mtr_check.sql' --- a/mysql-test/include/mtr_check.sql 2011-08-22 13:24:38 +0000 +++ b/mysql-test/include/mtr_check.sql 2011-09-20 15:42:23 +0000 @@ -19,32 +19,34 @@ use mtr|| CREATE DEFINER=root@localhost PROCEDURE check_testcase_perfschema() BEGIN + IF ((SELECT count(*) from information_schema.engines + where engine='PERFORMANCE_SCHEMA' and support='YES') = 1) THEN BEGIN - -- For tests tampering with performance_schema table structure - DECLARE CONTINUE HANDLER for SQLEXCEPTION + BEGIN + -- For tests tampering with performance_schema table structure + DECLARE CONTINUE HANDLER for SQLEXCEPTION + BEGIN + END; + + -- Leave the instruments in the same state + SELECT * from performance_schema.setup_instruments + where enabled='NO' order by NAME; END; - -- Leave the instruments in the same state - SELECT * from performance_schema.setup_instruments - where enabled='NO' order by NAME; + -- Leave the consumers in the same state + SELECT * from performance_schema.setup_consumers + order by NAME; + + -- Leave the actors setup in the same state + SELECT * from performance_schema.setup_actors + order by USER, HOST; + + -- Leave the objects setup in the same state + SELECT * from performance_schema.setup_objects + order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME; END; - - -- Leave the consumers in the same state - SELECT * from performance_schema.setup_consumers - order by NAME; - - -- Leave the actors setup in the same state - SELECT * from performance_schema.setup_actors - order by USER, HOST; - - -- Leave the objects setup in the same state - SELECT * from performance_schema.setup_objects - order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME; - - -- Leave the same number of socket instances - --SELECT COUNT(*) FROM performance_schema.socket_instances; - + END IF; END|| -- No bundle (reason: useless for push emails).