Skip to content

Commit

Permalink
Set remote requst's DagRequest flags field (pingcap#8606)
Browse files Browse the repository at this point in the history
  • Loading branch information
yibin87 authored and ti-chi-bot committed Dec 27, 2023
1 parent d158474 commit dd74c1a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbms/src/Flash/Coprocessor/RemoteRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ RemoteRequest RemoteRequest::build(
/// do not collect execution summaries because in this case because the execution summaries
/// will be collected by CoprocessorBlockInputStream
dag_req.set_collect_execution_summaries(false);
dag_req.set_flags(dag_context.getFlags());
dag_req.set_sql_mode(dag_context.getSQLMode());
const auto & original_dag_req = *dag_context.dag_request;
if (original_dag_req.has_time_zone_name() && !original_dag_req.time_zone_name().empty())
dag_req.set_time_zone_name(original_dag_req.time_zone_name());
Expand Down
45 changes: 45 additions & 0 deletions tests/fullstack-test/issues/issue_8607.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2023 PingCAP, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Preparation.
=> DBGInvoke __init_fail_point()

mysql> drop table if exists test.t
mysql> create table test.t (a int);

mysql> insert into test.t values (123456789);

mysql> alter table test.t set tiflash replica 1;
func> wait_table test t

mysql> set tidb_isolation_read_engines='tiflash'; set tidb_enforce_mpp=1; select * from test.t where cast(a as char(5)) = '12345';
+-----------+
| a |
+-----------+
| 123456789 |
+-----------+

=> DBGInvoke __enable_fail_point(force_remote_read_for_batch_cop)

mysql> set tidb_isolation_read_engines='tiflash'; set tidb_enforce_mpp=1; select * from test.t where cast(a as char(5)) = '12345';
+-----------+
| a |
+-----------+
| 123456789 |
+-----------+

=> DBGInvoke __disable_fail_point(force_remote_read_for_batch_cop)

# Clean up.
mysql> drop table if exists test.t;

0 comments on commit dd74c1a

Please sign in to comment.