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
ba7ba4e0
Commit
ba7ba4e0
authored
Jun 03, 2011
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Plain Diff
Merge.
parents
c20552e1
33a9d9fa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
1 deletion
+36
-1
mysql-test/r/archive_debug.result
mysql-test/r/archive_debug.result
+12
-0
mysql-test/t/archive_debug.test
mysql-test/t/archive_debug.test
+13
-0
storage/archive/azio.c
storage/archive/azio.c
+9
-0
storage/archive/ha_archive.cc
storage/archive/ha_archive.cc
+2
-1
No files found.
mysql-test/r/archive_debug.result
0 → 100644
View file @
ba7ba4e0
#
# BUG#12402794 - 60976: CRASH, VALGRIND WARNING AND MEMORY LEAK
# WITH PARTITIONED ARCHIVE TABLES
#
CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
INSERT INTO t1 VALUES(1);
SET SESSION debug='d,simulate_archive_open_failure';
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check error Corrupt
SET SESSION debug=DEFAULT;
DROP TABLE t1;
mysql-test/t/archive_debug.test
0 → 100644
View file @
ba7ba4e0
--
source
include
/
have_archive
.
inc
--
source
include
/
have_debug
.
inc
--
echo
#
--
echo
# BUG#12402794 - 60976: CRASH, VALGRIND WARNING AND MEMORY LEAK
--
echo
# WITH PARTITIONED ARCHIVE TABLES
--
echo
#
CREATE
TABLE
t1
(
a
INT
)
ENGINE
=
ARCHIVE
;
INSERT
INTO
t1
VALUES
(
1
);
SET
SESSION
debug
=
'd,simulate_archive_open_failure'
;
CHECK
TABLE
t1
;
SET
SESSION
debug
=
DEFAULT
;
DROP
TABLE
t1
;
storage/archive/azio.c
View file @
ba7ba4e0
...
@@ -114,6 +114,15 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
...
@@ -114,6 +114,15 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
errno
=
0
;
errno
=
0
;
s
->
file
=
fd
<
0
?
my_open
(
path
,
Flags
,
MYF
(
0
))
:
fd
;
s
->
file
=
fd
<
0
?
my_open
(
path
,
Flags
,
MYF
(
0
))
:
fd
;
DBUG_EXECUTE_IF
(
"simulate_archive_open_failure"
,
{
if
(
s
->
file
>=
0
)
{
my_close
(
s
->
file
,
MYF
(
0
));
s
->
file
=
-
1
;
my_errno
=
EMFILE
;
}
});
if
(
s
->
file
<
0
)
if
(
s
->
file
<
0
)
{
{
...
...
storage/archive/ha_archive.cc
View file @
ba7ba4e0
...
@@ -1586,11 +1586,12 @@ int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
...
@@ -1586,11 +1586,12 @@ int ha_archive::check(THD* thd, HA_CHECK_OPT* check_opt)
azflush
(
&
(
share
->
archive_write
),
Z_SYNC_FLUSH
);
azflush
(
&
(
share
->
archive_write
),
Z_SYNC_FLUSH
);
pthread_mutex_unlock
(
&
share
->
mutex
);
pthread_mutex_unlock
(
&
share
->
mutex
);
if
(
init_archive_reader
())
DBUG_RETURN
(
HA_ADMIN_CORRUPT
);
/*
/*
Now we will rewind the archive file so that we are positioned at the
Now we will rewind the archive file so that we are positioned at the
start of the file.
start of the file.
*/
*/
init_archive_reader
();
read_data_header
(
&
archive
);
read_data_header
(
&
archive
);
while
(
!
(
rc
=
get_row
(
&
archive
,
table
->
record
[
0
])))
while
(
!
(
rc
=
get_row
(
&
archive
,
table
->
record
[
0
])))
count
--
;
count
--
;
...
...
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