|
| 1 | +# Copyright 2025 PingCAP, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +# Preparation. |
| 16 | +=> DBGInvoke __init_fail_point() |
| 17 | + |
| 18 | +mysql> drop table if exists test.test_vir; |
| 19 | +mysql> create table test.test_vir (id int not null, str varchar(100), str_vir varchar(100) as (lower(str)) VIRTUAL); |
| 20 | +mysql> insert into test.test_vir (id, str) values(1, 'ABC'), (2, 'Def'), (3, 'xXXX'); |
| 21 | +mysql> alter table test.test_vir set tiflash replica 1; |
| 22 | +mysql> set @@cte_max_recursion_depth = 10000000; insert into test.test_vir (id, str) with recursive cte1 as (select 1 c1, 'a' c2 union select c1+1 c1, substr(concat(c2, 'B'), 10) c2 from cte1 limit 10000) select * from cte1; |
| 23 | + |
| 24 | +func> wait_table test test_vir |
| 25 | +mysql> split table test.test_vir by (100), (500), (1000); |
| 26 | +TOTAL_SPLIT_REGION SCATTER_FINISH_RATIO |
| 27 | +3 1 |
| 28 | + |
| 29 | +=> DBGInvoke __enable_fail_point(force_random_remote_read) |
| 30 | +mysql> set @@tidb_isolation_read_engines='tiflash'; set @@tidb_enforce_mpp=1; select * from test.test_vir order by 1, 2, 3 limit 5; |
| 31 | +id str str_vir |
| 32 | +1 ABC abc |
| 33 | +1 a a |
| 34 | +2 |
| 35 | +2 Def def |
| 36 | +3 |
| 37 | +=> DBGInvoke __disable_fail_point(force_random_remote_read) |
| 38 | + |
| 39 | +# Clean up. |
| 40 | +mysql> drop table if exists test.test_vir |
| 41 | + |
0 commit comments