| Bug #10183 | Executing SQL Statements from a Text File fails | ||
|---|---|---|---|
| Submitted: | 26 Apr 2005 16:05 | Modified: | 26 Apr 2005 19:28 |
| Reporter: | Disha | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.4 Beta | OS: | Windows (Windows 2003) |
| Assigned to: | CPU Architecture: | Any | |
[26 Apr 2005 19:28]
MySQL Verification Team
Discussion with Serg, \x commands not uses delimiter how showed below: c:\mysql\bin>mysql -uroot mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 to server version: 5.0.4-beta-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> \. c:/mysql/bin/select.txt +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.01 sec) mysql> \. c:/mysql/bin/select.txt; ERROR: Failed to open file 'c:\mysql\bin\select.txt;', error: 2 mysql>

Description: On trying to execute sql statement from a text file, the execution fails with an error 'Failed to open file'. The command fails when '\.' is used, but works fine when 'source' keyword is used as follows: >source filepath/select.txt// As per documentation ('Using mysql in Batch Mode' section), '\.' should work. How to repeat: 1. >\. filepath/select.txt// ACTUAL RESULT Failed to open file '...\select.txt\', error: 22 EXPECTED RESULT The execution should display proper results for sql statement in text file without any error or warning.