| Bug #17280 | mysqltest, --echo sometimes does not expand $variables | ||
|---|---|---|---|
| Submitted: | 9 Feb 2006 16:18 | Modified: | 15 Feb 2006 20:02 |
| Reporter: | Matthias Leich | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
| Version: | 4.1 | OS: | |
| Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[9 Feb 2006 16:19]
Matthias Leich
testcase
Attachment: ml024.test (application/test, text), 1.06 KiB.
[10 Feb 2006 11:11]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/2433
[15 Feb 2006 20:02]
Magnus Blåudd
Pushed to 5.0.19

Description: let $success= 1; --echo $success ----> 1 So the expansion of $variables in "--echo ..." basically works. --echo # <whatever> success: $success ----> # <whatever> success: $success Why is there no expansion of the $variable ? I assume this bug is not important for customers (--> S3). But it harms the development of QA tests and their use in bug analysis, because a workaround like --disable_query_log eval SELECT "# <whatever> success: $success" AS '' --enable_query-log is uncomfortable in coding and debugging situations. (--> P3 and not P4) My environment: - Intel PC with Linux(SuSE 9.3) - MySQL compiled from source Version 5.1 last ChangeSet@1.2077, 2006-02-07 Version 4.1 last ChangeSet@1.2471, 2006-02-03 I guess MySQL 5.0 shows the same effect. How to repeat: Please use my attached testscript ml024.test copy it to mysql-test/t echo "Dummy" > r/ml024.result # Produce a dummy file with # expected results ./mysql-test-run ml024 Suggested fix: I think it is not necessary to fix this bug in MySQL 4.1, because most test development etc. appears in MySQL 5.1 now. So either MySQL 5.0 or at least 5.1 would be sufficient. I would like to have the following behaviour let $success= 1; --echo # <whatever> success: $success Response: "# <whatever> success: 1" It would be also wonderful if --echo # content of variable \$success: $success would give Response: "# content of variable $success: 1" This would be similar to the behaviour of "eval" when there is a "\" just before "$".