1 # include/socket_event.inc
4 # - running some statement in connection con1
5 # and checking the changes for the client_connction" entry belonging to con1
6 # within socket_summary_by_instance and
7 # - checking if the changes to values caused by the statement execution are
8 # reasonable and stable
11 # 1. Have socket_summary_by_instance_func running
12 # 2. Have a connection con1
13 # @con1_object_instance_begin needs to be the OBJECT_INSTANCE_BEGIN
14 # value of the "client_connction" entry belonging to con1 within
15 # socket_summary_by_instance.
16 # 3. $statement needs to contain the statement to be executed by con1.
22 while($loop_round <= $loop_rounds)
25 if (!$my_socket_debug)
30 # Collect the current state
31 #==========================
39 let $statement= Connect (con1,$connect_host,$connect_user,,$connect_db,,);
40 # Some statements fail with ER_ACCESS_DENIED_ERROR
41 --disable_abort_on_error
42 --connect (con1,$connect_host,$connect_user,,$connect_db,,)
43 --enable_abort_on_error
44 let $my_errno= $mysql_errno;
49 # Print the statement outcome once.
56 # One of the statements to be checked is expected to fail with ER_NO_SUCH_TABLE.
57 --disable_abort_on_error
59 --enable_abort_on_error
61 if (!$my_socket_debug)
68 # Wait till the operation is really finished. We expect that there will be no
69 # changes to the statistics of the additional connection after this point of time.
70 #=================================================================================
75 # Wait a bit and hope that the counter maintenence is finished.
80 --source ../include/wait_till_sleep.inc
85 # 1. Check statistics in general
86 #-------------------------------
87 # ../include/socket_summary_check.inc also inserts the 'After' state into
88 # mysqltest.my_socket_summary_by_instance.
89 --source ../include/socket_summary_check_dbg.inc
91 if (!$my_socket_debug)
99 eval $get_object_instance_begin;
100 eval $insert_pseudo_before;
104 # Correct the values of the columns statement and run
106 UPDATE mysqltest.socket_summary_by_instance_detail
108 WHERE statement IS NULL;
110 UPDATE mysqltest.socket_summary_by_instance_detail
111 SET
run = $loop_round
120 --source include/wait_until_disconnected.inc