Commit 47b8d63d authored by unknown's avatar unknown

Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
mysql-test/t/mysqladmin.test:
  Auto merged
sql/sql_class.h:
  Auto merged
parents 9a864bb7 8fc4864e
...@@ -1246,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end, ...@@ -1246,7 +1246,9 @@ void var_set(const char *var_name, const char *var_name_end,
v->int_dirty= 0; v->int_dirty= 0;
v->str_val_len= strlen(v->str_val); 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)))) if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
die("Out of memory"); die("Out of memory");
putenv(v->env_s); putenv(v->env_s);
...@@ -4685,10 +4687,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, ...@@ -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 Store the result of the query if it will return any fields
determine if that was expected
*/ */
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), handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds); mysql_sqlstate(mysql), ds);
...@@ -4740,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, ...@@ -4740,7 +4741,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
} }
if (res) if (res)
{
mysql_free_result(res); mysql_free_result(res);
res= 0;
}
counter++; counter++;
} while (!(err= mysql_next_result(mysql))); } while (!(err= mysql_next_result(mysql)));
if (err > 0) if (err > 0)
...@@ -4807,7 +4811,7 @@ void handle_error(struct st_command *command, ...@@ -4807,7 +4811,7 @@ void handle_error(struct st_command *command,
err_errno, err_error); err_errno, err_error);
/* Abort the run of this test, pass the failed query as reason */ /* 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); "not supported", command->query);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment