1+ // Licensed to the Apache Software Foundation (ASF) under one
2+ // or more contributor license agreements. See the NOTICE file
3+ // distributed with this work for additional information
4+ // regarding copyright ownership. The ASF licenses this file
5+ // to you under the Apache License, Version 2.0 (the
6+ // "License"); you may not use this file except in compliance
7+ // with the License. You may obtain a copy of the License at
8+ //
9+ // http://www.apache.org/licenses/LICENSE-2.0
10+ //
11+ // Unless required by applicable law or agreed to in writing,
12+ // software distributed under the License is distributed on an
13+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ // KIND, either express or implied. See the License for the
15+ // specific language governing permissions and limitations
16+ // under the License.
17+
18+ suite(' test_flexible_partial_update_downgrade' , ' p0,restart_fe' ) {
19+ String db = context. config. getDbNameByFile(context. file)
20+ for (def use_row_store : [false , true ]) {
21+ logger. info(" current params: use_row_store: ${ use_row_store} " )
22+ def tableName = " test_f_downgrade_${ use_row_store} "
23+ qt_sql " select k,v1,v2,v3,v4,v5 from ${ tableName} order by k;"
24+
25+ sql " set enable_unique_key_partial_update=true;"
26+ sql " set enable_insert_strict=false;"
27+ sql " sync;"
28+ sql " insert into ${ tableName} (k,v1,v3,v5) values(1,999,999,999),(2,888,888,888),(5,777,777,777),(20,555,555,555);"
29+ sql " set enable_unique_key_partial_update=false;"
30+ sql " set enable_insert_strict=true;"
31+ sql " sync;"
32+ qt_sql " select k,v1,v2,v3,v4,v5 from ${ tableName} order by k;"
33+
34+ sql " delete from ${ tableName} where k>=3 and k<=6;"
35+ qt_sql " select k,v1,v2,v3,v4,v5 from ${ tableName} order by k;"
36+
37+ sql " insert into ${ tableName} values(3,10,10,10,10,10),(30,11,11,11,11,11),(4,12,12,12,12,12);"
38+ qt_sql " select k,v1,v2,v3,v4,v5 from ${ tableName} order by k;"
39+ }
40+ }
0 commit comments