Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add alter table change column with type
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
mysql-test/mroonga/storage/alter_table/change_column/r/with_type.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| DROP TABLE IF EXISTS tags; | ||
| DROP TABLE IF EXISTS bugs; | ||
| CREATE TABLE tags ( | ||
| id INT UNSIGNED PRIMARY KEY | ||
| ) DEFAULT CHARSET=utf8; | ||
| CREATE TABLE bugs ( | ||
| id INT UNSIGNED PRIMARY KEY | ||
| ) DEFAULT CHARSET=utf8; | ||
| ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; | ||
| SELECT mroonga_command("dump"); | ||
| mroonga_command("dump") | ||
| table_create tags TABLE_PAT_KEY UInt32 | ||
| column_create tags id COLUMN_SCALAR UInt32 | ||
| table_create bugs TABLE_PAT_KEY UInt32 | ||
| column_create bugs id COLUMN_SCALAR UInt32 | ||
| column_create bugs name COLUMN_SCALAR tags | ||
| DROP TABLE bugs; | ||
| DROP TABLE tags; |
42 changes: 42 additions & 0 deletions
42
mysql-test/mroonga/storage/alter_table/change_column/t/with_type.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Copyright(C) 2014 Kenji Maruyama <mmmaru777@gmail.com> | ||
| # | ||
| # 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
|
||
| --source include/not_embedded.inc | ||
| --source ../../../../include/mroonga/have_mroonga.inc | ||
| --source ../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS tags; | ||
| DROP TABLE IF EXISTS bugs; | ||
| --enable_warnings | ||
|
|
||
| CREATE TABLE tags ( | ||
| id INT UNSIGNED PRIMARY KEY | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| CREATE TABLE bugs ( | ||
| id INT UNSIGNED PRIMARY KEY | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| ALTER TABLE bugs ADD COLUMN name VARCHAR(64) COMMENT 'type "tags"'; | ||
|
|
||
| SELECT mroonga_command("dump"); | ||
|
|
||
| DROP TABLE bugs; | ||
| DROP TABLE tags; | ||
|
|
||
| --source ../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../include/mroonga/have_mroonga_deinit.inc |