[MDEV-4357] Histogram_type is not saved in the histogram Created: 2013-04-03  Updated: 2013-04-06  Resolved: 2013-04-06

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Sergei Petrunia Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: mwl#253
Environment:

maria-10.0-mwl253 tree


Issue Links:
Relates
relates to MDEV-4145 Take into account the selectivity of ... Closed

 Description   

I get the latest maria-10.0-mwl253 tree, compile it, and start the client:

./mysql-test-run --start-and-exit
mysql -uroot -A --socket=/data0/psergey/dev2/maria-10.0-mwl253/mysql-test/var/tmp/mysqld.1.sock

This is to make sure I have the right system tables.

MariaDB [(none)]> use test;
Database changed
MariaDB [test]> create table t1 (a int);
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> insert into t1 values (1),(2),(3);
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0
 
MariaDB [test]>  set histogram_size=100;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> analyze table t1  persistent for all;
+---------+---------+----------+----------+
| Table   | Op      | Msg_type | Msg_text |
+---------+---------+----------+----------+
| test.t1 | analyze | status   | OK       |
+---------+---------+----------+----------+
1 row in set (0.00 sec)
 
MariaDB [test]> select * from mysql.column_stats\G
*************************** 1. row ***************************
      db_name: test
   table_name: t1
  column_name: a
    min_value: 1
    max_value: 3
  nulls_ratio: 0.0000
   avg_length: 4.0000
avg_frequency: 1.0000
    hist_size: 100
    hist_type: 
    histogram:                                  ���������������������������������
1 row in set (0.00 sec)
 
MariaDB [test]> select length(hist_type) from mysql.column_stats;
+-------------------+
| length(hist_type) |
+-------------------+
|                 0 |
+-------------------+
1 row in set (0.00 sec)

That is, hist_type is empty.

MariaDB [test]>  select @@histogram_type;
+------------------+
| @@histogram_type |
+------------------+
| SINGLE_PREC_HB   |
+------------------+
1 row in set (0.00 sec)
 



 Comments   
Comment by Sergei Petrunia [ 2013-04-03 ]

See also MDEV-4359

Comment by Igor Babaev [ 2013-04-06 ]

A fix for the bug has been pushed into maria-10.0-mwl253.

Generated at Thu Feb 08 06:55:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.