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
f6658356
Commit
f6658356
authored
Jun 29, 2006
by
iggy@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#20328 mysql client: dumb about trailing spaces on help command.
parent
e343c0e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
3 deletions
+67
-3
client/mysql.cc
client/mysql.cc
+14
-3
mysql-test/r/mysql_client.result
mysql-test/r/mysql_client.result
+44
-0
mysql-test/t/mysql_client.test
mysql-test/t/mysql_client.test
+9
-0
No files found.
client/mysql.cc
View file @
f6658356
...
...
@@ -1725,7 +1725,14 @@ static int com_server_help(String *buffer __attribute__((unused)),
if
(
help_arg
[
0
]
!=
'\''
)
{
(
void
)
strxnmov
(
cmd_buf
,
sizeof
(
cmd_buf
),
"help '"
,
help_arg
,
"'"
,
NullS
);
char
*
end_arg
=
strend
(
help_arg
);
if
(
--
end_arg
)
{
while
(
my_isspace
(
charset_info
,
*
end_arg
))
end_arg
--
;
*++
end_arg
=
'\0'
;
}
(
void
)
strxnmov
(
cmd_buf
,
sizeof
(
cmd_buf
),
"help '"
,
help_arg
,
"'"
,
NullS
);
server_cmd
=
cmd_buf
;
}
...
...
@@ -1811,9 +1818,13 @@ com_help(String *buffer __attribute__((unused)),
{
reg1
int
i
,
j
;
char
*
help_arg
=
strchr
(
line
,
' '
),
buff
[
32
],
*
end
;
if
(
help_arg
)
return
com_server_help
(
buffer
,
line
,
help_arg
+
1
);
{
while
(
my_isspace
(
charset_info
,
*
help_arg
))
help_arg
++
;
if
(
*
help_arg
)
return
com_server_help
(
buffer
,
line
,
help_arg
);
}
put_info
(
"
\n
For information about MySQL products and services, visit:
\n
"
" http://www.mysql.com/
\n
"
...
...
mysql-test/r/mysql_client.result
0 → 100644
View file @
f6658356
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set query delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (\n) Disable pager, print to stdout.
notee (\t) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset_name(\C) Switch to another charset. Might be needed for processing binlog.
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set query delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (\n) Disable pager, print to stdout.
notee (\t) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset_name(\C) Switch to another charset. Might be needed for processing binlog.
mysql-test/t/mysql_client.test
0 → 100644
View file @
f6658356
# This test should work in embedded server after we fix mysqltest
--
source
include
/
not_embedded
.
inc
#
# Bug #20328: mysql client interprets commands in comments
#
--
exec
echo
'help'
|
$MYSQL
--
exec
echo
'help '
|
$MYSQL
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