diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-30 16:34:54 +0200 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-30 16:34:54 +0200 |
commit | ecef6c3308b3f92e0250d071b23ef0f74ffadef4 (patch) | |
tree | f450428c84d9cdb527c547bc5234bf5d4e4db7f6 /client | |
parent | 9d96cd6dcb3f171cbbe93c0f7061ce132a9087a7 (diff) | |
parent | 37743aedda91ca18a408ed934cf68e5b02f962dd (diff) | |
download | mariadb-git-ecef6c3308b3f92e0250d071b23ef0f74ffadef4.tar.gz |
merge from 5.0-main
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 442b2020a56..0e18dacd4f1 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -6352,35 +6352,39 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command, Need to grab affected rows information before getting warnings here */ - if (!disable_info) - affected_rows= mysql_affected_rows(mysql); - - if (!disable_warnings) { - /* Get the warnings from execute */ + ulonglong affected_rows; + LINT_INIT(affected_rows); + + if (!disable_info) + affected_rows= mysql_affected_rows(mysql); - /* Append warnings to ds - if there are any */ - if (append_warnings(&ds_execute_warnings, mysql) || - ds_execute_warnings.length || - ds_prepare_warnings.length || - ds_warnings->length) + if (!disable_warnings) { - dynstr_append_mem(ds, "Warnings:\n", 10); - if (ds_warnings->length) - dynstr_append_mem(ds, ds_warnings->str, - ds_warnings->length); - if (ds_prepare_warnings.length) - dynstr_append_mem(ds, ds_prepare_warnings.str, - ds_prepare_warnings.length); - if (ds_execute_warnings.length) - dynstr_append_mem(ds, ds_execute_warnings.str, - ds_execute_warnings.length); - } - } + /* Get the warnings from execute */ - if (!disable_info) - append_info(ds, affected_rows, mysql_info(mysql)); + /* Append warnings to ds - if there are any */ + if (append_warnings(&ds_execute_warnings, mysql) || + ds_execute_warnings.length || + ds_prepare_warnings.length || + ds_warnings->length) + { + dynstr_append_mem(ds, "Warnings:\n", 10); + if (ds_warnings->length) + dynstr_append_mem(ds, ds_warnings->str, + ds_warnings->length); + if (ds_prepare_warnings.length) + dynstr_append_mem(ds, ds_prepare_warnings.str, + ds_prepare_warnings.length); + if (ds_execute_warnings.length) + dynstr_append_mem(ds, ds_execute_warnings.str, + ds_execute_warnings.length); + } + } + if (!disable_info) + append_info(ds, affected_rows, mysql_info(mysql)); + } } end: |