diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-09-15 13:09:24 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-09-15 13:09:24 +0200 |
commit | 04c402c452c4fc124cf30e6ac2b87b62ddc4e579 (patch) | |
tree | 041c31b29aa104d98407ddddca490a5f66d2390e /mysql-test/t/mysqltest.test | |
parent | e0a9cd56a76d4dfcf797e5a0186f53405f0b7fef (diff) | |
parent | e24d8bbf0af4d1312f431cf5274fd0fa38646d9f (diff) | |
download | mariadb-git-04c402c452c4fc124cf30e6ac2b87b62ddc4e579.tar.gz |
upmerge 12793118,12912120
Diffstat (limited to 'mysql-test/t/mysqltest.test')
-rw-r--r-- | mysql-test/t/mysqltest.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 6279a392119..a363038dee3 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -354,6 +354,14 @@ eval select $mysql_errno as "after_!errno_masked_error" ; EOF # ---------------------------------------------------------------------------- +# Check backtick and query_get_value, result should be empty +# ---------------------------------------------------------------------------- +let $empty= `garbage`; +echo $empty is empty; +let $empty= query_get_value(nonsense, blabla, 1); +echo $empty is empty; + +# ---------------------------------------------------------------------------- # Switch the abort on error on and check the effect on $mysql_errno # ---------------------------------------------------------------------------- --error ER_PARSE_ERROR @@ -433,6 +441,23 @@ select "CASE" as "LOWER"; select "xyz" as name union select "abc" as name order by name desc; # ---------------------------------------------------------------------------- +# Test --error with backtick operator or query_get_value +# ---------------------------------------------------------------------------- + +--error 0,ER_NO_SUCH_TABLE +let $empty= `SELECT foo from bar`; +echo $empty is empty; + +--error 0,ER_BAD_FIELD_ERROR +let $empty= query_get_value(SELECT bar as foo, baz, 1); +echo $empty is empty; + +--error 0,ER_NO_SUCH_TABLE +if (!`SELECT foo from bar`) { + echo "Yes it's empty"; +} + +# ---------------------------------------------------------------------------- # Test comments # ---------------------------------------------------------------------------- |