Skip to content

Instantly share code, notes, and snippets.

@amatus
Created February 19, 2017 23:01
Show Gist options
  • Save amatus/da76f8c8f20180ff6b0e7f2046705360 to your computer and use it in GitHub Desktop.
Save amatus/da76f8c8f20180ff6b0e7f2046705360 to your computer and use it in GitHub Desktop.
pt-duplicate-key-checker run on gnunet mysql datastore
# ########################################################################
# gnunet.gn090
# ########################################################################
# idx_hash is a left-prefix of idx_hash_vhash
# Key definitions:
# KEY `idx_hash` (`hash`),
# KEY `idx_hash_vhash` (`hash`,`vhash`),
# Column types:
# `hash` binary(64) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
# `vhash` binary(64) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
# To remove this duplicate index, execute:
ALTER TABLE `gnunet`.`gn090` DROP INDEX `idx_hash`;
# Key idx_hash_uid ends with a prefix of the clustered index
# Key definitions:
# KEY `idx_hash_uid` (`hash`,`uid`),
# PRIMARY KEY (`uid`),
# Column types:
# `hash` binary(64) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
# `uid` bigint(20) not null auto_increment
# To shorten this duplicate clustered index, execute:
ALTER TABLE `gnunet`.`gn090` DROP INDEX `idx_hash_uid`, ADD INDEX `idx_hash_uid` (`hash`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment