| 1 |
create user user1@localhost; |
| 2 |
create user user2@localhost; |
| 3 |
create user user3@localhost; |
| 4 |
create user user4@localhost; |
| 5 |
grant ALL on *.* to user1@localhost; |
| 6 |
grant ALL on *.* to user2@localhost; |
| 7 |
grant ALL on *.* to user3@localhost; |
| 8 |
grant ALL on *.* to user4@localhost; |
| 9 |
flush privileges; |
| 10 |
select * from performance_schema.setup_consumers; |
| 11 |
NAME ENABLED |
| 12 |
events_stages_current YES |
| 13 |
events_stages_history YES |
| 14 |
events_stages_history_long YES |
| 15 |
events_statements_current YES |
| 16 |
events_statements_history YES |
| 17 |
events_statements_history_long YES |
| 18 |
events_transactions_current YES |
| 19 |
events_transactions_history YES |
| 20 |
events_transactions_history_long YES |
| 21 |
events_waits_current YES |
| 22 |
events_waits_history YES |
| 23 |
events_waits_history_long YES |
| 24 |
global_instrumentation YES |
| 25 |
thread_instrumentation YES |
| 26 |
statements_digest YES |
| 27 |
# Switch to (con1, localhost, user1, , ) |
| 28 |
update performance_schema.threads |
| 29 |
set INSTRUMENTED='YES', HISTORY='YES' |
| 30 |
where PROCESSLIST_ID = connection_id(); |
| 31 |
# Switch to (con2, localhost, user2, , ) |
| 32 |
update performance_schema.threads |
| 33 |
set INSTRUMENTED='YES', HISTORY='NO' |
| 34 |
where PROCESSLIST_ID = connection_id(); |
| 35 |
# Switch to (con3, localhost, user3, , ) |
| 36 |
update performance_schema.threads |
| 37 |
set INSTRUMENTED='NO', HISTORY='YES' |
| 38 |
where PROCESSLIST_ID = connection_id(); |
| 39 |
# Switch to (con4, localhost, user4, , ) |
| 40 |
update performance_schema.threads |
| 41 |
set INSTRUMENTED='NO', HISTORY='NO' |
| 42 |
where PROCESSLIST_ID = connection_id(); |
| 43 |
# Switch to connection default |
| 44 |
update performance_schema.threads |
| 45 |
set INSTRUMENTED='NO', HISTORY='NO' |
| 46 |
where PROCESSLIST_ID = connection_id(); |
| 47 |
truncate table performance_schema.events_transactions_current; |
| 48 |
truncate table performance_schema.events_transactions_history; |
| 49 |
truncate table performance_schema.events_transactions_history_long; |
| 50 |
truncate table performance_schema.events_statements_current; |
| 51 |
truncate table performance_schema.events_statements_history; |
| 52 |
truncate table performance_schema.events_statements_history_long; |
| 53 |
truncate table performance_schema.events_stages_current; |
| 54 |
truncate table performance_schema.events_stages_history; |
| 55 |
truncate table performance_schema.events_stages_history_long; |
| 56 |
truncate table performance_schema.events_waits_current; |
| 57 |
truncate table performance_schema.events_waits_history; |
| 58 |
truncate table performance_schema.events_waits_history_long; |
| 59 |
# Switch to connection con1 |
| 60 |
XA START 'XA_CON1', 'XA_BQUAL', 12; |
| 61 |
select "Hi from con1"; |
| 62 |
Hi from con1 |
| 63 |
Hi from con1 |
| 64 |
XA END 'XA_CON1', 'XA_BQUAL', 12; |
| 65 |
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12; |
| 66 |
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12; |
| 67 |
# Switch to connection con2 |
| 68 |
XA START 'XA_CON2', 'XA_BQUAL', 12; |
| 69 |
select "Hi from con2"; |
| 70 |
Hi from con2 |
| 71 |
Hi from con2 |
| 72 |
XA END 'XA_CON2', 'XA_BQUAL', 12; |
| 73 |
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12; |
| 74 |
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12; |
| 75 |
# Switch to connection con3 |
| 76 |
XA START 'XA_CON3', 'XA_BQUAL', 12; |
| 77 |
select "Hi from con3"; |
| 78 |
Hi from con3 |
| 79 |
Hi from con3 |
| 80 |
XA END 'XA_CON3', 'XA_BQUAL', 12; |
| 81 |
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12; |
| 82 |
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12; |
| 83 |
# Switch to connection con4 |
| 84 |
XA START 'XA_CON4', 'XA_BQUAL', 12; |
| 85 |
select "Hi from con4"; |
| 86 |
Hi from con4 |
| 87 |
Hi from con4 |
| 88 |
XA END 'XA_CON4', 'XA_BQUAL', 12; |
| 89 |
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12; |
| 90 |
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12; |
| 91 |
"=========================== Transactions user 1" |
| 92 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 93 |
12 XA_CON1 XA_BQUAL |
| 94 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 95 |
12 XA_CON1 XA_BQUAL |
| 96 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 97 |
12 XA_CON1 XA_BQUAL |
| 98 |
"=========================== Transactions user 2" |
| 99 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 100 |
12 XA_CON2 XA_BQUAL |
| 101 |
count(*) |
| 102 |
0 |
| 103 |
count(*) |
| 104 |
0 |
| 105 |
"=========================== Transactions user 3" |
| 106 |
count(*) |
| 107 |
0 |
| 108 |
count(*) |
| 109 |
0 |
| 110 |
count(*) |
| 111 |
0 |
| 112 |
"=========================== Transactions user 4" |
| 113 |
count(*) |
| 114 |
0 |
| 115 |
count(*) |
| 116 |
0 |
| 117 |
count(*) |
| 118 |
0 |
| 119 |
"=========================== Statements user 1" |
| 120 |
EVENT_NAME SQL_TEXT |
| 121 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 122 |
EVENT_NAME SQL_TEXT |
| 123 |
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12 |
| 124 |
statement/sql/select select "Hi from con1" |
| 125 |
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12 |
| 126 |
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12 |
| 127 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 128 |
EVENT_NAME SQL_TEXT |
| 129 |
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12 |
| 130 |
statement/sql/select select "Hi from con1" |
| 131 |
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12 |
| 132 |
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12 |
| 133 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 134 |
"=========================== Statements user 2" |
| 135 |
EVENT_NAME SQL_TEXT |
| 136 |
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12 |
| 137 |
count(*) |
| 138 |
0 |
| 139 |
count(*) |
| 140 |
0 |
| 141 |
"=========================== Statements user 3" |
| 142 |
count(*) |
| 143 |
0 |
| 144 |
count(*) |
| 145 |
0 |
| 146 |
count(*) |
| 147 |
0 |
| 148 |
"=========================== Statements user 4" |
| 149 |
count(*) |
| 150 |
0 |
| 151 |
count(*) |
| 152 |
0 |
| 153 |
count(*) |
| 154 |
0 |
| 155 |
"=========================== Stages user 1" |
| 156 |
EVENT_NAME |
| 157 |
EVENT_NAME |
| 158 |
stage/sql/starting |
| 159 |
stage/sql/query end |
| 160 |
stage/sql/closing tables |
| 161 |
stage/sql/freeing items |
| 162 |
stage/sql/cleaning up |
| 163 |
stage/sql/starting |
| 164 |
stage/sql/query end |
| 165 |
stage/sql/closing tables |
| 166 |
stage/sql/freeing items |
| 167 |
stage/sql/cleaning up |
| 168 |
EVENT_NAME |
| 169 |
stage/sql/starting |
| 170 |
stage/sql/Executing hook on transaction begin. |
| 171 |
stage/sql/starting |
| 172 |
stage/sql/query end |
| 173 |
stage/sql/closing tables |
| 174 |
stage/sql/freeing items |
| 175 |
stage/sql/cleaning up |
| 176 |
stage/sql/starting |
| 177 |
stage/sql/checking permissions |
| 178 |
stage/sql/Opening tables |
| 179 |
stage/sql/init |
| 180 |
stage/sql/optimizing |
| 181 |
stage/sql/executing |
| 182 |
stage/sql/end |
| 183 |
stage/sql/query end |
| 184 |
stage/sql/closing tables |
| 185 |
stage/sql/freeing items |
| 186 |
stage/sql/cleaning up |
| 187 |
stage/sql/starting |
| 188 |
stage/sql/Executing hook on transaction begin. |
| 189 |
stage/sql/starting |
| 190 |
stage/sql/query end |
| 191 |
stage/sql/closing tables |
| 192 |
stage/sql/freeing items |
| 193 |
stage/sql/cleaning up |
| 194 |
stage/sql/starting |
| 195 |
stage/sql/query end |
| 196 |
stage/sql/closing tables |
| 197 |
stage/sql/freeing items |
| 198 |
stage/sql/cleaning up |
| 199 |
stage/sql/starting |
| 200 |
stage/sql/query end |
| 201 |
stage/sql/closing tables |
| 202 |
stage/sql/freeing items |
| 203 |
stage/sql/cleaning up |
| 204 |
"=========================== Stages user 2" |
| 205 |
EVENT_NAME |
| 206 |
count(*) |
| 207 |
0 |
| 208 |
count(*) |
| 209 |
0 |
| 210 |
"=========================== Stages user 3" |
| 211 |
count(*) |
| 212 |
0 |
| 213 |
count(*) |
| 214 |
0 |
| 215 |
count(*) |
| 216 |
0 |
| 217 |
"=========================== Stages user 4" |
| 218 |
count(*) |
| 219 |
0 |
| 220 |
count(*) |
| 221 |
0 |
| 222 |
count(*) |
| 223 |
0 |
| 224 |
"=========================== Waits user 1" |
| 225 |
EVENT_NAME |
| 226 |
idle |
| 227 |
has_waits |
| 228 |
1 |
| 229 |
has_waits |
| 230 |
1 |
| 231 |
"=========================== Waits user 2" |
| 232 |
EVENT_NAME |
| 233 |
idle |
| 234 |
count(*) |
| 235 |
0 |
| 236 |
count(*) |
| 237 |
0 |
| 238 |
"=========================== Waits user 3" |
| 239 |
count(*) |
| 240 |
0 |
| 241 |
count(*) |
| 242 |
0 |
| 243 |
count(*) |
| 244 |
0 |
| 245 |
"=========================== Waits user 4" |
| 246 |
count(*) |
| 247 |
0 |
| 248 |
count(*) |
| 249 |
0 |
| 250 |
count(*) |
| 251 |
0 |
| 252 |
# Switch to connection default, disable consumers |
| 253 |
update performance_schema.setup_consumers |
| 254 |
set enabled='NO' where name like "%history%"; |
| 255 |
select * from performance_schema.setup_consumers; |
| 256 |
NAME ENABLED |
| 257 |
events_stages_current YES |
| 258 |
events_stages_history NO |
| 259 |
events_stages_history_long NO |
| 260 |
events_statements_current YES |
| 261 |
events_statements_history NO |
| 262 |
events_statements_history_long NO |
| 263 |
events_transactions_current YES |
| 264 |
events_transactions_history NO |
| 265 |
events_transactions_history_long NO |
| 266 |
events_waits_current YES |
| 267 |
events_waits_history NO |
| 268 |
events_waits_history_long NO |
| 269 |
global_instrumentation YES |
| 270 |
thread_instrumentation YES |
| 271 |
statements_digest YES |
| 272 |
truncate table performance_schema.events_transactions_current; |
| 273 |
truncate table performance_schema.events_transactions_history; |
| 274 |
truncate table performance_schema.events_transactions_history_long; |
| 275 |
truncate table performance_schema.events_statements_current; |
| 276 |
truncate table performance_schema.events_statements_history; |
| 277 |
truncate table performance_schema.events_statements_history_long; |
| 278 |
truncate table performance_schema.events_stages_current; |
| 279 |
truncate table performance_schema.events_stages_history; |
| 280 |
truncate table performance_schema.events_stages_history_long; |
| 281 |
truncate table performance_schema.events_waits_current; |
| 282 |
truncate table performance_schema.events_waits_history; |
| 283 |
truncate table performance_schema.events_waits_history_long; |
| 284 |
# Switch to connection con1 |
| 285 |
XA START 'XA_CON1', 'XA_BQUAL', 12; |
| 286 |
select "Hi from con1"; |
| 287 |
Hi from con1 |
| 288 |
Hi from con1 |
| 289 |
XA END 'XA_CON1', 'XA_BQUAL', 12; |
| 290 |
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12; |
| 291 |
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12; |
| 292 |
# Switch to connection con2 |
| 293 |
XA START 'XA_CON2', 'XA_BQUAL', 12; |
| 294 |
select "Hi from con2"; |
| 295 |
Hi from con2 |
| 296 |
Hi from con2 |
| 297 |
XA END 'XA_CON2', 'XA_BQUAL', 12; |
| 298 |
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12; |
| 299 |
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12; |
| 300 |
# Switch to connection con3 |
| 301 |
XA START 'XA_CON3', 'XA_BQUAL', 12; |
| 302 |
select "Hi from con3"; |
| 303 |
Hi from con3 |
| 304 |
Hi from con3 |
| 305 |
XA END 'XA_CON3', 'XA_BQUAL', 12; |
| 306 |
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12; |
| 307 |
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12; |
| 308 |
# Switch to connection con4 |
| 309 |
XA START 'XA_CON4', 'XA_BQUAL', 12; |
| 310 |
select "Hi from con4"; |
| 311 |
Hi from con4 |
| 312 |
Hi from con4 |
| 313 |
XA END 'XA_CON4', 'XA_BQUAL', 12; |
| 314 |
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12; |
| 315 |
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12; |
| 316 |
"=========================== Transactions user 1" |
| 317 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 318 |
12 XA_CON1 XA_BQUAL |
| 319 |
count(*) |
| 320 |
0 |
| 321 |
count(*) |
| 322 |
0 |
| 323 |
"=========================== Transactions user 2" |
| 324 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 325 |
12 XA_CON2 XA_BQUAL |
| 326 |
count(*) |
| 327 |
0 |
| 328 |
count(*) |
| 329 |
0 |
| 330 |
"=========================== Transactions user 3" |
| 331 |
count(*) |
| 332 |
0 |
| 333 |
count(*) |
| 334 |
0 |
| 335 |
count(*) |
| 336 |
0 |
| 337 |
"=========================== Transactions user 4" |
| 338 |
count(*) |
| 339 |
0 |
| 340 |
count(*) |
| 341 |
0 |
| 342 |
count(*) |
| 343 |
0 |
| 344 |
"=========================== Statements user 1" |
| 345 |
EVENT_NAME SQL_TEXT |
| 346 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 347 |
count(*) |
| 348 |
0 |
| 349 |
count(*) |
| 350 |
0 |
| 351 |
"=========================== Statements user 2" |
| 352 |
EVENT_NAME SQL_TEXT |
| 353 |
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12 |
| 354 |
count(*) |
| 355 |
0 |
| 356 |
count(*) |
| 357 |
0 |
| 358 |
"=========================== Statements user 3" |
| 359 |
count(*) |
| 360 |
0 |
| 361 |
count(*) |
| 362 |
0 |
| 363 |
count(*) |
| 364 |
0 |
| 365 |
"=========================== Statements user 4" |
| 366 |
count(*) |
| 367 |
0 |
| 368 |
count(*) |
| 369 |
0 |
| 370 |
count(*) |
| 371 |
0 |
| 372 |
"=========================== Stages user 1" |
| 373 |
EVENT_NAME |
| 374 |
count(*) |
| 375 |
0 |
| 376 |
count(*) |
| 377 |
0 |
| 378 |
"=========================== Stages user 2" |
| 379 |
EVENT_NAME |
| 380 |
count(*) |
| 381 |
0 |
| 382 |
count(*) |
| 383 |
0 |
| 384 |
"=========================== Stages user 3" |
| 385 |
count(*) |
| 386 |
0 |
| 387 |
count(*) |
| 388 |
0 |
| 389 |
count(*) |
| 390 |
0 |
| 391 |
"=========================== Stages user 4" |
| 392 |
count(*) |
| 393 |
0 |
| 394 |
count(*) |
| 395 |
0 |
| 396 |
count(*) |
| 397 |
0 |
| 398 |
"=========================== Waits user 1" |
| 399 |
EVENT_NAME |
| 400 |
idle |
| 401 |
has_waits |
| 402 |
0 |
| 403 |
has_waits |
| 404 |
0 |
| 405 |
"=========================== Waits user 2" |
| 406 |
EVENT_NAME |
| 407 |
idle |
| 408 |
count(*) |
| 409 |
0 |
| 410 |
count(*) |
| 411 |
0 |
| 412 |
"=========================== Waits user 3" |
| 413 |
count(*) |
| 414 |
0 |
| 415 |
count(*) |
| 416 |
0 |
| 417 |
count(*) |
| 418 |
0 |
| 419 |
"=========================== Waits user 4" |
| 420 |
count(*) |
| 421 |
0 |
| 422 |
count(*) |
| 423 |
0 |
| 424 |
count(*) |
| 425 |
0 |
| 426 |
# Switch to connection default, enable consumers |
| 427 |
update performance_schema.setup_consumers |
| 428 |
set enabled='YES' where name like "%history%"; |
| 429 |
select * from performance_schema.setup_consumers; |
| 430 |
NAME ENABLED |
| 431 |
events_stages_current YES |
| 432 |
events_stages_history YES |
| 433 |
events_stages_history_long YES |
| 434 |
events_statements_current YES |
| 435 |
events_statements_history YES |
| 436 |
events_statements_history_long YES |
| 437 |
events_transactions_current YES |
| 438 |
events_transactions_history YES |
| 439 |
events_transactions_history_long YES |
| 440 |
events_waits_current YES |
| 441 |
events_waits_history YES |
| 442 |
events_waits_history_long YES |
| 443 |
global_instrumentation YES |
| 444 |
thread_instrumentation YES |
| 445 |
statements_digest YES |
| 446 |
truncate table performance_schema.events_transactions_current; |
| 447 |
truncate table performance_schema.events_transactions_history; |
| 448 |
truncate table performance_schema.events_transactions_history_long; |
| 449 |
truncate table performance_schema.events_statements_current; |
| 450 |
truncate table performance_schema.events_statements_history; |
| 451 |
truncate table performance_schema.events_statements_history_long; |
| 452 |
truncate table performance_schema.events_stages_current; |
| 453 |
truncate table performance_schema.events_stages_history; |
| 454 |
truncate table performance_schema.events_stages_history_long; |
| 455 |
truncate table performance_schema.events_waits_current; |
| 456 |
truncate table performance_schema.events_waits_history; |
| 457 |
truncate table performance_schema.events_waits_history_long; |
| 458 |
# Switch to connection con1 |
| 459 |
XA START 'XA_CON1', 'XA_BQUAL', 12; |
| 460 |
select "Hi from con1"; |
| 461 |
Hi from con1 |
| 462 |
Hi from con1 |
| 463 |
XA END 'XA_CON1', 'XA_BQUAL', 12; |
| 464 |
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12; |
| 465 |
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12; |
| 466 |
# Switch to connection con2 |
| 467 |
XA START 'XA_CON2', 'XA_BQUAL', 12; |
| 468 |
select "Hi from con2"; |
| 469 |
Hi from con2 |
| 470 |
Hi from con2 |
| 471 |
XA END 'XA_CON2', 'XA_BQUAL', 12; |
| 472 |
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12; |
| 473 |
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12; |
| 474 |
# Switch to connection con3 |
| 475 |
XA START 'XA_CON3', 'XA_BQUAL', 12; |
| 476 |
select "Hi from con3"; |
| 477 |
Hi from con3 |
| 478 |
Hi from con3 |
| 479 |
XA END 'XA_CON3', 'XA_BQUAL', 12; |
| 480 |
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12; |
| 481 |
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12; |
| 482 |
# Switch to connection con4 |
| 483 |
XA START 'XA_CON4', 'XA_BQUAL', 12; |
| 484 |
select "Hi from con4"; |
| 485 |
Hi from con4 |
| 486 |
Hi from con4 |
| 487 |
XA END 'XA_CON4', 'XA_BQUAL', 12; |
| 488 |
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12; |
| 489 |
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12; |
| 490 |
"=========================== Transactions user 1" |
| 491 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 492 |
12 XA_CON1 XA_BQUAL |
| 493 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 494 |
12 XA_CON1 XA_BQUAL |
| 495 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 496 |
12 XA_CON1 XA_BQUAL |
| 497 |
"=========================== Transactions user 2" |
| 498 |
XID_FORMAT_ID XID_GTRID XID_BQUAL |
| 499 |
12 XA_CON2 XA_BQUAL |
| 500 |
count(*) |
| 501 |
0 |
| 502 |
count(*) |
| 503 |
0 |
| 504 |
"=========================== Transactions user 3" |
| 505 |
count(*) |
| 506 |
0 |
| 507 |
count(*) |
| 508 |
0 |
| 509 |
count(*) |
| 510 |
0 |
| 511 |
"=========================== Transactions user 4" |
| 512 |
count(*) |
| 513 |
0 |
| 514 |
count(*) |
| 515 |
0 |
| 516 |
count(*) |
| 517 |
0 |
| 518 |
"=========================== Statements user 1" |
| 519 |
EVENT_NAME SQL_TEXT |
| 520 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 521 |
EVENT_NAME SQL_TEXT |
| 522 |
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12 |
| 523 |
statement/sql/select select "Hi from con1" |
| 524 |
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12 |
| 525 |
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12 |
| 526 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 527 |
EVENT_NAME SQL_TEXT |
| 528 |
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12 |
| 529 |
statement/sql/select select "Hi from con1" |
| 530 |
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12 |
| 531 |
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12 |
| 532 |
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12 |
| 533 |
"=========================== Statements user 2" |
| 534 |
EVENT_NAME SQL_TEXT |
| 535 |
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12 |
| 536 |
count(*) |
| 537 |
0 |
| 538 |
count(*) |
| 539 |
0 |
| 540 |
"=========================== Statements user 3" |
| 541 |
count(*) |
| 542 |
0 |
| 543 |
count(*) |
| 544 |
0 |
| 545 |
count(*) |
| 546 |
0 |
| 547 |
"=========================== Statements user 4" |
| 548 |
count(*) |
| 549 |
0 |
| 550 |
count(*) |
| 551 |
0 |
| 552 |
count(*) |
| 553 |
0 |
| 554 |
"=========================== Stages user 1" |
| 555 |
EVENT_NAME |
| 556 |
EVENT_NAME |
| 557 |
stage/sql/starting |
| 558 |
stage/sql/query end |
| 559 |
stage/sql/closing tables |
| 560 |
stage/sql/freeing items |
| 561 |
stage/sql/cleaning up |
| 562 |
stage/sql/starting |
| 563 |
stage/sql/query end |
| 564 |
stage/sql/closing tables |
| 565 |
stage/sql/freeing items |
| 566 |
stage/sql/cleaning up |
| 567 |
EVENT_NAME |
| 568 |
stage/sql/starting |
| 569 |
stage/sql/Executing hook on transaction begin. |
| 570 |
stage/sql/starting |
| 571 |
stage/sql/query end |
| 572 |
stage/sql/closing tables |
| 573 |
stage/sql/freeing items |
| 574 |
stage/sql/cleaning up |
| 575 |
stage/sql/starting |
| 576 |
stage/sql/checking permissions |
| 577 |
stage/sql/Opening tables |
| 578 |
stage/sql/init |
| 579 |
stage/sql/optimizing |
| 580 |
stage/sql/executing |
| 581 |
stage/sql/end |
| 582 |
stage/sql/query end |
| 583 |
stage/sql/closing tables |
| 584 |
stage/sql/freeing items |
| 585 |
stage/sql/cleaning up |
| 586 |
stage/sql/starting |
| 587 |
stage/sql/Executing hook on transaction begin. |
| 588 |
stage/sql/starting |
| 589 |
stage/sql/query end |
| 590 |
stage/sql/closing tables |
| 591 |
stage/sql/freeing items |
| 592 |
stage/sql/cleaning up |
| 593 |
stage/sql/starting |
| 594 |
stage/sql/query end |
| 595 |
stage/sql/closing tables |
| 596 |
stage/sql/freeing items |
| 597 |
stage/sql/cleaning up |
| 598 |
stage/sql/starting |
| 599 |
stage/sql/query end |
| 600 |
stage/sql/closing tables |
| 601 |
stage/sql/freeing items |
| 602 |
stage/sql/cleaning up |
| 603 |
"=========================== Stages user 2" |
| 604 |
EVENT_NAME |
| 605 |
count(*) |
| 606 |
0 |
| 607 |
count(*) |
| 608 |
0 |
| 609 |
"=========================== Stages user 3" |
| 610 |
count(*) |
| 611 |
0 |
| 612 |
count(*) |
| 613 |
0 |
| 614 |
count(*) |
| 615 |
0 |
| 616 |
"=========================== Stages user 4" |
| 617 |
count(*) |
| 618 |
0 |
| 619 |
count(*) |
| 620 |
0 |
| 621 |
count(*) |
| 622 |
0 |
| 623 |
"=========================== Waits user 1" |
| 624 |
EVENT_NAME |
| 625 |
idle |
| 626 |
has_waits |
| 627 |
1 |
| 628 |
has_waits |
| 629 |
0 |
| 630 |
"=========================== Waits user 2" |
| 631 |
EVENT_NAME |
| 632 |
idle |
| 633 |
count(*) |
| 634 |
0 |
| 635 |
count(*) |
| 636 |
0 |
| 637 |
"=========================== Waits user 3" |
| 638 |
count(*) |
| 639 |
0 |
| 640 |
count(*) |
| 641 |
0 |
| 642 |
count(*) |
| 643 |
0 |
| 644 |
"=========================== Waits user 4" |
| 645 |
count(*) |
| 646 |
0 |
| 647 |
count(*) |
| 648 |
0 |
| 649 |
count(*) |
| 650 |
0 |
| 651 |
# Switch to connection default |
| 652 |
update performance_schema.threads |
| 653 |
set INSTRUMENTED='YES', HISTORY='YES' |
| 654 |
where PROCESSLIST_ID = connection_id(); |
| 655 |
revoke all privileges, grant option from user1@localhost; |
| 656 |
revoke all privileges, grant option from user2@localhost; |
| 657 |
revoke all privileges, grant option from user3@localhost; |
| 658 |
revoke all privileges, grant option from user4@localhost; |
| 659 |
drop user user1@localhost; |
| 660 |
drop user user2@localhost; |
| 661 |
drop user user3@localhost; |
| 662 |
drop user user4@localhost; |
| 663 |
flush privileges; |
| 664 |
truncate table performance_schema.setup_actors; |
| 665 |
insert into performance_schema.setup_actors |
| 666 |
values ('%', '%', '%', 'YES', 'YES'); |
| 667 |
select * from performance_schema.setup_actors; |
| 668 |
HOST USER ROLE ENABLED HISTORY |
| 669 |
% % % YES YES |