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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
aab7b774
Commit
aab7b774
authored
Aug 23, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed a Bug #4998 "--protocol doesn't reject bad values"
parent
83e3d3f9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
10 deletions
+26
-10
client/mysql.cc
client/mysql.cc
+1
-2
client/mysqladmin.c
client/mysqladmin.c
+1
-1
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+1
-2
client/mysqlcheck.c
client/mysqlcheck.c
+1
-1
client/mysqldump.c
client/mysqldump.c
+1
-2
client/mysqlimport.c
client/mysqlimport.c
+1
-1
client/mysqlshow.c
client/mysqlshow.c
+1
-1
mysql-test/r/mysql_protocols.result
mysql-test/r/mysql_protocols.result
+9
-0
mysql-test/t/mysql_protocols.test
mysql-test/t/mysql_protocols.test
+10
-0
No files found.
client/mysql.cc
View file @
aab7b774
...
...
@@ -753,8 +753,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_nopager
=
1
;
case
OPT_MYSQL_PROTOCOL
:
{
if
((
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
)))
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqladmin.c
View file @
aab7b774
...
...
@@ -249,7 +249,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
case
OPT_MYSQL_PROTOCOL
:
{
if
(
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
)
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqlbinlog.cc
View file @
aab7b774
...
...
@@ -633,8 +633,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
case
OPT_MYSQL_PROTOCOL
:
{
if
((
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
)))
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqlcheck.c
View file @
aab7b774
...
...
@@ -271,7 +271,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case
'V'
:
print_version
();
exit
(
0
);
case
OPT_MYSQL_PROTOCOL
:
{
if
(
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
)
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqldump.c
View file @
aab7b774
...
...
@@ -582,8 +582,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
}
case
(
int
)
OPT_MYSQL_PROTOCOL
:
{
if
((
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
)))
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqlimport.c
View file @
aab7b774
...
...
@@ -203,7 +203,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif
case
OPT_MYSQL_PROTOCOL
:
{
if
(
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
)
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
client/mysqlshow.c
View file @
aab7b774
...
...
@@ -268,7 +268,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
case
OPT_MYSQL_PROTOCOL
:
{
if
(
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
==
~
(
ulong
)
0
)
if
(
!
(
opt_protocol
=
find_type
(
argument
,
&
sql_protocol_typelib
,
0
))
)
{
fprintf
(
stderr
,
"Unknown option to protocol: %s
\n
"
,
argument
);
exit
(
1
);
...
...
mysql-test/r/mysql_protocols.result
0 → 100644
View file @
aab7b774
<default>
ok
TCP
ok
SOCKET
ok
ERROR 2047: Wrong or unknown protocol
ERROR 2047: Wrong or unknown protocol
Unknown option to protocol: NullS
mysql-test/t/mysql_protocols.test
0 → 100644
View file @
aab7b774
# test for Bug #4998 "--protocol doesn't reject bad values"
--
exec
echo
"select ' ok' as '<default>'"
|
$MYSQL
--
exec
echo
"select ' ok' as 'TCP'"
|
$MYSQL
--
protocol
=
TCP
--
exec
echo
"select ' ok' as 'SOCKET'"
|
$MYSQL
--
protocol
=
SOCKET
--
exec
echo
"select ' ok' as 'PIPE'"
|
$MYSQL
--
protocol
=
PIPE
2
>&
1
--
exec
echo
"select ' ok' as 'MEMORY'"
|
$MYSQL
--
protocol
=
MEMORY
2
>&
1
--
exec
echo
"select ' ok' as 'NullS'"
|
$MYSQL
--
protocol
=
NullS
2
>&
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