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
1db3f602
Commit
1db3f602
authored
Sep 20, 2006
by
Kristofer.Pettersson@naruto
Browse files
Options
Browse Files
Download
Plain Diff
Merge naruto.:C:/cpp/bug20789/my50-bug20789
into naruto.:C:/cpp/bug20789/my51-bug20789
parents
8ec47c09
70316e06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
1 deletion
+30
-1
storage/myisam/mi_locking.c
storage/myisam/mi_locking.c
+15
-0
storage/myisam/myisamdef.h
storage/myisam/myisamdef.h
+3
-0
storage/myisammrg/myrg_locking.c
storage/myisammrg/myrg_locking.c
+12
-1
No files found.
storage/myisam/mi_locking.c
View file @
1db3f602
...
...
@@ -237,6 +237,21 @@ int mi_lock_database(MI_INFO *info, int lock_type)
break
;
/* Impossible */
}
}
#ifdef __WIN__
else
{
/*
Check for bad file descriptors if this table is part
of a merge union. Failing to capture this may cause
a crash on windows if the table is renamed and
later on referenced by the merge table.
*/
if
(
info
->
owned_by_merge
&&
(
info
->
s
)
->
kfile
<
0
)
{
error
=
HA_ERR_NO_SUCH_TABLE
;
}
}
#endif
pthread_mutex_unlock
(
&
share
->
intern_lock
);
#if defined(FULL_LOG) || defined(_lint)
lock_type
|=
(
int
)
(
flag
<<
8
);
/* Set bit to set if real lock */
...
...
storage/myisam/myisamdef.h
View file @
1db3f602
...
...
@@ -291,6 +291,9 @@ struct st_myisam_info {
my_bool
page_changed
;
/* If info->buff can't be used for rnext */
my_bool
buff_used
;
/* If info->buff has to be reread for rnext */
my_bool
once_flags
;
/* For MYISAMMRG */
#ifdef __WIN__
my_bool
owned_by_merge
;
/* This MyISAM table is part of a merge union */
#endif
#ifdef THREAD
THR_LOCK_DATA
lock
;
#endif
...
...
storage/myisammrg/myrg_locking.c
View file @
1db3f602
...
...
@@ -26,8 +26,19 @@ int myrg_lock_database(MYRG_INFO *info, int lock_type)
MYRG_TABLE
*
file
;
error
=
0
;
for
(
file
=
info
->
open_tables
;
file
!=
info
->
end_table
;
file
++
)
for
(
file
=
info
->
open_tables
;
file
!=
info
->
end_table
;
file
++
)
{
#ifdef __WIN__
/*
Make sure this table is marked as owned by a merge table.
The semaphore is never released as long as table remains
in memory. This should be refactored into a more generic
approach (observer pattern)
*/
(
file
->
table
)
->
owned_by_merge
=
TRUE
;
#endif
if
((
new_error
=
mi_lock_database
(
file
->
table
,
lock_type
)))
error
=
new_error
;
}
return
(
error
);
}
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