diff options
author | ramil/ram@ramil.myoffice.izhnet.ru <> | 2007-05-23 13:47:34 +0500 |
---|---|---|
committer | ramil/ram@ramil.myoffice.izhnet.ru <> | 2007-05-23 13:47:34 +0500 |
commit | 3d940b14782464a98275001ecf2be6e651dbd41b (patch) | |
tree | 8dac30d487e4506f6bf316478df8c7807c13b7a1 /sql/item.cc | |
parent | 7ed9851230071215b6b9ff08d71dcbf2101cf975 (diff) | |
parent | 11a2fd422b5e605f16335431254ee550b9f03363 (diff) | |
download | mariadb-git-3d940b14782464a98275001ecf2be6e651dbd41b.tar.gz |
Merge mysql.com:/home/ram/work/b28509/b28509.5.0
into mysql.com:/home/ram/work/b28509/b28509.5.1
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/item.cc b/sql/item.cc index 24958f64f2a..8f59e8a3e04 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2542,16 +2542,14 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry) if (entry && entry->value) { item_result_type= entry->type; - switch (entry->type) { + switch (item_result_type) { case REAL_RESULT: set_double(*(double*)entry->value); item_type= Item::REAL_ITEM; - item_result_type= REAL_RESULT; break; case INT_RESULT: set_int(*(longlong*)entry->value, MY_INT64_NUM_DECIMAL_DIGITS); item_type= Item::INT_ITEM; - item_result_type= INT_RESULT; break; case STRING_RESULT: { @@ -2574,7 +2572,6 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry) charset of connection, so we have to set it later. */ item_type= Item::STRING_ITEM; - item_result_type= STRING_RESULT; if (set_str((const char *)entry->value, entry->length)) DBUG_RETURN(1); @@ -2588,6 +2585,7 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry) decimals= ent_value->frac; max_length= my_decimal_precision_to_length(ent_value->precision(), decimals, unsigned_flag); + item_type= Item::DECIMAL_ITEM; break; } default: |