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
a71c5c39
Commit
a71c5c39
authored
21 years ago
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0
parents
1054633f
9b4ebf3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
myisam/mi_locking.c
myisam/mi_locking.c
+8
-0
myisam/myisamdef.h
myisam/myisamdef.h
+1
-0
sql/ha_myisam.cc
sql/ha_myisam.cc
+5
-4
No files found.
myisam/mi_locking.c
View file @
a71c5c39
...
...
@@ -39,6 +39,14 @@ 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
)
{
++
share
->
w_locks
;
++
share
->
tot_locks
;
info
->
lock_type
=
lock_type
;
DBUG_RETURN
(
0
);
}
flag
=
error
=
0
;
pthread_mutex_lock
(
&
share
->
intern_lock
);
if
(
share
->
kfile
>=
0
)
/* May only be false on windows */
...
...
This diff is collapsed.
Click to expand it.
myisam/myisamdef.h
View file @
a71c5c39
...
...
@@ -101,6 +101,7 @@ 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
{
...
...
This diff is collapsed.
Click to expand it.
sql/ha_myisam.cc
View file @
a71c5c39
...
...
@@ -559,7 +559,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize)
strmov
(
fixed_name
,
file
->
filename
);
// Don't lock tables if we have used LOCK TABLE
if
(
!
thd
->
locked_tables
&&
mi_lock_database
(
file
,
F_WRLCK
))
if
(
!
thd
->
locked_tables
&&
mi_lock_database
(
file
,
table
->
tmp_table
?
MI_TEMPORARY_TABLE
:
F_WRLCK
))
{
mi_check_print_error
(
&
param
,
ER
(
ER_CANT_LOCK
),
my_errno
);
DBUG_RETURN
(
HA_ADMIN_FAILED
);
...
...
@@ -999,9 +1000,9 @@ int ha_myisam::delete_table(const char *name)
int
ha_myisam
::
external_lock
(
THD
*
thd
,
int
lock_type
)
{
if
(
!
table
->
tmp_table
)
return
mi_lock_database
(
file
,
lock_type
);
return
0
;
return
mi_lock_database
(
file
,
!
table
->
tmp_table
?
lock_type
:
((
lock_type
==
F_UNLCK
)
?
F_UNLCK
:
MI_TEMPORARY_TABLE
))
;
}
...
...
This diff is collapsed.
Click to expand it.
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