3390 Matthias Leich 2011-08-19
Fixes for tests in WL#4896 PERFORMANCE_SCHEMA Instrumenting Net IO
It is possible that socket_summary_by_instance_win fails.
I backported improvements from the unix version of the test to this one
but are unable to run this test.
@ mysql-test/suite/perfschema/include/wait_till_sleep.inc
Add missing header
@ mysql-test/suite/perfschema/r/socket_instances_func.result
Adjusted result
@ mysql-test/suite/perfschema/r/socket_instances_func_win.result
Adjusted result
@ mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
Adjusted result
@ mysql-test/suite/perfschema/t/socket_instances_func.test
- Minor beautification in formatting
- The test failed once at end because of unexpected row
Fix by adding a wait routine
- Minor corrections in comments
@ mysql-test/suite/perfschema/t/socket_instances_func_win.test
- Minor beautification in formatting
- The unix variant of this test failed once at end because of unexpected row
Fix by adding a wait routine
- Minor corrections in comments
@ mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
Improve formatting
@ mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
- Add a lot debug code
- Fixed one instability
- Some minor improvements
@ mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
Port of improvements from the unix version to WIN
modified:
mysql-test/suite/perfschema/include/wait_till_sleep.inc
mysql-test/suite/perfschema/r/socket_instances_func.result
mysql-test/suite/perfschema/r/socket_instances_func_win.result
mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
mysql-test/suite/perfschema/t/socket_instances_func.test
mysql-test/suite/perfschema/t/socket_instances_func_win.test
mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
3389 Marc Alff 2011-08-19
Build break on FreeBSD (tentative)
modified:
storage/perfschema/pfs_global.cc
=== modified file 'mysql-test/suite/perfschema/include/wait_till_sleep.inc'
--- a/mysql-test/suite/perfschema/include/wait_till_sleep.inc 2011-08-15 06:26:10 +0000
+++ b/mysql-test/suite/perfschema/include/wait_till_sleep.inc 2011-08-19 16:38:25 +0000
@@ -1,6 +1,25 @@
+# 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+
# Wait till the action of the connection using the DB = 'mysqltest' or
# 'mysqlsupertest' is finished ( Command = 'Sleep').
-let $wait_timeout= 5;
+
+let $wait_timeout= 10;
let $wait_condition=
SELECT COUNT(*) = 1
FROM performance_schema.threads
=== modified file 'mysql-test/suite/perfschema/r/socket_instances_func.result'
--- a/mysql-test/suite/perfschema/r/socket_instances_func.result 2011-07-28 19:51:50 +0000
+++ b/mysql-test/suite/perfschema/r/socket_instances_func.result 2011-08-19 16:38:25 +0000
@@ -197,8 +197,8 @@ wait/io/socket/sql/client_connection <LO
wait/io/socket/sql/client_connection <LOCALHOST>
wait/io/socket/sql/client_connection
# Disconnect con1, con2 and con3
-# Show differences to socket_instances before con1,con1 connecting.
-# There should be none.
+# After waiting a bit we should have no differences to socket_instances
+# before con1, con2, con3 connecting.
SELECT *
FROM performance_schema.socket_instances
WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
=== modified file 'mysql-test/suite/perfschema/r/socket_instances_func_win.result'
--- a/mysql-test/suite/perfschema/r/socket_instances_func_win.result 2011-08-17 20:29:21 +0000
+++ b/mysql-test/suite/perfschema/r/socket_instances_func_win.result 2011-08-19 16:38:25 +0000
@@ -132,9 +132,9 @@ ORDER BY THREAD_ID;
EVENT_NAME IP
wait/io/socket/sql/client_connection <LOCALHOST>
wait/io/socket/sql/client_connection <LOCALHOST>
-# Disconnect con1, con2 and con3
-# Show differences to socket_instances before con1,con1 connecting.
-# There should be none.
+# Disconnect con1 and con2
+# After waiting a bit we should have no differences to socket_instances
+# before con1, con2 connecting.
SELECT *
FROM performance_schema.socket_instances
WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
=== modified file 'mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result'
--- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result 2011-08-19 07:19:08 +0000
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result 2011-08-19 16:38:25 +0000
@@ -45,6 +45,7 @@ DROP USER 'root0123456789'@'localhost';
# length of user name = 4 character
# length of default db = 9 character
# connection runs through server_tcpip_socket !
+DO 1;
# 3 Variations on SELECT
# 3.1 Check a SELECT ending with server sending an error message.
# Error message is short (unknown table).
=== modified file 'mysql-test/suite/perfschema/t/socket_instances_func.test'
--- a/mysql-test/suite/perfschema/t/socket_instances_func.test 2011-08-17 20:29:21 +0000
+++ b/mysql-test/suite/perfschema/t/socket_instances_func.test 2011-08-19 16:38:25 +0000
@@ -22,30 +22,30 @@
--source include/not_windows.inc
# Set this to enable debugging output
-let $my_socket_debug=0;
+let $my_socket_debug= 0;
#
# Set IP address defaults with respect to IPV6 support
#
# Determine if IPV6 supported
-let $check_ipv6_just_check=1;
+let $check_ipv6_just_check= 1;
--source include/check_ipv6.inc
# Determine if IPV4 mapped to IPV6 supported
-let $check_ipv4_mapped_just_check=1;
+let $check_ipv4_mapped_just_check= 1;
--source include/check_ipv4_mapped.inc
-let $my_localhost=127.0.0.1;
+let $my_localhost= 127.0.0.1;
if($check_ipv6_supported)
{
- let $my_localhost=::1;
+ let $my_localhost= ::1;
}
if($check_ipv4_mapped_supported)
{
- let $my_localhost=::ffff:127.0.0.1;
+ let $my_localhost= ::ffff:127.0.0.1;
}
if($my_socket_debug)
@@ -66,7 +66,7 @@ SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-let $con0_thread_id = `SELECT @thread_id`;
+let $con0_thread_id= `SELECT @thread_id`;
#
# ESTABLISH TCP/IP CONNECTION 1
@@ -95,7 +95,7 @@ FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
let $con1_thread_id= `SELECT @thread_id`;
-let $con1_port = `SELECT @port`;
+let $con1_port= `SELECT @port`;
--echo # Switch to connection default
--connection default
@@ -127,7 +127,7 @@ FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
let $con2_thread_id= `SELECT @thread_id`;
-let $con2_port = `SELECT @port`;
+let $con2_port= `SELECT @port`;
--echo # Switch to connection default
--connection default
@@ -156,7 +156,7 @@ eval SELECT PORT INTO @port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
-let $con3_port = `SELECT @port`;
+let $con3_port= `SELECT @port`;
let $con3_thread_id= `SELECT @thread_id`;
--echo # Switch to connection default
@@ -198,7 +198,7 @@ FROM performance_schema.socket_instances
--echo # There must be only one entry with our thread_id
--disable_query_log
-eval set @thread_id= $con0_thread_id;
+eval SET @thread_id= $con0_thread_id;
--enable_query_log
eval SELECT COUNT(*) = 1 AS 'Expect 1'
@@ -211,7 +211,7 @@ WHERE THREAD_ID = @thread_id;
--echo # TCP/IP connections should have a unique port number
--disable_query_log
-eval set @port= $con1_port;
+eval SET @port= $con1_port;
--enable_query_log
--echo # Connection 1 (tcp/ip)
@@ -220,7 +220,7 @@ FROM performance_schema.socket_instances
WHERE PORT = @port;
--disable_query_log
-eval set @port= $con2_port;
+eval SET @port= $con2_port;
--enable_query_log
--echo # Connection 2 (tcp/ip)
@@ -237,7 +237,7 @@ WHERE PORT = @port;
# wait/io/socket/sql/client_connection 139799531958280 16 37 0 ACTIVE
--disable_query_log
-eval set @thread_id = $con0_thread_id;
+eval SET @thread_id = $con0_thread_id;
--enable_query_log
SELECT COUNT(*) = 1 as 'Expect 1'
@@ -269,7 +269,7 @@ let $server_tcpip_thread_id= `SELECT @th
--echo # Check the content.
--disable_query_log
-eval set @port = $MASTER_MYPORT;
+eval SET @port = $MASTER_MYPORT;
--enable_query_log
eval SELECT THREAD_ID = @thread_id
@@ -316,7 +316,7 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/s
--echo # Server listening sockets (TCP and Unix) are handled on the same thread
--disable_query_log
-eval set @thread_id = $server_tcpip_thread_id;
+eval SET @thread_id = $server_tcpip_thread_id;
--enable_query_log
eval SELECT COUNT(*) = 2 AS 'Expect 1'
@@ -324,7 +324,7 @@ FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
--disable_query_log
-eval set @thread_id = $server_unix_thread_id;
+eval SET @thread_id = $server_unix_thread_id;
--enable_query_log
eval SELECT COUNT(*) = 2 AS 'Expect 1'
@@ -348,9 +348,9 @@ select @match_thread_id;
--echo # Check content for client connection 1 (tcpip)
--disable_query_log
-eval set @port = $con1_port;
-eval set @thread_id = $con1_thread_id;
-eval set @addr = '$my_localhost';
+eval SET @port = $con1_port;
+eval SET @thread_id = $con1_thread_id;
+eval SET @addr = '$my_localhost';
--enable_query_log
eval SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -377,9 +377,9 @@ WHERE THREAD_ID = @thread_id;
--echo # Check content for client connection 2 (tcpip)
--disable_query_log
-eval set @port = $con2_port;
-eval set @thread_id = $con2_thread_id;
-eval set @addr = '$my_localhost';
+eval SET @port = $con2_port;
+eval SET @thread_id = $con2_thread_id;
+eval SET @addr = '$my_localhost';
--enable_query_log
eval SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -406,7 +406,7 @@ WHERE THREAD_ID = @thread_id;
--echo # Check the content for client connection 3 (unix domain).
--disable_query_log
-eval set @thread_id = $con3_thread_id;
+eval SET @thread_id = $con3_thread_id;
--enable_query_log
eval SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -428,13 +428,16 @@ WHERE THREAD_ID = @thread_id;
#
--echo # Show differences to socket_instances before con1, con2 and con3 connecting
---replace_result '::ffff:127.0.0.1' <LOCALHOST> '127.0.0.1' <LOCALHOST> '::1' <LOCALHOST> '::' <BINDADDR> '0.0.0.0' <BINDADDR>
-SELECT EVENT_NAME, IP
+let $part=
FROM performance_schema.socket_instances
WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
FROM my_socket_instances)
ORDER BY THREAD_ID;
+--replace_result '::ffff:127.0.0.1' <LOCALHOST> '127.0.0.1' <LOCALHOST> '::1' <LOCALHOST> '::' <BINDADDR> '0.0.0.0' <BINDADDR>
+eval
+SELECT EVENT_NAME, IP
+$part;
--connection default
@@ -458,13 +461,13 @@ ORDER BY THREAD_ID;
# VERIFY CONNECTIONS DROPPED
#
---echo # Show differences to socket_instances before con1,con1 connecting.
---echo # There should be none.
-
+--echo # After waiting a bit we should have no differences to socket_instances
+--echo # before con1, con2, con3 connecting.
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 0 $part;
+--source include/wait_condition.inc
+#
+eval
SELECT *
-FROM performance_schema.socket_instances
-WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
-NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
- FROM my_socket_instances)
-ORDER BY THREAD_ID;
+$part;
=== modified file 'mysql-test/suite/perfschema/t/socket_instances_func_win.test'
--- a/mysql-test/suite/perfschema/t/socket_instances_func_win.test 2011-08-17 20:29:21 +0000
+++ b/mysql-test/suite/perfschema/t/socket_instances_func_win.test 2011-08-19 16:38:25 +0000
@@ -22,30 +22,30 @@
--source include/windows.inc
# Set this to enable debugging output
-let $my_socket_debug=0;
+let $my_socket_debug= 0;
#
# Set IP address defaults with respect to IPV6 support
#
# Determine if IPV6 supported
-let $check_ipv6_just_check=1;
+let $check_ipv6_just_check= 1;
--source include/check_ipv6.inc
# Determine if IPV4 mapped to IPV6 supported
-let $check_ipv4_mapped_just_check=1;
+let $check_ipv4_mapped_just_check= 1;
--source include/check_ipv4_mapped.inc
-let $my_localhost=127.0.0.1;
+let $my_localhost= 127.0.0.1;
if($check_ipv6_supported)
{
- let $my_localhost=::1;
+ let $my_localhost= ::1;
}
if($check_ipv4_mapped_supported)
{
- let $my_localhost=::ffff:127.0.0.1;
+ let $my_localhost= ::ffff:127.0.0.1;
}
if($my_socket_debug)
@@ -66,7 +66,7 @@ SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-let $con0_thread_id = `SELECT @thread_id`;
+let $con0_thread_id= `SELECT @thread_id`;
#
# ESTABLISH TCP/IP CONNECTION 1
@@ -95,7 +95,7 @@ FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
let $con1_thread_id= `SELECT @thread_id`;
-let $con1_port = `SELECT @port`;
+let $con1_port= `SELECT @port`;
--echo # Switch to connection default
--connection default
@@ -168,7 +168,7 @@ FROM performance_schema.socket_instances
--echo # There must be only one entry with our thread_id
--disable_query_log
-eval set @thread_id= $con0_thread_id;
+eval SET @thread_id= $con0_thread_id;
--enable_query_log
eval SELECT COUNT(*) = 1 AS 'Expect 1'
@@ -181,7 +181,7 @@ WHERE THREAD_ID = @thread_id;
--echo # TCP/IP connections should have a unique port number
--disable_query_log
-eval set @port= $con1_port;
+eval SET @port= $con1_port;
--enable_query_log
--echo # Connection 1 (tcp/ip)
@@ -190,7 +190,7 @@ FROM performance_schema.socket_instances
WHERE PORT = @port;
--disable_query_log
-eval set @port= $con2_port;
+eval SET @port= $con2_port;
--enable_query_log
--echo # Connection 2 (tcp/ip)
@@ -203,11 +203,11 @@ WHERE PORT = @port;
#
--echo # Check the content for the default connection (tcpip)
-# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
-# wait/io/socket/sql/client_connection 26139912 16 907296 127.0.0.1 2631 ACTIVE
+# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
+# wait/io/socket/sql/client_connection 26139912 16 907296 127.0.0.1 2631 ACTIVE
--disable_query_log
-eval set @thread_id = $con0_thread_id;
+eval SET @thread_id = $con0_thread_id;
--enable_query_log
SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -239,7 +239,7 @@ let $server_tcpip_thread_id= `SELECT @th
--echo # Check the content.
--disable_query_log
-eval set @port = $MASTER_MYPORT;
+eval SET @port = $MASTER_MYPORT;
--enable_query_log
eval SELECT THREAD_ID = @thread_id
@@ -253,15 +253,15 @@ WHERE EVENT_NAME = 'wait/io/socket/sql/s
# VERIFY TCP/IP CLIENT CONNECTION 1
#
-# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
-# wait/io/socket/sql/client_connection 140707865187120 18 59 127.0.0.1 59298 IDLE or ACTIVE
+# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
+# wait/io/socket/sql/client_connection 140707865187120 18 59 127.0.0.1 59298 IDLE or ACTIVE
--echo # Check content for client connection 1 (tcpip)
--disable_query_log
-eval set @port = $con1_port;
-eval set @thread_id = $con1_thread_id;
-eval set @addr = '$my_localhost';
+eval SET @port = $con1_port;
+eval SET @thread_id = $con1_thread_id;
+eval SET @addr = '$my_localhost';
--enable_query_log
eval SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -282,15 +282,15 @@ WHERE THREAD_ID = @thread_id;
# VERIFY TCP/IP CLIENT CONNECTION 2
#
-# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
-# wait/io/socket/sql/client_connection 140707865187120 18 59 127.0.0.1 59298 IDLE or ACTIVE
+# EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
+# wait/io/socket/sql/client_connection 140707865187120 18 59 127.0.0.1 59298 IDLE or ACTIVE
--echo # Check content for client connection 2 (tcpip)
--disable_query_log
-eval set @port = $con2_port;
-eval set @thread_id = $con2_thread_id;
-eval set @addr = '$my_localhost';
+eval SET @port = $con2_port;
+eval SET @thread_id = $con2_thread_id;
+eval SET @addr = '$my_localhost';
--enable_query_log
eval SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
@@ -312,13 +312,16 @@ WHERE THREAD_ID = @thread_id;
#
--echo # Show differences to socket_instances before con1, con2 and con3 connecting
---replace_result '::ffff:127.0.0.1' <LOCALHOST> '127.0.0.1' <LOCALHOST> '::1' <LOCALHOST> '::' <BINDADDR> '0.0.0.0' <BINDADDR>
-SELECT EVENT_NAME, IP
+let $part=
FROM performance_schema.socket_instances
WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
FROM my_socket_instances)
ORDER BY THREAD_ID;
+--replace_result '::ffff:127.0.0.1' <LOCALHOST> '127.0.0.1' <LOCALHOST> '::1' <LOCALHOST> '::' <BINDADDR> '0.0.0.0' <BINDADDR>
+eval
+SELECT EVENT_NAME, IP
+$part;
--connection default
@@ -326,7 +329,7 @@ ORDER BY THREAD_ID;
# DROP CLIENT CONNECTIONS
#
---echo # Disconnect con1, con2 and con3
+--echo # Disconnect con1 and con2
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
@@ -339,13 +342,13 @@ ORDER BY THREAD_ID;
# VERIFY CONNECTIONS DROPPED
#
---echo # Show differences to socket_instances before con1,con1 connecting.
---echo # There should be none.
-
+--echo # After waiting a bit we should have no differences to socket_instances
+--echo # before con1, con2 connecting.
+let $wait_timeout= 10;
+let $wait_condition= SELECT COUNT(*) = 0 $part;
+--source include/wait_condition.inc
+#
+eval
SELECT *
-FROM performance_schema.socket_instances
-WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
-NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
- FROM my_socket_instances)
-ORDER BY THREAD_ID;
+$part;
=== modified file 'mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test'
--- a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test 2011-08-19 07:19:08 +0000
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test 2011-08-19 16:38:25 +0000
@@ -45,7 +45,7 @@
--source ../include/no_protocol.inc
# Set this to enable debugging output
-let $my_socket_debug=0;
+let $my_socket_debug= 0;
--echo #==============================================================================
--echo # Establish the level of IPV6 support
@@ -123,7 +123,7 @@ SELECT EVENT_NAME,
FROM performance_schema.socket_summary_by_instance t_inst
JOIN performance_schema.socket_summary_by_event_name t_name
USING (EVENT_NAME)
-WHERE t_inst.event_name like '%client%'
+WHERE t_inst.event_name LIKE '%client%'
AND t_inst.object_instance_begin <> @default_object_instance_begin;
let $compare_tables_and_verify=
@@ -147,7 +147,7 @@ SELECT (
FROM performance_schema.socket_summary_by_instance t_inst
JOIN performance_schema.socket_summary_by_event_name t_name
USING (EVENT_NAME)
-WHERE t_inst.event_name like '%client%'
+WHERE t_inst.event_name LIKE '%client%'
AND t_inst.object_instance_begin <> @default_object_instance_begin;
--echo #==============================================================================
@@ -312,9 +312,9 @@ if (`SELECT @tables_match = 0`)
eval $compare_tables_and_print;
--enable_query_log
--echo
- SELECT * from performance_schema.socket_summary_by_instance ORDER BY EVENT_NAME;
+ SELECT * FROM performance_schema.socket_summary_by_instance ORDER BY EVENT_NAME;
--echo
- SELECT * from performance_schema.socket_summary_by_event_name ORDER BY EVENT_NAME;
+ SELECT * FROM performance_schema.socket_summary_by_event_name ORDER BY EVENT_NAME;
--echo
--echo # Abort
exit;
=== modified file 'mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test'
--- a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test 2011-08-19 06:59:27 +0000
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test 2011-08-19 16:38:25 +0000
@@ -547,6 +547,13 @@ let $connect_user= root;
#========================================================================
--connect (con1,localhost,root,,mysqltest,,)
+# Experiments showed some unexpected result in the counter difference
+# which got con1 for the next statement (see 3.1).
+# The measured diff was too high and was probably caused by some
+# too much delayed counter maintenance for the connect.
+# We run here just some SQL statement because counter maintenance
+# for SQL statements is more fast and reliable than far Connect.
+DO 1;
--connection default
--source ../include/wait_till_sleep.inc
--disable_query_log
@@ -683,6 +690,20 @@ if(`SELECT NOT ( $my_rules ) $part `)
--echo # Attention: There are exceptions but they are not valid
--echo # for this test.
#==========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET SUM_TIMER_MISC = 13, COUNT_MISC = 0
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME LIKE '%client_connection'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
((COUNT_READ = 0 AND SUM_TIMER_READ = 0 AND SUM_NUMBER_OF_BYTES_READ = 0)
OR
@@ -714,7 +735,8 @@ if(`SELECT COUNT(*) FROM mysqltest.socke
--echo # 4.2 Results must be stable
#==========================================================================
-# Enable the following lines for debugging the check
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
if(0)
{
--enable_info
@@ -800,7 +822,9 @@ if(`SELECT COUNT(*) FROM performance_sch
--echo # We expect
--echo # $my_rules
--echo #
- # MLML: Try $column_list
+ # Attention: We use here performance_schema.socket_summary_by_instance
+ # and not mysqltest.socket_summary_by_instance_detail.
+ # Therefore the convenient $column_list cannot be used.
eval
SELECT
COUNT_STAR, SUM_TIMER_WAIT,
@@ -818,16 +842,31 @@ if(`SELECT COUNT(*) FROM performance_sch
--echo # NOT LIKE '%client_connection' because everything gets charged
--echo # into client_connection of the acting connection.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_WRITE = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME NOT LIKE '%client_connection'
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_READ = 0 AND SUM_TIMER_READ = 0 AND SUM_NUMBER_OF_BYTES_READ = 0
AND
COUNT_WRITE = 0 AND SUM_TIMER_WRITE = 0 AND SUM_NUMBER_OF_BYTES_WRITE = 0
AND
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
-if(`SELECT COUNT(*) FROM mysqltest.socket_summary_by_instance_detail
+let $part=
+FROM mysqltest.socket_summary_by_instance_detail
WHERE NOT ( $my_rules )
AND EVENT_NAME NOT LIKE '%client_connection'
- AND statement NOT LIKE 'Connect%'`)
+ AND statement NOT LIKE 'Connect%';
+if(`SELECT COUNT(*) $part`)
{
--enable_query_log
--enable_result_log
@@ -838,15 +877,25 @@ if(`SELECT COUNT(*) FROM mysqltest.socke
eval
SELECT
$column_list
- FROM mysqltest.socket_summary_by_instance_detail
- WHERE NOT ( $my_rules )
- AND EVENT_NAME NOT LIKE '%client_connection'
- AND statement NOT LIKE 'Connect%'
+ $part
ORDER BY EVENT_NAME, OBJECT_INSTANCE_BEGIN, statement, run;
}
--echo # 4.4.2 In case of SELECT and our scenarios even COUNT_READ and COUNT_MISC
--echo # are stable.
+#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_READ = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT(DISTINCT COUNT_READ) = 1 AND
COUNT(DISTINCT COUNT_MISC) = 1;
@@ -879,6 +928,20 @@ if(`SELECT COUNT(statement) $part`)
--echo # -> OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
--echo # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME LIKE '%client_connection'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1134,6 +1197,20 @@ if(`SELECT COUNT(*) $part `)
--echo # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
--echo # because we run through server_unix_socket.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%localhost%')
+ AND EVENT_NAME LIKE ('%server_tcpip_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1159,6 +1236,20 @@ if(`SELECT COUNT(*) $part `)
--echo # 4.5.2.2 For the instance with EVENT_NAME LIKE '%server_unix_socket'
--echo # COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 0
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%localhost%')
+ AND EVENT_NAME LIKE ('%server_unix_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC > 0 AND SUM_TIMER_MISC > 0;
let $part=
@@ -1186,6 +1277,21 @@ if(`SELECT COUNT(*) $part `)
--echo # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
--echo # because we run through server_tcpip_socket.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND EVENT_NAME LIKE ('%server_unix_socket%')
+ AND statement LIKE ('%Connect%$my_localhost%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1211,6 +1317,21 @@ if(`SELECT COUNT(*) $part `)
--echo # 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
--echo # COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 0
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%$my_localhost%')
+ AND EVENT_NAME LIKE ('%server_tcpip_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC > 0 AND SUM_TIMER_MISC > 0;
let $part=
@@ -1236,7 +1357,21 @@ if(`SELECT COUNT(*) $part `)
--echo # 4.5.4 Failing Connects do not cause any row with EVENT_NAME
--echo # LIKE '%client_connection'
#===========================================================================
-# Debug: Try with LIKE 'Connect%root%'
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET statement = 'Connect boot '
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('Connect%root%')
+ AND EVENT_NAME LIKE ('%client_connection')
+ LIMIT 1;
+ --disable_info
+}
+
let $part=
FROM mysqltest.socket_summary_by_instance_detail
WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
@@ -1259,7 +1394,20 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.5.5 Successful Connects cause a new instance with EVENT_NAME
--echo # LIKE '%client_connection'
#===========================================================================
-# MLML: Is checked
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ DELETE
+ FROM mysqltest.socket_summary_by_instance_detail
+ WHERE EVENT_NAME LIKE ('%client_connection')
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('Connect%root%')
+ LIMIT 1;
+ --disable_info
+}
+
# - connects which should be successful have statement LIKE ('Connect%root%').
# - We try every type of Connect $loop_rounds times.
# Therefore we should find $loop_rounds rows with
@@ -1281,15 +1429,6 @@ WHERE EVENT_NAME LIKE ('%client_connecti
GROUP BY statement
HAVING NOT ( $my_rules );
-# Reveal that the check that follows would catch anything:
-# DELETE
-# FROM mysqltest.socket_summary_by_instance_detail
-# WHERE EVENT_NAME LIKE ('%client_connection')
-# AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
-# AND statement LIKE ('Connect%root%')
-# LIMIT 1;
-# Attention: socket_summary_by_instance_detail is after that rotten.
-
if(`SELECT COUNT(*) $part`)
{
--enable_query_log
@@ -1316,6 +1455,8 @@ if(`SELECT COUNT(*) $part`)
--echo # - the stability of results is already checked
--echo # So we con go with the results of the first run.
+# Typical content of mysqltest.socket_summary_by_instance_detail
+#
# eval
# SELECT $column_list
# FROM mysqltest.socket_summary_by_instance_detail
@@ -1333,7 +1474,6 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
#========================================================================
-# MLML: Is checked
let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 1;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
@@ -1358,7 +1498,6 @@ if(`SELECT NOT ( $my_rules) $part`)
--echo # 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
#============================================================
-# MLML: Is checked
let $my_rules= SUM_NUMBER_OF_BYTES_WRITE > 100;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
@@ -1384,7 +1523,6 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
#=========================================================================
-# MLML: Is checked
let $my_rules=
COUNT_READ > 0 AND COUNT_WRITE > 0 AND COUNT_MISC > 0;
let $part=
@@ -1429,7 +1567,7 @@ WHERE OBJECT_INSTANCE_BEGIN <> @default_
--echo # 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
#======================================================================
-# MLML: Is checked
+# CREAD TREAD BREAD CWRITE TWRITE BWRITE CMISC TMISC STATEMENT
# 4 6706392 85 3 15509472 117 2 34851168 Connect (con*,localhost,root012345,,mysqltest,,)
# 4 10543632 89 3 10578744 117 2 39460872 Connect (con*,localhost,root0123456789,,mysqltest,,)
let $stmt2= Connect (con*,localhost,root0123456789,,mysqltest,,);
@@ -1454,6 +1592,7 @@ if(`SELECT NOT ($my_rules)
--echo # 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
#==========================================================================
+# CREAD TREAD BREAD CWRITE TWRITE BWRITE CMISC TMISC STATEMENT
# 4 7012368 84 3 10112256 117 2 43067376 Connect (con*,localhost,root,,mysqlsupertest,,)
# 4 7172880 79 3 10247688 117 2 40128000 Connect (con*,localhost,root,,mysqltest,,)
let $stmt2= Connect (con*,localhost,root,,mysqlsupertest,,);
=== modified file 'mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test'
--- a/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test 2011-08-19 08:08:08 +0000
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test 2011-08-19 16:38:25 +0000
@@ -550,6 +550,13 @@ let $connect_user= root;
#========================================================================
--connect (con1,localhost,root,,mysqltest,,)
+# Experiments showed some unexpected result in the counter difference
+# which got con1 for the next statement (see 3.1).
+# The measured diff was too high and was probably caused by some
+# too much delayed counter maintenance for the connect.
+# We run here just some SQL statement because counter maintenance
+# for SQL statements is more fast and reliable than far Connect.
+DO 1;
--connection default
--source ../include/wait_till_sleep.inc
--disable_query_log
@@ -688,6 +695,20 @@ if(`SELECT NOT ( $my_rules ) $part `)
--echo # Attention: There are exceptions but they are not valid
--echo # for this test.
#==========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET SUM_TIMER_MISC = 13, COUNT_MISC = 0
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME LIKE '%client_connection'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
((COUNT_READ = 0 AND SUM_TIMER_READ = 0 AND SUM_NUMBER_OF_BYTES_READ = 0)
OR
@@ -719,7 +740,8 @@ if(`SELECT COUNT(*) FROM mysqltest.socke
--echo # 4.2 Results must be stable
#==========================================================================
-# Enable the following lines for debugging the check
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
if(0)
{
--enable_info
@@ -805,7 +827,9 @@ if(`SELECT COUNT(*) FROM performance_sch
--echo # We expect
--echo # $my_rules
--echo #
- # MLML: Try $column_list
+ # Attention: We use here performance_schema.socket_summary_by_instance
+ # and not mysqltest.socket_summary_by_instance_detail.
+ # Therefore the convenient $column_list cannot be used.
eval
SELECT
COUNT_STAR, SUM_TIMER_WAIT,
@@ -823,16 +847,31 @@ if(`SELECT COUNT(*) FROM performance_sch
--echo # NOT LIKE '%client_connection' because everything gets charged
--echo # into client_connection of the acting connection.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_WRITE = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME NOT LIKE '%client_connection'
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_READ = 0 AND SUM_TIMER_READ = 0 AND SUM_NUMBER_OF_BYTES_READ = 0
AND
COUNT_WRITE = 0 AND SUM_TIMER_WRITE = 0 AND SUM_NUMBER_OF_BYTES_WRITE = 0
AND
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
-if(`SELECT COUNT(*) FROM mysqltest.socket_summary_by_instance_detail
+let $part=
+FROM mysqltest.socket_summary_by_instance_detail
WHERE NOT ( $my_rules )
AND EVENT_NAME NOT LIKE '%client_connection'
- AND statement NOT LIKE 'Connect%'`)
+ AND statement NOT LIKE 'Connect%';
+if(`SELECT COUNT(*) $part`)
{
--enable_query_log
--enable_result_log
@@ -843,15 +882,25 @@ if(`SELECT COUNT(*) FROM mysqltest.socke
eval
SELECT
$column_list
- FROM mysqltest.socket_summary_by_instance_detail
- WHERE NOT ( $my_rules )
- AND EVENT_NAME NOT LIKE '%client_connection'
- AND statement NOT LIKE 'Connect%'
+ $part
ORDER BY EVENT_NAME, OBJECT_INSTANCE_BEGIN, statement, run;
}
--echo # 4.4.2 In case of SELECT and our scenarios even COUNT_READ and COUNT_MISC
--echo # are stable.
+#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_READ = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT(DISTINCT COUNT_READ) = 1 AND
COUNT(DISTINCT COUNT_MISC) = 1;
@@ -885,6 +934,20 @@ if(`SELECT COUNT(statement) $part`)
--echo # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0
--echo # SKIPPED FOR WINDOWS
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE statement LIKE '%WHERE col1 = 3'
+ AND EVENT_NAME LIKE '%client_connection'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1141,6 +1204,20 @@ if(`SELECT COUNT(*) $part `)
--echo # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
--echo # because we run through server_unix_socket.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%localhost%')
+ AND EVENT_NAME LIKE ('%server_tcpip_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1169,6 +1246,20 @@ if (0)
--echo # COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
--echo # SKIPPED FOR WINDOWS
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 0
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%localhost%')
+ AND EVENT_NAME LIKE ('%server_unix_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC > 0 AND SUM_TIMER_MISC > 0;
let $part=
@@ -1198,6 +1289,21 @@ if (0)
--echo # because we run through server_tcpip_socket.
--echo # SKIPPED FOR WINDOWS
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 13
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND EVENT_NAME LIKE ('%server_unix_socket%')
+ AND statement LIKE ('%Connect%$my_localhost%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC = 0 AND SUM_TIMER_MISC = 0;
let $part=
@@ -1224,6 +1330,21 @@ if (0)
--echo # 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
--echo # COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
#===========================================================================
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET COUNT_MISC = 0
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('%Connect%$my_localhost%')
+ AND EVENT_NAME LIKE ('%server_tcpip_socket%')
+ LIMIT 1;
+ --disable_info
+}
+
let $my_rules=
COUNT_MISC > 0 AND SUM_TIMER_MISC > 0;
let $part=
@@ -1249,7 +1370,21 @@ if(`SELECT COUNT(*) $part `)
--echo # 4.5.4 Failing Connects do not cause any row with EVENT_NAME
--echo # LIKE '%client_connection'
#===========================================================================
-# Debug: Try with LIKE 'Connect%root%'
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ eval
+ UPDATE mysqltest.socket_summary_by_instance_detail
+ SET statement = 'Connect boot '
+ WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('Connect%root%')
+ AND EVENT_NAME LIKE ('%client_connection')
+ LIMIT 1;
+ --disable_info
+}
+
let $part=
FROM mysqltest.socket_summary_by_instance_detail
WHERE OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
@@ -1272,7 +1407,20 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.5.5 Successful Connects cause a new instance with EVENT_NAME
--echo # LIKE '%client_connection'
#===========================================================================
-# MLML: Is checked
+# Enable the following lines for debugging the check.
+# Attention: socket_summary_by_instance_detail is after that rotten.
+if(0)
+{
+ --enable_info
+ DELETE
+ FROM mysqltest.socket_summary_by_instance_detail
+ WHERE EVENT_NAME LIKE ('%client_connection')
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+ AND statement LIKE ('Connect%root%')
+ LIMIT 1;
+ --disable_info
+}
+
# - connects which should be successful have statement LIKE ('Connect%root%').
# - We try every type of Connect $loop_rounds times.
# Therefore we should find $loop_rounds rows with
@@ -1294,15 +1442,6 @@ WHERE EVENT_NAME LIKE ('%client_connecti
GROUP BY statement
HAVING NOT ( $my_rules );
-# Reveal that the check that follows would catch anything:
-# DELETE
-# FROM mysqltest.socket_summary_by_instance_detail
-# WHERE EVENT_NAME LIKE ('%client_connection')
-# AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
-# AND statement LIKE ('Connect%root%')
-# LIMIT 1;
-# Attention: socket_summary_by_instance_detail is after that rotten.
-
if(`SELECT COUNT(*) $part`)
{
--enable_query_log
@@ -1329,6 +1468,8 @@ if(`SELECT COUNT(*) $part`)
--echo # - the stability of results is already checked
--echo # So we con go with the results of the first run.
+# Typical content of mysqltest.socket_summary_by_instance_detail
+#
# eval
# SELECT $column_list
# FROM mysqltest.socket_summary_by_instance_detail
@@ -1346,7 +1487,6 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
#========================================================================
-# MLML: Is checked
let $my_rules= COUNT(DISTINCT SUM_NUMBER_OF_BYTES_WRITE) = 1;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
@@ -1371,7 +1511,6 @@ if(`SELECT NOT ( $my_rules) $part`)
--echo # 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
#============================================================
-# MLML: Is checked
let $my_rules= SUM_NUMBER_OF_BYTES_WRITE > 100;
let $part=
FROM mysqltest.socket_summary_by_instance_detail
@@ -1397,7 +1536,6 @@ if(`SELECT COUNT(*) $part`)
--echo # 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
#=========================================================================
-# MLML: Is checked
let $my_rules=
COUNT_READ > 0 AND COUNT_WRITE > 0 AND COUNT_MISC > 0;
let $part=
@@ -1442,7 +1580,7 @@ WHERE OBJECT_INSTANCE_BEGIN <> @default_
--echo # 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
#======================================================================
-# MLML: Is checked
+# CREAD TREAD BREAD CWRITE TWRITE BWRITE CMISC TMISC STATEMENT
# 4 6706392 85 3 15509472 117 2 34851168 Connect (con*,localhost,root012345,,mysqltest,,)
# 4 10543632 89 3 10578744 117 2 39460872 Connect (con*,localhost,root0123456789,,mysqltest,,)
let $stmt2= Connect (con*,localhost,root0123456789,,mysqltest,,);
@@ -1467,6 +1605,7 @@ if(`SELECT NOT ($my_rules)
--echo # 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
#==========================================================================
+# CREAD TREAD BREAD CWRITE TWRITE BWRITE CMISC TMISC STATEMENT
# 4 7012368 84 3 10112256 117 2 43067376 Connect (con*,localhost,root,,mysqlsupertest,,)
# 4 7172880 79 3 10247688 117 2 40128000 Connect (con*,localhost,root,,mysqltest,,)
let $stmt2= Connect (con*,localhost,root,,mysqlsupertest,,);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (matthias.leich:3389 to 3390) WL#4896 | Matthias Leich | 22 Aug |