1
0
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:
unknown
2006-02-10 12:11:16 +01:00
parent f220f89212
commit 3f25e323c5
3 changed files with 45 additions and 15 deletions

View File

@ -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>`;