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
cb310f76
Commit
cb310f76
authored
Jul 19, 2003
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #712 with Serg's suggestions
parent
a71c5c39
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
10 deletions
+5
-10
myisam/mi_locking.c
myisam/mi_locking.c
+1
-1
myisam/myisamchk.c
myisam/myisamchk.c
+2
-6
myisam/myisamdef.h
myisam/myisamdef.h
+0
-1
sql/ha_myisam.cc
sql/ha_myisam.cc
+2
-2
No files found.
myisam/mi_locking.c
View file @
cb310f76
...
...
@@ -39,7 +39,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if
(
share
->
options
&
HA_OPTION_READ_ONLY_DATA
||
info
->
lock_type
==
lock_type
)
DBUG_RETURN
(
0
);
if
(
lock_type
==
MI_TEMPORARY_TABLE
)
if
(
lock_type
==
F_EXTRA_LCK
)
{
++
share
->
w_locks
;
++
share
->
tot_locks
;
...
...
myisam/myisamchk.c
View file @
cb310f76
...
...
@@ -878,10 +878,7 @@ static int myisamchk(MI_CHECK *param, my_string filename)
param
->
error_printed
=
0
;
goto
end2
;
}
share
->
w_locks
++
;
/* Mark for writeinfo */
share
->
tot_locks
++
;
info
->
lock_type
=
F_EXTRA_LCK
;
/* Simulate as locked */
info
->
tmp_lock_type
=
lock_type
;
mi_lock_database
(
info
,
F_EXTRA_LCK
);
datafile
=
info
->
dfile
;
if
(
param
->
testflag
&
(
T_REP_ANY
|
T_SORT_RECORDS
|
T_SORT_INDEX
))
...
...
@@ -1057,8 +1054,7 @@ static int myisamchk(MI_CHECK *param, my_string filename)
VOID
(
lock_file
(
param
,
share
->
kfile
,
0L
,
F_UNLCK
,
"indexfile"
,
filename
));
info
->
update
&=
~
HA_STATE_CHANGED
;
}
share
->
w_locks
--
;
share
->
tot_locks
--
;
mi_lock_database
(
info
,
F_UNLCK
);
end2:
if
(
mi_close
(
info
))
{
...
...
myisam/myisamdef.h
View file @
cb310f76
...
...
@@ -101,7 +101,6 @@ typedef struct st_mi_state_info
#define MI_COLUMNDEF_SIZE (2*3+1)
#define MI_BASE_INFO_SIZE (5*8 + 8*4 + 4 + 4*2 + 16)
#define MI_INDEX_BLOCK_MARGIN 16
/* Safety margin for .MYI tables */
#define MI_TEMPORARY_TABLE ((1 & ~F_RDLCK) | (2 & ~F_WRLCK) | (4 & ~F_UNLCK))
typedef
struct
st_mi_base_info
{
...
...
sql/ha_myisam.cc
View file @
cb310f76
...
...
@@ -560,7 +560,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
// Don't lock tables if we have used LOCK TABLE
if
(
!
thd
->
locked_tables
&&
mi_lock_database
(
file
,
table
->
tmp_table
?
MI_TEMPORARY_TABLE
:
F_WRLCK
))
mi_lock_database
(
file
,
table
->
tmp_table
?
F_EXTRA_LCK
:
F_WRLCK
))
{
mi_check_print_error
(
&
param
,
ER
(
ER_CANT_LOCK
),
my_errno
);
DBUG_RETURN
(
HA_ADMIN_FAILED
);
...
...
@@ -1002,7 +1002,7 @@ int ha_myisam::external_lock(THD *thd, int lock_type)
{
return
mi_lock_database
(
file
,
!
table
->
tmp_table
?
lock_type
:
((
lock_type
==
F_UNLCK
)
?
F_UNLCK
:
MI_TEMPORARY_TABLE
));
F_UNLCK
:
F_EXTRA_LCK
));
}
...
...
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