Navigation Menu

Skip to content

Commit

Permalink
doc: update an example in 5.04 entry
Browse files Browse the repository at this point in the history
TODO: confirm it by 5.04 package before upload.
  • Loading branch information
Masafumi Yokoyama committed Jun 24, 2015
1 parent 4c26224 commit d229a20
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions doc/source/news.rst
Expand Up @@ -65,20 +65,29 @@ Improvements

* It's backward incompatible change. For example::

-- Before
mysql> CREATE TABLE timestamps (
-> id INT NOT NULL AUTO_INCREMENT,
-> create_dt DATETIME
-> ) ENGINE = Mroonga DEFAULT CHARSET utf8;
Query OK, 0 rows affected (0.09 sec)
mysql> SET sql_mode='STRICT_TRANS_TABLES';
Query OK, 0 rows affected (0.01 sec)

-- Before (5.03 or earlier)
mysql> INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00");
ERROR 1265 (01000): Data truncated for column 'create_dt' at row 1
mysql> SELECT * FROM timestamps;
+----+---------------------+
| id | create_dt |
+----+---------------------+
| 1 | 0000-00-00 00:00:00 |
| 1 | 0000-01-01 00:00:00 |
+----+---------------------+

-- After
mysql> SET sql_mode='STRICT_TRANS_TABLES';
-- After (5.04 or later)
mysql> INSERT INTO timestamps (create_dt) VALUES ("0000-00-00 00:00:00");
ERROR 22003: Out of range value for column 'create_dt' at row 1
mysql> SELECT * FROM timestamps;
Empty set (0.02 sec)

* Changed keyword to use custom tokenizer to "tokenizer" from "parser".

Expand Down

0 comments on commit d229a20

Please sign in to comment.