summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2003-12-21 19:39:32 +0200
committerunknown <monty@mysql.com>2003-12-21 19:39:32 +0200
commitd31c6628e1494dd561f96cfb8a1fbfde17fc8ed4 (patch)
tree82780d2f52e09f3ef112e35fc6f6b3e1dadc3a56 /client
parent9e56a0a7711e1f6f2b234db54b3e3d2004069bbf (diff)
downloadmariadb-git-d31c6628e1494dd561f96cfb8a1fbfde17fc8ed4.tar.gz
Portability fixes found during 5.0 test compilation
Fixed bug in ORDER BY on a small column (Bug #2147) Fixed error from pthread_mutex_destroy() when one had wrong errmsg file client/mysqltest.c: Added handling of error on query send (Needed for init_connection.test) mysql-test/mysql-test-run.sh: Added tracing of mysqldump and mysqlbinlog mysql-test/r/init_connect.result: Updated tests mysql-test/r/order_by.result: Added test for bug filesort bug mysql-test/t/init_connect-master.opt: Added proper quoting (for Solaris and OSF) mysql-test/t/init_connect.test: Portability fix mysql-test/t/order_by.test: Added test for bug #2147 (bug in filesort) sql/filesort.cc: Fixed bug in filesort (Bug #2147) sql/item.h: Clear 'fixed' on cleanup (For prepared statements) sql/item_func.cc: Protect mutex destroy. (Fixed error from pthread_mutex_destroy() when one had wrong errmsg file) sql/log_event.cc: Portability fix sql/sql_class.h: Fixed compiler warning sql/sql_prepare.cc: Portability fix. (Some compilers doesn't support jump over variables declared in for())
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index d034007cb29..bb1151fa178 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -2154,7 +2154,7 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
DYNAMIC_STRING ds_tmp;
DYNAMIC_STRING eval_query;
char* query;
- int query_len;
+ int query_len, got_error_on_send= 0;
DBUG_ENTER("run_query");
if (q->type != Q_EVAL)
@@ -2179,9 +2179,13 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
else
ds= &ds_res;
- if ((flags & QUERY_SEND) && mysql_send_query(mysql, query, query_len))
- die("At line %u: unable to send query '%s'(mysql_errno=%d,errno=%d)",
- start_lineno, query, mysql_errno(mysql), errno);
+ if (flags & QUERY_SEND)
+ {
+ got_error_on_send= mysql_send_query(mysql, query, query_len);
+ if (got_error_on_send && !q->expected_errno[0])
+ die("At line %u: unable to send query '%s' (mysql_errno=%d , errno=%d)",
+ start_lineno, query, mysql_errno(mysql), errno);
+ }
do
{
@@ -2194,9 +2198,10 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
if (!(flags & QUERY_REAP))
DBUG_RETURN(0);
- if ((!counter && (*mysql->methods->read_query_result)(mysql)) ||
- (!(last_result= res= mysql_store_result(mysql)) &&
- mysql_field_count(mysql)))
+ if (got_error_on_send ||
+ (!counter && (*mysql->methods->read_query_result)(mysql)) ||
+ (!(last_result= res= mysql_store_result(mysql)) &&
+ mysql_field_count(mysql)))
{
if (q->require_file)
{