~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/handler/i_s.cc

  • Committer: Brian Aker
  • Date: 2009-04-13 16:22:40 UTC
  • mfrom: (971.1.78 mordred)
  • Revision ID: brian@gaz-20090413162240-ugi3gvhofmcuglzl
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
#define STRUCT_FLD(name, value) value
69
69
 
 
70
InfoSchemaTable *innodb_trx_schema_table= NULL;
 
71
InfoSchemaTable *innodb_locks_schema_table= NULL;
 
72
InfoSchemaTable *innodb_lock_waits_schema_table= NULL;
 
73
InfoSchemaTable *innodb_cmp_schema_table= NULL;
 
74
InfoSchemaTable *innodb_cmp_reset_schema_table= NULL;
 
75
InfoSchemaTable *innodb_cmpmem_schema_table= NULL;
 
76
InfoSchemaTable *innodb_cmpmem_reset_schema_table= NULL;
 
77
 
70
78
static const ST_FIELD_INFO END_OF_ST_FIELD_INFO =
71
79
        {STRUCT_FLD(field_name,         NULL),
72
80
         STRUCT_FLD(field_length,       0),
124
132
 
125
133
/***********************************************************************
126
134
Unbind a dynamic INFORMATION_SCHEMA table. */
127
 
static
128
 
int
129
 
i_s_common_deinit(
130
 
/*==============*/
131
 
                        /* out: 0 on success */
132
 
        void*   p);     /* in/out: table schema object */
133
135
 
134
136
/***********************************************************************
135
137
Auxiliary function to store time_t value in DRIZZLE_TYPE_DATETIME
375
377
 
376
378
/***********************************************************************
377
379
Bind the dynamic table INFORMATION_SCHEMA.innodb_trx */
378
 
static
379
380
int
380
381
innodb_trx_init(
381
382
/*============*/
382
383
                        /* out: 0 on success */
383
 
        void*   p)      /* in/out: table schema object */
 
384
        )       /* in/out: table schema object */
384
385
{
385
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
386
 
 
387
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
386
        if ((innodb_trx_schema_table= new InfoSchemaTable) == NULL)
388
387
                return(1);
389
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
390
 
 
391
 
        (*schema)->fields_info = innodb_trx_fields_info;
392
 
        (*schema)->fill_table = trx_i_s_common_fill_table;
393
 
 
 
388
        memset(innodb_trx_schema_table, 0, sizeof(InfoSchemaTable));
 
389
 
 
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";
394
393
 
395
394
        return(0);
396
395
}
397
396
 
398
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_trx =
399
 
{
400
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
401
 
        /* int */
402
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
403
 
 
404
 
        /* plugin name */
405
 
        /* const char* */
406
 
        STRUCT_FLD(name, "INNODB_TRX"),
407
 
 
408
 
        /* plugin version */
409
 
        /* const char* */
410
 
        STRUCT_FLD(version, "1.0.2"),
411
 
 
412
 
        /* plugin author (for SHOW PLUGINS) */
413
 
        /* const char* */
414
 
        STRUCT_FLD(author, plugin_author),
415
 
 
416
 
        /* general descriptive text (for SHOW PLUGINS) */
417
 
        /* const char* */
418
 
        STRUCT_FLD(descr, "InnoDB transactions"),
419
 
 
420
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
421
 
        /* int */
422
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
423
 
 
424
 
        /* the function to invoke when plugin is loaded */
425
 
        /* int (*)(void*); */
426
 
        STRUCT_FLD(init, innodb_trx_init),
427
 
 
428
 
        /* the function to invoke when plugin is unloaded */
429
 
        /* int (*)(void*); */
430
 
        STRUCT_FLD(deinit, i_s_common_deinit),
431
 
 
432
 
        /* struct st_mysql_show_var* */
433
 
        STRUCT_FLD(status_vars, NULL),
434
 
 
435
 
        /* struct st_mysql_sys_var** */
436
 
        STRUCT_FLD(system_vars, NULL),
437
 
 
438
 
        /* reserved for dependency checking */
439
 
        /* void* */
440
 
        STRUCT_FLD(__reserved1, NULL)
441
 
};
442
397
 
443
398
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
444
399
static ST_FIELD_INFO    innodb_locks_fields_info[] =
645
600
 
646
601
/***********************************************************************
647
602
Bind the dynamic table INFORMATION_SCHEMA.innodb_locks */
648
 
static
649
603
int
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 */
654
608
{
655
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
656
609
 
657
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
610
        if ((innodb_locks_schema_table= new InfoSchemaTable) == NULL)
658
611
                return(1);
659
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
660
 
 
661
 
        (*schema)->fields_info = innodb_locks_fields_info;
662
 
        (*schema)->fill_table = trx_i_s_common_fill_table;
663
 
 
 
612
        memset(innodb_locks_schema_table, 0, sizeof(InfoSchemaTable));
 
613
 
 
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";
664
617
        return(0);
665
618
}
666
619
 
667
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_locks =
668
 
{
669
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
670
 
        /* int */
671
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
672
 
 
673
 
        /* plugin name */
674
 
        /* const char* */
675
 
        STRUCT_FLD(name, "INNODB_LOCKS"),
676
 
 
677
 
        /* plugin version */
678
 
        /* const char* */
679
 
        STRUCT_FLD(version, "1.0.2"),
680
 
 
681
 
        /* plugin author (for SHOW PLUGINS) */
682
 
        /* const char* */
683
 
        STRUCT_FLD(author, plugin_author),
684
 
 
685
 
        /* general descriptive text (for SHOW PLUGINS) */
686
 
        /* const char* */
687
 
        STRUCT_FLD(descr, "InnoDB conflicting locks"),
688
 
 
689
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
690
 
        /* int */
691
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
692
 
 
693
 
        /* the function to invoke when plugin is loaded */
694
 
        /* int (*)(void*); */
695
 
        STRUCT_FLD(init, innodb_locks_init),
696
 
 
697
 
        /* the function to invoke when plugin is unloaded */
698
 
        /* int (*)(void*); */
699
 
        STRUCT_FLD(deinit, i_s_common_deinit),
700
 
 
701
 
        /* struct st_mysql_show_var* */
702
 
        STRUCT_FLD(status_vars, NULL),
703
 
 
704
 
        /* struct st_mysql_sys_var** */
705
 
        STRUCT_FLD(system_vars, NULL),
706
 
 
707
 
        /* reserved for dependency checking */
708
 
        /* void* */
709
 
        STRUCT_FLD(__reserved1, NULL)
710
 
};
711
620
 
712
621
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
713
622
static ST_FIELD_INFO    innodb_lock_waits_fields_info[] =
822
731
 
823
732
/***********************************************************************
824
733
Bind the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
825
 
static
826
734
int
827
735
innodb_lock_waits_init(
828
736
/*===================*/
829
737
                        /* out: 0 on success */
830
 
        void*   p)      /* in/out: table schema object */
 
738
        )
831
739
{
832
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
833
740
 
834
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
741
        if ((innodb_lock_waits_schema_table= new InfoSchemaTable) == NULL)
835
742
                return(1);
836
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
837
 
 
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));
 
744
 
 
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";
 
748
 
840
749
 
841
750
        return(0);
842
751
}
843
752
 
844
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_lock_waits =
845
 
{
846
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
847
 
        /* int */
848
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
849
 
 
850
 
        /* plugin name */
851
 
        /* const char* */
852
 
        STRUCT_FLD(name, "INNODB_LOCK_WAITS"),
853
 
 
854
 
        /* plugin version */
855
 
        /* const char* */
856
 
        STRUCT_FLD(version, "1.0.2"),
857
 
 
858
 
        /* plugin author (for SHOW PLUGINS) */
859
 
        /* const char* */
860
 
        STRUCT_FLD(author, "Innobase Oy"),
861
 
 
862
 
        /* general descriptive text (for SHOW PLUGINS) */
863
 
        /* const char* */
864
 
        STRUCT_FLD(descr, "InnoDB which lock is blocking which"),
865
 
 
866
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
867
 
        /* int */
868
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
869
 
 
870
 
        /* the function to invoke when plugin is loaded */
871
 
        /* int (*)(void*); */
872
 
        STRUCT_FLD(init, innodb_lock_waits_init),
873
 
 
874
 
        /* the function to invoke when plugin is unloaded */
875
 
        /* int (*)(void*); */
876
 
        STRUCT_FLD(deinit, i_s_common_deinit),
877
 
 
878
 
        /* struct st_mysql_show_var* */
879
 
        STRUCT_FLD(status_vars, NULL),
880
 
 
881
 
        /* struct st_mysql_sys_var** */
882
 
        STRUCT_FLD(system_vars, NULL),
883
 
 
884
 
        /* reserved for dependency checking */
885
 
        /* void* */
886
 
        STRUCT_FLD(__reserved1, NULL)
887
 
};
888
753
 
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));
1119
984
}
1120
985
 
 
986
 
1121
987
/***********************************************************************
1122
988
Bind the dynamic table information_schema.innodb_cmp. */
1123
 
static
1124
989
int
1125
990
i_s_cmp_init(
1126
991
/*=========*/
1127
992
                        /* out: 0 on success */
1128
 
        void*   p)      /* in/out: table schema object */
 
993
        )
1129
994
{
1130
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1131
995
 
1132
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
996
        if ((innodb_cmp_schema_table= new InfoSchemaTable) == NULL)
1133
997
                return(1);
1134
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
1135
 
 
1136
 
 
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));
 
999
 
 
1000
 
 
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";
1139
1004
 
1140
1005
        return(0);
1141
1006
}
1142
1007
 
1143
1008
/***********************************************************************
1144
1009
Bind the dynamic table information_schema.innodb_cmp_reset. */
1145
 
static
1146
1010
int
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 */
1151
1015
{
1152
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1153
1016
 
1154
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
1017
        if ((innodb_cmp_reset_schema_table= new InfoSchemaTable) == NULL)
1155
1018
                return(1);
1156
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
 
1019
        memset(innodb_cmp_reset_schema_table, 0, sizeof(InfoSchemaTable));
1157
1020
 
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";
1160
1024
 
1161
1025
        return(0);
1162
1026
}
1163
1027
 
1164
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_cmp =
1165
 
{
1166
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1167
 
        /* int */
1168
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1169
 
 
1170
 
        /* plugin name */
1171
 
        /* const char* */
1172
 
        STRUCT_FLD(name, "INNODB_CMP"),
1173
 
 
1174
 
        /* plugin version */
1175
 
        /* const char* */
1176
 
        STRUCT_FLD(version, "1.0.2"),
1177
 
 
1178
 
        /* plugin author (for SHOW PLUGINS) */
1179
 
        /* const char* */
1180
 
        STRUCT_FLD(author, plugin_author),
1181
 
 
1182
 
        /* general descriptive text (for SHOW PLUGINS) */
1183
 
        /* const char* */
1184
 
        STRUCT_FLD(descr, "Statistics for the InnoDB compression"),
1185
 
 
1186
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
1187
 
        /* int */
1188
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1189
 
 
1190
 
        /* the function to invoke when plugin is loaded */
1191
 
        /* int (*)(void*); */
1192
 
        STRUCT_FLD(init, i_s_cmp_init),
1193
 
 
1194
 
        /* the function to invoke when plugin is unloaded */
1195
 
        /* int (*)(void*); */
1196
 
        STRUCT_FLD(deinit, i_s_common_deinit),
1197
 
 
1198
 
        /* struct st_mysql_show_var* */
1199
 
        STRUCT_FLD(status_vars, NULL),
1200
 
 
1201
 
        /* struct st_mysql_sys_var** */
1202
 
        STRUCT_FLD(system_vars, NULL),
1203
 
 
1204
 
        /* reserved for dependency checking */
1205
 
        /* void* */
1206
 
        STRUCT_FLD(__reserved1, NULL)
1207
 
};
1208
 
 
1209
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_cmp_reset =
1210
 
{
1211
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1212
 
        /* int */
1213
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1214
 
 
1215
 
        /* plugin name */
1216
 
        /* const char* */
1217
 
        STRUCT_FLD(name, "INNODB_CMP_RESET"),
1218
 
 
1219
 
        /* plugin version */
1220
 
        /* const char* */
1221
 
        STRUCT_FLD(version, "1.0.2"),
1222
 
 
1223
 
        /* plugin author (for SHOW PLUGINS) */
1224
 
        /* const char* */
1225
 
        STRUCT_FLD(author, plugin_author),
1226
 
 
1227
 
        /* general descriptive text (for SHOW PLUGINS) */
1228
 
        /* const char* */
1229
 
        STRUCT_FLD(descr, "Statistics for the InnoDB compression;"
1230
 
                   " reset cumulated counts"),
1231
 
 
1232
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
1233
 
        /* int */
1234
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1235
 
 
1236
 
        /* the function to invoke when plugin is loaded */
1237
 
        /* int (*)(void*); */
1238
 
        STRUCT_FLD(init, i_s_cmp_reset_init),
1239
 
 
1240
 
        /* the function to invoke when plugin is unloaded */
1241
 
        /* int (*)(void*); */
1242
 
        STRUCT_FLD(deinit, i_s_common_deinit),
1243
 
 
1244
 
        /* struct st_mysql_show_var* */
1245
 
        STRUCT_FLD(status_vars, NULL),
1246
 
 
1247
 
        /* struct st_mysql_sys_var** */
1248
 
        STRUCT_FLD(system_vars, NULL),
1249
 
 
1250
 
        /* reserved for dependency checking */
1251
 
        /* void* */
1252
 
        STRUCT_FLD(__reserved1, NULL)
1253
 
};
 
1028
 
1254
1029
 
1255
1030
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
1256
1031
static ST_FIELD_INFO    i_s_cmpmem_fields_info[] =
1377
1152
 
1378
1153
/***********************************************************************
1379
1154
Bind the dynamic table information_schema.innodb_cmpmem. */
1380
 
static
1381
1155
int
1382
1156
i_s_cmpmem_init(
1383
1157
/*============*/
1384
1158
                        /* out: 0 on success */
1385
 
        void*   p)      /* in/out: table schema object */
 
1159
        )
1386
1160
{
1387
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1388
1161
 
1389
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
1162
        if ((innodb_cmpmem_schema_table= new InfoSchemaTable) == NULL)
1390
1163
                return(1);
1391
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
 
1164
        memset(innodb_cmpmem_schema_table, 0, sizeof(InfoSchemaTable));
1392
1165
 
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";
1395
1169
 
1396
1170
        return(0);
1397
1171
}
1398
1172
 
1399
1173
/***********************************************************************
1400
1174
Bind the dynamic table information_schema.innodb_cmpmem_reset. */
1401
 
static
1402
1175
int
1403
1176
i_s_cmpmem_reset_init(
1404
1177
/*==================*/
1405
1178
                        /* out: 0 on success */
1406
 
        void*   p)      /* in/out: table schema object */
 
1179
        )
1407
1180
{
1408
 
        ST_SCHEMA_TABLE** schema = static_cast<ST_SCHEMA_TABLE**>(p);
1409
 
 
1410
 
        if ((*schema= new ST_SCHEMA_TABLE) == NULL)
 
1181
        if ((innodb_cmpmem_reset_schema_table= new InfoSchemaTable) == NULL)
1411
1182
                return(1);
1412
 
        memset(*schema, 0, sizeof(ST_SCHEMA_TABLE));
 
1183
        memset(innodb_cmpmem_reset_schema_table, 0, sizeof(InfoSchemaTable));
1413
1184
 
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";
1416
1188
 
1417
1189
        return(0);
1418
1190
}
1419
1191
 
1420
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_cmpmem =
1421
 
{
1422
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1423
 
        /* int */
1424
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1425
 
 
1426
 
        /* plugin name */
1427
 
        /* const char* */
1428
 
        STRUCT_FLD(name, "INNODB_CMPMEM"),
1429
 
 
1430
 
        /* plugin version */
1431
 
        /* const char* */
1432
 
        STRUCT_FLD(version, "1.0.2"),
1433
 
 
1434
 
        /* plugin author (for SHOW PLUGINS) */
1435
 
        /* const char* */
1436
 
        STRUCT_FLD(author, plugin_author),
1437
 
 
1438
 
        /* general descriptive text (for SHOW PLUGINS) */
1439
 
        /* const char* */
1440
 
        STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool"),
1441
 
 
1442
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
1443
 
        /* int */
1444
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1445
 
 
1446
 
        /* the function to invoke when plugin is loaded */
1447
 
        /* int (*)(void*); */
1448
 
        STRUCT_FLD(init, i_s_cmpmem_init),
1449
 
 
1450
 
        /* the function to invoke when plugin is unloaded */
1451
 
        /* int (*)(void*); */
1452
 
        STRUCT_FLD(deinit, i_s_common_deinit),
1453
 
 
1454
 
        /* struct st_mysql_show_var* */
1455
 
        STRUCT_FLD(status_vars, NULL),
1456
 
 
1457
 
        /* struct st_mysql_sys_var** */
1458
 
        STRUCT_FLD(system_vars, NULL),
1459
 
 
1460
 
        /* reserved for dependency checking */
1461
 
        /* void* */
1462
 
        STRUCT_FLD(__reserved1, NULL)
1463
 
};
1464
 
 
1465
 
UNIV_INTERN struct st_mysql_plugin      i_s_innodb_cmpmem_reset =
1466
 
{
1467
 
        /* the plugin type (a DRIZZLE_XXX_PLUGIN value) */
1468
 
        /* int */
1469
 
        STRUCT_FLD(type, DRIZZLE_INFORMATION_SCHEMA_PLUGIN),
1470
 
 
1471
 
        /* plugin name */
1472
 
        /* const char* */
1473
 
        STRUCT_FLD(name, "INNODB_CMPMEM_RESET"),
1474
 
 
1475
 
        /* plugin version */
1476
 
        /* const char* */
1477
 
        STRUCT_FLD(version, "1.0.2"),
1478
 
 
1479
 
        /* plugin author (for SHOW PLUGINS) */
1480
 
        /* const char* */
1481
 
        STRUCT_FLD(author, plugin_author),
1482
 
 
1483
 
        /* general descriptive text (for SHOW PLUGINS) */
1484
 
        /* const char* */
1485
 
        STRUCT_FLD(descr, "Statistics for the InnoDB compressed buffer pool;"
1486
 
                   " reset cumulated counts"),
1487
 
 
1488
 
        /* the plugin license (PLUGIN_LICENSE_XXX) */
1489
 
        /* int */
1490
 
        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
1491
 
 
1492
 
        /* the function to invoke when plugin is loaded */
1493
 
        /* int (*)(void*); */
1494
 
        STRUCT_FLD(init, i_s_cmpmem_reset_init),
1495
 
 
1496
 
        /* the function to invoke when plugin is unloaded */
1497
 
        /* int (*)(void*); */
1498
 
        STRUCT_FLD(deinit, i_s_common_deinit),
1499
 
 
1500
 
        /* struct st_mysql_show_var* */
1501
 
        STRUCT_FLD(status_vars, NULL),
1502
 
 
1503
 
        /* struct st_mysql_sys_var** */
1504
 
        STRUCT_FLD(system_vars, NULL),
1505
 
 
1506
 
        /* reserved for dependency checking */
1507
 
        /* void* */
1508
 
        STRUCT_FLD(__reserved1, NULL)
1509
 
};
1510
1192
 
1511
1193
/***********************************************************************
1512
1194
Unbind a dynamic INFORMATION_SCHEMA table. */
1513
 
static
1514
1195
int
1515
1196
i_s_common_deinit(
1516
1197
/*==============*/
1517
1198
                        /* out: 0 on success */
1518
 
        void*   p)      /* in/out: table schema object */
 
1199
        PluginRegistry &registry)       /* in/out: table schema object */
1519
1200
{
1520
 
        ST_SCHEMA_TABLE *schema= static_cast<ST_SCHEMA_TABLE *>(p);
1521
 
        delete schema;
 
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);
 
1208
 
 
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;
1522
1216
 
1523
1217
        return(0);
1524
1218
}