1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Correct handling of parameter variables with NULL values in PREPARE queries

This commit is contained in:
unknown
2004-04-07 12:58:28 +04:00
parent fbfdff7fb0
commit 4ceaf3a629
3 changed files with 17 additions and 2 deletions

View File

@ -661,7 +661,8 @@ static bool insert_params_from_vars(Prepared_statement *stmt,
varname= var_it++;
if ((entry= (user_var_entry*)hash_search(&stmt->thd->user_vars,
(byte*) varname->str,
varname->length)))
varname->length))
&& entry->value)
{
param->item_result_type= entry->type;
switch (entry->type)
@ -710,7 +711,8 @@ static bool insert_params_from_vars_with_log(Prepared_statement *stmt,
varname= var_it++;
if ((entry= (user_var_entry*)hash_search(&stmt->thd->user_vars,
(byte*) varname->str,
varname->length)))
varname->length))
&& entry->value)
{
param->item_result_type= entry->type;
switch (entry->type)