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

Merge branch '10.5' into 10.6

This commit is contained in:
Sergei Golubchik
2023-12-15 20:00:58 +01:00
621 changed files with 28475 additions and 5403 deletions

View File

@@ -8,9 +8,9 @@ CREATE TABLE t1 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val))
ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
CREATE TABLE t2 LIKE t1;
INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
SET STATEMENT use_stat_tables=never FOR
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
connect con1, localhost, root,,;
START TRANSACTION;
@@ -89,7 +89,7 @@ COUNT(*)
# ha_innobase::records_in_range() would count the delete-marked records.
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL val 4 NULL 16 Using index
1 SIMPLE t1 index NULL val 4 NULL 1 Using index
ROLLBACK;
EXPLAIN SELECT * FROM t1;
id select_type table type possible_keys key key_len ref rows Extra
@@ -103,3 +103,25 @@ DROP TABLE t1,t2;
SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked;
SET GLOBAL innodb_stats_traditional = @saved_traditional;
SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter;
CREATE TABLE bug12429573 (i INTEGER PRIMARY KEY, j INTEGER, KEY(j))
ENGINE=INNODB STATS_PERSISTENT=1;
SET STATEMENT use_stat_tables=never FOR
ANALYZE TABLE bug12429573;
Table Op Msg_type Msg_text
test.bug12429573 analyze status OK
SELECT last_update INTO @last FROM mysql.innodb_table_stats
WHERE table_name = 'bug12429573';
SELECT * FROM mysql.innodb_index_stats
WHERE table_name = 'bug12429573' AND last_update!=@last;
database_name table_name index_name last_update stat_name stat_value sample_size stat_description
SET STATEMENT use_stat_tables=never FOR
ANALYZE TABLE bug12429573;
Table Op Msg_type Msg_text
test.bug12429573 analyze status OK
SELECT * FROM mysql.innodb_table_stats
WHERE table_name = 'bug12429573' AND last_update=@last;
database_name table_name last_update n_rows clustered_index_size sum_of_other_index_sizes
SELECT * FROM mysql.innodb_index_stats
WHERE table_name = 'bug12429573' AND last_update=@last;
database_name table_name index_name last_update stat_name stat_value sample_size stat_description
DROP TABLE bug12429573;