diff options
author | unknown <bell@sanja.is.com.ua> | 2004-03-16 07:40:11 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-03-16 07:40:11 +0200 |
commit | c7fd1fa4968b9649567895af2b5ebf11ca2f5e6c (patch) | |
tree | ed85d427ded2a3c957cb64be83314ba53f015811 /sql/item.cc | |
parent | 7b13e02039f5a38dced00ca9590512e132226c40 (diff) | |
parent | 17f8d3d725f4b465a8a0dc8e96b04cd973c47fd5 (diff) | |
download | mariadb-git-c7fd1fa4968b9649567895af2b5ebf11ca2f5e6c.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-fix_fields-4.1
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc index fb8fbbd8556..45cd85d1775 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -517,7 +517,33 @@ String *Item_null::val_str(String *str) { null_value=1; return 0;} -/* Item_param related */ +/*********************** Item_param related ******************************/ + +/* + Default function of Item_param::set_param_func, so in case + of malformed packet the server won't SIGSEGV +*/ + +static void +default_set_param_func(Item_param *param, + uchar **pos __attribute__((unused)), + ulong len __attribute__((unused))) +{ + param->set_null(); +} + +Item_param::Item_param(unsigned position) : + value_is_set(FALSE), + item_result_type(STRING_RESULT), + item_type(STRING_ITEM), + item_is_time(FALSE), + long_data_supplied(FALSE), + pos_in_query(position), + set_param_func(default_set_param_func) +{ + name= (char*) "?"; +} + void Item_param::set_null() { DBUG_ENTER("Item_param::set_null"); |