opts:
  seed: 0
tests:
- name: "primary key types"
  repos: &repos
#  - name: mysql # mysqld --port 3308 --local-infile=1
#    external-server:
#      name: test
#      host: 127.0.0.1
#      user: root
#      password:
#      port: 3308
  - name: dolt_cli
#  - name: dolt_server
  #    server:
#      port: 3308
#  args: [ "--port", "3308" ]

  tables:
  - name: "int"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "float"
    schema: |
      create table xy (
        x float primary key,
        y varchar(30)
      );
  - name: "varchar"
    schema: |
      create table xy (
        x varchar(20) primary key,
        y varchar(30)
      );
- name: "config width"
  repos: *repos
  tables:
  - name: "2 cols"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "4 cols"
    schema: |
      create table xy (
        x int primary key,
        y int,
        z int,
        w int
      );
  - name: "8 cols"
    schema: |
      create table xy (
        x int primary key,
        y int,
        z int,
        w int,
        a int,
        b int,
        c int,
        d int
      );
- name: "pk type"
  repos: *repos
  tables:
  - name: "int"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "float"
    schema: |
      create table xy (
        x float primary key,
        y varchar(30)
      );
  - name: "varchar"
    schema: |
      create table xy (
        x varchar(30) primary key,
        y varchar(30)
      );
- name: "schema types"
  repos: *repos
  tables:
  - name: "varchar"
    schema: |
      create table xy (
        x int,
        y varchar(30)
      );
#  - name: "geometry"
#    schema: |
#      create table xy (
#        x int primary key,
#        y geometry
#      );
  - name: "datetime"
    schema: |
      create table xy (
        x int primary key,
        y date
      );
- name: "secondary indexes"
  repos: *repos
  tables:
  - name: "no secondary"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30),
        z varchar(30),
        w varchar(30)
      );
  - name: "one index"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30),
        z varchar(30),
        w varchar(30),
        index x (x)
      );
  - name: "two index"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30),
        z varchar(30),
        w varchar(30),
        index x (x),
        index y (y)
      );
  - name: "four index"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30),
        z varchar(30),
        w varchar(30),
        index x (x),
        index y (y),
        index z (z),
        index w (w)
      );
- name: "blobs"
  repos: *repos
  tables:
  - name: "no blob"
    schema: |
      create table xy (
        x int primary key,
        y varchar(30),
        z varchar(30),
        w varchar(30)
      );
  - name: "1 blob"
    schema: |
      create table xy (
        x int primary key,
        y blob,
        z varchar(30),
        w varchar(30)
      );
  - name: "2 blobs"
    schema: |
      create table xy (
        x int primary key,
        y blob,
        z blob,
        w varchar(30)
      );
- name: "row count"
  repos: *repos
  tables:
  - name: "400k"
    rows: 400000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "800k"
    rows: 800000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "1.6mm"
    rows: 1600000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "3.2mm"
    rows: 3200000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
- name: "sorting"
  repos: *repos
  tables:
  - name: "shuffled"
    shuffle: true
    rows: 2000000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
  - name: "sorted"
    shuffle: false
    rows: 2000000
    schema: |
      create table xy (
        x int primary key,
        y varchar(30)
      );
