diff options
author | msvensson@neptunus.(none) <> | 2006-12-08 16:50:54 +0100 |
---|---|---|
committer | msvensson@neptunus.(none) <> | 2006-12-08 16:50:54 +0100 |
commit | 3a4491c70a27ebb6f4c6b6a0f454e32680608743 (patch) | |
tree | 740e3367e105bec6cd496585bf988de461490bdd /client | |
parent | 0b41593db60e0670f27a76b8144e42e70e1589a8 (diff) | |
parent | 3e43b86329017a1d5b3c26a252bcfff619a8b219 (diff) | |
download | mariadb-git-3a4491c70a27ebb6f4c6b6a0f454e32680608743.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index e646cc412a9..ad5c3d6a5d1 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1246,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end, v->int_dirty= 0; v->str_val_len= strlen(v->str_val); } - strxmov(buf, v->name, "=", v->str_val, NullS); + my_snprintf(buf, sizeof(buf), "%.*s=%.*s", + v->name_len, v->name, + v->str_val_len, v->str_val); if (!(v->env_s= my_strdup(buf, MYF(MY_WME)))) die("Out of memory"); putenv(v->env_s); @@ -4685,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } /* - Store the result. If res is NULL, use mysql_field_count to - determine if that was expected + Store the result of the query if it will return any fields */ - if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql)) + if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0)) { handle_error(command, mysql_errno(mysql), mysql_error(mysql), mysql_sqlstate(mysql), ds); @@ -4740,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } if (res) + { mysql_free_result(res); + res= 0; + } counter++; } while (!(err= mysql_next_result(mysql))); if (err > 0) @@ -4807,7 +4811,7 @@ void handle_error(struct st_command *command, err_errno, err_error); /* Abort the run of this test, pass the failed query as reason */ - abort_not_supported_test("Query '%s' failed, required functionality" \ + abort_not_supported_test("Query '%s' failed, required functionality " \ "not supported", command->query); } |