diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-03-17 22:38:34 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-03-17 22:38:34 +0100 |
commit | 1a963822c80ada2ea82a8a07c09870070fb6a820 (patch) | |
tree | 1914659dc134031e8416702fc9ae6f83f2811e48 /sql/item.h | |
parent | 684405e74126c81545f62338322d40b8f2975ca4 (diff) | |
download | mariadb-git-1a963822c80ada2ea82a8a07c09870070fb6a820.tar.gz |
lp:737104 Crash in DTCollation::set in 5.1-micro
and a different fix for lp:736370
cache temporal expression in Item_cache_int, not in Item_string.
invoke get_datetime_value() to create a correct Item_cache_int.
Implement Item_cache_int::clone, as it's a proper constant
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index af0f3d1c024..d45df4ebe53 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3035,6 +3035,12 @@ public: my_decimal *val_decimal(my_decimal *); enum Item_result result_type() const { return INT_RESULT; } bool cache_value(); + Item *clone_item() + { + Item_cache_int *item= new Item_cache_int(cached_field_type); + item->store(this, value); + return item; + } }; |