376
378
/***********************************************************************
377
379
Bind the dynamic table INFORMATION_SCHEMA.innodb_trx */
382
383
/* out: 0 on success */
383
void* p) /* in/out: table schema object */
384
) /* in/out: table schema object */
385
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
387
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
386
if ((innodb_trx_schema_table= new InfoSchemaTable) == NULL)
389
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
391
(*schema)->fields_info = innodb_trx_fields_info;
392
(*schema)->fill_table = trx_i_s_common_fill_table;
388
memset(innodb_trx_schema_table, 0, sizeof(InfoSchemaTable));
390
innodb_trx_schema_table->fields_info = innodb_trx_fields_info;
391
innodb_trx_schema_table->fill_table = trx_i_s_common_fill_table;
392
innodb_trx_schema_table->table_name= "INNODB_TRX";
398
UNIV_INTERN struct st_mysql_plugin i_s_innodb_trx =
400
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
402
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
406
STRUCT_FLD(name, "INNODB_TRX"),
410
STRUCT_FLD(version, "1.0.2"),
412
/* plugin author (for SHOW PLUGINS) */
414
STRUCT_FLD(author, plugin_author),
416
/* general descriptive text (for SHOW PLUGINS) */
418
STRUCT_FLD(descr, "InnoDB transactions"),
420
/* the plugin license (PLUGIN_LICENSE_XXX) */
422
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
424
/* the function to invoke when plugin is loaded */
425
/* int (*)(void*); */
426
STRUCT_FLD(init, innodb_trx_init),
428
/* the function to invoke when plugin is unloaded */
429
/* int (*)(void*); */
430
STRUCT_FLD(deinit, i_s_common_deinit),
432
/* struct st_mysql_show_var* */
433
STRUCT_FLD(status_vars, NULL),
435
/* struct st_mysql_sys_var** */
436
STRUCT_FLD(system_vars, NULL),
438
/* reserved for dependency checking */
440
STRUCT_FLD(__reserved1, NULL)
443
398
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
444
399
static ST_FIELD_INFO innodb_locks_fields_info[] =
646
601
/***********************************************************************
647
602
Bind the dynamic table INFORMATION_SCHEMA.innodb_locks */
650
604
innodb_locks_init(
651
605
/*==============*/
652
606
/* out: 0 on success */
653
void* p) /* in/out: table schema object */
607
) /* in/out: table schema object */
655
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
657
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
610
if ((innodb_locks_schema_table= new InfoSchemaTable) == NULL)
659
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
661
(*schema)->fields_info = innodb_locks_fields_info;
662
(*schema)->fill_table = trx_i_s_common_fill_table;
612
memset(innodb_locks_schema_table, 0, sizeof(InfoSchemaTable));
614
innodb_locks_schema_table->fields_info = innodb_locks_fields_info;
615
innodb_locks_schema_table->fill_table = trx_i_s_common_fill_table;
616
innodb_locks_schema_table->table_name= "INNODB_LOCKS";
667
UNIV_INTERN struct st_mysql_plugin i_s_innodb_locks =
669
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
671
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
675
STRUCT_FLD(name, "INNODB_LOCKS"),
679
STRUCT_FLD(version, "1.0.2"),
681
/* plugin author (for SHOW PLUGINS) */
683
STRUCT_FLD(author, plugin_author),
685
/* general descriptive text (for SHOW PLUGINS) */
687
STRUCT_FLD(descr, "InnoDB conflicting locks"),
689
/* the plugin license (PLUGIN_LICENSE_XXX) */
691
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
693
/* the function to invoke when plugin is loaded */
694
/* int (*)(void*); */
695
STRUCT_FLD(init, innodb_locks_init),
697
/* the function to invoke when plugin is unloaded */
698
/* int (*)(void*); */
699
STRUCT_FLD(deinit, i_s_common_deinit),
701
/* struct st_mysql_show_var* */
702
STRUCT_FLD(status_vars, NULL),
704
/* struct st_mysql_sys_var** */
705
STRUCT_FLD(system_vars, NULL),
707
/* reserved for dependency checking */
709
STRUCT_FLD(__reserved1, NULL)
712
621
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
713
622
static ST_FIELD_INFO innodb_lock_waits_fields_info[] =
823
732
/***********************************************************************
824
733
Bind the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
827
735
innodb_lock_waits_init(
828
736
/*===================*/
829
737
/* out: 0 on success */
830
void* p) /* in/out: table schema object */
832
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
834
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
741
if ((innodb_lock_waits_schema_table= new InfoSchemaTable) == NULL)
836
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
838
(*schema)->fields_info = innodb_lock_waits_fields_info;
839
(*schema)->fill_table = trx_i_s_common_fill_table;
743
memset(innodb_lock_waits_schema_table, 0, sizeof(InfoSchemaTable));
745
innodb_lock_waits_schema_table->fields_info = innodb_lock_waits_fields_info;
746
innodb_lock_waits_schema_table->fill_table = trx_i_s_common_fill_table;
747
innodb_lock_waits_schema_table->table_name= "INNODB_LOCK_WAITS";
844
UNIV_INTERN struct st_mysql_plugin i_s_innodb_lock_waits =
846
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
848
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
852
STRUCT_FLD(name, "INNODB_LOCK_WAITS"),
856
STRUCT_FLD(version, "1.0.2"),
858
/* plugin author (for SHOW PLUGINS) */
860
STRUCT_FLD(author, "Innobase Oy"),
862
/* general descriptive text (for SHOW PLUGINS) */
864
STRUCT_FLD(descr, "InnoDB which lock is blocking which"),
866
/* the plugin license (PLUGIN_LICENSE_XXX) */
868
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
870
/* the function to invoke when plugin is loaded */
871
/* int (*)(void*); */
872
STRUCT_FLD(init, innodb_lock_waits_init),
874
/* the function to invoke when plugin is unloaded */
875
/* int (*)(void*); */
876
STRUCT_FLD(deinit, i_s_common_deinit),
878
/* struct st_mysql_show_var* */
879
STRUCT_FLD(status_vars, NULL),
881
/* struct st_mysql_sys_var** */
882
STRUCT_FLD(system_vars, NULL),
884
/* reserved for dependency checking */
886
STRUCT_FLD(__reserved1, NULL)
889
754
/***********************************************************************
890
755
Common function to fill any of the dynamic tables:
1118
983
return(i_s_cmp_fill_low(session, tables, cond, TRUE));
1121
987
/***********************************************************************
1122
988
Bind the dynamic table information_schema.innodb_cmp. */
1127
992
/* out: 0 on success */
1128
void* p) /* in/out: table schema object */
1130
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1132
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
996
if ((innodb_cmp_schema_table= new InfoSchemaTable) == NULL)
1134
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
1137
(*schema)->fields_info = i_s_cmp_fields_info;
1138
(*schema)->fill_table = i_s_cmp_fill;
998
memset(innodb_cmp_schema_table, 0, sizeof(InfoSchemaTable));
1001
innodb_cmp_schema_table->fields_info = i_s_cmp_fields_info;
1002
innodb_cmp_schema_table->fill_table = i_s_cmp_fill;
1003
innodb_cmp_schema_table->table_name= "INNODB_CMP";
1143
1008
/***********************************************************************
1144
1009
Bind the dynamic table information_schema.innodb_cmp_reset. */
1147
1011
i_s_cmp_reset_init(
1148
1012
/*===============*/
1149
1013
/* out: 0 on success */
1150
void* p) /* in/out: table schema object */
1014
) /* in/out: table schema object */
1152
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1154
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
1017
if ((innodb_cmp_reset_schema_table= new InfoSchemaTable) == NULL)
1156
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
1019
memset(innodb_cmp_reset_schema_table, 0, sizeof(InfoSchemaTable));
1158
(*schema)->fields_info = i_s_cmp_fields_info;
1159
(*schema)->fill_table = i_s_cmp_reset_fill;
1021
innodb_cmp_reset_schema_table->fields_info = i_s_cmp_fields_info;
1022
innodb_cmp_reset_schema_table->fill_table = i_s_cmp_reset_fill;
1023
innodb_cmp_reset_schema_table->table_name= "INNODB_CMP_RESET";
1164
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp =
1166
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1168
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1172
STRUCT_FLD(name, "INNODB_CMP"),
1174
/* plugin version */
1176
STRUCT_FLD(version, "1.0.2"),
1178
/* plugin author (for SHOW PLUGINS) */
1180
STRUCT_FLD(author, plugin_author),
1182
/* general descriptive text (for SHOW PLUGINS) */
1184
STRUCT_FLD(descr, "Statistics for the InnoDB compression"),
1186
/* the plugin license (PLUGIN_LICENSE_XXX) */
1188
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1190
/* the function to invoke when plugin is loaded */
1191
/* int (*)(void*); */
1192
STRUCT_FLD(init, i_s_cmp_init),
1194
/* the function to invoke when plugin is unloaded */
1195
/* int (*)(void*); */
1196
STRUCT_FLD(deinit, i_s_common_deinit),
1198
/* struct st_mysql_show_var* */
1199
STRUCT_FLD(status_vars, NULL),
1201
/* struct st_mysql_sys_var** */
1202
STRUCT_FLD(system_vars, NULL),
1204
/* reserved for dependency checking */
1206
STRUCT_FLD(__reserved1, NULL)
1209
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_reset =
1211
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1213
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1217
STRUCT_FLD(name, "INNODB_CMP_RESET"),
1219
/* plugin version */
1221
STRUCT_FLD(version, "1.0.2"),
1223
/* plugin author (for SHOW PLUGINS) */
1225
STRUCT_FLD(author, plugin_author),
1227
/* general descriptive text (for SHOW PLUGINS) */
1229
STRUCT_FLD(descr, "Statistics for the InnoDB compression;"
1230
" reset cumulated counts"),
1232
/* the plugin license (PLUGIN_LICENSE_XXX) */
1234
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1236
/* the function to invoke when plugin is loaded */
1237
/* int (*)(void*); */
1238
STRUCT_FLD(init, i_s_cmp_reset_init),
1240
/* the function to invoke when plugin is unloaded */
1241
/* int (*)(void*); */
1242
STRUCT_FLD(deinit, i_s_common_deinit),
1244
/* struct st_mysql_show_var* */
1245
STRUCT_FLD(status_vars, NULL),
1247
/* struct st_mysql_sys_var** */
1248
STRUCT_FLD(system_vars, NULL),
1250
/* reserved for dependency checking */
1252
STRUCT_FLD(__reserved1, NULL)
1255
1030
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
1256
1031
static ST_FIELD_INFO i_s_cmpmem_fields_info[] =
1378
1153
/***********************************************************************
1379
1154
Bind the dynamic table information_schema.innodb_cmpmem. */
1382
1156
i_s_cmpmem_init(
1383
1157
/*============*/
1384
1158
/* out: 0 on success */
1385
void* p) /* in/out: table schema object */
1387
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1389
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
1162
if ((innodb_cmpmem_schema_table= new InfoSchemaTable) == NULL)
1391
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
1164
memset(innodb_cmpmem_schema_table, 0, sizeof(InfoSchemaTable));
1393
(*schema)->fields_info = i_s_cmpmem_fields_info;
1394
(*schema)->fill_table = i_s_cmpmem_fill;
1166
innodb_cmpmem_schema_table->fields_info = i_s_cmpmem_fields_info;
1167
innodb_cmpmem_schema_table->fill_table = i_s_cmpmem_fill;
1168
innodb_cmpmem_schema_table->table_name= "INNODB_CMPMEM";
1399
1173
/***********************************************************************
1400
1174
Bind the dynamic table information_schema.innodb_cmpmem_reset. */
1403
1176
i_s_cmpmem_reset_init(
1404
1177
/*==================*/
1405
1178
/* out: 0 on success */
1406
void* p) /* in/out: table schema object */
1408
ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1410
if ((*schema= new ST_SCHEMA_TABLE) == NULL)
1181
if ((innodb_cmpmem_reset_schema_table= new InfoSchemaTable) == NULL)
1412
memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
1183
memset(innodb_cmpmem_reset_schema_table, 0, sizeof(InfoSchemaTable));
1414
(*schema)->fields_info = i_s_cmpmem_fields_info;
1415
(*schema)->fill_table = i_s_cmpmem_reset_fill;
1185
innodb_cmpmem_reset_schema_table->fields_info = i_s_cmpmem_fields_info;
1186
innodb_cmpmem_reset_schema_table->fill_table = i_s_cmpmem_reset_fill;
1187
innodb_cmpmem_reset_schema_table->table_name= "INNODB_CMPMEM_RESET";
1420
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem =
1422
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1424
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1428
STRUCT_FLD(name, "INNODB_CMPMEM"),
1430
/* plugin version */
1432
STRUCT_FLD(version, "1.0.2"),
1434
/* plugin author (for SHOW PLUGINS) */
1436
STRUCT_FLD(author, plugin_author),
1438
/* general descriptive text (for SHOW PLUGINS) */
1440
STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool"),
1442
/* the plugin license (PLUGIN_LICENSE_XXX) */
1444
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1446
/* the function to invoke when plugin is loaded */
1447
/* int (*)(void*); */
1448
STRUCT_FLD(init, i_s_cmpmem_init),
1450
/* the function to invoke when plugin is unloaded */
1451
/* int (*)(void*); */
1452
STRUCT_FLD(deinit, i_s_common_deinit),
1454
/* struct st_mysql_show_var* */
1455
STRUCT_FLD(status_vars, NULL),
1457
/* struct st_mysql_sys_var** */
1458
STRUCT_FLD(system_vars, NULL),
1460
/* reserved for dependency checking */
1462
STRUCT_FLD(__reserved1, NULL)
1465
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmpmem_reset =
1467
/* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1469
STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1473
STRUCT_FLD(name, "INNODB_CMPMEM_RESET"),
1475
/* plugin version */
1477
STRUCT_FLD(version, "1.0.2"),
1479
/* plugin author (for SHOW PLUGINS) */
1481
STRUCT_FLD(author, plugin_author),
1483
/* general descriptive text (for SHOW PLUGINS) */
1485
STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool;"
1486
" reset cumulated counts"),
1488
/* the plugin license (PLUGIN_LICENSE_XXX) */
1490
STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1492
/* the function to invoke when plugin is loaded */
1493
/* int (*)(void*); */
1494
STRUCT_FLD(init, i_s_cmpmem_reset_init),
1496
/* the function to invoke when plugin is unloaded */
1497
/* int (*)(void*); */
1498
STRUCT_FLD(deinit, i_s_common_deinit),
1500
/* struct st_mysql_show_var* */
1501
STRUCT_FLD(status_vars, NULL),
1503
/* struct st_mysql_sys_var** */
1504
STRUCT_FLD(system_vars, NULL),
1506
/* reserved for dependency checking */
1508
STRUCT_FLD(__reserved1, NULL)
1511
1193
/***********************************************************************
1512
1194
Unbind a dynamic INFORMATION_SCHEMA table. */
1515
1196
i_s_common_deinit(
1516
1197
/*==============*/
1517
1198
/* out: 0 on success */
1518
void* p) /* in/out: table schema object */
1199
PluginRegistry ®istry) /* in/out: table schema object */
1520
ST_SCHEMA_TABLE *schema= static_cast<ST_SCHEMA_TABLE *>(p);
1201
registry.remove(innodb_trx_schema_table);
1202
registry.remove(innodb_locks_schema_table);
1203
registry.remove(innodb_lock_waits_schema_table);
1204
registry.remove(innodb_cmp_schema_table);
1205
registry.remove(innodb_cmp_reset_schema_table);
1206
registry.remove(innodb_cmpmem_schema_table);
1207
registry.remove(innodb_cmpmem_reset_schema_table);
1209
delete innodb_trx_schema_table;
1210
delete innodb_locks_schema_table;
1211
delete innodb_lock_waits_schema_table;
1212
delete innodb_cmp_schema_table;
1213
delete innodb_cmp_reset_schema_table;
1214
delete innodb_cmpmem_schema_table;
1215
delete innodb_cmpmem_reset_schema_table;