diff options
Diffstat (limited to 'libmysqld/libmysql.c')
-rw-r--r-- | libmysqld/libmysql.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c index 970076393d0..8c80e1a3f54 100644 --- a/libmysqld/libmysql.c +++ b/libmysqld/libmysql.c @@ -1535,8 +1535,9 @@ mysql_stmt_init(MYSQL *mysql) DBUG_RETURN(NULL); } - init_alloc_root(&stmt->mem_root, 2048,2048, MYF(MY_THREAD_SPECIFIC)); - init_alloc_root(&stmt->result.alloc, 4096, 4096, MYF(MY_THREAD_SPECIFIC)); + init_alloc_root(&stmt->mem_root, "stmt", 2048,2048, MYF(MY_THREAD_SPECIFIC)); + init_alloc_root(&stmt->result.alloc, "result", 4096, 4096, + MYF(MY_THREAD_SPECIFIC)); stmt->result.alloc.min_malloc= sizeof(MYSQL_ROWS); mysql->stmts= list_add(mysql->stmts, &stmt->list); stmt->list.data= stmt; @@ -1547,7 +1548,7 @@ mysql_stmt_init(MYSQL *mysql) strmov(stmt->sqlstate, not_error_sqlstate); /* The rest of statement members was bzeroed inside malloc */ - init_alloc_root(&stmt->extension->fields_mem_root, 2048, 0, + init_alloc_root(&stmt->extension->fields_mem_root, "extension", 2048, 0, MYF(MY_THREAD_SPECIFIC)); DBUG_RETURN(stmt); @@ -3152,8 +3153,7 @@ static void read_binary_date(MYSQL_TIME *tm, uchar **pos) length data length */ -static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, - uint length) +static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t length) { char *buffer= (char *)param->buffer; int err= 0; @@ -3265,7 +3265,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, param->length will always contain length of entire column; number of copied bytes may be way different: */ - *param->length= length; + *param->length= (ulong)length; break; } } @@ -4377,7 +4377,7 @@ static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) MYSQL_FIELD *field; uchar *null_ptr, bit; uchar *row= (uchar*) data->data; -#ifndef DBUG_OFF +#ifdef DBUG_ASSERT_EXISTS uchar *row_end= row + data->length; #endif |