List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:August 27 2011 12:53pm
Subject:bzr push into mysql-trunk branch (matthias.leich:3407 to 3408) Bug#12921422
View as plain text  
 3408 Matthias Leich	2011-08-27
      Bug#12921422 - SOCKET_SUMMARY_BY_INSTANCE_FUNC_WIN FAILS IN PB
      This fix already passed PB on tree mysql-trunk-wl4896.

    modified:
      mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
      mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
      mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test
      mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test
 3407 Marko Mäkelä	2011-08-26 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/sync/sync0sync.c
=== 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-24 14:09:20 +0000
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result	2011-08-27 12:50:19 +0000
@@ -12,10 +12,8 @@ SET INSTRUMENTED='NO' WHERE PROCESSLIST_
 # 1. Basic checks
 # 1.1 Check that the entry of the disconnected old default session really
 #     disappeared from performance_schema.socket_summary_by_instance.
-# 1.2 Check the impact of TRUNCATE on socket_summary_by_instance.
-#     It must reset all counters.
 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
-# 1.3 Check the base line
+# 1.2 Check the base line
 TRUNCATE TABLE mysqltest.my_socket_summary_by_instance;
 # 2. Variations on Connect
 # 2.1 Connect fails because the user is unknown
@@ -201,4 +199,7 @@ col2
 # 4.6.4 Checks based on comparison of results for connects
 # 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
 # 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
-# 5. Cleanup
+# 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+#    It must reset all counters.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 6. Cleanup

=== modified file 'mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result'
--- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result	2011-08-20 00:36:03 +0000
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result	2011-08-27 12:50:19 +0000
@@ -12,10 +12,9 @@ SET INSTRUMENTED='NO' WHERE PROCESSLIST_
 # 1. Basic checks
 # 1.1 Check that the entry of the disconnected old default session really
 #     disappeared from performance_schema.socket_summary_by_instance.
-# 1.2 Check the impact of TRUNCATE on socket_summary_by_instance.
-#     It must reset all counters.
 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
-# 1.3 Check the base line
+# 1.2 Check the base line
+TRUNCATE TABLE mysqltest.my_socket_summary_by_instance;
 # 2. Variations on Connect
 # 2.1 Connect fails because the user is unknown
 #     length of user name = 4 character
@@ -97,13 +96,13 @@ col2
 #     - no change in COUNT_* leads to no change in
 #       SUM_TIMER_* and no change in SUM_NUMBER_OF_BYTES_*
 #     - increased COUNT_READ leads to increased
-#       SUM_TIMER_READ and SUM_NUMBER_OF_BYTES_READ
+#       SUM_NUMBER_OF_BYTES_READ
 #     - increased COUNT_WRITE leads to increased
-#       SUM_TIMER_READ and SUM_NUMBER_OF_BYTES_READ
-#     - increased COUNT_MISC leads to increased
-#       SUM_TIMER_MISC
-#       Attention: There are exceptions but they are not valid
-#                  for this test.
+#       SUM_NUMBER_OF_BYTES_WRITE
+#     Attention:
+#     The time required for some action might be below timer resolution.
+#     Therefore some increased COUNT_* does not need to lead to an
+#     increased SUM_TIMER_*.
 # 4.2 Results must be stable
 # 4.3 Counters must be 0 in client_connection for the default session
 #     Instrumenting is disabled since a long time and the counter were
@@ -179,7 +178,7 @@ col2
 #         COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
 #         because we run through server_unix_socket.
 # 4.5.2.2 For the instance with EVENT_NAME LIKE '%server_unix_socket'
-#         COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
+#         COUNT_MISC > 0 must be valid.
 # SKIPPED FOR WINDOWS
 # 4.5.3 Connects using for host a value <> 'localhost'
 # 4.5.3.1 For the instance with EVENT_NAME LIKE '%server_unix_socket'
@@ -187,7 +186,7 @@ col2
 #         because we run through server_tcpip_socket.
 # SKIPPED FOR WINDOWS
 # 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
-#         COUNT_MISC > 0 AND SUM_TIMER_MISC > 0 must be valid.
+#         COUNT_MISC > 0 must be valid.
 # 4.5.4 Failing Connects do not cause any row with EVENT_NAME
 #       LIKE '%client_connection'
 # 4.5.5 Successful Connects cause a new instance with EVENT_NAME
@@ -203,4 +202,7 @@ col2
 # 4.6.4 Checks based on comparison of results for connects
 # 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
 # 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
-# 5. Cleanup
+# 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+#    It must reset all counters.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 6. Cleanup

=== 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-24 14:09:20 +0000
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test	2011-08-27 12:50:19 +0000
@@ -26,12 +26,12 @@
 #    A new row with EVENT_NAME "client_connection" shows up
 #    is tested in 0 and 4.5.
 # 2. Impact of disconnect
-#    A row with EVENT_NAME "client_connection" disappears up
-#    is tested in 0. and 1.2.
+#    A row with EVENT_NAME "client_connection" disappears
+#    is tested in 0. and 2.
 # 3. Disabling the instrumentation for some thread causes that the
 #    counter for this thread become static is tested in 4.3.
 #    Nearby the beginning of this test and somewhere in the middle.
-# 4. TRUNCATE table resets the counter is tested nearby the beginning.
+# 4. TRUNCATE table resets the counters is tested in 5.
 # 5. Consistency within a row like MIN_* <= AVG_* <= MAX_*
 #    -> include/socket_summary_check.inc which is called at
 #       various places
@@ -457,74 +457,9 @@ WHERE OBJECT_INSTANCE_BEGIN <> @default_
      AND EVENT_NAME LIKE '%client_connection';
 }
 
---echo # 1.2 Check the impact of TRUNCATE on socket_summary_by_instance.
---echo #     It must reset all counters.
-#=======================================================================
-# We did a Connect and executed some statements within our new default session.
-# This specific history must have caused that none of the counters within
-# the client_connection for this session is 0.
-#
-# C_STAR TIMER_WAIT C_READ TIMER_READ BYTES_READ C_WRITE TIMER_WRITE BYTES_WRITE C_MISC TIMER_MISC
-#     26   98238140     15   14874860        645       5    47217170         178      6   36146110
-#
-# Ensure that the counters are <> 0 so that TRUNCATE has a visible effect.
-let $my_rules=
-COUNT_STAR  > 0 AND SUM_TIMER_WAIT  > 0
-AND
-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 performance_schema.socket_summary_by_instance
-    WHERE NOT ( $my_rules )
-      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
-{
-   --enable_query_log
-   --enable_result_log
-   --echo # The statistics looks suspicious.
-   --echo # We expect
-   --echo #    $my_rules
-   --echo #
-   eval
-   SELECT
-      COUNT_STAR,  SUM_TIMER_WAIT,
-      COUNT_READ,  SUM_TIMER_READ,  SUM_NUMBER_OF_BYTES_READ,
-      COUNT_WRITE, SUM_TIMER_WRITE, SUM_NUMBER_OF_BYTES_WRITE,
-      COUNT_MISC,  SUM_TIMER_MISC
-   FROM performance_schema.socket_summary_by_instance
-   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
-}
 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
-let $my_rules=
-COUNT_STAR  = 0 AND SUM_TIMER_WAIT  = 0
-AND
-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 performance_schema.socket_summary_by_instance
-    WHERE NOT ( $my_rules )
-      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
-{
-   --enable_query_log
-   --enable_result_log
-   --echo # The statistics looks suspicious.
-   --echo # We expect
-   --echo #    $my_rules
-   --echo #
-   eval
-   SELECT
-      COUNT_STAR, SUM_TIMER_WAIT,
-      COUNT_READ,SUM_TIMER_READ,SUM_NUMBER_OF_BYTES_READ,
-      COUNT_WRITE,SUM_TIMER_WRITE,SUM_NUMBER_OF_BYTES_WRITE,
-      COUNT_MISC,SUM_TIMER_MISC
-   FROM performance_schema.socket_summary_by_instance
-   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
-}
 
---echo # 1.3 Check the base line
+--echo # 1.2 Check the base line
 #===============================
 eval $truncate;
 --source ../include/socket_summary_check.inc
@@ -1690,6 +1625,42 @@ if(`SELECT NOT ($my_rules)
    let $print_details= 1;
 }
 
+--echo # 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+--echo #    It must reset all counters.
+#=======================================================================
+# We do not need to check if the majority of counters is <> 0 because if
+# we ever hit such a bad state than a lot of the preceding checks would
+# have already failed and reported this.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+let $my_rules=
+COUNT_STAR  = 0 AND SUM_TIMER_WAIT  = 0
+AND
+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 performance_schema.socket_summary_by_instance
+    WHERE NOT ( $my_rules )
+      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
+{
+   --enable_query_log
+   --enable_result_log
+   --echo # The statistics looks suspicious.
+   --echo # We expect
+   --echo #    $my_rules
+   --echo #
+   eval
+   SELECT
+      COUNT_STAR, SUM_TIMER_WAIT,
+      COUNT_READ,SUM_TIMER_READ,SUM_NUMBER_OF_BYTES_READ,
+      COUNT_WRITE,SUM_TIMER_WRITE,SUM_NUMBER_OF_BYTES_WRITE,
+      COUNT_MISC,SUM_TIMER_MISC
+   FROM performance_schema.socket_summary_by_instance
+   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
+}
+
+
 if($print_details)
 {
    --enable_query_log
@@ -1698,7 +1669,6 @@ if($print_details)
    --echo # Dump detailed differences after - before statement execution
    --echo # 1. The statement executing connection and hopefully noone else
    SELECT @default_object_instance_begin;
-   # SELECT EVENT_NAME,
    SELECT EVENT_NAME, OBJECT_INSTANCE_BEGIN,
           COUNT_READ,  SUM_NUMBER_OF_BYTES_READ,
           COUNT_WRITE, SUM_NUMBER_OF_BYTES_WRITE,
@@ -1738,7 +1708,7 @@ if($print_details)
    --horizontal_results
 }
 
---echo # 5. Cleanup
+--echo # 6. Cleanup
 #==================
 # Cleanup
 --disable_query_log

=== 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-24 14:09:20 +0000
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test	2011-08-27 12:50:19 +0000
@@ -26,12 +26,12 @@
 #    A new row with EVENT_NAME "client_connection" shows up
 #    is tested in 0 and 4.5.
 # 2. Impact of disconnect
-#    A row with EVENT_NAME "client_connection" disappears up
-#    is tested in 0. and 1.2.
+#    A row with EVENT_NAME "client_connection" disappears
+#    is tested in 0. and 2.
 # 3. Disabling the instrumentation for some thread causes that the
 #    counter for this thread become static is tested in 4.3.
 #    Nearby the beginning of this test and somewhere in the middle.
-# 4. TRUNCATE table resets the counter is tested nearby the beginning.
+# 4. TRUNCATE table resets the counters is tested in 5.
 # 5. Consistency within a row like MIN_* <= AVG_* <= MAX_*
 #    -> include/socket_summary_check.inc which is called at
 #       various places
@@ -459,74 +459,9 @@ WHERE OBJECT_INSTANCE_BEGIN <> @default_
      AND EVENT_NAME LIKE '%client_connection';
 }
 
---echo # 1.2 Check the impact of TRUNCATE on socket_summary_by_instance.
---echo #     It must reset all counters.
-#=======================================================================
-# We did a Connect and executed some statements within our new default session.
-# This specific history must have caused that none of the counters within
-# the client_connection for this session is 0.
-#
-# C_STAR TIMER_WAIT C_READ TIMER_READ BYTES_READ C_WRITE TIMER_WRITE BYTES_WRITE C_MISC TIMER_MISC
-#     26   98238140     15   14874860        645       5    47217170         178      6   36146110
-#
-# Ensure that the counters are <> 0 so that TRUNCATE has a visible effect.
-let $my_rules=
-COUNT_STAR  > 0 AND SUM_TIMER_WAIT  > 0
-AND
-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 performance_schema.socket_summary_by_instance
-    WHERE NOT ( $my_rules )
-      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
-{
-   --enable_query_log
-   --enable_result_log
-   --echo # The statistics looks suspicious.
-   --echo # We expect
-   --echo #    $my_rules
-   --echo #
-   eval
-   SELECT
-      COUNT_STAR,  SUM_TIMER_WAIT,
-      COUNT_READ,  SUM_TIMER_READ,  SUM_NUMBER_OF_BYTES_READ,
-      COUNT_WRITE, SUM_TIMER_WRITE, SUM_NUMBER_OF_BYTES_WRITE,
-      COUNT_MISC,  SUM_TIMER_MISC
-   FROM performance_schema.socket_summary_by_instance
-   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
-}
 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
-let $my_rules=
-COUNT_STAR  = 0 AND SUM_TIMER_WAIT  = 0
-AND
-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 performance_schema.socket_summary_by_instance
-    WHERE NOT ( $my_rules )
-      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
-{
-   --enable_query_log
-   --enable_result_log
-   --echo # The statistics looks suspicious.
-   --echo # We expect
-   --echo #    $my_rules
-   --echo #
-   eval
-   SELECT
-      COUNT_STAR, SUM_TIMER_WAIT,
-      COUNT_READ,SUM_TIMER_READ,SUM_NUMBER_OF_BYTES_READ,
-      COUNT_WRITE,SUM_TIMER_WRITE,SUM_NUMBER_OF_BYTES_WRITE,
-      COUNT_MISC,SUM_TIMER_MISC
-   FROM performance_schema.socket_summary_by_instance
-   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
-}
 
---echo # 1.3 Check the base line
+--echo # 1.2 Check the base line
 #===============================
 eval $truncate;
 --source ../include/socket_summary_check.inc
@@ -1702,6 +1637,42 @@ if(`SELECT NOT ($my_rules)
    let $print_details= 1;
 }
 
+--echo # 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+--echo #    It must reset all counters.
+#=======================================================================
+# We do not need to check if the majority of counters is <> 0 because if
+# we ever hit such a bad state than a lot of the preceding checks would
+# have already failed and reported this.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+let $my_rules=
+COUNT_STAR  = 0 AND SUM_TIMER_WAIT  = 0
+AND
+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 performance_schema.socket_summary_by_instance
+    WHERE NOT ( $my_rules )
+      AND OBJECT_INSTANCE_BEGIN = @default_object_instance_begin`)
+{
+   --enable_query_log
+   --enable_result_log
+   --echo # The statistics looks suspicious.
+   --echo # We expect
+   --echo #    $my_rules
+   --echo #
+   eval
+   SELECT
+      COUNT_STAR, SUM_TIMER_WAIT,
+      COUNT_READ,SUM_TIMER_READ,SUM_NUMBER_OF_BYTES_READ,
+      COUNT_WRITE,SUM_TIMER_WRITE,SUM_NUMBER_OF_BYTES_WRITE,
+      COUNT_MISC,SUM_TIMER_MISC
+   FROM performance_schema.socket_summary_by_instance
+   WHERE OBJECT_INSTANCE_BEGIN = @default_object_instance_begin;
+}
+
+
 if($print_details)
 {
    --enable_query_log
@@ -1710,7 +1681,6 @@ if($print_details)
    --echo # Dump detailed differences after - before statement execution
    --echo # 1. The statement executing connection and hopefully noone else
    SELECT @default_object_instance_begin;
-   # SELECT EVENT_NAME,
    SELECT EVENT_NAME, OBJECT_INSTANCE_BEGIN,
           COUNT_READ,  SUM_NUMBER_OF_BYTES_READ,
           COUNT_WRITE, SUM_NUMBER_OF_BYTES_WRITE,
@@ -1750,7 +1720,7 @@ if($print_details)
    --horizontal_results
 }
 
---echo # 5. Cleanup
+--echo # 6. Cleanup
 #==================
 # Cleanup
 --disable_query_log

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (matthias.leich:3407 to 3408) Bug#12921422Matthias Leich29 Aug