Bug #37109 parse error in \! and system
Submitted: 30 May 2008 22:05 Modified: 31 May 2008 16:15
Reporter: Alex Efros Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.0.54, 4.1, 5.1, 6.0 BK OS:Linux
Assigned to: CPU Architecture:Any
Tags: system
Triage: Triaged: D3 (Medium)

[30 May 2008 22:05] Alex Efros
Description:
1. Command-line client have differences in how \! and system commands works (while it expected both are just two names of same command).

2. When executing multiple commands at once with \! bash -c 'cmd;cmd' string after ; executed twice - first by bash and next by mysql client.

How to repeat:
mysql> \! bash -c "echo 1; echo 2"
1
2
    "> 

..... if I'll enter "; at than prompt I get this:

mysql> \! bash -c "echo 1; echo 2"
1
2
    "> ";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'echo 2"
"' at line 1

..... the system command work differently from \!:

mysql> system bash -c "echo 1; echo 2"
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'system bash -c "echo 1; echo 2"' at line 1
[31 May 2008 16:15] Sveta Smirnova
Thank you for the report.

Verified as described.