1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Remove confusing printouts from expected to fail "system" commands

This commit is contained in:
msvensson@neptunus.(none)
2005-12-13 18:47:34 +01:00
parent b5d805b2d6
commit b38a183d62
3 changed files with 12 additions and 4 deletions

View File

@@ -1134,6 +1134,7 @@ static void do_exec(struct st_query *query)
}
free_replace();
DBUG_VOID_RETURN;
}
@@ -1300,10 +1301,13 @@ int do_modify_var(struct st_query *query, const char *name,
int do_system(struct st_query *q)
{
DYNAMIC_STRING *ds;
char *p=q->first_argument;
VAR v;
var_init(&v, 0, 0, 0, 0);
eval_expr(&v, p, 0); /* NULL terminated */
ds= &ds_res;
if (v.str_val_len)
{
char expr_buf[1024];
@@ -1316,8 +1320,11 @@ int do_system(struct st_query *q)
{
if (q->abort_on_error)
die("system command '%s' failed", expr_buf);
/* If ! abort_on_error, display message and continue */
verbose_msg("system command '%s' failed", expr_buf);
/* If ! abort_on_error, log message and continue */
dynstr_append(ds, "system command '");
replace_dynstr_append(ds, expr_buf);
dynstr_append(ds, "' failed\n");
}
}
else
@@ -1582,6 +1589,7 @@ int do_sleep(struct st_query *query, my_bool real_sleep)
if (opt_sleep && !real_sleep)
sleep_val= opt_sleep;
DBUG_PRINT("info", ("sleep_val: %f", sleep_val));
my_sleep((ulong) (sleep_val * 1000000L));
query->last_argument= sleep_end;
return 0;

View File

@@ -304,6 +304,7 @@ mysqltest: At line 1: End of line junk detected: "1000"
mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: system command 'false' failed
system command 'NonExistsinfComamdn 2> /dev/null' failed
test
test2
test3

View File

@@ -689,7 +689,7 @@ system echo "hej" > /dev/null;
--exec echo "system false;" | $MYSQL_TEST 2>&1
--disable_abort_on_error
system NonExistsinfComamdn;
system NonExistsinfComamdn 2> /dev/null;
--enable_abort_on_error
@@ -1026,4 +1026,3 @@ drop table t1;
drop table t1;