diff options
author | unknown <msvensson@neptunus.(none)> | 2006-12-08 16:53:59 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-12-08 16:53:59 +0100 |
commit | e49488ea0238c4b25d055957a3f84b3b441944cb (patch) | |
tree | 4c80fa843ed9d53e8d1b77da1398879d83562da5 /client | |
parent | e54bbaa3fb8793905d37af808b9bee6a49df358a (diff) | |
parent | 47b8d63d4702c0ce4d3f38815fc50d38f03b1519 (diff) | |
download | mariadb-git-e49488ea0238c4b25d055957a3f84b3b441944cb.tar.gz |
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
client/mysqltest.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/sql_class.h:
Auto merged
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 4eb17fc5f7a..a322b9119d7 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1247,7 +1247,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); @@ -4692,10 +4694,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); @@ -4747,7 +4748,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) @@ -4814,7 +4818,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); } |