summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2006-11-29 11:44:37 +0300
committerunknown <kostja@bodhi.local>2006-11-29 11:44:37 +0300
commit6d1e66a3de34b1b7b71c73c550cd1d13f1db9dcd (patch)
treef6410b9231112e66043c0eb7edc1b33fbff6e760 /libmysql
parent774675a215bad1afdcf3c53e295536a217a70d00 (diff)
parent79e7d778134f2c4bd358d84d85db1fe1f200624c (diff)
downloadmariadb-git-6d1e66a3de34b1b7b71c73c550cd1d13f1db9dcd.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge libmysql/libmysql.c: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/ps.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged sql/item_sum.cc: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_yacc.yy: Auto merged server-tools/instance-manager/mysql_connection.cc: Rollback Monty's removals of explicit casts tests/mysql_client_test.c: SCCS merged
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/errmsg.c3
-rw-r--r--libmysql/libmysql.c19
2 files changed, 12 insertions, 10 deletions
diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c
index 9e1d70a47df..59089d5ec18 100644
--- a/libmysql/errmsg.c
+++ b/libmysql/errmsg.c
@@ -82,6 +82,7 @@ const char *client_errors[]=
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
+ "Lost connection to MySQL server at '%s', system error: %d",
""
};
@@ -145,6 +146,7 @@ const char *client_errors[]=
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
+ "Lost connection to MySQL server at '%s', system error: %d",
""
};
@@ -206,6 +208,7 @@ const char *client_errors[]=
"Prepared statement contains no metadata",
"Attempt to read a row while there is no result set associated with the statement",
"This feature is not implemented yet",
+ "Lost connection to MySQL server at '%s', system error: %d",
""
};
#endif
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index bf9d2ffb0f0..e94d5111de0 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -176,16 +176,15 @@ void STDCALL mysql_server_end()
end_embedded_server();
#endif
/* If library called my_init(), free memory allocated by it */
+ finish_client_errs();
if (!org_my_init_done)
{
my_end(MY_DONT_FREE_DBUG);
- /* Remove TRACING, if enabled by mysql_debug() */
+ /* Remove TRACING, if enabled by mysql_debug() */
DBUG_POP();
}
else
mysql_thread_end();
- finish_client_errs();
- free_charsets();
vio_end();
mysql_client_init= org_my_init_done= 0;
#ifdef EMBEDDED_SERVER
@@ -2094,7 +2093,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
}
stmt->bind= stmt->params + stmt->param_count;
stmt->state= MYSQL_STMT_PREPARE_DONE;
- DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count));
+ DBUG_PRINT("info", ("Parameter count: %u", stmt->param_count));
DBUG_RETURN(0);
}
@@ -2437,10 +2436,10 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
{
NET *net= &stmt->mysql->net;
DBUG_ENTER("store_param");
- DBUG_PRINT("enter",("type: %d, buffer:%lx, length: %lu is_null: %d",
+ DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d",
param->buffer_type,
- param->buffer ? param->buffer : "0", *param->length,
- *param->is_null));
+ (long) (param->buffer ? param->buffer : NullS),
+ *param->length, *param->is_null));
if (*param->is_null)
store_param_null(net, param);
@@ -3323,8 +3322,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
MYSQL_BIND *param;
DBUG_ENTER("mysql_stmt_send_long_data");
DBUG_ASSERT(stmt != 0);
- DBUG_PRINT("enter",("param no : %d, data : %lx, length : %ld",
- param_number, data, length));
+ DBUG_PRINT("enter",("param no: %d data: 0x%lx, length : %ld",
+ param_number, (long) data, length));
/*
We only need to check for stmt->param_count, if it's not null
@@ -4407,7 +4406,7 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
ulong bind_count= stmt->field_count;
uint param_count= 0;
DBUG_ENTER("mysql_stmt_bind_result");
- DBUG_PRINT("enter",("field_count: %d", bind_count));
+ DBUG_PRINT("enter",("field_count: %lu", bind_count));
if (!bind_count)
{