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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2841eb94
Commit
2841eb94
authored
Mar 10, 2010
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for BUG51307 to 5.1-bugteam.
parents
425c9ec6
a21d1eae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
3 deletions
+72
-3
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+33
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+28
-0
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+11
-3
No files found.
mysql-test/r/myisam.result
View file @
2841eb94
...
...
@@ -2356,4 +2356,37 @@ CHECKSUM TABLE t3 EXTENDED;
Table Checksum
test.t3 3775188275
DROP TABLE t1, t2, t3;
#
# BUG#51307 - widespread corruption with partitions and insert...select
#
CREATE TABLE t1(a CHAR(255), KEY(a));
SELECT * FROM t1, t1 AS a1;
a a
SET myisam_sort_buffer_size=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'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),('0'),
('0'),('0'),('0'),('0'),('0'),('0'),('0');
Warnings:
Error 1034 myisam_sort_buffer_size is too small
Error 1034 Number of rows changed from 0 to 157
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
INSERT INTO t1 VALUES('1');
SELECT * FROM t1, t1 AS a1 WHERE t1.a=1 AND a1.a=1;
a a
1 1
DROP TABLE t1;
End of 5.1 tests
mysql-test/t/myisam.test
View file @
2841eb94
...
...
@@ -1603,4 +1603,32 @@ CHECKSUM TABLE t2 EXTENDED;
CHECKSUM
TABLE
t3
EXTENDED
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
# BUG#51307 - widespread corruption with partitions and insert...select
--
echo
#
CREATE
TABLE
t1
(
a
CHAR
(
255
),
KEY
(
a
));
SELECT
*
FROM
t1
,
t1
AS
a1
;
SET
myisam_sort_buffer_size
=
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'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),(
'0'
),
(
'0'
),(
'0'
),(
'0'
),(
'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_sort_buffer_size
=@@
global
.
myisam_sort_buffer_size
;
INSERT
INTO
t1
VALUES
(
'1'
);
SELECT
*
FROM
t1
,
t1
AS
a1
WHERE
t1
.
a
=
1
AND
a1
.
a
=
1
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
storage/myisam/ha_myisam.cc
View file @
2841eb94
...
...
@@ -1448,9 +1448,17 @@ int ha_myisam::enable_indexes(uint mode)
{
sql_print_warning
(
"Warning: Enabling keys got errno %d on %s.%s, retrying"
,
my_errno
,
param
.
db_name
,
param
.
table_name
);
/* Repairing by sort failed. Now try standard repair method. */
param
.
testflag
&=
~
(
T_REP_BY_SORT
|
T_QUICK
);
error
=
(
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
);
/*
Repairing by sort failed. Now try standard repair method.
Still we want to fix only index file. If data file corruption
was detected (T_RETRY_WITHOUT_QUICK), we shouldn't do much here.
Let implicit repair do this job.
*/
if
(
!
(
param
.
testflag
&
T_RETRY_WITHOUT_QUICK
))
{
param
.
testflag
&=
~
T_REP_BY_SORT
;
error
=
(
repair
(
thd
,
param
,
0
)
!=
HA_ADMIN_OK
);
}
/*
If the standard repair succeeded, clear all error messages which
might have been set by the first repair. They can still be seen
...
...
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