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
99a7866a
Commit
99a7866a
authored
Oct 16, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/maint/bug31174/my41-bug31174
into polly.(none):/home/kaa/src/maint/mysql-4.1-maint
parents
74ce197b
1c7b80df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
3 deletions
+61
-3
myisam/sort.c
myisam/sort.c
+4
-2
mysql-test/r/repair.result
mysql-test/r/repair.result
+27
-0
mysql-test/t/repair.test
mysql-test/t/repair.test
+30
-1
No files found.
myisam/sort.c
View file @
99a7866a
...
...
@@ -559,9 +559,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
)
...
...
@@ -897,6 +898,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
);
...
...
mysql-test/r/repair.result
View file @
99a7866a
...
...
@@ -83,3 +83,30 @@ 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
mysql-test/t/repair.test
View file @
99a7866a
...
...
@@ -83,4 +83,33 @@ 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
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