summaryrefslogtreecommitdiff
path: root/mysql-test/r/repair.result
diff options
context:
space:
mode:
authorsvoj@mysql.com/april.(none) <>2006-10-18 17:57:29 +0500
committersvoj@mysql.com/april.(none) <>2006-10-18 17:57:29 +0500
commita2e0059f3c1cf647b1feaf80780a917476ae4bba (patch)
tree53984d04f062e309c8ffd5e75aa6f749396a3814 /mysql-test/r/repair.result
parent3ee35a76187b479c71dc4c417819c6183397521b (diff)
downloadmariadb-git-a2e0059f3c1cf647b1feaf80780a917476ae4bba.tar.gz
BUG#23175 - MYISAM crash/repair failed during repair
Repair table could crash a server if there is not sufficient memory (myisam_sort_buffer_size) to operate. Affects not only repair, but also all statements that use create index by sort: repair by sort, parallel repair, bulk insert. Return an error if there is not sufficient memory to store at least one key per BUFFPEK. Also fixed memory leak if thr_find_all_keys returns an error.
Diffstat (limited to 'mysql-test/r/repair.result')
-rw-r--r--mysql-test/r/repair.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result
index c069824e9f0..8b3782ec2a4 100644
--- a/mysql-test/r/repair.result
+++ b/mysql-test/r/repair.result
@@ -48,3 +48,31 @@ Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_par
t1 1 a 1 a A 5 NULL NULL YES BTREE
SET myisam_repair_threads=@@global.myisam_repair_threads;
DROP TABLE t1;
+CREATE TABLE t1(a CHAR(255), KEY(a));
+SET myisam_sort_buffer_size=4096;
+INSERT INTO t1 VALUES
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
+('0'),('0'),('0'),('0'),('0'),('0'),('0');
+SET myisam_repair_threads=2;
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair error sort_buffer_size is to small
+test.t1 repair warning Number of rows changed from 0 to 157
+test.t1 repair status OK
+SET myisam_repair_threads=@@global.myisam_repair_threads;
+SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
+DROP TABLE t1;