mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
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
This commit is contained in:
parent
52d9e13ffc
commit
52960624d3
3 changed files with 56 additions and 7 deletions
|
|
@ -334,6 +334,14 @@ eval select $mysql_errno as "after_!errno_masked_error" ;
|
|||
exit(2);
|
||||
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
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
@ -364,6 +372,23 @@ select 3 from t1 ;
|
|||
--exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST 2>&1
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue