[MDEV-19003] ignore send <cache> to remote Created: 2019-03-21  Updated: 2020-12-08  Resolved: 2020-07-20

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4
Fix Version/s: 10.4.5

Type: Bug Priority: Major
Reporter: willhan Assignee: Kentoku Shiba (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-18992 Crash when using “insert into on dupl... Closed

 Description   

ignore send <cache> to remote
may cause gammatical errors



 Comments   
Comment by Kentoku Shiba (Inactive) [ 2019-04-08 ]

willhan
Please add the test case. It is not easy to reproduce.

Comment by willhan [ 2019-04-09 ]

test case:
select c1 from will.spider_t1 where c2 > SUBDATE('2012-12-31 23:59:59', 31);

SUBDATE('2012-12-31 23:59:59', 31) is a Item_cache

Comment by Kentoku Shiba (Inactive) [ 2019-04-11 ]

I added a regression test. It certainly used Item_cache but there was no problem. Please see the test result of the following commit.
ef7de3e

Comment by willhan [ 2019-04-25 ]

case:
select uin from PlayerInfo where level < 16 and date(now()) -
date(logout_time) > 14;
spider would dispatch the result of now() to remote, and it would be wrong. '2019-04-30' - date(logout_time) would get wrong.

As a result, we add next code in Item_cache::print

// QT_TO_SPECIFIED_CHARSET used for us to process charset problem
f (value_cached && !(query_type & (QT_TO_SPECIFIED_CHARSET|QT_ORDINARY)))

{/* from spider, query type is (QT_TO_SPECIFIED_CHARSET|QT_ORDINARY) */ print_value(str); return; }

as a result, we will run _str->append(STRING_WITH_LEN("<cache>(")); in our environment
_

Comment by Kentoku Shiba (Inactive) [ 2019-04-27 ]

willhan
Charset issue is fixed at MDEV-18992. Please check this again after merging MDEV-18992's changes.

Comment by willhan [ 2019-05-07 ]

kentoku
ok, I will check it

Generated at Thu Feb 08 08:48:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.