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:
@ -380,6 +380,17 @@ Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
alter table t1 add column a varchar(8);
|
||||
drop table t1;
|
||||
#
|
||||
# Bug mdev-487: memory leak in ANALYZE with stat tables
|
||||
#
|
||||
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;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status OK
|
||||
DROP TABLE t1;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
Reference in New Issue
Block a user