summaryrefslogtreecommitdiff
path: root/mysql-test/r/myisam.result
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-25 16:08:21 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-25 16:08:21 +0400
commit412798658a5ede71651ed9112791d055a42edef7 (patch)
tree8a9f456988aff49c5dd5d915427810c19bad01c7 /mysql-test/r/myisam.result
parent7297ec560ee8ab09c796de81b482f73b8f83eb4a (diff)
downloadmariadb-git-412798658a5ede71651ed9112791d055a42edef7.tar.gz
BUG#51866 - crash with repair by sort and fulltext keys
Repairing MyISAM table with fulltext indexes and low myisam_sort_buffer_size may crash the server. Estimation of number of index entries was done incorrectly, causing further assertion failure or server crash. Docs note: min value for myisam_sort_buffer_size has been changed from 4 to 4096. mysql-test/r/fulltext.result: A test case for BUG#51866. mysql-test/r/myisam.result: Min value for myisam_sort_buffer_size is 4096. mysql-test/r/variables.result: Min value for myisam_sort_buffer_size is 4096. mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result: Min value for myisam_sort_buffer_size is 4096. mysql-test/t/fulltext.test: A test case for BUG#51866. sql/mysqld.cc: Min value for myisam_sort_buffer_size is 4096. storage/myisam/mi_check.c: When estimating number of index entries for external fulltext parser, take into account that key_length may be bigger than myisam_sort_buffer_size. Reuse logic from _create_index_by_sort(): force MIN_SORT_BUFFER to be min value for myisam_sort_buffer_size. Another problem is that ftkey_nr has no other meaning than serial number of fulltext index starting with 1. We can't say if this key using built-in or external parser basing on it's value. In other words we always entered if-branch for external parser. At this point, the only way to check if we use default parser is to compare keyinfo::parser with &ft_default_parser. storage/myisam/sort.c: Get rid of MIN_SORT_MEMORY, use MIN_SORT_BUFFER instead (defined in myisamdef.h, has the same value and purpose).
Diffstat (limited to 'mysql-test/r/myisam.result')
-rw-r--r--mysql-test/r/myisam.result4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index ba417d54998..508523fda21 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2313,6 +2313,8 @@ INSERT INTO t1 SELECT a+1280,b FROM t1;
INSERT INTO t1 SELECT a+2560,b FROM t1;
INSERT INTO t1 SELECT a+5120,b FROM t1;
SET myisam_sort_buffer_size=4;
+Warnings:
+Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4'
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair error myisam_sort_buffer_size is too small
@@ -2363,6 +2365,8 @@ CREATE TABLE t1(a CHAR(255), KEY(a));
SELECT * FROM t1, t1 AS a1;
a a
SET myisam_sort_buffer_size=4;
+Warnings:
+Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4'
INSERT INTO t1 VALUES
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),