Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a9184873
Commit
a9184873
authored
Oct 16, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/maint/mysql-5.0-maint
into polly.(none):/home/kaa/src/maint/mysql-5.1-maint
parents
a152ff16
5cb0d706
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
3 deletions
+61
-3
mysql-test/r/repair.result
mysql-test/r/repair.result
+27
-0
mysql-test/t/repair.test
mysql-test/t/repair.test
+30
-1
storage/myisam/sort.c
storage/myisam/sort.c
+4
-2
No files found.
mysql-test/r/repair.result
View file @
a9184873
...
...
@@ -88,6 +88,33 @@ 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;
CREATE TABLE t1(a CHAR(255), KEY(a));
SET myisam_sort_buffer_size=4196;
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 status OK
SET myisam_repair_threads=@@global.myisam_repair_threads;
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
End of 4.1 tests
DROP TABLE IF EXISTS tt1;
CREATE TEMPORARY TABLE tt1 (c1 INT);
REPAIR TABLE tt1 USE_FRM;
...
...
mysql-test/t/repair.test
View file @
a9184873
...
...
@@ -83,7 +83,36 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
SET
myisam_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
DROP
TABLE
t1
;
# End of 4.1 tests
#
# BUG#31174 - "Repair" command on MyISAM crashes with small
# myisam_sort_buffer_size
#
CREATE
TABLE
t1
(
a
CHAR
(
255
),
KEY
(
a
));
SET
myisam_sort_buffer_size
=
4196
;
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
;
SET
myisam_repair_threads
=@@
global
.
myisam_repair_threads
;
SET
myisam_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
DROP
TABLE
t1
;
--
echo
End
of
4.1
tests
# End of 5.0 tests
#
...
...
storage/myisam/sort.c
View file @
a9184873
...
...
@@ -565,9 +565,10 @@ int thr_write_keys(MI_SORT_PARAM *sort_param)
if
(
!
mergebuf
)
{
length
=
param
->
sort_buffer_length
;
while
(
length
>=
MIN_SORT_MEMORY
&&
!
mergebuf
)
while
(
length
>=
MIN_SORT_MEMORY
)
{
mergebuf
=
my_malloc
(
length
,
MYF
(
0
));
if
((
mergebuf
=
my_malloc
(
length
,
MYF
(
0
))))
break
;
length
=
length
*
3
/
4
;
}
if
(
!
mergebuf
)
...
...
@@ -904,6 +905,7 @@ merge_buffers(MI_SORT_PARAM *info, uint keys, IO_CACHE *from_file,
count
=
error
=
0
;
maxcount
=
keys
/
((
uint
)
(
Tb
-
Fb
)
+
1
);
DBUG_ASSERT
(
maxcount
>
0
);
LINT_INIT
(
to_start_filepos
);
if
(
to_file
)
to_start_filepos
=
my_b_tell
(
to_file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment