Skip to content

Commit

Permalink
Set remote requst's DagRequest flags field (#8606) (#8611)
Browse files Browse the repository at this point in the history
close #8607
  • Loading branch information
ti-chi-bot authored Dec 28, 2023
1 parent 27ead78 commit b66f685
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 @@ -89,6 +89,8 @@ RemoteRequest RemoteRequest::build(
/// will be collected by CoprocessorBlockInputStream.
/// Otherwise rows in execution summary of table scan will be double.
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 b66f685

Please sign in to comment.