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
c2b656fa
Commit
c2b656fa
authored
Oct 18, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
parents
a755fae8
43608c25
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
22 deletions
+64
-22
mysys/charset.c
mysys/charset.c
+9
-6
mysys/my_lread.c
mysys/my_lread.c
+2
-0
mysys/my_lwrite.c
mysys/my_lwrite.c
+2
-0
mysys/my_pread.c
mysys/my_pread.c
+8
-4
mysys/my_quick.c
mysys/my_quick.c
+25
-1
mysys/my_read.c
mysys/my_read.c
+5
-4
mysys/my_write.c
mysys/my_write.c
+13
-7
No files found.
mysys/charset.c
View file @
c2b656fa
...
@@ -312,7 +312,7 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
...
@@ -312,7 +312,7 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
{
{
char
*
buf
;
char
*
buf
;
int
fd
;
int
fd
;
uint
len
;
uint
len
,
tmp_len
;
MY_STAT
stat_info
;
MY_STAT
stat_info
;
if
(
!
my_stat
(
filename
,
&
stat_info
,
MYF
(
myflags
))
||
if
(
!
my_stat
(
filename
,
&
stat_info
,
MYF
(
myflags
))
||
...
@@ -321,12 +321,11 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
...
@@ -321,12 +321,11 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
return
TRUE
;
return
TRUE
;
if
((
fd
=
my_open
(
filename
,
O_RDONLY
,
myflags
))
<
0
)
if
((
fd
=
my_open
(
filename
,
O_RDONLY
,
myflags
))
<
0
)
{
goto
error
;
my_free
(
buf
,
myflags
);
tmp_len
=
my_read
(
fd
,
buf
,
len
,
myflags
);
return
TRUE
;
}
len
=
read
(
fd
,
buf
,
len
);
my_close
(
fd
,
myflags
);
my_close
(
fd
,
myflags
);
if
(
tmp_len
!=
len
)
goto
error
;
if
(
my_parse_charset_xml
(
buf
,
len
,
add_collation
))
if
(
my_parse_charset_xml
(
buf
,
len
,
add_collation
))
{
{
...
@@ -340,6 +339,10 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
...
@@ -340,6 +339,10 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
my_free
(
buf
,
myflags
);
my_free
(
buf
,
myflags
);
return
FALSE
;
return
FALSE
;
error:
my_free
(
buf
,
myflags
);
return
TRUE
;
}
}
...
...
mysys/my_lread.c
View file @
c2b656fa
...
@@ -30,6 +30,8 @@ uint32 my_lread(int Filedes, byte *Buffer, uint32 Count, myf MyFlags)
...
@@ -30,6 +30,8 @@ uint32 my_lread(int Filedes, byte *Buffer, uint32 Count, myf MyFlags)
DBUG_PRINT
(
"my"
,(
"Fd: %d Buffer: %ld Count: %ld MyFlags: %d"
,
DBUG_PRINT
(
"my"
,(
"Fd: %d Buffer: %ld Count: %ld MyFlags: %d"
,
Filedes
,
Buffer
,
Count
,
MyFlags
));
Filedes
,
Buffer
,
Count
,
MyFlags
));
DBUG_PRINT
(
"error"
,
(
"Deprecated my_lread() function should not be used."
));
/* Temp hack to get count to int32 while read wants int */
/* Temp hack to get count to int32 while read wants int */
if
((
readbytes
=
(
uint32
)
read
(
Filedes
,
Buffer
,
(
uint
)
Count
))
!=
Count
)
if
((
readbytes
=
(
uint32
)
read
(
Filedes
,
Buffer
,
(
uint
)
Count
))
!=
Count
)
{
{
...
...
mysys/my_lwrite.c
View file @
c2b656fa
...
@@ -26,6 +26,8 @@ uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags)
...
@@ -26,6 +26,8 @@ uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags)
DBUG_PRINT
(
"my"
,(
"Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d"
,
DBUG_PRINT
(
"my"
,(
"Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d"
,
Filedes
,
Buffer
,
Count
,
MyFlags
));
Filedes
,
Buffer
,
Count
,
MyFlags
));
DBUG_PRINT
(
"error"
,
(
"Deprecated my_lwrite() function should not be used."
));
/* Temp hack to get count to int32 while write wants int */
/* Temp hack to get count to int32 while write wants int */
if
((
writenbytes
=
(
uint32
)
write
(
Filedes
,
Buffer
,
(
uint
)
Count
))
!=
Count
)
if
((
writenbytes
=
(
uint32
)
write
(
Filedes
,
Buffer
,
(
uint
)
Count
))
!=
Count
)
{
{
...
...
mysys/my_pread.c
View file @
c2b656fa
...
@@ -52,8 +52,12 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
...
@@ -52,8 +52,12 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
DBUG_PRINT
(
"warning"
,(
"Read only %ld bytes off %ld from %d, errno: %d"
,
DBUG_PRINT
(
"warning"
,(
"Read only %ld bytes off %ld from %d, errno: %d"
,
readbytes
,
Count
,
Filedes
,
my_errno
));
readbytes
,
Count
,
Filedes
,
my_errno
));
#ifdef THREAD
#ifdef THREAD
if
(
readbytes
==
0
&&
errno
==
EINTR
)
if
((
readbytes
==
0
||
(
int
)
readbytes
==
-
1
)
&&
errno
==
EINTR
)
continue
;
/* Interrupted */
{
DBUG_PRINT
(
"debug"
,
(
"my_pread() was interrupted and returned %d"
,
(
int
)
readbytes
));
continue
;
/* Interrupted */
}
#endif
#endif
if
(
MyFlags
&
(
MY_WME
|
MY_FAE
|
MY_FNABP
))
if
(
MyFlags
&
(
MY_WME
|
MY_FAE
|
MY_FNABP
))
{
{
...
@@ -124,8 +128,8 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
...
@@ -124,8 +128,8 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
VOID
(
sleep
(
MY_WAIT_FOR_USER_TO_FIX_PANIC
));
VOID
(
sleep
(
MY_WAIT_FOR_USER_TO_FIX_PANIC
));
continue
;
continue
;
}
}
if
((
writenbytes
==
0
&&
my_errno
==
EINTR
)
||
if
((
writenbytes
>
0
&&
(
uint
)
writenbytes
!=
(
uint
)
-
1
)
||
(
writenbytes
>
0
&&
(
uint
)
writenbytes
!=
(
uint
)
-
1
)
)
my_errno
==
EINTR
)
continue
;
/* Retry */
continue
;
/* Retry */
#endif
#endif
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
...
...
mysys/my_quick.c
View file @
c2b656fa
...
@@ -26,6 +26,14 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
...
@@ -26,6 +26,14 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
if
((
readbytes
=
(
uint
)
read
(
Filedes
,
Buffer
,
Count
))
!=
Count
)
if
((
readbytes
=
(
uint
)
read
(
Filedes
,
Buffer
,
Count
))
!=
Count
)
{
{
#ifndef DBUG_OFF
if
((
readbytes
==
0
||
(
int
)
readbytes
==
-
1
)
&&
errno
==
EINTR
)
{
DBUG_PRINT
(
"error"
,
(
"my_quick_read() was interrupted and returned %d"
". This function does not retry the read!"
,
(
int
)
readbytes
));
}
#endif
my_errno
=
errno
;
my_errno
=
errno
;
return
readbytes
;
return
readbytes
;
}
}
...
@@ -35,8 +43,24 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
...
@@ -35,8 +43,24 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
uint
my_quick_write
(
File
Filedes
,
const
byte
*
Buffer
,
uint
Count
)
uint
my_quick_write
(
File
Filedes
,
const
byte
*
Buffer
,
uint
Count
)
{
{
if
((
uint
)
write
(
Filedes
,
Buffer
,
Count
)
!=
Count
)
#ifndef DBUG_OFF
uint
writtenbytes
;
#endif
if
((
#ifndef DBUG_OFF
writtenbytes
=
#endif
(
uint
)
write
(
Filedes
,
Buffer
,
Count
))
!=
Count
)
{
{
#ifndef DBUG_OFF
if
((
writtenbytes
==
0
||
(
int
)
writtenbytes
==
-
1
)
&&
errno
==
EINTR
)
{
DBUG_PRINT
(
"error"
,
(
"my_quick_write() was interrupted and returned %d"
". This function does not retry the write!"
,
(
int
)
writtenbytes
));
}
#endif
my_errno
=
errno
;
my_errno
=
errno
;
return
(
uint
)
-
1
;
return
(
uint
)
-
1
;
}
}
...
...
mysys/my_read.c
View file @
c2b656fa
...
@@ -51,10 +51,11 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
...
@@ -51,10 +51,11 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
DBUG_PRINT
(
"warning"
,(
"Read only %ld bytes off %ld from %d, errno: %d"
,
DBUG_PRINT
(
"warning"
,(
"Read only %ld bytes off %ld from %d, errno: %d"
,
readbytes
,
Count
,
Filedes
,
my_errno
));
readbytes
,
Count
,
Filedes
,
my_errno
));
#ifdef THREAD
#ifdef THREAD
if
((
int
)
readbytes
<=
0
&&
errno
==
EINTR
)
if
((
readbytes
==
0
||
(
int
)
readbytes
==
-
1
)
&&
errno
==
EINTR
)
{
{
DBUG_PRINT
(
"debug"
,
(
"my_read() was interrupted and returned %d"
,
(
int
)
readbytes
));
DBUG_PRINT
(
"debug"
,
(
"my_read() was interrupted and returned %d"
,
continue
;
/* Interrupted */
(
int
)
readbytes
));
continue
;
/* Interrupted */
}
}
#endif
#endif
if
(
MyFlags
&
(
MY_WME
|
MY_FAE
|
MY_FNABP
))
if
(
MyFlags
&
(
MY_WME
|
MY_FAE
|
MY_FNABP
))
...
...
mysys/my_write.c
View file @
c2b656fa
...
@@ -57,18 +57,24 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
...
@@ -57,18 +57,24 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
VOID
(
sleep
(
MY_WAIT_FOR_USER_TO_FIX_PANIC
));
VOID
(
sleep
(
MY_WAIT_FOR_USER_TO_FIX_PANIC
));
continue
;
continue
;
}
}
if
(
!
writenbytes
)
if
((
writenbytes
==
0
||
(
int
)
writenbytes
==
-
1
))
{
{
/* We may come here on an interrupt or if the file quote is exeeded */
if
(
my_errno
==
EINTR
)
if
(
my_errno
==
EINTR
)
continue
;
if
(
!
errors
++
)
/* Retry once */
{
{
errno
=
EFBIG
;
/* Assume this is the error */
DBUG_PRINT
(
"debug"
,
(
"my_write() was interrupted and returned %d"
,
continue
;
(
int
)
writenbytes
));
continue
;
/* Interrupted */
}
if
(
!
writenbytes
&&
!
errors
++
)
/* Retry once */
{
/* We may come here if the file quota is exeeded */
errno
=
EFBIG
;
/* Assume this is the error */
continue
;
}
}
}
}
else
if
((
uint
)
writenbytes
!=
(
uint
)
-
1
)
else
continue
;
/* Retry */
continue
;
/* Retry */
#endif
#endif
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
if
(
MyFlags
&
(
MY_NABP
|
MY_FNABP
))
...
...
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