summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-10-01 16:44:57 +0500
committerunknown <hf@deer.(none)>2003-10-01 16:44:57 +0500
commite50b19a04756a7aa6965d7797a21a04efd534b14 (patch)
tree801af6a8599b4055c8948a7f7c06275ba1d543f2 /libmysqld
parent6fbd3da597615c94b2aab7b02fd9e1b8f9092c1b (diff)
downloadmariadb-git-e50b19a04756a7aa6965d7797a21a04efd534b14.tar.gz
Fix for #1430
there was an error about sendind prepared parameters to the server libmysqld/lib_sql.cc: parameter's length added as a parameter sql/ha_berkeley.cc: these lines sometimes crashes in embedded library so i #ifdef-ed it sql/item.h: add the data_len parameter in the embedded case sql/sql_prepare.cc: i added macroses to make headers of store_param_xxx functions they have different number of parameters in standalone an embedded servers also get_param_length now is implemented differently in embedded server
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 9b0b32b628e..ddfd05d64b6 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -755,7 +755,10 @@ bool setup_params_data(st_prep_stmt *stmt)
{
uchar *buff= (uchar*)client_param->buffer;
param->maybe_null= param->null_value= 0;
- param->setup_param_func(param,&buff);
+ param->setup_param_func(param,&buff,
+ client_param->length ?
+ *client_param->length :
+ client_param->buffer_length);
}
}
param_no++;
@@ -796,7 +799,10 @@ bool setup_params_data_withlog(st_prep_stmt *stmt)
{
uchar *buff= (uchar*)client_param->buffer;
param->maybe_null= param->null_value= 0;
- param->setup_param_func(param,&buff);
+ param->setup_param_func(param,&buff,
+ client_param->length ?
+ *client_param->length :
+ client_param->buffer_length);
res= param->query_val_str(&str);
}
}