--let $TEST_ENGINE_TYPE= $CHILD2_1_ENGINE_TYPE
--source ../include/init_engine.inc
--let $INIT_CHILD2_1_ENGINE= $INIT_TEST_ENGINE
let $CHILD2_1_DROP_TABLES=
  DROP TABLE IF EXISTS ta_r;
let $CHILD2_1_CREATE_TABLES=
  CREATE TABLE ta_r (
    a INT DEFAULT 10,
    b CHAR(1) DEFAULT 'c',
    c DATETIME DEFAULT '1999-10-10 10:10:10',
    PRIMARY KEY(a),
    KEY idx1(b)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES=
  SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r ORDER BY a;
let $CHILD2_1_DROP_TABLES2=
  DROP TABLE IF EXISTS ta_r2;
let $CHILD2_1_CREATE_TABLES2=
  CREATE TABLE ta_r2 (
    a INT DEFAULT 10,
    b CHAR(1) DEFAULT 'c',
    c DATETIME DEFAULT '1999-10-10 10:10:10',
    PRIMARY KEY(a)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES2=
  SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r2 ORDER BY a;
let $CHILD2_1_DROP_TABLES3=
  DROP TABLE IF EXISTS ta_r_no_idx;
let $CHILD2_1_CREATE_TABLES3=
  CREATE TABLE ta_r_no_idx (
    a INT DEFAULT 10,
    b CHAR(1) DEFAULT 'c',
    c DATETIME DEFAULT '1999-10-10 10:10:10'
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES3=
  SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_no_idx ORDER BY a;
let $CHILD2_1_DROP_TABLES4=
  DROP TABLE IF EXISTS ta_r_auto_inc;
let $CHILD2_1_CREATE_TABLES4=
  CREATE TABLE ta_r_auto_inc (
    a INT AUTO_INCREMENT,
    b CHAR(1) DEFAULT 'c',
    c DATETIME DEFAULT '1999-10-10 10:10:10',
    PRIMARY KEY(a)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES4=
  SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_auto_inc
  ORDER BY a;
let $CHILD2_1_DROP_TABLES5=
  DROP TABLE IF EXISTS ta_r_int;
let $CHILD2_1_CREATE_TABLES5=
  CREATE TABLE ta_r_int (
    a INT AUTO_INCREMENT,
    b INT DEFAULT 10,
    c INT DEFAULT 11,
    PRIMARY KEY(a),
    KEY idx1(b),
    KEY idx2(c)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES5=
  SELECT a, b, c FROM ta_r_int ORDER BY a;
let $CHILD2_1_DROP_TABLES6=
  DROP TABLE IF EXISTS ta_r_3;
let $CHILD2_1_CREATE_TABLES6=
  CREATE TABLE ta_r_3 (
    a INT DEFAULT 10,
    b CHAR(1) DEFAULT 'c',
    c DATETIME DEFAULT '1999-10-10 10:10:10'
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES6=
  SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_r_3 ORDER BY a;
let $CHILD2_1_DROP_TABLES7=
  DROP TABLE IF EXISTS ta_ob;
let $CHILD2_1_CREATE_TABLES7=
  CREATE TABLE ta_ob (
    a VARCHAR(50) NOT NULL,
    b VARCHAR(50) NULL DEFAULT NULL,
    c VARCHAR(100) NULL DEFAULT NULL,
    d DATETIME(0) NULL DEFAULT NULL,
    e INT(11) NOT NULL,
    f INT(10) NULL DEFAULT NULL,
    PRIMARY KEY (a, e)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TABLES7=
  SELECT * FROM ta_ob WHERE c LIKE "%510411106%" AND e = 510411 AND f != 1 ORDER BY d,c LIMIT 6 OFFSET 0;
let $CHILD2_1_DROP_FT_TABLES=
  DROP TABLE IF EXISTS ft_r;
let $CHILD2_1_CREATE_FT_TABLES=
  CREATE TABLE ft_r (
    a INT DEFAULT 0,
    b TEXT,
    c TEXT,
    d TEXT,
    PRIMARY KEY(a),
    FULLTEXT INDEX ft_idx1(b),
    FULLTEXT INDEX ft_idx2(c)
  ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
let $CHILD2_1_SELECT_FT_TABLES=
  SELECT a, b, c, d FROM ft_r ORDER BY a;
let $CHILD2_1_DROP_FT_TABLES2=
  DROP TABLE IF EXISTS ft_r2;
let $CHILD2_1_CREATE_FT_TABLES2=
  CREATE TABLE ft_r2 (
    a INT DEFAULT 0,
    b TEXT,
    c TEXT,
    d TEXT,
    PRIMARY KEY(a),
    FULLTEXT INDEX ft_idx1(b),
    FULLTEXT INDEX ft_idx2(c)
  ) $CHILD2_1_FT_ENGINE $CHILD2_1_FT_CHARSET;
let $CHILD2_1_SELECT_FT_TABLES2=
  SELECT a, b, c, d FROM ft_r2 ORDER BY a;
let $CHILD2_1_DROP_GM_TABLES=
  DROP TABLE IF EXISTS gm_r;
let $CHILD2_1_CREATE_GM_TABLES=
  CREATE TABLE gm_r (
    a INT DEFAULT 0,
    b GEOMETRY NOT NULL,
    c GEOMETRY NOT NULL,
    PRIMARY KEY(a),
    SPATIAL INDEX sp_idx1(b),
    SPATIAL INDEX sp_idx2(c)
  ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
let $CHILD2_1_SELECT_GM_TABLES=
  SELECT a, b, c FROM gm_r ORDER BY a;
let $CHILD2_1_DROP_GM_TABLES2=
  DROP TABLE IF EXISTS gm_r2;
let $CHILD2_1_CREATE_GM_TABLES2=
  CREATE TABLE gm_r2 (
    a INT DEFAULT 0,
    b GEOMETRY NOT NULL,
    c GEOMETRY NOT NULL,
    PRIMARY KEY(a),
    SPATIAL INDEX sp_idx1(b),
    SPATIAL INDEX sp_idx2(c)
  ) $CHILD2_1_GM_ENGINE $CHILD2_1_GM_CHARSET;
let $CHILD2_1_SELECT_GM_TABLES2=
  SELECT a, b, c FROM gm_r2 ORDER BY a;
let $CHILD2_1_DROP_LOCK_TABLES1=
  DROP TABLE IF EXISTS t1_1;
let $CHILD2_1_CREATE_LOCK_TABLES1=
  CREATE TABLE t1_1 (
    id int(11) NOT NULL,
    PRIMARY KEY (id)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_DROP_LOCK_TABLES2=
  DROP TABLE IF EXISTS t2_2;
let $CHILD2_1_CREATE_LOCK_TABLES2=
  CREATE TABLE t2_2 (
    id int(11) NOT NULL,
    PRIMARY KEY (id)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_DROP_INCREMENT_TABLES1=
  DROP TABLE IF EXISTS t1_1;
let $CHILD2_1_CREATE_INCREMENT_TABLES1=
  CREATE TABLE t1_1 (
    id int(11) NOT NULL AUTO_INCREMENT,
    PRIMARY KEY (id)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_INCREMENT_TABLES1=
  SELECT id FROM t1_1 ORDER BY id;
let $CHILD2_1_DROP_TEXT_PK_TABLES1=
  DROP TABLE IF EXISTS t1;
let $CHILD2_1_CREATE_TEXT_PK_TABLES1=
  CREATE TABLE t1 (
    a VARCHAR(255),
    PRIMARY KEY (a)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET2;
let $CHILD2_1_SELECT_TEXT_PK_TABLES1=
  SELECT a FROM t1 ORDER BY a;
let $CHILD2_1_DROP_TEXT_KEY_TABLES1=
  DROP TABLE IF EXISTS t1;
let $CHILD2_1_CREATE_TEXT_KEY_TABLES1=
  CREATE TABLE t1 (
    a VARCHAR(255),
    b VARCHAR(255),
    c VARCHAR(255),
    KEY idx1(a,b),
    KEY idx2(b),
    PRIMARY KEY(c)
  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
let $CHILD2_1_SELECT_TEXT_KEY_TABLES1=
  SELECT a, b FROM t1 ORDER BY a, b;
let $CHILD2_1_AUTO_INCREMENT_INCREMENT1=
  SET GLOBAL AUTO_INCREMENT_INCREMENT = 1;
let $CHILD2_1_AUTO_INCREMENT_INCREMENT2=
  SET GLOBAL AUTO_INCREMENT_INCREMENT = 4;
let $CHILD2_1_AUTO_INCREMENT_OFFSET1=
  SET GLOBAL AUTO_INCREMENT_OFFSET = 1;
let $CHILD2_1_AUTO_INCREMENT_OFFSET2=
  SET GLOBAL AUTO_INCREMENT_OFFSET = 2;
