217
201
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */
218
static ST_FIELD_INFO innodb_trx_fields_info[] =
202
static ColumnInfo innodb_trx_fields_info[] =
220
204
#define IDX_TRX_ID 0
221
{STRUCT_FLD(field_name, "trx_id"),
222
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
223
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
224
STRUCT_FLD(value, 0),
225
STRUCT_FLD(field_flags, 0),
226
STRUCT_FLD(old_name, ""),
227
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
207
DRIZZLE_TYPE_VARCHAR,
229
213
#define IDX_TRX_STATE 1
230
{STRUCT_FLD(field_name, "trx_state"),
231
STRUCT_FLD(field_length, TRX_QUE_STATE_STR_MAX_LEN + 1),
232
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
233
STRUCT_FLD(value, 0),
234
STRUCT_FLD(field_flags, 0),
235
STRUCT_FLD(old_name, ""),
236
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
214
ColumnInfo("trx_state",
215
TRX_QUE_STATE_STR_MAX_LEN + 1,
216
DRIZZLE_TYPE_VARCHAR,
238
222
#define IDX_TRX_STARTED 2
239
{STRUCT_FLD(field_name, "trx_started"),
240
STRUCT_FLD(field_length, 0),
241
STRUCT_FLD(field_type, DRIZZLE_TYPE_DATETIME),
242
STRUCT_FLD(value, 0),
243
STRUCT_FLD(field_flags, 0),
244
STRUCT_FLD(old_name, ""),
245
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
223
ColumnInfo("trx_started",
225
DRIZZLE_TYPE_DATETIME,
247
231
#define IDX_TRX_REQUESTED_LOCK_ID 3
248
{STRUCT_FLD(field_name, "trx_requested_lock_id"),
249
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
250
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
251
STRUCT_FLD(value, 0),
252
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
253
STRUCT_FLD(old_name, ""),
254
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
232
ColumnInfo("trx_requested_lock_id",
233
TRX_I_S_LOCK_ID_MAX_LEN + 1,
234
DRIZZLE_TYPE_VARCHAR,
256
240
#define IDX_TRX_WAIT_STARTED 4
257
{STRUCT_FLD(field_name, "trx_wait_started"),
258
STRUCT_FLD(field_length, 0),
259
STRUCT_FLD(field_type, DRIZZLE_TYPE_DATETIME),
260
STRUCT_FLD(value, 0),
261
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
262
STRUCT_FLD(old_name, ""),
263
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
241
ColumnInfo("trx_wait_started",
243
DRIZZLE_TYPE_DATETIME,
265
249
#define IDX_TRX_WEIGHT 5
266
{STRUCT_FLD(field_name, "trx_weight"),
267
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
268
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
269
STRUCT_FLD(value, 0),
270
STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
271
STRUCT_FLD(old_name, ""),
272
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
250
ColumnInfo("trx_weight",
251
MY_INT64_NUM_DECIMAL_DIGITS,
252
DRIZZLE_TYPE_LONGLONG,
274
258
#define IDX_TRX_DRIZZLE_THREAD_ID 6
275
{STRUCT_FLD(field_name, "trx_mysql_thread_id"),
276
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
277
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
278
STRUCT_FLD(value, 0),
279
STRUCT_FLD(field_flags, MY_I_S_UNSIGNED),
280
STRUCT_FLD(old_name, ""),
281
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
259
ColumnInfo("trx_mysql_thread_id",
260
MY_INT64_NUM_DECIMAL_DIGITS,
261
DRIZZLE_TYPE_LONGLONG,
283
267
#define IDX_TRX_QUERY 7
284
{STRUCT_FLD(field_name, "trx_query"),
285
STRUCT_FLD(field_length, TRX_I_S_TRX_QUERY_MAX_LEN),
286
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
287
STRUCT_FLD(value, 0),
288
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
289
STRUCT_FLD(old_name, ""),
290
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
268
ColumnInfo("trx_query",
269
TRX_I_S_TRX_QUERY_MAX_LEN,
270
DRIZZLE_TYPE_VARCHAR,
295
279
/***********************************************************************
386
370
if ((innodb_trx_schema_table= new InfoSchemaTable) == NULL)
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";
373
innodb_trx_schema_table->setColumnInfo(innodb_trx_fields_info);
374
innodb_trx_schema_table->setInfoSchemaMethods(&trx_methods);
375
innodb_trx_schema_table->setTableName("INNODB_TRX");
398
381
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
399
static ST_FIELD_INFO innodb_locks_fields_info[] =
382
static ColumnInfo innodb_locks_fields_info[] =
401
384
#define IDX_LOCK_ID 0
402
{STRUCT_FLD(field_name, "lock_id"),
403
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
404
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
405
STRUCT_FLD(value, 0),
406
STRUCT_FLD(field_flags, 0),
407
STRUCT_FLD(old_name, ""),
408
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
385
ColumnInfo("lock_id",
386
TRX_I_S_LOCK_ID_MAX_LEN + 1,
387
DRIZZLE_TYPE_VARCHAR,
410
393
#define IDX_LOCK_TRX_ID 1
411
{STRUCT_FLD(field_name, "lock_trx_id"),
412
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
413
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
414
STRUCT_FLD(value, 0),
415
STRUCT_FLD(field_flags, 0),
416
STRUCT_FLD(old_name, ""),
417
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
394
ColumnInfo("lock_trx_id",
396
DRIZZLE_TYPE_VARCHAR,
419
402
#define IDX_LOCK_MODE 2
420
{STRUCT_FLD(field_name, "lock_mode"),
403
ColumnInfo("lock_mode",
421
404
/* S[,GAP] X[,GAP] IS[,GAP] IX[,GAP] AUTO_INC UNKNOWN */
422
STRUCT_FLD(field_length, 32),
423
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
424
STRUCT_FLD(value, 0),
425
STRUCT_FLD(field_flags, 0),
426
STRUCT_FLD(old_name, ""),
427
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
406
DRIZZLE_TYPE_VARCHAR,
429
412
#define IDX_LOCK_TYPE 3
430
{STRUCT_FLD(field_name, "lock_type"),
431
STRUCT_FLD(field_length, 32 /* RECORD|TABLE|UNKNOWN */),
432
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
433
STRUCT_FLD(value, 0),
434
STRUCT_FLD(field_flags, 0),
435
STRUCT_FLD(old_name, ""),
436
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
413
ColumnInfo("lock_type",
414
32, /* RECORD|TABLE|UNKNOWN */
415
DRIZZLE_TYPE_VARCHAR,
438
421
#define IDX_LOCK_TABLE 4
439
{STRUCT_FLD(field_name, "lock_table"),
440
STRUCT_FLD(field_length, 1024),
441
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
442
STRUCT_FLD(value, 0),
443
STRUCT_FLD(field_flags, 0),
444
STRUCT_FLD(old_name, ""),
445
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
422
ColumnInfo("lock_table",
424
DRIZZLE_TYPE_VARCHAR,
447
430
#define IDX_LOCK_INDEX 5
448
{STRUCT_FLD(field_name, "lock_index"),
449
STRUCT_FLD(field_length, 1024),
450
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
451
STRUCT_FLD(value, 0),
452
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
453
STRUCT_FLD(old_name, ""),
454
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
431
ColumnInfo("lock_index",
433
DRIZZLE_TYPE_VARCHAR,
456
439
#define IDX_LOCK_SPACE 6
457
{STRUCT_FLD(field_name, "lock_space"),
458
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
459
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
460
STRUCT_FLD(value, 0),
461
STRUCT_FLD(field_flags, MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL),
462
STRUCT_FLD(old_name, ""),
463
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
440
ColumnInfo("lock_space",
441
MY_INT64_NUM_DECIMAL_DIGITS,
442
DRIZZLE_TYPE_LONGLONG,
444
MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL,
465
448
#define IDX_LOCK_PAGE 7
466
{STRUCT_FLD(field_name, "lock_page"),
467
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
468
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
469
STRUCT_FLD(value, 0),
470
STRUCT_FLD(field_flags, MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL),
471
STRUCT_FLD(old_name, ""),
472
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
449
ColumnInfo("lock_page",
450
MY_INT64_NUM_DECIMAL_DIGITS,
451
DRIZZLE_TYPE_LONGLONG,
453
MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL,
474
457
#define IDX_LOCK_REC 8
475
{STRUCT_FLD(field_name, "lock_rec"),
476
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
477
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
478
STRUCT_FLD(value, 0),
479
STRUCT_FLD(field_flags, MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL),
480
STRUCT_FLD(old_name, ""),
481
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
458
ColumnInfo("lock_rec",
459
MY_INT64_NUM_DECIMAL_DIGITS,
460
DRIZZLE_TYPE_LONGLONG,
462
MY_I_S_UNSIGNED | MY_I_S_MAYBE_NULL,
483
466
#define IDX_LOCK_DATA 9
484
{STRUCT_FLD(field_name, "lock_data"),
485
STRUCT_FLD(field_length, TRX_I_S_LOCK_DATA_MAX_LEN),
486
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
487
STRUCT_FLD(value, 0),
488
STRUCT_FLD(field_flags, MY_I_S_MAYBE_NULL),
489
STRUCT_FLD(old_name, ""),
490
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
467
ColumnInfo("lock_data",
468
TRX_I_S_LOCK_DATA_MAX_LEN,
469
DRIZZLE_TYPE_VARCHAR,
495
478
/***********************************************************************
610
593
if ((innodb_locks_schema_table= new InfoSchemaTable) == NULL)
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";
596
innodb_locks_schema_table->setColumnInfo(innodb_locks_fields_info);
597
innodb_locks_schema_table->setInfoSchemaMethods(&trx_methods);
598
innodb_locks_schema_table->setTableName("INNODB_LOCKS");
621
603
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
622
static ST_FIELD_INFO innodb_lock_waits_fields_info[] =
604
static ColumnInfo innodb_lock_waits_fields_info[] =
624
606
#define IDX_REQUESTING_TRX_ID 0
625
{STRUCT_FLD(field_name, "requesting_trx_id"),
626
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
627
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
628
STRUCT_FLD(value, 0),
629
STRUCT_FLD(field_flags, 0),
630
STRUCT_FLD(old_name, ""),
631
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
607
ColumnInfo("requesting_trx_id",
609
DRIZZLE_TYPE_VARCHAR,
633
615
#define IDX_REQUESTED_LOCK_ID 1
634
{STRUCT_FLD(field_name, "requested_lock_id"),
635
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
636
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
637
STRUCT_FLD(value, 0),
638
STRUCT_FLD(field_flags, 0),
639
STRUCT_FLD(old_name, ""),
640
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
616
ColumnInfo("requested_lock_id",
617
TRX_I_S_LOCK_ID_MAX_LEN + 1,
618
DRIZZLE_TYPE_VARCHAR,
642
624
#define IDX_BLOCKING_TRX_ID 2
643
{STRUCT_FLD(field_name, "blocking_trx_id"),
644
STRUCT_FLD(field_length, TRX_ID_MAX_LEN + 1),
645
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
646
STRUCT_FLD(value, 0),
647
STRUCT_FLD(field_flags, 0),
648
STRUCT_FLD(old_name, ""),
649
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
625
ColumnInfo("blocking_trx_id",
627
DRIZZLE_TYPE_VARCHAR,
651
633
#define IDX_BLOCKING_LOCK_ID 3
652
{STRUCT_FLD(field_name, "blocking_lock_id"),
653
STRUCT_FLD(field_length, TRX_I_S_LOCK_ID_MAX_LEN + 1),
654
STRUCT_FLD(field_type, DRIZZLE_TYPE_VARCHAR),
655
STRUCT_FLD(value, 0),
656
STRUCT_FLD(field_flags, 0),
657
STRUCT_FLD(old_name, ""),
658
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
634
ColumnInfo("blocking_lock_id",
635
TRX_I_S_LOCK_ID_MAX_LEN + 1,
636
DRIZZLE_TYPE_VARCHAR,
663
645
/***********************************************************************
849
829
/* Fields of the dynamic table information_schema.innodb_cmp. */
850
static ST_FIELD_INFO i_s_cmp_fields_info[] =
830
static ColumnInfo i_s_cmp_fields_info[] =
852
{STRUCT_FLD(field_name, "page_size"),
853
STRUCT_FLD(field_length, 5),
854
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
855
STRUCT_FLD(value, 0),
856
STRUCT_FLD(field_flags, 0),
857
STRUCT_FLD(old_name, "Compressed Page Size"),
858
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
860
{STRUCT_FLD(field_name, "compress_ops"),
861
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
862
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
863
STRUCT_FLD(value, 0),
864
STRUCT_FLD(field_flags, 0),
865
STRUCT_FLD(old_name, "Total Number of Compressions"),
866
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
868
{STRUCT_FLD(field_name, "compress_ops_ok"),
869
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
870
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
871
STRUCT_FLD(value, 0),
872
STRUCT_FLD(field_flags, 0),
873
STRUCT_FLD(old_name, "Total Number of"
874
" Successful Compressions"),
875
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
877
{STRUCT_FLD(field_name, "compress_time"),
878
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
879
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
880
STRUCT_FLD(value, 0),
881
STRUCT_FLD(field_flags, 0),
882
STRUCT_FLD(old_name, "Total Duration of Compressions,"
884
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
886
{STRUCT_FLD(field_name, "uncompress_ops"),
887
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
888
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
889
STRUCT_FLD(value, 0),
890
STRUCT_FLD(field_flags, 0),
891
STRUCT_FLD(old_name, "Total Number of Decompressions"),
892
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
894
{STRUCT_FLD(field_name, "uncompress_time"),
895
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
896
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
897
STRUCT_FLD(value, 0),
898
STRUCT_FLD(field_flags, 0),
899
STRUCT_FLD(old_name, "Total Duration of Decompressions,"
901
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
832
ColumnInfo("page_size",
837
"Compressed Page Size",
840
ColumnInfo("compress_ops",
841
MY_INT32_NUM_DECIMAL_DIGITS,
845
"Total Number of Compressions",
848
ColumnInfo("compress_ops_ok",
849
MY_INT32_NUM_DECIMAL_DIGITS,
853
"Total Number of Successful Compressions",
856
ColumnInfo("compress_time",
857
MY_INT32_NUM_DECIMAL_DIGITS,
861
"Total Duration of Compressions in Seconds",
864
ColumnInfo("uncompress_ops",
865
MY_INT32_NUM_DECIMAL_DIGITS,
869
"Total Number of Decompressions",
872
ColumnInfo("uncompress_time",
873
MY_INT32_NUM_DECIMAL_DIGITS,
877
"Total Duration of Decompressions in Seconds",
1030
1002
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
1031
static ST_FIELD_INFO i_s_cmpmem_fields_info[] =
1003
static ColumnInfo i_s_cmpmem_fields_info[] =
1033
{STRUCT_FLD(field_name, "page_size"),
1034
STRUCT_FLD(field_length, 5),
1035
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
1036
STRUCT_FLD(value, 0),
1037
STRUCT_FLD(field_flags, 0),
1038
STRUCT_FLD(old_name, "Buddy Block Size"),
1039
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
1041
{STRUCT_FLD(field_name, "pages_used"),
1042
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
1043
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
1044
STRUCT_FLD(value, 0),
1045
STRUCT_FLD(field_flags, 0),
1046
STRUCT_FLD(old_name, "Currently in Use"),
1047
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
1049
{STRUCT_FLD(field_name, "pages_free"),
1050
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
1051
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
1052
STRUCT_FLD(value, 0),
1053
STRUCT_FLD(field_flags, 0),
1054
STRUCT_FLD(old_name, "Currently Available"),
1055
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
1057
{STRUCT_FLD(field_name, "relocation_ops"),
1058
STRUCT_FLD(field_length, MY_INT64_NUM_DECIMAL_DIGITS),
1059
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONGLONG),
1060
STRUCT_FLD(value, 0),
1061
STRUCT_FLD(field_flags, 0),
1062
STRUCT_FLD(old_name, "Total Number of Relocations"),
1063
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
1065
{STRUCT_FLD(field_name, "relocation_time"),
1066
STRUCT_FLD(field_length, MY_INT32_NUM_DECIMAL_DIGITS),
1067
STRUCT_FLD(field_type, DRIZZLE_TYPE_LONG),
1068
STRUCT_FLD(value, 0),
1069
STRUCT_FLD(field_flags, 0),
1070
STRUCT_FLD(old_name, "Total Duration of Relocations,"
1072
STRUCT_FLD(open_method, SKIP_OPEN_TABLE)},
1074
END_OF_ST_FIELD_INFO
1005
ColumnInfo("page_size",
1013
ColumnInfo("pages_used",
1014
MY_INT32_NUM_DECIMAL_DIGITS,
1021
ColumnInfo("pages_free",
1022
MY_INT32_NUM_DECIMAL_DIGITS,
1026
"Currently Available",
1029
ColumnInfo("relocation_ops",
1030
MY_INT64_NUM_DECIMAL_DIGITS,
1031
DRIZZLE_TYPE_LONGLONG,
1034
"Total Number of Relocations",
1037
ColumnInfo("relocation_time",
1038
MY_INT32_NUM_DECIMAL_DIGITS,
1042
"Total Duration of Relocations, in Seconds",
1077
1048
/***********************************************************************