summaryrefslogtreecommitdiff
path: root/mysql-test/r/stat_tables.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2012-08-27 14:19:25 -0700
committerIgor Babaev <igor@askmonty.org>2012-08-27 14:19:25 -0700
commitd0ad93fbc7eca575364e46f67c4613efb0807047 (patch)
tree6b9aae82750afbb2093c2d997076666b91838dcc /mysql-test/r/stat_tables.result
parentf4631d6f71c19a98eccf4998eccb49dd69897661 (diff)
downloadmariadb-git-d0ad93fbc7eca575364e46f67c4613efb0807047.tar.gz
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.
Diffstat (limited to 'mysql-test/r/stat_tables.result')
-rw-r--r--mysql-test/r/stat_tables.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/stat_tables.result b/mysql-test/r/stat_tables.result
index 4cc486b10ef..3cc650e7050 100644
--- a/mysql-test/r/stat_tables.result
+++ b/mysql-test/r/stat_tables.result
@@ -353,4 +353,15 @@ Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
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;