1# Copyright(C) 2017 Naoya Murakami <naoya@createfield.com>
2# Copyright(C) 2017 Kouhei Sutou <kou@clear-code.com>
3#
4# This library is free software; you can redistribute it and/or
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
8#
9# This library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12# Lesser General Public License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public
15# License along with this library; if not, write to the Free Software
16# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1335  USA
17
18--source include/not_embedded.inc
19--source ../../include/mroonga/have_mroonga.inc
20--source ../../include/mroonga/load_mroonga_functions.inc
21
22--disable_warnings
23DROP TABLE IF EXISTS diaries;
24--enable_warnings
25
26CREATE TABLE diaries (
27  title TEXT
28) DEFAULT CHARSET=utf8;
29
30SELECT mroonga_command('truncate mroonga_operations');
31INSERT INTO diaries VALUES("Unlogged: Research for Mroonga");
32SELECT mroonga_command('load --table mroonga_operations --values "[{}]"');
33SELECT mroonga_command('select mroonga_operations --output_columns _id');
34
35SET GLOBAL mroonga_enable_operations_recording = false;
36FLUSH TABLES;
37
38SELECT mroonga_command('truncate mroonga_operations');
39INSERT INTO diaries VALUES("Logged: Research for Mroonga");
40SELECT mroonga_command('load --table mroonga_operations --values "[{}]"');
41SELECT mroonga_command('select mroonga_operations --output_columns _id');
42
43DROP TABLE diaries;
44SELECT mroonga_command('truncate mroonga_operations');
45
46SET GLOBAL mroonga_enable_operations_recording = default;
47FLUSH TABLES;
48
49--source ../../include/mroonga/unload_mroonga_functions.inc
50--source ../../include/mroonga/have_mroonga_deinit.inc
51