Bug #533 | --force ignored when also -e "source myscript.sql" is present | ||
---|---|---|---|
Submitted: | 29 May 2003 3:23 | Modified: | 29 May 2003 12:24 |
Reporter: | Ralf Hauser | Email Updates: | |
Status: | won't fix | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S4 (Feature request) |
Version: | c:\mysql\bin\mysql.exe Ver 12.18 Distri | OS: | Windows (win2k) |
Assigned to: | CPU Architecture: | Any |
[29 May 2003 3:23]
Ralf Hauser
[29 May 2003 4:38]
Ralf Hauser
relevant page;s http://www.mysql.com/doc/en/mysql.html and http://www.mysql.com/doc/en/Batch_Commands.html
[29 May 2003 11:52]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php --force is intended to be used in Batch Mode only. I.e. like: mysql --force < myscript.sql # Unix style cat myscript.sql | mysql --force # Windows style type myscript.sql | mysql --force -e "" is intened to send Single query or command that's why --force does not make much sence for it. Single query can either succeed or fail. Maning of --force is to continue executing batch of queries even if some of them fail. Without it mysql will stop after first error.
[29 May 2003 12:24]
Ralf Hauser
Alexander, Thanks for your quick reply. Unfortunately, the Ant exec task happily takes multiple arguments, but doesn't allow for pipes (|) nor I/O redirects (<,>) - at least not in a way portable between Unix and Win. Therefore, please take this as an enhancement request with the following variants: 1) let the scripts be added as arguments to mysql.exe with option "-m" such as "multiple commands" (one of the few letters or the alphabet left) or 2) change the implementation of "--force" such that it also is effective under '"-e source script.sql"' since this appears to be "valid" under the title of "batch mode" at least according to the part of your website's documentation I came across, namely http://www.mysql.com/doc/en/Batch_mode.html (therefore, I disagree with you - some minor "bug" might be here all the same... ;) ) 3) provide another way to get it working with ant - for example by adding a mysql ant-task (--> I guess this would require an additonal ant-mysql.jar or could become part of the jar of http://ant-contrib.sourceforge.net). Rgds r.