null+****@clear*****
null+****@clear*****
2012年 2月 14日 (火) 16:24:57 JST
Kouhei Sutou 2012-02-14 16:24:57 +0900 (Tue, 14 Feb 2012) New Revision: 0c02972485d80a24b9b45a8466b5e03572405632 Log: [test][storage] add a test for slash in database name. refs #1281 Expected result may be wrong... Added files: test/sql/suite/mroonga_storage/r/create_database_name_slash.result test/sql/suite/mroonga_storage/t/create_database_name_slash.test Added: test/sql/suite/mroonga_storage/r/create_database_name_slash.result (+33 -0) 100644 =================================================================== --- /dev/null +++ test/sql/suite/mroonga_storage/r/create_database_name_slash.result 2012-02-14 16:24:57 +0900 (56c868b) @@ -0,0 +1,33 @@ +DROP DATABASE IF EXISTS `master/production`; +DROP DATABASE IF EXISTS `master/development`; +CREATE DATABASE `master/production`; +USE `master/production`; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8; +INSERT INTO diaries (title) VALUES ("clear day (production)"); +INSERT INTO diaries (title) VALUES ("rainy day (production)"); +INSERT INTO diaries (title) VALUES ("cloudy day (production)"); +SELECT * FROM diaries; +id title +1 clear day (production) +2 rainy day (production) +3 cloudy day (production) +CREATE DATABASE `master/development`; +USE `master/development`; +CREATE TABLE diaries ( +id INT PRIMARY KEY AUTO_INCREMENT, +title TEXT +) DEFAULT CHARSET=UTF8; +INSERT INTO diaries (title) VALUES ("clear day (development)"); +INSERT INTO diaries (title) VALUES ("rainy day (development)"); +INSERT INTO diaries (title) VALUES ("cloudy day (development)"); +SELECT * FROM diaries; +id title +1 clear day (development) +2 rainy day (development) +3 cloudy day (development) +USE test; +DROP DATABASE `master/production`; +DROP DATABASE `master/development`; Added: test/sql/suite/mroonga_storage/t/create_database_name_slash.test (+59 -0) 100644 =================================================================== --- /dev/null +++ test/sql/suite/mroonga_storage/t/create_database_name_slash.test 2012-02-14 16:24:57 +0900 (877122a) @@ -0,0 +1,59 @@ +# Copyright(C) 2012 Kouhei Sutou <kou****@clear*****> +# +# 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/have_mroonga.inc + +--disable_warnings +DROP DATABASE IF EXISTS `master/production`; +DROP DATABASE IF EXISTS `master/development`; +--enable_warnings + +CREATE DATABASE `master/production`; +USE `master/production`; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8; + +INSERT INTO diaries (title) VALUES ("clear day (production)"); +INSERT INTO diaries (title) VALUES ("rainy day (production)"); +INSERT INTO diaries (title) VALUES ("cloudy day (production)"); + +SELECT * FROM diaries; + + +CREATE DATABASE `master/development`; +USE `master/development`; + +CREATE TABLE diaries ( + id INT PRIMARY KEY AUTO_INCREMENT, + title TEXT +) DEFAULT CHARSET=UTF8; + +INSERT INTO diaries (title) VALUES ("clear day (development)"); +INSERT INTO diaries (title) VALUES ("rainy day (development)"); +INSERT INTO diaries (title) VALUES ("cloudy day (development)"); + +SELECT * FROM diaries; + + +USE test; + +DROP DATABASE `master/production`; +DROP DATABASE `master/development`; + +--source include/have_mroonga_deinit.inc