Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL), 10.4(EOL)
-
None
Description
--source include/have_innodb.inc
|
|
set @@optimizer_use_condition_selectivity=4; |
set @@use_stat_tables=PREFERABLY; |
|
create table t1 (a int)engine=InnoDB; |
insert into t1 values (1),(1),(2),(3); |
|
MariaDB [test]> analyze table t1;
|
+---------+---------+----------+-----------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+---------+---------+----------+-----------------------------------------+
|
| test.t1 | analyze | status | Engine-independent statistics collected |
|
| test.t1 | analyze | status | OK |
|
+---------+---------+----------+-----------------------------------------+
|
|
MariaDB [test]> alter table t1 change a b int;
|
Query OK, 0 rows affected (0.029 sec)
|
Records: 0 Duplicates: 0 Warnings: 0
|
MariaDB [test]> analyze table t1;
|
+---------+---------+----------+----------------------------------------------------+
|
| Table | Op | Msg_type | Msg_text |
|
+---------+---------+----------+----------------------------------------------------+
|
| test.t1 | analyze | status | Engine-independent statistics collected |
|
| test.t1 | analyze | Note | Data truncated for column 'avg_frequency' at row 1 |
|
| test.t1 | analyze | status | OK |
|
+---------+---------+----------+----------------------------------------------------+
|
MariaDB [test]> 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 | b | 1 | 3 | 0.0000 | 4.0000 | 1.3333 | 0 | NULL | NULL |
|
+---------+------------+-------------+-----------+-----------+-------------+------------+---------------+-----------+-----------+-----------+
|
1 row in set (0.001 sec)
|
|
The avg_frequency is 1.3333. The behaviour needs to be consistent.
Attachments
Issue Links
- is part of
-
MDEV-15253 Default optimizer setting changes for MariaDB 10.4
- Closed