Debian Codegraph @

mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result

raw
1 # The logging of commands and result sets is mostly disabled.
2 # There are some messages which help to observe the progress of the test.
3 # In case some check fails
4 # - a message about this will be printed
5 # - some SQL commands which show the unexpected state will be executed
6 # (logging enabled)
7 # - the test might abort
8 #
9 # 0. Check, build or set prequisites
10 Warnings:
11 Warning 1287 'performance_schema.setup_timers' is deprecated and will be removed in a future release
12 UPDATE performance_schema.threads
13 SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
14 # 1. Basic checks
15 # 1.1 Check that the entry of the disconnected old default session really
16 # disappeared from performance_schema.socket_summary_by_instance.
17 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
18 # 1.2 Check the base line
19 TRUNCATE TABLE mysqltest.my_socket_summary_by_instance;
20 # 2. Variations on Connect
21 # 2.1 Connect fails because the user is unknown
22 # length of user name = 4 character
23 # length of default db = 9 character
24 ERROR 28000: Access denied for user 'boot'@'localhost' (using password: NO)
25 # 2.2 Connect fails because the user is unknown
26 # length of user name = 14 character (10 more than in 2.1)
27 # length of default db = 9 character
28 ERROR 28000: Access denied for user 'boot0123456789'@'localhost' (using password: NO)
29 # 2.3 Connect should pass, host = localhost
30 # length of user name = 4 character
31 # length of default db = 9 character
32 # 2.4 Connect should pass, host = localhost
33 # length of user name = 4 character
34 # length of default db = 14 character (5 more than 2.3)
35 # 2.5 Connect should pass, host = localhost
36 # length of user name = 10 character
37 # length of default db = 9 character
38 CREATE USER 'root012345'@'localhost';
39 GRANT ALL PRIVILEGES ON *.* TO 'root012345'@'localhost';
40 DROP USER 'root012345'@'localhost';
41 # 2.6 Connect should pass, host = localhost
42 # length of user name = 14 character
43 # length of default db = 9 character
44 CREATE USER 'root0123456789'@'localhost';
45 GRANT ALL PRIVILEGES ON *.* to 'root0123456789'@'localhost';
46 DROP USER 'root0123456789'@'localhost';
47 # 2.7 Connect should pass, host = my_localhost
48 # length of user name = 4 character
49 # length of default db = 9 character
50 # connection runs through server_tcpip_socket !
51 connect con1,localhost,root,,mysqltest,,;
52 DO 1;
53 connection default;
54 # 3 Variations on SELECT
55 # 3.1 Check a SELECT ending with server sending an error message.
56 # Error message is short (unknown table).
57 SELECT col2 FROM does_not_exist;
58 ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
59 connection default;
60 # 3.2 SELECT ending with server sending an error message.
61 # Now the statement is a bit longer but the error message
62 # length does again not depend on statement.
63 SELECT col2 FROM does_not_exist WHERE col1 = 0;
64 ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
65 connection default;
66 # 3.3 SELECT ending with server sending an error message.
67 # The statement has the same length like in 3.2 but the error
68 # message is now different and much longer.
69 SELECT col2 FROM does_not_exist WHERE col1 A 0;
70 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A 0' at line 1
71 connection default;
72 # 3.4 SELECT ending with server sending an error message.
73 # Statement and error message are a bit longer than in 3.1
74 # because the table name is longer.
75 SELECT col2 FROM does_not_exist0123;
76 ERROR 42S02: Table 'mysqltest.does_not_exist0123' doesn't exist
77 connection default;
78 # 3.5 SELECT earning an empty result set.
79 SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1;
80 col2
81 connection default;
82 # 3.6 SELECT earning an empty result set.
83 # Short column name is replaced by longer alias.
84 SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1;
85 my_super_col
86 connection default;
87 # 3.7 SELECT earning one row with an empty string.
88 SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1;
89 col2
90
91 connection default;
92 # 3.8 SELECT earning one row with one string one char long.
93 SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2;
94 col2
95 a
96 connection default;
97 # 3.9 SELECT earning one row with one string 1024 char long.
98 SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3;
99 col2
100 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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105
106
107 connection default;
108 # 3.11 Check that the preceding Connects/SQL command runs have not
109 # caused some unexpected state.
110 # 4. Check delta (value_after_action - value_before_action) details
111 # 4.1 Check that
112 # - no change in COUNT_* leads to no change in
113 # SUM_TIMER_* and no change in SUM_NUMBER_OF_BYTES_*
114 # - increased COUNT_READ leads to increased
115 # SUM_NUMBER_OF_BYTES_READ
116 # - increased COUNT_WRITE leads to increased
117 # SUM_NUMBER_OF_BYTES_WRITE
118 # Attention:
119 # The time required for some action might be below timer resolution.
120 # Therefore some increased COUNT_* does not need to lead to an
121 # increased SUM_TIMER_*.
122 # 4.2 Results must be stable
123 # 4.3 Counters must be 0 in client_connection for the default session
124 # Instrumenting is disabled since a long time and the counter were
125 # reset via TRUNCATE just after the disabling.
126 # 4.4 Check the differences caused by SQL statements
127 # 4.4.1 There must be no changes in counters of instances
128 # NOT LIKE '%client_connection' because everything gets charged
129 # into client_connection of the acting connection.
130 # 4.4.2 In case of SELECT and our scenarios even COUNT_READ and COUNT_MISC
131 # are stable.
132 # 4.4.3 In our testing scenarios we get for the client_connection entry
133 # of the acting connection
134 # -> OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
135 # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0
136 # Check the differences between changes caused by SQL statements
137 # These differences must correspond to parameters like
138 # - statement, table name or column name length
139 # - number of rows in result set, size of rows in result set etc.
140 # 4.4.4 Compare impact of statements
141 # SELECT col2 FROM does_not_exist WHERE col1 = 0
142 # SELECT col2 FROM does_not_exist
143 # # One statement is longer than the other.
144 # Both statements fail with the same error message (table does not exist)
145 # 4.4.5 Compare impact of statements
146 # SELECT col2 FROM does_not_exist WHERE col1 A 0
147 # SELECT col2 FROM does_not_exist WHERE col1 = 0
148 # # Both statements have the same length and fail.
149 # The length of the error messages differs.
150 # 4.4.6 Compare impact of statements
151 # SELECT col2 FROM does_not_exist0123
152 # SELECT col2 FROM does_not_exist
153 # # Both statements fail (table does not exist).
154 # The length of the statement and the length of the error messages differs.
155 # Reason for both differences is the length of the table name.
156 # 4.4.7 Compare impact of statements
157 # SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1
158 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
159 # # Both statements get an empty result set.
160 # The length of the statements and the length of the result sets differs.
161 # Reason for both differences is the length of the some column name.
162 # 4.4.8 Compare impact of statements
163 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
164 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
165 # # Both statements differ in the statement length.
166 # One statement earns an empty result set.
167 # The other statement earns one row containing an empty string.
168 # 4.4.9 Compare impact of statements
169 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2
170 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
171 # # Both statements have the same length.
172 # One statement earns an one row containing an empty string.
173 # The other statement earns one row containing a string 1 byte long.
174 # 4.4.10 Compare impact of statements
175 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3
176 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
177 # # Both statements have the same length.
178 # One statement earns an one row containing an empty string.
179 # The other statement earns one row containing a string 1024 byte long.
180 # 4.4.11 Compare impact of statements
181 # SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2
182 # SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
183 # # Both statements have the same length.
184 # One statement earns an one row containing an empty string.
185 # The other statement earns two rows containing an empty string.
186 # 4.5 Check the differences caused by Connects
187 # Attention: Succesful Connects run an additional "DO 1".
188 # 4.5.1 Connects do not charge anything into READ or WRITE counters
189 # of the instance with EVENT_NAME NOT LIKE ('%client_connection%').
190 # This mean all these counters must be 0.
191 # 4.5.2 Connects using for host the value 'localhost'
192 # 4.5.2.1 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
193 # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
194 # because we run through server_unix_socket.
195 # 4.5.2.2 For the instance with EVENT_NAME LIKE '%server_unix_socket'
196 # COUNT_MISC > 0 must be valid.
197 # 4.5.3 Connects using for host a value <> 'localhost'
198 # 4.5.3.1 For the instance with EVENT_NAME LIKE '%server_unix_socket'
199 # COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
200 # because we run through server_tcpip_socket.
201 # 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
202 # COUNT_MISC > 0 must be valid.
203 # 4.5.4 Failing Connects do not cause any row with EVENT_NAME
204 # LIKE '%client_connection'
205 # 4.5.5 Successful Connects cause a new instance with EVENT_NAME
206 # LIKE '%client_connection'
207 # 4.6 Check the differences caused by Connects
208 # - INSTANCES with an EVENT_NAME like server_tcpip_socket or
209 # server_unix_socket are already checked
210 # - the stability of results is already checked
211 # So we con go with the results of the first run.
212 # 4.6.1 The SUM_OF_BYTES_WRITE value depends on length of database
213 # since the database name is written in OK packet.
214 # Hence the value 2.
215 # 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
216 # 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
217 # 4.6.4 Checks based on comparison of results for connects
218 # 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
219 # 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
220 # 5. Check the impact of TRUNCATE on socket_summary_by_instance.
221 # It must reset all counters.
222 TRUNCATE TABLE performance_schema.socket_summary_by_instance;
223 # 6. Cleanup
224 Warnings:
225 Warning 1287 'performance_schema.setup_timers' is deprecated and will be removed in a future release
226 connection default;