# Copyright(C) 2013 Kentoku SHIBA
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

--source ../../../../include/mroonga/have_mariadb.inc
--source ../../../../include/mroonga/have_mroonga.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

CREATE TABLE t1 (
  c1 int NOT NULL,
  c2 text NOT NULL,
  c3 int NOT NULL,
  c4 int NOT NULL,
  PRIMARY KEY(c1),
  KEY idx1(c3,c4),
  FULLTEXT KEY ft1(c2)
) COMMENT='ENGINE "MyISAM"' DEFAULT CHARSET=utf8mb4;
INSERT INTO t1 VALUES(1, 'test1', 1, 1);
INSERT INTO t1 VALUES(2, 'test2', 2, 2);
INSERT INTO t1 VALUES(3, 'test3', 1, 3);
ALTER TABLE t1 DISABLE KEYS;
DELETE FROM t1 WHERE c1 = 2;
UPDATE t1 SET c4 = 4 WHERE c1 = 1;
INSERT INTO t1 VALUES(4, 'test4', 2, 4);
TRUNCATE t1;
DROP TABLE t1;

--source ../../../../include/mroonga/have_mroonga_deinit.inc
