mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#17280 mysqltest, --echo sometimes does not expand $variables
- Evaluate all variables in the text before printing it to result file client/mysqltest.c: Update echo command to vvaluate all variables in the string before printing, allow for variable names to be escaped using \ mysql-test/r/mysqltest.result: Update results for echo mysql-test/t/mysqltest.test: Add more advanced tests for echo of strings with several variables and/or text plus variables. Also test that variables can be escaped
This commit is contained in:
@ -539,6 +539,19 @@ echo $novar1;
|
||||
--error 1
|
||||
--exec echo "let hi;" | $MYSQL_TEST 2>&1
|
||||
|
||||
# More advanced test for bug#17280
|
||||
let $success= 1;
|
||||
--echo # Execute: --echo # <whatever> success: \$success
|
||||
--echo # <whatever> success: $success
|
||||
--echo # Execute: echo # <whatever> success: \$success ;
|
||||
echo # <whatever> success: $success ;
|
||||
|
||||
--echo # The next two variants work fine and expand the content of \$success
|
||||
--echo # Execute: --echo \$success
|
||||
--echo $success
|
||||
--echo # Execute: echo \$success ;
|
||||
echo $success ;
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Test to assign let from query
|
||||
# let $<var_name>=`<query>`;
|
||||
|
Reference in New Issue
Block a user