1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug mdev-487.

The function collect_statistics_for_table() when scanning a table
did not take into account that the handler function ha_rnd_next
could return the code HA_ERR_RECORD_DELETE that should not be
considered as an indication of an error.
Also fixed a potential memory leak in this function.
This commit is contained in:
Igor Babaev
2012-08-27 14:19:25 -07:00
parent f4631d6f71
commit d0ad93fbc7
4 changed files with 65 additions and 6 deletions

View File

@ -166,5 +166,18 @@ alter table t1 add column a varchar(8);
drop table t1;
--echo #
--echo # Bug mdev-487: memory leak in ANALYZE with stat tables
--echo #
SET use_stat_tables = 'preferably';
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
DELETE FROM t1 WHERE a=1;
ANALYZE TABLE t1;
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;