757
757
List<FOREIGN_KEY_INFO> f_key_list;
758
758
Table *show_table= tables->table;
759
show_table->file->info(HA_STATUS_VARIABLE |
759
show_table->cursor->info(HA_STATUS_VARIABLE |
760
760
HA_STATUS_NO_LOCK |
763
show_table->file->get_foreign_key_list(session, &f_key_list);
763
show_table->cursor->get_foreign_key_list(session, &f_key_list);
764
764
FOREIGN_KEY_INFO *f_key_info;
765
765
List_iterator_fast<FOREIGN_KEY_INFO> it(f_key_list);
766
766
while ((f_key_info= it++))
962
962
KEY *key=show_table->key_info+i;
963
963
if (key->rec_per_key[j])
965
ha_rows records=(show_table->file->stats.records /
965
ha_rows records=(show_table->cursor->stats.records /
966
966
key->rec_per_key[j]);
967
967
table->field[9]->store((int64_t) records, true);
968
968
table->field[9]->set_notnull();
970
str= show_table->file->index_type(i);
970
str= show_table->cursor->index_type(i);
971
971
table->field[13]->store(str, strlen(str), cs);
973
973
if ((key_part->field &&
1258
1258
table->field[6]->store(tmp_buff, strlen(tmp_buff), cs);
1259
1259
if (! tables->schema_table)
1261
table->field[7]->store((int64_t) file->stats.records, true);
1261
table->field[7]->store((int64_t) cursor->stats.records, true);
1262
1262
table->field[7]->set_notnull();
1264
table->field[8]->store((int64_t) file->stats.mean_rec_length, true);
1265
table->field[9]->store((int64_t) file->stats.data_file_length, true);
1266
if (file->stats.max_data_file_length)
1264
table->field[8]->store((int64_t) cursor->stats.mean_rec_length, true);
1265
table->field[9]->store((int64_t) cursor->stats.data_file_length, true);
1266
if (cursor->stats.max_data_file_length)
1268
table->field[10]->store((int64_t) file->stats.max_data_file_length,
1268
table->field[10]->store((int64_t) cursor->stats.max_data_file_length,
1271
table->field[11]->store((int64_t) file->stats.index_file_length, true);
1272
table->field[12]->store((int64_t) file->stats.delete_length, true);
1271
table->field[11]->store((int64_t) cursor->stats.index_file_length, true);
1272
table->field[12]->store((int64_t) cursor->stats.delete_length, true);
1273
1273
if (show_table->found_next_number_field)
1275
table->field[13]->store((int64_t) file->stats.auto_increment_value,
1275
table->field[13]->store((int64_t) cursor->stats.auto_increment_value, true);
1277
1276
table->field[13]->set_notnull();
1279
if (file->stats.create_time)
1278
if (cursor->stats.create_time)
1281
1280
session->variables.time_zone->gmt_sec_to_TIME(&time,
1282
(time_t) file->stats.create_time);
1281
(time_t) cursor->stats.create_time);
1283
1282
table->field[14]->store_time(&time, DRIZZLE_TIMESTAMP_DATETIME);
1284
1283
table->field[14]->set_notnull();
1286
if (file->stats.update_time)
1285
if (cursor->stats.update_time)
1288
1287
session->variables.time_zone->gmt_sec_to_TIME(&time,
1289
(time_t) file->stats.update_time);
1288
(time_t) cursor->stats.update_time);
1290
1289
table->field[15]->store_time(&time, DRIZZLE_TIMESTAMP_DATETIME);
1291
1290
table->field[15]->set_notnull();
1293
if (file->stats.check_time)
1292
if (cursor->stats.check_time)
1295
1294
session->variables.time_zone->gmt_sec_to_TIME(&time,
1296
(time_t) file->stats.check_time);
1295
(time_t) cursor->stats.check_time);
1297
1296
table->field[16]->store_time(&time, DRIZZLE_TIMESTAMP_DATETIME);
1298
1297
table->field[16]->set_notnull();
1300
if (file->ha_table_flags() & (ulong) HA_HAS_CHECKSUM)
1299
if (cursor->ha_table_flags() & (ulong) HA_HAS_CHECKSUM)
1302
table->field[18]->store((int64_t) file->checksum(), true);
1301
table->field[18]->store((int64_t) cursor->checksum(), true);
1303
1302
table->field[18]->set_notnull();