1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-7635: Part 1

innodb_autoinc_lock_mode            = 2
innodb_buffer_pool_dump_at_shutdown = ON
innodb_buffer_pool_dump_pct         = 25
innodb_buffer_pool_load_at_startup  = ON
innodb_checksum_algorithm           = CRC32
innodb_file_format                  = Barracuda
innodb_large_prefix                 = ON
innodb_log_compressed_pages         = ON
innodb_purge_threads                = 4
innodb_strict_mode                  = ON
binlog_annotate_row_events          = ON
binlog_format                       = MIXED
binlog-row-event-max-size           = 8192
group_concat_max_len                = 1M
lock_wait_timeout                   = 86400
log_slow_admin_statements           = ON
log_slow_slave_statements           = ON
log_warnings                        = 2
max_allowed_packet                  = 16M
replicate_annotate_row_events       = ON
slave_net_timeout                   = 60
sync_binlog                         = 1
aria_recover                        = BACKUP,QUICK
myisam_recover_options              = BACKUP,QUICK
This commit is contained in:
Nirbhay Choubey
2016-12-19 17:32:45 -05:00
parent 185d140f19
commit 3435e8a515
204 changed files with 7551 additions and 665 deletions

View File

@@ -925,36 +925,36 @@ db_name table_name cardinality
test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary';
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status Table is already up to date
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
@@ -967,22 +967,22 @@ db_name table_name cardinality
test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000
test t1 idx1 1 6.4000
test t1 idx1 2 1.6875
test t1 idx4 2 1.6875
test t1 idx4 1 6.2000
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx1 2 1.6875
test t1 idx1 1 6.4000
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ENGINE=InnoDB;
@@ -998,8 +998,8 @@ test t1 40
test t2 40
SELECT * FROM mysql.column_stats ORDER BY column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t2 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
@@ -1193,22 +1193,22 @@ ADD INDEX idx1 (b(4), e),
ADD INDEX idx4 (e, b(4), d);
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t2 idx3 1 8.5000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
test t2 PRIMARY 1 1.0000
test t2 idx3 2 1.0000
test t2 idx2 3 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
test t2 idx4 3 1.0000
test t2 idx3 2 1.0000
test t2 PRIMARY 1 1.0000
test t2 idx2 2 2.3846
test t2 idx2 1 7.0000
test t2 idx3 1 8.5000
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
@@ -1216,33 +1216,33 @@ test.t1 analyze Warning Engine-independent statistics are not collected for colu
test.t1 analyze status OK
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t2 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t2 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t2 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t2 idx3 1 8.5000
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
test t2 idx2 1 7.0000
test t2 idx2 2 2.3846
test t1 idx1 2 NULL
test t2 PRIMARY 1 1.0000
test t2 idx3 2 1.0000
test t2 idx2 3 1.0000
test t2 idx4 1 6.2000
test t2 idx4 2 2.2308
test t2 idx4 3 1.0000
test t2 idx3 2 1.0000
test t2 PRIMARY 1 1.0000
test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000
test t2 idx2 2 2.3846
test t2 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t2 idx3 1 8.5000
test t1 idx1 1 NULL
test t1 idx1 2 NULL
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
@@ -1272,22 +1272,22 @@ db_name table_name cardinality
test t1 40
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 f 1 5 0.2000 1.0000 6.4000 0 NULL NULL
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 0 NULL NULL
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 0 NULL NULL
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 0 NULL NULL
test t1 a 0 49 0.0000 4.0000 1.0000 0 NULL NULL
SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx1 1 NULL
test t1 idx1 2 NULL
test t1 idx4 1 6.2000
test t1 idx4 2 NULL
test t1 idx4 3 NULL
test t1 idx4 2 NULL
test t1 idx4 1 6.2000
test t1 idx1 2 NULL
test t1 idx1 1 NULL
test t1 idx2 2 2.3846
test t1 idx2 1 7.0000
test t1 idx3 1 8.5000
test t1 PRIMARY 1 1.0000
DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stats;
@@ -1354,15 +1354,15 @@ SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
@@ -1370,14 +1370,14 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000
WORLD CITY PRIMARY 1 1.0000
WORLD CITY Population 1 1.0467
WORLD CITY Country 1 17.5819
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD CITY Country 1 17.5819
WORLD CITY Population 1 1.0467
WORLD CITY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000
WORLD COUNTRY PRIMARY 1 1.0000
use test;
set use_stat_tables='never';
CREATE DATABASE world_innodb;
@@ -1425,15 +1425,15 @@ SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD CITY Name A Coruña (La Coruña) Ürgenc 0.0000 8.6416 1.0195
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY Population 42 10500000 0.0000 4.0000 1.0467
WORLD CITY Country ABW ZWE 0.0000 3.0000 17.5819
WORLD CITY ID 1 4079 0.0000 4.0000 1.0000
WORLD COUNTRY Capital 1 4074 0.0293 4.0000 1.0000
WORLD COUNTRY Population 0 1277558000 0.0000 4.0000 1.0575
WORLD COUNTRY SurfaceArea 0.40 17075400.00 0.0000 4.0000 1.0042
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRYLANGUAGE Country ABW ZWE 0.0000 3.0000 4.2232
WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
@@ -1453,19 +1453,19 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000
WORLD CITY PRIMARY 1 1.0000
WORLD CITY Population 1 1.0467
WORLD CITY Country 1 17.5819
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD COUNTRYLANGUAGE Percentage 1 2.7640
WORLD COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD CITY Country 1 17.5819
WORLD CITY Population 1 1.0467
WORLD CITY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000
WORLD COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640
@@ -1534,11 +1534,11 @@ SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency
FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY Country 1 17.5819
WORLD_INNODB CITY Population 1 1.0467
WORLD_INNODB CITY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000
WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 1 4.2232
WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640