Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mysql57 test: follow default sql_mode change
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
mysql-test/mroonga/storage/column/datetime/64bit/mysql_57_or_later/r/out_of_range.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,20 @@ | ||
| DROP TABLE IF EXISTS diaries; | ||
| CREATE TABLE diaries ( | ||
| id INT PRIMARY KEY AUTO_INCREMENT, | ||
| title TEXT, | ||
| created_at DATETIME | ||
| ) DEFAULT CHARSET UTF8; | ||
| SHOW CREATE TABLE diaries; | ||
| Table Create Table | ||
| diaries CREATE TABLE `diaries` ( | ||
| `id` int(11) NOT NULL AUTO_INCREMENT, | ||
| `title` text, | ||
| `created_at` datetime DEFAULT NULL, | ||
| PRIMARY KEY (`id`) | ||
| ) ENGINE=Mroonga DEFAULT CHARSET=utf8 | ||
| INSERT INTO diaries (title, created_at) | ||
| VALUES ('2012', '2012'); | ||
| ERROR 22007: Incorrect datetime value: '2012' for column 'created_at' at row 1 | ||
| SELECT * FROM diaries; | ||
| id title created_at | ||
| DROP TABLE diaries; |
42 changes: 42 additions & 0 deletions
42
mysql-test/mroonga/storage/column/datetime/64bit/mysql_57_or_later/t/out_of_range.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) 2012 Kentoku SHIBA | ||
| # 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/mroonga/skip_freebsd.inc | ||
| --source ../../../../../../include/mroonga/have_64bit.inc | ||
| --source ../../../../../../include/mroonga/have_mysql_57_or_later.inc | ||
| --source ../../../../../../include/mroonga/have_mroonga.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS diaries; | ||
| --enable_warnings | ||
|
|
||
| CREATE TABLE diaries ( | ||
| id INT PRIMARY KEY AUTO_INCREMENT, | ||
| title TEXT, | ||
| created_at DATETIME | ||
| ) DEFAULT CHARSET UTF8; | ||
| SHOW CREATE TABLE diaries; | ||
|
|
||
| --error ER_TRUNCATED_WRONG_VALUE | ||
| INSERT INTO diaries (title, created_at) | ||
| VALUES ('2012', '2012'); | ||
|
|
||
| SELECT * FROM diaries; | ||
|
|
||
| DROP TABLE diaries; | ||
|
|
||
| --source ../../../../../../include/mroonga/have_mroonga_deinit.inc |
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