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
ffee15b1
Commit
ffee15b1
authored
Oct 06, 2009
by
Michael Widenius
Browse files
Options
Browse Files
Download
Plain Diff
Merge with bug fix
parents
76d47f53
0e9e201d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
storage/maria/ma_extra.c
storage/maria/ma_extra.c
+9
-2
storage/maria/ma_locking.c
storage/maria/ma_locking.c
+2
-2
storage/myisam/mi_extra.c
storage/myisam/mi_extra.c
+12
-2
No files found.
storage/maria/ma_extra.c
View file @
ffee15b1
...
@@ -323,9 +323,16 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
...
@@ -323,9 +323,16 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
error
=
my_errno
;
error
=
my_errno
;
info
->
lock_type
=
F_UNLCK
;
info
->
lock_type
=
F_UNLCK
;
}
}
if
(
share
->
kfile
.
file
>=
0
)
/*
_ma_decrement_open_count
(
info
);
We don't need to call _mi_decrement_open_count() if we are
dropping the table, as the files will be removed anyway. If we
are aborted before the files is removed, it's better to not
call it as in that case the automatic repair on open will add
the missing index entries
*/
pthread_mutex_lock
(
&
share
->
intern_lock
);
pthread_mutex_lock
(
&
share
->
intern_lock
);
if
(
share
->
kfile
.
file
>=
0
&&
function
!=
HA_EXTRA_PREPARE_FOR_DROP
)
_ma_decrement_open_count
(
info
);
if
(
info
->
trn
)
if
(
info
->
trn
)
{
{
_ma_remove_table_from_trnman
(
share
,
info
->
trn
);
_ma_remove_table_from_trnman
(
share
,
info
->
trn
);
...
...
storage/maria/ma_locking.c
View file @
ffee15b1
...
@@ -484,7 +484,7 @@ int _ma_decrement_open_count(MARIA_HA *info)
...
@@ -484,7 +484,7 @@ int _ma_decrement_open_count(MARIA_HA *info)
{
{
uint
old_lock
=
info
->
lock_type
;
uint
old_lock
=
info
->
lock_type
;
share
->
global_changed
=
0
;
share
->
global_changed
=
0
;
lock_error
=
maria_lock_database
(
info
,
F_WRLCK
);
lock_error
=
my_disable_locking
?
0
:
maria_lock_database
(
info
,
F_WRLCK
);
/* Its not fatal even if we couldn't get the lock ! */
/* Its not fatal even if we couldn't get the lock ! */
if
(
share
->
state
.
open_count
>
0
)
if
(
share
->
state
.
open_count
>
0
)
{
{
...
@@ -499,7 +499,7 @@ int _ma_decrement_open_count(MARIA_HA *info)
...
@@ -499,7 +499,7 @@ int _ma_decrement_open_count(MARIA_HA *info)
MYF
(
MY_NABP
));
MYF
(
MY_NABP
));
}
}
}
}
if
(
!
lock_error
)
if
(
!
lock_error
&&
!
my_disable_locking
)
lock_error
=
maria_lock_database
(
info
,
old_lock
);
lock_error
=
maria_lock_database
(
info
,
old_lock
);
}
}
return
test
(
lock_error
||
write_error
);
return
test
(
lock_error
||
write_error
);
...
...
storage/myisam/mi_extra.c
View file @
ffee15b1
...
@@ -286,9 +286,19 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
...
@@ -286,9 +286,19 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
info
->
lock_type
=
F_UNLCK
;
info
->
lock_type
=
F_UNLCK
;
}
}
if
(
share
->
kfile
>=
0
)
if
(
share
->
kfile
>=
0
)
{
/*
We don't need to call _mi_decrement_open_count() if we are
dropping the table, as the files will be removed anyway. If we
are aborted before the files is removed, it's better to not
call it as in that case the automatic repair on open will add
the missing index entries
*/
if
(
function
!=
HA_EXTRA_PREPARE_FOR_DROP
)
_mi_decrement_open_count
(
info
);
_mi_decrement_open_count
(
info
);
if
(
share
->
kfile
>=
0
&&
my_close
(
share
->
kfile
,
MYF
(
0
)))
if
(
my_close
(
share
->
kfile
,
MYF
(
0
)))
error
=
my_errno
;
error
=
my_errno
;
}
{
{
LIST
*
list_element
;
LIST
*
list_element
;
for
(
list_element
=
myisam_open_list
;
for
(
list_element
=
myisam_open_list
;
...
...
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