summaryrefslogtreecommitdiffstats
path: root/storage/mroonga/mysql-test/mroonga/wrapper/t/alter_table_disable_keys_updating.test
blob: de1af71ddd7bc9de267e578b5beee6043634d56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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-1335  USA

--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=utf8;
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