diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-10-04 15:12:36 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-10-30 09:26:38 +0400 |
commit | 84ed288f6807a4602e0af8615bfb17080df15160 (patch) | |
tree | a9f7ada4240e172bd0496a34224f81c08e2619cb /storage/xtradb/btr/btr0scrub.cc | |
parent | 667e4b97aa2fe6fbd5aabcf8510f2eaaa255b1eb (diff) | |
download | mariadb-git-84ed288f6807a4602e0af8615bfb17080df15160.tar.gz |
MDEV-13997 Change Item_bool_rowready_func2 to cache const items at fix time rather than evaluation time
Side effect: the second debug Note in cache_temporal_4265.result disappeared.
Before this change:
- During JOIN::cache_const_exprs(),
Item::get_cache() for Item_date_add_interval() was called.
The data type for date_add('2001-01-01',interval 5 day) is VARCHAR,
because the first argument is VARCHAR (not temporal).
Item_get_cache() created Item_cache_str('2001-01-06').
- During evaluate_join_record(), get_datetime_value() was called,
which called Item::get_date() for Item_cache_str('2001-01-06').
This gave the second Note. Then, get_datetime_value() created
a new cache, now Item_cache_temporal for '2001-01-06', so not
further str_to_datetime() happened.
After this change:
- During tem_bool_rowready_func2::fix_length_and_dec(),
Arg_comparator::set_cmp_func_datetime() is called,
which immediately creates an instance of Item_cache_date for
the result of date_add('2001-01-01',interval 5 day).
So later no str_to_datetime happens any more,
neither during JOIN::cache_const_exprs(),
nor during evaluate_join_record().
Diffstat (limited to 'storage/xtradb/btr/btr0scrub.cc')
0 files changed, 0 insertions, 0 deletions