Commit 34163154 authored by Alexander Barkov's avatar Alexander Barkov

A followup for MDEV-29672 Add MTR tests covering key and key segment flags and types

Adding debug output for key and keyseg flags at ha_myisam::open() time.
So now there are three points of debug output:

1. In the very end of mysql_prepare_create_table()
2. In ha_myisam::create(), after the table2myisam() call
3. In ha_myisan::open(), after the mi_open() call

mi_create(), which is is called between 2 and 3, modifies flags for
some data types, so the output in 2 and 3 is different.
parent f6f9b7fc
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -53,6 +53,8 @@ BEGIN NOT ATOMIC
SELECT tabledef AS ``;
EXECUTE IMMEDIATE tabledef;
SHOW WARNINGS;
SELECT * FROM t1;
SHOW WARNINGS;
SHOW CREATE TABLE t1;
DROP TABLE t1;
END;
......
......@@ -63,23 +63,23 @@ class Debug_key: public String
{
static const char *names[17]=
{
"HA_NOSAME",
"HA_PACK_KEY",
"HA_SPACE_PACK_USED",
"HA_VAR_LENGTH_KEY",
"HA_AUTO_KEY",
"HA_BINARY_PACK_KEY",
"HA_NULL_PART_KEY",
"HA_FULLTEXT",
"HA_UNIQUE_CHECK",
"HA_SORT_ALLOWS_SAME",
"HA_SPATIAL",
"HA_NULL_ARE_EQUAL",
"HA_GENERATED_KEY",
"HA_USES_COMMENT",
"HA_USES_PARSER",
"HA_USES_BLOCK_SIZE",
"HA_KEY_HAS_PART_KEY_SEG"
"HA_NOSAME", // 1
"HA_PACK_KEY", // 2 - used in both HA_KEYSEG and KEY/MI_KEYDEF
"HA_SPACE_PACK_USED", // 4
"HA_VAR_LENGTH_KEY", // 8
"HA_AUTO_KEY", // 16
"HA_BINARY_PACK_KEY", // 32
"HA_NULL_PART_KEY", // 64
"HA_FULLTEXT", // 128
"HA_UNIQUE_CHECK", // 256
"HA_SORT_ALLOWS_SAME", // 512
"HA_SPATIAL", // 1024
"HA_NULL_ARE_EQUAL", // 2048
"HA_USES_COMMENT", // 4096
"HA_GENERATED_KEY", // 8192
"HA_USES_PARSER", // 16384
"HA_USES_BLOCK_SIZE", // 32768
"HA_KEY_HAS_PART_KEY_SEG" // 65536
};
return append_flag32_names((uint) flags, names, array_elements(names));
}
......@@ -89,7 +89,7 @@ class Debug_key: public String
static const char *names[]=
{
"HA_SPACE_PACK", // 1
"??? 2 ???", // 2
"HA_PACK_KEY", // 2 - used in both HA_KEYSEG and KEY/MI_KEYDEF
"HA_PART_KEY_SEG", // 4
"HA_VAR_LENGTH_PART", // 8
"HA_NULL_PART", // 16
......
......@@ -860,6 +860,13 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked)
/* purecov: end */
}
}
DBUG_EXECUTE_IF("key",
Debug_key_myisam::print_keys_myisam(table->in_use,
"ha_myisam::open: ",
table, file->s->keyinfo,
file->s->base.keys);
);
if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE))
(void) mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment