diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2011-09-14 15:19:24 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2011-09-14 15:19:24 +0200 |
commit | 52960624d350359c67a333fb09c3a93465116668 (patch) | |
tree | 1bebca1bd2e82673f57b57bdbb95f93fbbfa1130 /mysql-test/t/mysqltest.test | |
parent | 52d9e13ffcacee74e42bc436877f5f4eb1999e66 (diff) | |
download | mariadb-git-52960624d350359c67a333fb09c3a93465116668.tar.gz |
Bug #12793118 MYSQLTEST: --ERROR AND --DISABLE_ABORT_ON_ERROR DO NOT WORK FOR SQL IN COMMANDS
Call handle_error() instead of die() when evaluating these
Must remember "current command" with link to errors to ignore
Added test cases to mysqltest.test
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 52dfd8e86d3..7b897117b9b 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -335,6 +335,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 @@ -365,6 +373,23 @@ select 3 from t1 ; # ---------------------------------------------------------------------------- +# 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 # ---------------------------------------------------------------------------- |