"Fossies" - the Fresh Open Source Software Archive 
Member "mroonga-12.04/mysql-test/mroonga/wrapper/alter_table/t/add_column.test" (6 Jun 2022, 1645 Bytes) of package /linux/misc/mroonga-12.04.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the last
Fossies "Diffs" side-by-side code changes report for "add_column.test":
12.00_vs_12.02.
1 # Copyright(C) 2011 Kouhei Sutou <kou@clear-code.com>
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
17 --source ../../../include/mroonga/skip_mysql_8_0_or_later.inc
18 --source ../../../include/mroonga/have_innodb.inc
19 --source ../../../include/mroonga/not_embedded.inc
20 --source ../../../include/mroonga/have_mroonga.inc
21
22 --disable_warnings
23 DROP TABLE IF EXISTS diaries;
24 --enable_warnings
25
26 CREATE TABLE diaries (
27 id INT PRIMARY KEY AUTO_INCREMENT,
28 title TEXT
29 ) DEFAULT CHARSET UTF8MB4 COMMENT = 'ENGINE "InnoDB"';
30
31 INSERT INTO diaries (title) VALUES ("survey");
32 SELECT * FROM diaries;
33
34 ALTER TABLE diaries ADD COLUMN body TEXT;
35 UPDATE diaries SET body = "will start groonga!";
36 SELECT * FROM diaries;
37
38 INSERT INTO diaries (title, body) values ("groonga (1)", "starting groonga...");
39 INSERT INTO diaries (title, body) values ("groonga (2)", "started groonga.");
40 SELECT * FROM diaries;
41
42 DROP TABLE diaries;
43
44 --source ../../../include/mroonga/have_mroonga_deinit.inc