diff options
author | unknown <msvensson@pilot.blaudden> | 2007-04-04 15:09:12 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-04-04 15:09:12 +0200 |
commit | aaaf49814682e7eb1c947eef8c59f8b2d20461a1 (patch) | |
tree | e8c3ffa14766a2c3903c8cbd358e81a3ef3f3003 /mysql-test | |
parent | 96d879cb4b310c2b94f83566ee64c701576f5c61 (diff) | |
download | mariadb-git-aaaf49814682e7eb1c947eef8c59f8b2d20461a1.tar.gz |
Add expansion of $variables in "let from query",
"if with query" and "while with query"
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysqltest.result | 3 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 71f1c7de4ed..ba37284e597 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -268,6 +268,9 @@ mysqltest: At line 1: Missing assignment operator in let 1 # Execute: echo $success ; 1 +var2: content of variable 1 +var3: content of variable 1 content of variable 1 +length of var3 is longer than 0 mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Could not open file ./non_existingFile mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 221ad5d5c6e..9a7139187b5 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -686,6 +686,21 @@ echo # <whatever> success: $success ; echo $success ; # ---------------------------------------------------------------------------- +# Test let from query with $variable +# let $<var_name>=`<query with $variable>`; +# ---------------------------------------------------------------------------- + +let $var1=content of variable 1; +let $var2= `select "$var1"`; +let $var3= `select concat("$var1", " ", "$var2")`; +echo var2: $var2; +echo var3: $var3; +if (`select length("$var3") > 0`) +{ + echo length of var3 is longer than 0; +} + +# ---------------------------------------------------------------------------- # Test to assign let from query # let $<var_name>=`<query>`; # ---------------------------------------------------------------------------- |