1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Bug#11338 Fixes from review (identical functionality).

include/my_sys.h:
  Fixes from review (use version in log_event.cc instead)
mysql-test/r/ctype_cp932.result:
  Updated test for bug#11338 (logging of prepared statement w/ blob type)
mysql-test/t/ctype_cp932.test:
  udpated test for bug#11338 (logging of prepared statement w/ blob type)
mysys/charset.c:
  Fixes from review (use version in log_event.cc instead)
sql/item.cc:
  Fixes from review (store character_set_client differently so that
  fix can be merged forward to 5.0)
sql/item.h:
  Fixes from review
sql/log_event.cc:
  Fixes from review, str_to_hex is now used by item.cc
sql/log_event.h:
  Added prototype for str_to_hex (now used by item.cc)
sql/sql_prepare.cc:
  Fixes from review, store character_set_client differently so that 
  Item_param::query_val_str can use it.
This commit is contained in:
unknown
2005-08-19 14:49:34 -04:00
parent 496e86da3a
commit 1b970e94e0
9 changed files with 51 additions and 33 deletions

View File

@@ -528,7 +528,9 @@ static void setup_one_conversion_function(THD *thd, Item_param *param,
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_BLOB:
param->set_param_func= set_param_str;
param->value.cs_info.character_set_client= &my_charset_bin;
param->value.cs_info.character_set_of_placeholder= &my_charset_bin;
param->value.cs_info.character_set_client=
thd->variables.character_set_client;
param->value.cs_info.final_character_set_of_str_value= &my_charset_bin;
param->item_type= Item::STRING_ITEM;
param->item_result_type= STRING_RESULT;
@@ -544,6 +546,7 @@ static void setup_one_conversion_function(THD *thd, Item_param *param,
CHARSET_INFO *tocs= thd->variables.collation_connection;
uint32 dummy_offset;
param->value.cs_info.character_set_of_placeholder= fromcs;
param->value.cs_info.character_set_client= fromcs;
/*
@@ -601,7 +604,7 @@ static bool insert_params_withlog(Prepared_statement *stmt, uchar *null_array,
param->set_param_func(param, &read_pos, data_end - read_pos);
}
}
res= param->query_val_str(&str, thd);
res= param->query_val_str(&str);
if (param->convert_str_value(thd))
DBUG_RETURN(1); /* out of memory */
@@ -749,7 +752,7 @@ static bool emb_insert_params_withlog(Prepared_statement *stmt, String *query)
client_param->buffer_length);
}
}
res= param->query_val_str(&str, thd);
res= param->query_val_str(&str);
if (param->convert_str_value(thd))
DBUG_RETURN(1); /* out of memory */