[
  {
    "name": "TestExpBackoffEstimation",
    "cases": [
      "explain select * from exp_backoff where a = 1",
      "explain select * from exp_backoff where b = 1",
      "explain select * from exp_backoff where c = 1",
      "explain select * from exp_backoff where d >= 3 and d <= 5",
      "explain select * from exp_backoff where a = 1 and b = 1 and c = 1 and d >= 3 and d<= 5",
      "explain select * from exp_backoff where a = 1 and b = 1 and c = 1 and d >= 3 and d<= 5"
    ]
  },
  {
    "name": "TestNULLOnFullSampling",
    "cases": [
      "show stats_topn",
      "show stats_buckets"
    ]
  },
  {
    "name": "TestDefaultSelectivityForStrMatch",
    "cases": [
      "set @@tidb_default_string_match_selectivity = 0.8",
      "explain format = 'brief' select * from t where a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%'",
      "explain format = 'brief' select * from t where b not like '%test%'",
      "explain format = 'brief' select * from t where b regexp '.*test.*'",
      "explain format = 'brief' select * from t where b not regexp '.*test.*'",
      "explain format = 'brief' select * from t where b like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b not like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%' or a + 10 > 100",
      "set @@tidb_default_string_match_selectivity = 0.9",
      "explain format = 'brief' select * from t where a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%'",
      "explain format = 'brief' select * from t where b not like '%test%'",
      "explain format = 'brief' select * from t where b regexp '.*test.*'",
      "explain format = 'brief' select * from t where b not regexp '.*test.*'",
      "explain format = 'brief' select * from t where b like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b not like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%' or a + 10 > 100",
      "set @@tidb_default_string_match_selectivity = 0.1",
      "explain format = 'brief' select * from t where a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%'",
      "explain format = 'brief' select * from t where b like '%test%' is true",
      "explain format = 'brief' select * from t where b not like '%test%'",
      "explain format = 'brief' select * from t where b regexp '.*test.*'",
      "explain format = 'brief' select * from t where b rlike '.*test.*'",
      "explain format = 'brief' select * from t where b not rlike '.*test.*'",
      "explain format = 'brief' select * from t where b not regexp '.*test.*'",
      "explain format = 'brief' select * from t where b like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b not like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%' or a + 10 > 100",
      "set @@tidb_default_string_match_selectivity = 0",
      "explain format = 'brief' select * from t where a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%'",
      "explain format = 'brief' select * from t where b not like '%test%'",
      "explain format = 'brief' select * from t where b regexp '.*test.*'",
      "explain format = 'brief' select * from t where b not regexp '.*test.*'",
      "explain format = 'brief' select * from t where b like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b not like '%test%' and a + 10 > 100",
      "explain format = 'brief' select * from t where b like '%test%' or a + 10 > 100"
    ]
  },
  {
    "name": "TestTopNAssistedEstimationWithNewCollation",
    "cases": [
      "explain format = 'brief' select * from t where a like '%111%'",
      "explain format = 'brief' select * from t where a not like '%111%'",
      "explain format = 'brief' select * from t where a regexp '.*111.*'",
      "explain format = 'brief' select * from t where a not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(a, '1111') like '%111%'",
      "explain format = 'brief' select * from t where f like '%111%'",
      "explain format = 'brief' select * from t where f not like '%111%'",
      "explain format = 'brief' select * from t where f regexp '.*111.*'",
      "explain format = 'brief' select * from t where f not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(f, '1111') like '%111%'",
      "explain format = 'brief' select * from t where a like '%111%' and f rlike '.*111.*'",
      "explain format = 'brief' select * from t where a like '%111%' or f like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%'",
      "explain format = 'brief' select * from t where b not like '%111%'",
      "explain format = 'brief' select * from t where b regexp '.*111.*'",
      "explain format = 'brief' select * from t where b not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(b, '1111') like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%' and f like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%' or f like '%111%'",
      "explain format = 'brief' select * from t where c like '%111%'",
      "explain format = 'brief' select * from t where c not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(c, '1111') like '%111%'",
      "explain format = 'brief' select * from t where d like '%111%'",
      "explain format = 'brief' select * from t where d not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(c, '1111') like '%111%'",
      "explain format = 'brief' select * from t where e like '%111%'",
      "explain format = 'brief' select * from t where e not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(e, '1111') like '%111%'"
    ]
  },
  {
    "name": "TestTopNAssistedEstimationWithoutNewCollation",
    "cases": [
      "explain format = 'brief' select * from t where a like '%111%'",
      "explain format = 'brief' select * from t where a not like '%111%'",
      "explain format = 'brief' select * from t where a regexp '.*111.*'",
      "explain format = 'brief' select * from t where a not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(a, '1111') like '%111%'",
      "explain format = 'brief' select * from t where f like '%111%'",
      "explain format = 'brief' select * from t where f not like '%111%'",
      "explain format = 'brief' select * from t where f regexp '.*111.*'",
      "explain format = 'brief' select * from t where f not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(f, '1111') like '%111%'",
      "explain format = 'brief' select * from t where a like '%111%' and f rlike '.*111.*'",
      "explain format = 'brief' select * from t where a like '%111%' or f like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%'",
      "explain format = 'brief' select * from t where b not like '%111%'",
      "explain format = 'brief' select * from t where b regexp '.*111.*'",
      "explain format = 'brief' select * from t where b not regexp '.*111.*'",
      "explain format = 'brief' select * from t where ifnull(b, '1111') like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%' and f like '%111%'",
      "explain format = 'brief' select * from t where b like '%111%' or f like '%111%'",
      "explain format = 'brief' select * from t where c like '%111%'",
      "explain format = 'brief' select * from t where c not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(c, '1111') like '%111%'",
      "explain format = 'brief' select * from t where d like '%111%'",
      "explain format = 'brief' select * from t where d not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(c, '1111') like '%111%'",
      "explain format = 'brief' select * from t where e like '%111%'",
      "explain format = 'brief' select * from t where e not like '%111%'",
      "explain format = 'brief' select * from t where ifnull(e, '1111') like '%111%'"
    ]
  }
]
