# 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.

=> DBGInvoke __enable_schema_sync_service('true')

=> DBGInvoke __drop_tidb_table(default, test)
=> drop table if exists default.test



# Data.
=> DBGInvoke __mock_tidb_table(default, test, 'id Int64, c1 String')
=> DBGInvoke __refresh_mapped_table_schema(default, test)
=> DBGInvoke __put_region(4, 0, 100, default, test)
=> DBGInvoke __raft_insert_row(default, test, 4, 50, 0, 'y\0\0\0\0\0\0')

=> DBGInvoke dag('select count(1) from default.test where c1 = \'y\'', 4)
┌─count(1)─┐
│        0 │
└──────────┘
=> DBGInvoke dag('select count(1) from default.test where c1 != \'y\'', 4)
┌─count(1)─┐
│        1 │
└──────────┘
=> DBGInvoke dag('select count(1) from default.test where c1 > \'y\'', 4)
┌─count(1)─┐
│        1 │
└──────────┘
=> DBGInvoke dag('select count(1) from default.test where c1 >= \'y\'', 4)
┌─count(1)─┐
│        1 │
└──────────┘
=> DBGInvoke dag('select count(1) from default.test where c1 < \'y\'', 4)
┌─count(1)─┐
│        0 │
└──────────┘
=> DBGInvoke dag('select count(1) from default.test where c1 <= \'y\'', 4)
┌─count(1)─┐
│        0 │
└──────────┘
# Clean up.
=> DBGInvoke __drop_tidb_table(default, test)
=> drop table if exists default.test
