3
CREATE TABLE IF NOT EXISTS `innodb_index_stats` (
4
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
5
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
6
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
7
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
8
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
9
`stat_value` bigint(20) unsigned NOT NULL,
10
`sample_size` bigint(20) unsigned DEFAULT NULL,
11
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
12
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
13
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
15
CREATE TABLE IF NOT EXISTS `innodb_table_stats` (
16
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
17
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
18
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
19
`n_rows` bigint(20) unsigned NOT NULL,
20
`clustered_index_size` bigint(20) unsigned NOT NULL,
21
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
22
PRIMARY KEY (`database_name`,`table_name`)
23
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
25
CREATE TABLE IF NOT EXISTS `slave_master_info` (
26
`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file.',
27
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log currently being read from the master.',
28
`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last read event.',
29
`Host` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'The host name of the master.',
30
`User_name` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The user name used to connect to the master.',
31
`User_password` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The password used to connect to the master.',
32
`Port` int(10) unsigned NOT NULL COMMENT 'The network port used to connect to the master.',
33
`Connect_retry` int(10) unsigned NOT NULL COMMENT 'The period (in seconds) that the slave will wait before trying to reconnect to the master.',
34
`Enabled_ssl` tinyint(1) NOT NULL COMMENT 'Indicates whether the server supports SSL connections.',
35
`Ssl_ca` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Authority (CA) certificate.',
36
`Ssl_capath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path to the Certificate Authority (CA) certificates.',
37
`Ssl_cert` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL certificate file.',
38
`Ssl_cipher` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the cipher in use for the SSL connection.',
39
`Ssl_key` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The name of the SSL key file.',
40
`Ssl_verify_server_cert` tinyint(1) NOT NULL COMMENT 'Whether to verify the server certificate.',
41
`Heartbeat` float NOT NULL,
42
`Bind` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'Displays which interface is employed when connecting to the MySQL server',
43
`Ignored_server_ids` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The number of server IDs to be ignored, followed by the actual server IDs',
44
`Uuid` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The master server uuid.',
45
`Retry_count` bigint(20) unsigned NOT NULL COMMENT 'Number of reconnect attempts, to the master, before giving up.',
46
`Ssl_crl` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The file used for the Certificate Revocation List (CRL)',
47
`Ssl_crlpath` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT 'The path used for Certificate Revocation List (CRL) files',
48
`Enabled_auto_position` tinyint(1) NOT NULL COMMENT 'Indicates whether GTIDs will be used to retrieve events from the master.',
49
PRIMARY KEY (`Host`,`Port`)
50
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Master Information';
52
CREATE TABLE IF NOT EXISTS `slave_relay_log_info` (
53
`Number_of_lines` int(10) unsigned NOT NULL COMMENT 'Number of lines in the file or rows in the table. Used to version table definitions.',
54
`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the current relay log file.',
55
`Relay_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The relay log position of the last executed event.',
56
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'The name of the master binary log file from which the events in the relay log file were read.',
57
`Master_log_pos` bigint(20) unsigned NOT NULL COMMENT 'The master log position of the last executed event.',
58
`Sql_delay` int(11) NOT NULL COMMENT 'The number of seconds that the slave must lag behind the master.',
59
`Number_of_workers` int(10) unsigned NOT NULL,
60
`Id` int(10) unsigned NOT NULL COMMENT 'Internal Id that uniquely identifies this record.',
62
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Relay Log Information';
64
CREATE TABLE IF NOT EXISTS `slave_worker_info` (
65
`Id` int(10) unsigned NOT NULL,
66
`Relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
67
`Relay_log_pos` bigint(20) unsigned NOT NULL,
68
`Master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
69
`Master_log_pos` bigint(20) unsigned NOT NULL,
70
`Checkpoint_relay_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
71
`Checkpoint_relay_log_pos` bigint(20) unsigned NOT NULL,
72
`Checkpoint_master_log_name` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
73
`Checkpoint_master_log_pos` bigint(20) unsigned NOT NULL,
74
`Checkpoint_seqno` int(10) unsigned NOT NULL,
75
`Checkpoint_group_size` int(10) unsigned NOT NULL,
76
`Checkpoint_group_bitmap` blob NOT NULL,
78
) ENGINE=InnoDB DEFAULT CHARSET=utf8 STATS_PERSISTENT=0 COMMENT='Worker Information';