| 1 |
########################################## |
| 2 |
# Run plugin |
| 3 |
########################################## |
| 4 |
INSTALL PLUGIN test_session_attach SONAME 'TEST_SESSION_ATTACH'; |
| 5 |
CREATE FUNCTION execute_test RETURNS INTEGER |
| 6 |
SONAME 'TEST_SESSION_ATTACH'; |
| 7 |
########################################## |
| 8 |
# Execute test case |
| 9 |
########################################## |
| 10 |
select execute_test(); |
| 11 |
execute_test() |
| 12 |
0 |
| 13 |
########################################## |
| 14 |
# Stop plugin |
| 15 |
########################################## |
| 16 |
DROP FUNCTION execute_test; |
| 17 |
UNINSTALL PLUGIN test_session_attach; |
| 18 |
########################################## |
| 19 |
# Plugin log |
| 20 |
########################################## |
| 21 |
========================================================================= |
| 22 |
Test in a server thread. Attach must fail on non srv_session thread. |
| 23 |
Opening Session 1 |
| 24 |
Opening Session 2 |
| 25 |
Opening Session 3 |
| 26 |
Opening Session 4 |
| 27 |
Opening Session 5 |
| 28 |
Opening Session 6 |
| 29 |
Opening Session 7 |
| 30 |
Opening Session 8 |
| 31 |
Opening Session 9 |
| 32 |
Opening Session 10 |
| 33 |
========================================================================= |
| 34 |
|
| 35 |
Query 01: SET SESSION test_session_attach_var_int = 10; |
| 36 |
|
| 37 |
Query 02: SET SESSION test_session_attach_var_int = 20; |
| 38 |
|
| 39 |
Query 03: SET SESSION test_session_attach_var_int = 30; |
| 40 |
|
| 41 |
Query 04: SET SESSION test_session_attach_var_int = 40; |
| 42 |
|
| 43 |
Query 05: SET SESSION test_session_attach_var_int = 50; |
| 44 |
|
| 45 |
Query 06: SET SESSION test_session_attach_var_int = 60; |
| 46 |
|
| 47 |
Query 07: SET SESSION test_session_attach_var_int = 70; |
| 48 |
|
| 49 |
Query 08: SET SESSION test_session_attach_var_int = 80; |
| 50 |
|
| 51 |
Query 09: SET SESSION test_session_attach_var_int = 90; |
| 52 |
|
| 53 |
Query 10: SET SESSION test_session_attach_var_int = 100; |
| 54 |
========================================================================= |
| 55 |
Attach Session 1 |
| 56 |
Attach Session 1 failed. |
| 57 |
Attach Session 2 |
| 58 |
Attach Session 2 failed. |
| 59 |
Attach Session 3 |
| 60 |
Attach Session 3 failed. |
| 61 |
Attach Session 4 |
| 62 |
Attach Session 4 failed. |
| 63 |
Attach Session 5 |
| 64 |
Attach Session 5 failed. |
| 65 |
Attach Session 6 |
| 66 |
Attach Session 6 failed. |
| 67 |
Attach Session 7 |
| 68 |
Attach Session 7 failed. |
| 69 |
Attach Session 8 |
| 70 |
Attach Session 8 failed. |
| 71 |
Attach Session 9 |
| 72 |
Attach Session 9 failed. |
| 73 |
Attach Session 10 |
| 74 |
Attach Session 10 failed. |
| 75 |
========================================================================= |
| 76 |
Close Session 1 |
| 77 |
Close Session 2 |
| 78 |
Close Session 3 |
| 79 |
Close Session 4 |
| 80 |
Close Session 5 |
| 81 |
Close Session 6 |
| 82 |
Close Session 7 |
| 83 |
Close Session 8 |
| 84 |
Close Session 9 |
| 85 |
Close Session 10 |
| 86 |
Closed all sessions |
| 87 |
Follows threaded run. Successful scenario. |
| 88 |
========================================================================= |
| 89 |
init thread |
| 90 |
Opening Session 1 |
| 91 |
Opening Session 2 |
| 92 |
Opening Session 3 |
| 93 |
Opening Session 4 |
| 94 |
Opening Session 5 |
| 95 |
Opening Session 6 |
| 96 |
Opening Session 7 |
| 97 |
Opening Session 8 |
| 98 |
Opening Session 9 |
| 99 |
Opening Session 10 |
| 100 |
========================================================================= |
| 101 |
|
| 102 |
Query 01: SET SESSION test_session_attach_var_int = 10; |
| 103 |
|
| 104 |
Query 02: SET SESSION test_session_attach_var_int = 20; |
| 105 |
|
| 106 |
Query 03: SET SESSION test_session_attach_var_int = 30; |
| 107 |
|
| 108 |
Query 04: SET SESSION test_session_attach_var_int = 40; |
| 109 |
|
| 110 |
Query 05: SET SESSION test_session_attach_var_int = 50; |
| 111 |
|
| 112 |
Query 06: SET SESSION test_session_attach_var_int = 60; |
| 113 |
|
| 114 |
Query 07: SET SESSION test_session_attach_var_int = 70; |
| 115 |
|
| 116 |
Query 08: SET SESSION test_session_attach_var_int = 80; |
| 117 |
|
| 118 |
Query 09: SET SESSION test_session_attach_var_int = 90; |
| 119 |
|
| 120 |
Query 10: SET SESSION test_session_attach_var_int = 100; |
| 121 |
========================================================================= |
| 122 |
Attach Session 1 |
| 123 |
Verify Session 1 variable |
| 124 |
Detach Session 1 |
| 125 |
Attach Session 2 |
| 126 |
Verify Session 2 variable |
| 127 |
Detach Session 2 |
| 128 |
Attach Session 3 |
| 129 |
Verify Session 3 variable |
| 130 |
Detach Session 3 |
| 131 |
Attach Session 4 |
| 132 |
Verify Session 4 variable |
| 133 |
Detach Session 4 |
| 134 |
Attach Session 5 |
| 135 |
Verify Session 5 variable |
| 136 |
Detach Session 5 |
| 137 |
Attach Session 6 |
| 138 |
Verify Session 6 variable |
| 139 |
Detach Session 6 |
| 140 |
Attach Session 7 |
| 141 |
Verify Session 7 variable |
| 142 |
Detach Session 7 |
| 143 |
Attach Session 8 |
| 144 |
Verify Session 8 variable |
| 145 |
Detach Session 8 |
| 146 |
Attach Session 9 |
| 147 |
Verify Session 9 variable |
| 148 |
Detach Session 9 |
| 149 |
Attach Session 10 |
| 150 |
Verify Session 10 variable |
| 151 |
Detach Session 10 |
| 152 |
========================================================================= |
| 153 |
Close Session 1 |
| 154 |
Close Session 2 |
| 155 |
Close Session 3 |
| 156 |
Close Session 4 |
| 157 |
Close Session 5 |
| 158 |
Close Session 6 |
| 159 |
Close Session 7 |
| 160 |
Close Session 8 |
| 161 |
Close Session 9 |
| 162 |
Close Session 10 |
| 163 |
Closed all sessions |
| 164 |
deinit thread |