@@ -292,6 +292,64 @@ PREPARE stmt FROM @str;
292
292
EXECUTE stmt;
293
293
DROP PREPARE stmt;
294
294
295
+ --
296
+ -- TABLE EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME
297
+ --
298
+
299
+ SET @cmd= " CREATE TABLE performance_schema.events_waits_summary_by_host_by_event_name("
300
+ " HOST CHAR(60) collate utf8_bin default null,"
301
+ " EVENT_NAME VARCHAR(128) not null,"
302
+ " COUNT_STAR BIGINT unsigned not null,"
303
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
304
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
305
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
306
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
307
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
308
+
309
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
310
+ PREPARE stmt FROM @str;
311
+ EXECUTE stmt;
312
+ DROP PREPARE stmt;
313
+
314
+ --
315
+ -- TABLE EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME
316
+ --
317
+
318
+ SET @cmd= " CREATE TABLE performance_schema.events_waits_summary_by_user_by_event_name("
319
+ " USER CHAR(16) collate utf8_bin default null,"
320
+ " EVENT_NAME VARCHAR(128) not null,"
321
+ " COUNT_STAR BIGINT unsigned not null,"
322
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
323
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
324
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
325
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
326
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
327
+
328
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
329
+ PREPARE stmt FROM @str;
330
+ EXECUTE stmt;
331
+ DROP PREPARE stmt;
332
+
333
+ --
334
+ -- TABLE EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME
335
+ --
336
+
337
+ SET @cmd= " CREATE TABLE performance_schema.events_waits_summary_by_account_by_event_name("
338
+ " USER CHAR(16) collate utf8_bin default null,"
339
+ " HOST CHAR(60) collate utf8_bin default null,"
340
+ " EVENT_NAME VARCHAR(128) not null,"
341
+ " COUNT_STAR BIGINT unsigned not null,"
342
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
343
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
344
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
345
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
346
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
347
+
348
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
349
+ PREPARE stmt FROM @str;
350
+ EXECUTE stmt;
351
+ DROP PREPARE stmt;
352
+
295
353
--
296
354
-- TABLE EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME
297
355
--
@@ -814,6 +872,64 @@ PREPARE stmt FROM @str;
814
872
EXECUTE stmt;
815
873
DROP PREPARE stmt;
816
874
875
+ --
876
+ -- TABLE EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME
877
+ --
878
+
879
+ SET @cmd= " CREATE TABLE performance_schema.events_stages_summary_by_host_by_event_name("
880
+ " HOST CHAR(60) collate utf8_bin default null,"
881
+ " EVENT_NAME VARCHAR(128) not null,"
882
+ " COUNT_STAR BIGINT unsigned not null,"
883
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
884
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
885
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
886
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
887
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
888
+
889
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
890
+ PREPARE stmt FROM @str;
891
+ EXECUTE stmt;
892
+ DROP PREPARE stmt;
893
+
894
+ --
895
+ -- TABLE EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME
896
+ --
897
+
898
+ SET @cmd= " CREATE TABLE performance_schema.events_stages_summary_by_user_by_event_name("
899
+ " USER CHAR(16) collate utf8_bin default null,"
900
+ " EVENT_NAME VARCHAR(128) not null,"
901
+ " COUNT_STAR BIGINT unsigned not null,"
902
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
903
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
904
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
905
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
906
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
907
+
908
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
909
+ PREPARE stmt FROM @str;
910
+ EXECUTE stmt;
911
+ DROP PREPARE stmt;
912
+
913
+ --
914
+ -- TABLE EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME
915
+ --
916
+
917
+ SET @cmd= " CREATE TABLE performance_schema.events_stages_summary_by_account_by_event_name("
918
+ " USER CHAR(16) collate utf8_bin default null,"
919
+ " HOST CHAR(60) collate utf8_bin default null,"
920
+ " EVENT_NAME VARCHAR(128) not null,"
921
+ " COUNT_STAR BIGINT unsigned not null,"
922
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
923
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
924
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
925
+ " MAX_TIMER_WAIT BIGINT unsigned not null"
926
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
927
+
928
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
929
+ PREPARE stmt FROM @str;
930
+ EXECUTE stmt;
931
+ DROP PREPARE stmt;
932
+
817
933
--
818
934
-- TABLE EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME
819
935
--
@@ -1017,6 +1133,121 @@ PREPARE stmt FROM @str;
1017
1133
EXECUTE stmt;
1018
1134
DROP PREPARE stmt;
1019
1135
1136
+ --
1137
+ -- TABLE EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME
1138
+ --
1139
+
1140
+ SET @cmd= " CREATE TABLE performance_schema.events_statements_summary_by_host_by_event_name("
1141
+ " HOST CHAR(60) collate utf8_bin default null,"
1142
+ " EVENT_NAME VARCHAR(128) not null,"
1143
+ " COUNT_STAR BIGINT unsigned not null,"
1144
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
1145
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
1146
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
1147
+ " MAX_TIMER_WAIT BIGINT unsigned not null,"
1148
+ " SUM_LOCK_TIME BIGINT unsigned not null,"
1149
+ " SUM_ERRORS BIGINT unsigned not null,"
1150
+ " SUM_WARNINGS BIGINT unsigned not null,"
1151
+ " SUM_ROWS_AFFECTED BIGINT unsigned not null,"
1152
+ " SUM_ROWS_SENT BIGINT unsigned not null,"
1153
+ " SUM_ROWS_EXAMINED BIGINT unsigned not null,"
1154
+ " SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
1155
+ " SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
1156
+ " SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
1157
+ " SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
1158
+ " SUM_SELECT_RANGE BIGINT unsigned not null,"
1159
+ " SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
1160
+ " SUM_SELECT_SCAN BIGINT unsigned not null,"
1161
+ " SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
1162
+ " SUM_SORT_RANGE BIGINT unsigned not null,"
1163
+ " SUM_SORT_ROWS BIGINT unsigned not null,"
1164
+ " SUM_SORT_SCAN BIGINT unsigned not null,"
1165
+ " SUM_NO_INDEX_USED BIGINT unsigned not null,"
1166
+ " SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null"
1167
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1168
+
1169
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1170
+ PREPARE stmt FROM @str;
1171
+ EXECUTE stmt;
1172
+ DROP PREPARE stmt;
1173
+
1174
+ --
1175
+ -- TABLE EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME
1176
+ --
1177
+
1178
+ SET @cmd= " CREATE TABLE performance_schema.events_statements_summary_by_user_by_event_name("
1179
+ " USER CHAR(16) collate utf8_bin default null,"
1180
+ " EVENT_NAME VARCHAR(128) not null,"
1181
+ " COUNT_STAR BIGINT unsigned not null,"
1182
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
1183
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
1184
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
1185
+ " MAX_TIMER_WAIT BIGINT unsigned not null,"
1186
+ " SUM_LOCK_TIME BIGINT unsigned not null,"
1187
+ " SUM_ERRORS BIGINT unsigned not null,"
1188
+ " SUM_WARNINGS BIGINT unsigned not null,"
1189
+ " SUM_ROWS_AFFECTED BIGINT unsigned not null,"
1190
+ " SUM_ROWS_SENT BIGINT unsigned not null,"
1191
+ " SUM_ROWS_EXAMINED BIGINT unsigned not null,"
1192
+ " SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
1193
+ " SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
1194
+ " SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
1195
+ " SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
1196
+ " SUM_SELECT_RANGE BIGINT unsigned not null,"
1197
+ " SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
1198
+ " SUM_SELECT_SCAN BIGINT unsigned not null,"
1199
+ " SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
1200
+ " SUM_SORT_RANGE BIGINT unsigned not null,"
1201
+ " SUM_SORT_ROWS BIGINT unsigned not null,"
1202
+ " SUM_SORT_SCAN BIGINT unsigned not null,"
1203
+ " SUM_NO_INDEX_USED BIGINT unsigned not null,"
1204
+ " SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null"
1205
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1206
+
1207
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1208
+ PREPARE stmt FROM @str;
1209
+ EXECUTE stmt;
1210
+ DROP PREPARE stmt;
1211
+
1212
+ --
1213
+ -- TABLE EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME
1214
+ --
1215
+
1216
+ SET @cmd= " CREATE TABLE performance_schema.events_statements_summary_by_account_by_event_name("
1217
+ " USER CHAR(16) collate utf8_bin default null,"
1218
+ " HOST CHAR(60) collate utf8_bin default null,"
1219
+ " EVENT_NAME VARCHAR(128) not null,"
1220
+ " COUNT_STAR BIGINT unsigned not null,"
1221
+ " SUM_TIMER_WAIT BIGINT unsigned not null,"
1222
+ " MIN_TIMER_WAIT BIGINT unsigned not null,"
1223
+ " AVG_TIMER_WAIT BIGINT unsigned not null,"
1224
+ " MAX_TIMER_WAIT BIGINT unsigned not null,"
1225
+ " SUM_LOCK_TIME BIGINT unsigned not null,"
1226
+ " SUM_ERRORS BIGINT unsigned not null,"
1227
+ " SUM_WARNINGS BIGINT unsigned not null,"
1228
+ " SUM_ROWS_AFFECTED BIGINT unsigned not null,"
1229
+ " SUM_ROWS_SENT BIGINT unsigned not null,"
1230
+ " SUM_ROWS_EXAMINED BIGINT unsigned not null,"
1231
+ " SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
1232
+ " SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
1233
+ " SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
1234
+ " SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
1235
+ " SUM_SELECT_RANGE BIGINT unsigned not null,"
1236
+ " SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
1237
+ " SUM_SELECT_SCAN BIGINT unsigned not null,"
1238
+ " SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
1239
+ " SUM_SORT_RANGE BIGINT unsigned not null,"
1240
+ " SUM_SORT_ROWS BIGINT unsigned not null,"
1241
+ " SUM_SORT_SCAN BIGINT unsigned not null,"
1242
+ " SUM_NO_INDEX_USED BIGINT unsigned not null,"
1243
+ " SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null"
1244
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1245
+
1246
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1247
+ PREPARE stmt FROM @str;
1248
+ EXECUTE stmt;
1249
+ DROP PREPARE stmt;
1250
+
1020
1251
--
1021
1252
-- TABLE EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME
1022
1253
--
@@ -1054,6 +1285,52 @@ PREPARE stmt FROM @str;
1054
1285
EXECUTE stmt;
1055
1286
DROP PREPARE stmt;
1056
1287
1288
+ --
1289
+ -- TABLE HOSTS
1290
+ --
1291
+
1292
+ SET @cmd= " CREATE TABLE performance_schema.hosts("
1293
+ " HOST CHAR(60) collate utf8_bin default null,"
1294
+ " CURRENT_CONNECTIONS bigint not null,"
1295
+ " TOTAL_CONNECTIONS bigint not null"
1296
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1297
+
1298
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1299
+ PREPARE stmt FROM @str;
1300
+ EXECUTE stmt;
1301
+ DROP PREPARE stmt;
1302
+
1303
+ --
1304
+ -- TABLE USERS
1305
+ --
1306
+
1307
+ SET @cmd= " CREATE TABLE performance_schema.users("
1308
+ " USER CHAR(16) collate utf8_bin default null,"
1309
+ " CURRENT_CONNECTIONS bigint not null,"
1310
+ " TOTAL_CONNECTIONS bigint not null"
1311
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1312
+
1313
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1314
+ PREPARE stmt FROM @str;
1315
+ EXECUTE stmt;
1316
+ DROP PREPARE stmt;
1317
+
1318
+ --
1319
+ -- TABLE ACCOUNTS
1320
+ --
1321
+
1322
+ SET @cmd= " CREATE TABLE performance_schema.accounts("
1323
+ " USER CHAR(16) collate utf8_bin default null,"
1324
+ " HOST CHAR(60) collate utf8_bin default null,"
1325
+ " CURRENT_CONNECTIONS bigint not null,"
1326
+ " TOTAL_CONNECTIONS bigint not null"
1327
+ " )ENGINE=PERFORMANCE_SCHEMA;" ;
1328
+
1329
+ SET @str = IF(@have_pfs = 1 , @cmd, ' SET @dummy = 0' );
1330
+ PREPARE stmt FROM @str;
1331
+ EXECUTE stmt;
1332
+ DROP PREPARE stmt;
1333
+
1057
1334
1058
1335
CREATE TABLE IF NOT EXISTS proxies_priv (Host char (60 ) binary DEFAULT ' ' NOT NULL , User char (16 ) binary DEFAULT ' ' NOT NULL , Proxied_host char (60 ) binary DEFAULT ' ' NOT NULL , Proxied_user char (16 ) binary DEFAULT ' ' NOT NULL , With_grant BOOL DEFAULT 0 NOT NULL , Grantor char (77 ) DEFAULT ' ' NOT NULL , Timestamp timestamp , PRIMARY KEY Host (Host,User,Proxied_host,Proxied_user), KEY Grantor (Grantor) ) engine= MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment= ' User proxy privileges' ;
1059
1336
0 commit comments