Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL)
-
None
Description
ANALYZE TABLE t1 does not collect statistical data on min/max values for BLOB columns of table t1. However these values can be added manually into mysql.column_stats.
If we do this we observe a memory leak after running any query over table t1 when
use_stat_tables is set to 'PREFERABLY'.
The following test case demonstrates the problem:
SET use_stat_tables= PREFERABLY; |
|
CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT); |
INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); |
ANALYZE TABLE t1; |
SELECT * FROM mysql.column_stats; |
DELETE FROM mysql.column_stats |
WHERE db_name='test' AND table_name='t1' AND column_name='t'; |
INSERT INTO mysql.column_stats VALUES |
('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL); |
SELECT * FROM mysql.column_stats; |
|
SELECT pk FROM t1; |
|
DROP TABLE t1; |
After running this test in mtr we see
Warning: 8 bytes lost at 0x7f343402b560, allocated by T@0 at 0x70fe0b, 0x5c83d1, 0x84b4a7, 0x70dc99, 0x709657, 0x70a212, 0x613302, 0x6074f1
|
Warning: 8 bytes lost at 0x7f343407e7a0, allocated by T@0 at 0x70fe0b, 0x5c83d1, 0x84b4a7, 0x70dbef, 0x709657, 0x70a212, 0x613302, 0x6074f1
|