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
1ed53ce4
Commit
1ed53ce4
authored
Jun 01, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-ps-merge
parents
bdcf7deb
e6626bdb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
innobase/os/os0file.c
innobase/os/os0file.c
+10
-16
No files found.
innobase/os/os0file.c
View file @
1ed53ce4
...
@@ -387,22 +387,19 @@ os_file_lock(
...
@@ -387,22 +387,19 @@ os_file_lock(
/*=========*/
/*=========*/
/* out: 0 on success */
/* out: 0 on success */
int
fd
,
/* in: file descriptor */
int
fd
,
/* in: file descriptor */
const
char
*
name
,
/* in: file name */
const
char
*
name
)
/* in: file name */
uint
lock_type
)
/* in: lock_type */
{
{
struct
flock
lk
;
struct
flock
lk
;
lk
.
l_type
=
lock_type
;
lk
.
l_type
=
F_WRLCK
;
lk
.
l_whence
=
SEEK_SET
;
lk
.
l_whence
=
SEEK_SET
;
lk
.
l_start
=
lk
.
l_len
=
0
;
lk
.
l_start
=
lk
.
l_len
=
0
;
if
(
fcntl
(
fd
,
F_SETLK
,
&
lk
)
==
-
1
)
{
if
(
fcntl
(
fd
,
F_SETLK
,
&
lk
)
==
-
1
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"InnoDB: Unable to lock %s with lock %d, error: %d"
,
"InnoDB: Unable to lock %s, error: %d"
,
name
,
errno
);
name
,
lock_type
,
errno
);
perror
(
": fcntl"
);
close
(
fd
);
close
(
fd
);
return
(
-
1
);
return
(
-
1
);
}
}
return
0
;
return
(
0
)
;
}
}
#endif
/* USE_FILE_LOCK */
#endif
/* USE_FILE_LOCK */
...
@@ -869,7 +866,8 @@ try_again:
...
@@ -869,7 +866,8 @@ try_again:
goto
try_again
;
goto
try_again
;
}
}
#ifdef USE_FILE_LOCK
#ifdef USE_FILE_LOCK
}
else
if
(
os_file_lock
(
file
,
name
,
F_WRLCK
))
{
}
else
if
(
access_type
==
OS_FILE_READ_WRITE
&&
os_file_lock
(
file
,
name
))
{
*
success
=
FALSE
;
*
success
=
FALSE
;
file
=
-
1
;
file
=
-
1
;
#endif
#endif
...
@@ -980,7 +978,8 @@ os_file_create_simple_no_error_handling(
...
@@ -980,7 +978,8 @@ os_file_create_simple_no_error_handling(
if
(
file
==
-
1
)
{
if
(
file
==
-
1
)
{
*
success
=
FALSE
;
*
success
=
FALSE
;
#ifdef USE_FILE_LOCK
#ifdef USE_FILE_LOCK
}
else
if
(
os_file_lock
(
file
,
name
,
F_WRLCK
))
{
}
else
if
(
access_type
==
OS_FILE_READ_WRITE
&&
os_file_lock
(
file
,
name
))
{
*
success
=
FALSE
;
*
success
=
FALSE
;
file
=
-
1
;
file
=
-
1
;
#endif
#endif
...
@@ -1194,7 +1193,8 @@ try_again:
...
@@ -1194,7 +1193,8 @@ try_again:
goto
try_again
;
goto
try_again
;
}
}
#ifdef USE_FILE_LOCK
#ifdef USE_FILE_LOCK
}
else
if
(
os_file_lock
(
file
,
name
,
F_WRLCK
))
{
}
else
if
(
create_mode
!=
OS_FILE_OPEN_RAW
&&
os_file_lock
(
file
,
name
))
{
*
success
=
FALSE
;
*
success
=
FALSE
;
file
=
-
1
;
file
=
-
1
;
#endif
#endif
...
@@ -1395,9 +1395,6 @@ os_file_close(
...
@@ -1395,9 +1395,6 @@ os_file_close(
#else
#else
int
ret
;
int
ret
;
#ifdef USE_FILE_LOCK
(
void
)
os_file_lock
(
file
,
"unknown"
,
F_UNLCK
);
#endif
ret
=
close
(
file
);
ret
=
close
(
file
);
if
(
ret
==
-
1
)
{
if
(
ret
==
-
1
)
{
...
@@ -1434,9 +1431,6 @@ os_file_close_no_error_handling(
...
@@ -1434,9 +1431,6 @@ os_file_close_no_error_handling(
#else
#else
int
ret
;
int
ret
;
#ifdef USE_FILE_LOCK
(
void
)
os_file_lock
(
file
,
"unknown"
,
F_UNLCK
);
#endif
ret
=
close
(
file
);
ret
=
close
(
file
);
if
(
ret
==
-
1
)
{
if
(
ret
==
-
1
)
{
...
...
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