diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-12-26 16:49:10 -0700 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-12-26 16:49:10 -0700 |
commit | 6e84e11da5f4d9168005f48c90fd169047a9e950 (patch) | |
tree | e6bcbe8baaed6b27ac43fd5aa816ebe6f1e949f8 /client | |
parent | 4dabfa5de70c59c4f7ea1e4a33224c5a3f798d66 (diff) | |
parent | e87d593ae1598c4e93da59ba249bb01a649c5772 (diff) | |
download | mariadb-git-6e84e11da5f4d9168005f48c90fd169047a9e950.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/g51
into siva.hindu.god:/usr/home/tim/m/bk/tmp/mrg51-dec26
Makefile.am:
Auto merged
client/mysqlbinlog.cc:
Auto merged
configure.in:
Auto merged
client/mysqltest.c:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/mysql.h:
Auto merged
include/typelib.h:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysys/default.c:
Auto merged
mysys/my_wincond.c:
Auto merged
mysys/typelib.c:
Auto merged
server-tools/instance-manager/Makefile.am:
Auto merged
server-tools/instance-manager/guardian.cc:
Auto merged
server-tools/instance-manager/instance.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/charsets/hebrew.xml:
Auto merged
sql/sql_show.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
strings/conf_to_src.c:
Auto merged
vio/viossl.c:
Auto merged
sql/field.h:
Manual merge
sql/log_event.cc:
Manual merge
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index cd417ea66c7..a61f77aa1ca 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); @@ -2974,7 +2976,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host, if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR || mysql_errno(mysql) == CR_CONNECTION_ERROR) && failed_attempts < opt_max_connect_retries) + { + verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts, + opt_max_connect_retries, mysql_errno(mysql), + mysql_error(mysql)); my_sleep(connection_retry_sleep); + } else { if (failed_attempts > 0) @@ -4691,10 +4698,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); @@ -4746,7 +4752,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) @@ -4813,7 +4822,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); } |