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
65225c3e
Commit
65225c3e
authored
Mar 01, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.0
parents
774b9cb5
ab13e772
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
mysql-test/t/mysql_protocols.test
mysql-test/t/mysql_protocols.test
+2
-0
sql/net_serv.cc
sql/net_serv.cc
+21
-5
No files found.
mysql-test/t/mysql_protocols.test
View file @
65225c3e
# Embedded server doesn't support external clients
--
source
include
/
not_embedded
.
inc
# Windows does not have SOCKET, but will try to create a PIPE as well as MEMORY
--
source
include
/
not_windows
.
inc
# test for Bug #4998 "--protocol doesn't reject bad values"
...
...
sql/net_serv.cc
View file @
65225c3e
...
...
@@ -229,8 +229,12 @@ static int net_data_is_ready(my_socket sd)
struct
timeval
tv
;
int
res
;
#ifndef __WIN__
/* Windows uses an _array_ of 64 fd's as default, so it's safe */
if
(
sd
>=
FD_SETSIZE
)
return
-
1
;
#define NET_DATA_IS_READY_CAN_RETURN_MINUS_ONE
#endif
FD_ZERO
(
&
sfds
);
FD_SET
(
sd
,
&
sfds
);
...
...
@@ -271,7 +275,7 @@ void net_clear(NET *net)
int
count
,
ready
;
DBUG_ENTER
(
"net_clear"
);
#if !defined(EMBEDDED_LIBRARY)
while
((
ready
=
net_data_is_ready
(
net
->
vio
->
sd
))
!=
0
)
while
((
ready
=
net_data_is_ready
(
net
->
vio
->
sd
))
>
0
)
{
/* The socket is ready */
if
((
count
=
vio_read
(
net
->
vio
,
(
char
*
)
(
net
->
buff
),
...
...
@@ -286,15 +290,27 @@ void net_clear(NET *net)
}
else
{
/* No data to read and 'net_data_is_ready' returned "don't know" */
if
(
ready
==
-
1
)
break
;
DBUG_PRINT
(
"info"
,(
"socket ready but only EOF to read - disconnected"
));
net
->
error
=
2
;
break
;
}
}
#ifdef NET_DATA_IS_READY_CAN_RETURN_MINUS_ONE
/* 'net_data_is_ready' returned "don't know" */
if
(
ready
==
-
1
)
{
/* Read unblocking to clear net */
my_bool
old_mode
;
if
(
!
vio_blocking
(
net
->
vio
,
FALSE
,
&
old_mode
))
{
while
((
count
=
vio_read
(
net
->
vio
,
(
char
*
)
(
net
->
buff
),
(
uint32
)
net
->
max_packet
))
>
0
)
DBUG_PRINT
(
"info"
,(
"skipped %d bytes from file: %s"
,
count
,
vio_description
(
net
->
vio
)));
vio_blocking
(
net
->
vio
,
TRUE
,
&
old_mode
);
}
}
#endif
#endif
net
->
pkt_nr
=
net
->
compress_pkt_nr
=
0
;
/* Ready for new command */
net
->
write_pos
=
net
->
buff
;
...
...
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