1177
1177
if (share->state.changed & STATE_CRASHED)
1178
my_stpcpy(buff,"crashed");
1178
strcpy(buff,"crashed");
1181
1181
if (share->state.open_count)
1182
pos=my_stpcpy(pos,"open,");
1182
pos= strcpy(pos,"open,")+5;
1183
1183
if (share->state.changed & STATE_CHANGED)
1184
pos=my_stpcpy(pos,"changed,");
1184
pos= strcpy(pos,"changed,")+8;
1186
pos=my_stpcpy(pos,"checked,");
1186
pos= strcpy(pos,"checked,")+8;
1187
1187
if (!(share->state.changed & STATE_NOT_ANALYZED))
1188
pos=my_stpcpy(pos,"analyzed,");
1188
pos= strcpy(pos,"analyzed,")+9;
1189
1189
if (!(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))
1190
pos=my_stpcpy(pos,"optimized keys,");
1190
pos= strcpy(pos,"optimized keys,")+15;
1191
1191
if (!(share->state.changed & STATE_NOT_SORTED_PAGES))
1192
pos=my_stpcpy(pos,"sorted index pages,");
1192
pos= strcpy(pos,"sorted index pages,")+19;
1193
1193
pos[-1]=0; /* Remove extra ',' */
1195
1195
printf("Status: %s\n",buff);
1217
1217
printf("Init-relocation: %13s\n",llstr(share->base.reloc,llbuff));
1219
1219
printf("Datafile parts: %13s Deleted data: %13s\n",
1220
llstr(share->state.split,llbuff),
1221
llstr(info->state->empty,llbuff2));
1220
llstr(share->state.split,llbuff),
1221
llstr(info->state->empty,llbuff2));
1222
1222
printf("Datafile pointer (bytes):%9d Keyfile pointer (bytes):%9d\n",
1223
share->rec_reflength,share->base.key_reflength);
1223
share->rec_reflength,share->base.key_reflength);
1224
1224
printf("Datafile length: %13s Keyfile length: %13s\n",
1225
llstr(info->state->data_file_length,llbuff),
1226
llstr(info->state->key_file_length,llbuff2));
1225
llstr(info->state->data_file_length,llbuff),
1226
llstr(info->state->key_file_length,llbuff2));
1228
1228
if (info->s->base.reloc == 1L && info->s->base.records == 1L)
1229
1229
puts("This is a one-record table");
1232
1232
if (share->base.max_data_file_length != HA_OFFSET_ERROR ||
1233
share->base.max_key_file_length != HA_OFFSET_ERROR)
1234
printf("Max datafile length: %13s Max keyfile length: %13s\n",
1235
llstr(share->base.max_data_file_length-1,llbuff),
1236
llstr(share->base.max_key_file_length-1,llbuff2));
1233
share->base.max_key_file_length != HA_OFFSET_ERROR)
1234
printf("Max datafile length: %13s Max keyfile length: %13s\n",
1235
llstr(share->base.max_data_file_length-1,llbuff),
1236
llstr(share->base.max_key_file_length-1,llbuff2));
1262
1262
if (keyseg->flag & HA_REVERSE_SORT)
1264
pos=my_stpcpy(pos,type_names[keyseg->type]);
1264
pos= strcpy(pos,type_names[keyseg->type]);
1265
pos+= strlen(type_names[keyseg->type]);
1267
1268
if (keyinfo->flag & HA_PACK_KEY)
1268
pos=my_stpcpy(pos,prefix_packed_txt);
1269
pos= strcpy(pos,prefix_packed_txt) + strlen(prefix_packed_txt);
1269
1270
if (keyinfo->flag & HA_BINARY_PACK_KEY)
1270
pos=my_stpcpy(pos,bin_packed_txt);
1271
pos= strcpy(pos,bin_packed_txt) + strlen(bin_packed_txt);
1271
1272
if (keyseg->flag & HA_SPACE_PACK)
1272
pos=my_stpcpy(pos,diff_txt);
1273
pos= strcpy(pos,diff_txt) + strlen(diff_txt);
1273
1274
if (keyseg->flag & HA_BLOB_PART)
1274
pos=my_stpcpy(pos,blob_txt);
1275
pos= strcpy(pos,blob_txt) + strlen(blob_txt);
1275
1276
if (keyseg->flag & HA_NULL_PART)
1276
pos=my_stpcpy(pos,null_txt);
1277
pos= strcpy(pos,null_txt) + strlen(null_txt);
1279
1280
printf("%-4d%-6ld%-3d %-8s%-21s",
1280
key+1,(long) keyseg->start+1,keyseg->length,text,buff);
1281
key+1,(long) keyseg->start+1,keyseg->length,text,buff);
1281
1282
if (share->state.key_root[key] != HA_OFFSET_ERROR)
1282
1283
llstr(share->state.key_root[key],buff);
1285
1286
if (param->testflag & T_VERBOSE)
1286
1287
printf("%11lu %12s %10d",
1287
share->state.rec_per_key_part[keyseg_nr++],
1288
buff,keyinfo->block_length);
1288
share->state.rec_per_key_part[keyseg_nr++],
1289
buff,keyinfo->block_length);
1290
1291
while ((++keyseg)->type != HA_KEYTYPE_END)
1293
1294
if (keyseg->flag & HA_REVERSE_SORT)
1295
pos=my_stpcpy(pos,type_names[keyseg->type]);
1296
pos= strcpy(pos,type_names[keyseg->type]);
1297
pos+= strlen(type_names[keyseg->type]);
1297
1299
if (keyseg->flag & HA_SPACE_PACK)
1298
pos=my_stpcpy(pos,diff_txt);
1300
pos= strcpy(pos,diff_txt) + strlen(diff_txt);
1299
1301
if (keyseg->flag & HA_BLOB_PART)
1300
pos=my_stpcpy(pos,blob_txt);
1302
pos= strcpy(pos,blob_txt) + strlen(blob_txt);
1301
1303
if (keyseg->flag & HA_NULL_PART)
1302
pos=my_stpcpy(pos,null_txt);
1304
pos= strcpy(pos,null_txt) + strlen(null_txt);
1304
1306
printf(" %-6ld%-3d %-21s",
1305
1307
(long) keyseg->start+1,keyseg->length,buff);
1306
1308
if (param->testflag & T_VERBOSE)
1307
printf("%11lu", share->state.rec_per_key_part[keyseg_nr++]);
1309
printf("%11lu", share->state.rec_per_key_part[keyseg_nr++]);
1314
1316
MI_UNIQUEDEF *uniqueinfo;
1315
1317
puts("\nUnique Key Start Len Nullpos Nullbit Type");
1316
1318
for (key=0,uniqueinfo= &share->uniqueinfo[0] ;
1317
key < share->state.header.uniques; key++, uniqueinfo++)
1319
key < share->state.header.uniques; key++, uniqueinfo++)
1319
1321
bool new_row=0;
1320
1322
char null_bit[8],null_pos[8];
1321
1323
printf("%-8d%-5d",key+1,uniqueinfo->key+1);
1322
1324
for (keyseg=uniqueinfo->seg ; keyseg->type != HA_KEYTYPE_END ; keyseg++)
1326
null_bit[0]=null_pos[0]=0;
1327
if (keyseg->null_bit)
1329
sprintf(null_bit,"%d",keyseg->null_bit);
1330
sprintf(null_pos,"%ld",(long) keyseg->null_pos+1);
1332
printf("%-7ld%-5d%-9s%-10s%-30s\n",
1333
(long) keyseg->start+1,keyseg->length,
1335
type_names[keyseg->type]);
1328
null_bit[0]=null_pos[0]=0;
1329
if (keyseg->null_bit)
1331
sprintf(null_bit,"%d",keyseg->null_bit);
1332
sprintf(null_pos,"%ld",(long) keyseg->null_pos+1);
1334
printf("%-7ld%-5d%-9s%-10s%-30s\n",
1335
(long) keyseg->start+1,keyseg->length,
1337
type_names[keyseg->type]);
1348
1350
for (field=0 ; field < share->base.fields ; field++)
1350
1352
if (share->options & HA_OPTION_COMPRESS_RECORD)
1351
type=share->rec[field].base_type;
1353
type=share->rec[field].base_type;
1353
type=(enum en_fieldtype) share->rec[field].type;
1354
end=my_stpcpy(buff,field_pack[type]);
1355
type=(enum en_fieldtype) share->rec[field].type;
1356
end= strcpy(buff, field_pack[type]);
1357
end+= strlen(field_pack[type]);
1355
1358
if (share->options & HA_OPTION_COMPRESS_RECORD)
1357
if (share->rec[field].pack_type & PACK_TYPE_SELECTED)
1358
end=my_stpcpy(end,", not_always");
1359
if (share->rec[field].pack_type & PACK_TYPE_SPACE_FIELDS)
1360
end=my_stpcpy(end,", no empty");
1361
if (share->rec[field].pack_type & PACK_TYPE_ZERO_FILL)
1363
sprintf(end,", zerofill(%d)",share->rec[field].space_length_bits);
1364
end= strchr(end, '\0');
1360
if (share->rec[field].pack_type & PACK_TYPE_SELECTED)
1361
end= strcpy(end,", not_always")+12;
1362
if (share->rec[field].pack_type & PACK_TYPE_SPACE_FIELDS)
1363
end= strcpy(end,", no empty")+10;
1364
if (share->rec[field].pack_type & PACK_TYPE_ZERO_FILL)
1366
sprintf(end,", zerofill(%d)",share->rec[field].space_length_bits);
1367
end= strchr(end, '\0');
1367
1370
if (buff[0] == ',')
1368
my_stpcpy(buff,buff+2);
1371
strcpy(buff,buff+2);
1369
1372
int10_to_str((long) share->rec[field].length,length,10);
1370
1373
null_bit[0]=null_pos[0]=0;
1371
1374
if (share->rec[field].null_bit)
1373
sprintf(null_bit,"%d",share->rec[field].null_bit);
1374
sprintf(null_pos,"%d",share->rec[field].null_pos+1);
1376
sprintf(null_bit,"%d",share->rec[field].null_bit);
1377
sprintf(null_pos,"%d",share->rec[field].null_pos+1);
1376
1379
printf("%-6d%-6d%-7s%-8s%-8s%-35s",field+1,start,length,
1377
1380
null_pos, null_bit, buff);