← Back to team overview

maria-developers team mailing list archive

Please review: MDEV-5528 Command line variable to choose MariaDB-5.3 vs MySQL-5.6 temporal data formats

 

  Hi,

Please review my patch for MDEV-5528.

It also fixes a bug:

MDEV-6649 Different warnings for TIME and TIME(N) when @@old_mode=zero_date_time_cast

Thanks.

=== modified file 'mysql-test/r/ctype_binary.result'
--- mysql-test/r/ctype_binary.result	2014-05-09 10:35:11 +0000
+++ mysql-test/r/ctype_binary.result	2014-08-29 05:37:33 +0000
@@ -2769,7 +2769,7 @@ id	select_type	table	type	possible_keys
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
+1	SIMPLE	t1	range	date_column	date_column	6	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data

=== modified file 'mysql-test/r/ctype_cp1251.result'
--- mysql-test/r/ctype_cp1251.result	2014-05-09 10:35:11 +0000
+++ mysql-test/r/ctype_cp1251.result	2014-08-29 05:38:10 +0000
@@ -3161,7 +3161,7 @@ id	select_type	table	type	possible_keys
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
+1	SIMPLE	t1	range	date_column	date_column	6	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data

=== modified file 'mysql-test/r/ctype_latin1.result'
--- mysql-test/r/ctype_latin1.result	2014-05-09 10:35:11 +0000
+++ mysql-test/r/ctype_latin1.result	2014-08-29 05:47:35 +0000
@@ -3445,7 +3445,7 @@ id	select_type	table	type	possible_keys
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
+1	SIMPLE	t1	range	date_column	date_column	6	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data

=== modified file 'mysql-test/r/ctype_ucs.result'
--- mysql-test/r/ctype_ucs.result	2014-08-07 16:06:56 +0000
+++ mysql-test/r/ctype_ucs.result	2014-08-29 05:38:52 +0000
@@ -4352,7 +4352,7 @@ id	select_type	table	type	possible_keys
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
+1	SIMPLE	t1	range	date_column	date_column	6	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data

=== modified file 'mysql-test/r/ctype_utf8.result'
--- mysql-test/r/ctype_utf8.result	2014-05-09 10:35:11 +0000
+++ mysql-test/r/ctype_utf8.result	2014-08-29 05:44:20 +0000
@@ -5220,7 +5220,7 @@ id	select_type	table	type	possible_keys
 ALTER TABLE t1 MODIFY date_column DATETIME DEFAULT NULL;
 EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	date_column	date_column	9	NULL	1	Using index condition
+1	SIMPLE	t1	range	date_column	date_column	6	NULL	1	Using index condition
 DROP TABLE t1;
 #
 # Bug #31384 	DATE_ADD() and DATE_SUB() return binary data

=== modified file 'mysql-test/r/distinct.result'
--- mysql-test/r/distinct.result	2014-04-22 21:39:57 +0000
+++ mysql-test/r/distinct.result	2014-08-29 07:17:11 +0000
@@ -926,8 +926,8 @@ SELECT STRAIGHT_JOIN DISTINCT t1.id  FRO
 t1, v1, t2 WHERE v1.id = t2.i AND t1.i1 = v1.i1 AND t2.i != 3;
 id
 7
-8
 9
+8
 18
 20
 24
@@ -941,8 +941,8 @@ id
 74
 77
 78
-93
 94
+93
 set join_buffer_size=1024*16;
 SELECT STRAIGHT_JOIN DISTINCT t1.id  FROM
 t1, v1, t2 WHERE v1.id = t2.i AND t1.i1 = v1.i1 AND t2.i != 3;
@@ -958,12 +958,12 @@ id
 61
 43
 45
-71
 64
+71
+94
 74
 77
 78
-94
 93
 set join_buffer_size=default;
 SELECT STRAIGHT_JOIN DISTINCT t1.id  FROM

=== modified file 'mysql-test/r/func_in.result'
--- mysql-test/r/func_in.result	2012-06-23 16:12:54 +0000
+++ mysql-test/r/func_in.result	2014-08-29 05:41:50 +0000
@@ -271,7 +271,7 @@ select * from t2 where a NOT IN (
 '2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00', 
 '2006-04-25 10:06:00', '2006-04-25 10:08:00');
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	range	a	a	9	NULL	18	Using index condition
+1	SIMPLE	t2	range	a	a	6	NULL	12	Using index condition
 select * from t2 where a NOT IN (
 '2006-04-25 10:00:00','2006-04-25 10:02:00','2006-04-25 10:04:00', 
 '2006-04-25 10:06:00', '2006-04-25 10:08:00');
@@ -701,11 +701,11 @@ id	select_type	table	type	possible_keys
 EXPLAIN SELECT * FROM t1 WHERE c_datetime
 IN ('2009-09-01 00:00:01', '2009-09-02 00:00:01', '2009-09-03 00:00:01');
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	c_datetime	c_datetime	8	NULL	3	Using index condition
+1	SIMPLE	t1	range	c_datetime	c_datetime	5	NULL	3	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE c_datetime
 IN (NULL, '2009-09-01 00:00:01', '2009-09-02 00:00:01', '2009-09-03 00:00:01');
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	c_datetime	c_datetime	8	NULL	3	Using index condition
+1	SIMPLE	t1	range	c_datetime	c_datetime	5	NULL	3	Using index condition
 EXPLAIN SELECT * FROM t1 WHERE c_datetime IN (NULL);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables

=== modified file 'mysql-test/r/mysqld--help.result'
--- mysql-test/r/mysqld--help.result	2014-08-07 16:06:56 +0000
+++ mysql-test/r/mysqld--help.result	2014-08-29 05:39:32 +0000
@@ -477,6 +477,10 @@
  NULLS_UNEQUAL (default behavior for 4.1 and later),
  NULLS_EQUAL (emulate 4.0 behavior), and NULLS_IGNORED
  --myisam-use-mmap   Use memory mapping for reading and writing MyISAM tables
+ --mysql56-temporal-format 
+ Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
+ DATETIME, TIMESTAMP columns.
+ (Defaults to on; use --skip-mysql56-temporal-format to disable.)
  --net-buffer-length=# 
  Buffer length for TCP/IP and socket communication
  --net-read-timeout=# 
@@ -1200,6 +1204,7 @@ myisam-repair-threads 1
 myisam-sort-buffer-size 134216704
 myisam-stats-method nulls_unequal
 myisam-use-mmap FALSE
+mysql56-temporal-format TRUE
 net-buffer-length 16384
 net-read-timeout 30
 net-retry-count 10

=== modified file 'mysql-test/r/old-mode.result'
--- mysql-test/r/old-mode.result	2014-06-06 06:29:52 +0000
+++ mysql-test/r/old-mode.result	2014-08-27 10:20:12 +0000
@@ -101,3 +101,29 @@ NULL
 Warning	1292	Incorrect datetime value: '0000-00-00 00:20:12'
 Warning	1292	Truncated incorrect datetime value: '-00:20:12'
 DROP TABLE t1;
+#
+# MDEV-6649 Different warnings for TIME and TIME(N) when @@old_mode=zero_date_time_cast
+#
+SET @@global.mysql56_temporal_format=true;
+SET @@old_mode=zero_date_time_cast;
+CREATE TABLE t1 (a TIME,b TIME(1));
+INSERT INTO t1 VALUES (TIME'830:20:30',TIME'830:20:30');
+SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
+TO_DAYS(a)	TO_DAYS(b)
+NULL	NULL
+Warnings:
+Warning	1264	Out of range value for column 'a' at row 1
+Warning	1264	Out of range value for column 'b' at row 1
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=false;
+SET @@old_mode=zero_date_time_cast;
+CREATE TABLE t1 (a TIME,b TIME(1));
+INSERT INTO t1 VALUES (TIME'830:20:30',TIME'830:20:30');
+SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
+TO_DAYS(a)	TO_DAYS(b)
+NULL	NULL
+Warnings:
+Warning	1264	Out of range value for column 'a' at row 1
+Warning	1264	Out of range value for column 'b' at row 1
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=DEFAULT;

=== modified file 'mysql-test/r/partition_pruning.result'
--- mysql-test/r/partition_pruning.result	2014-08-07 16:06:56 +0000
+++ mysql-test/r/partition_pruning.result	2014-08-29 05:52:56 +0000
@@ -1636,139 +1636,139 @@ INSERT INTO t1 VALUES (1, '2009-01-01'),
 (1, '2009-04-05'), (1, '2009-04-06'), (1, '2009-04-07');
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	9	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	9	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	13	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:59' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	9	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > CAST('2009-04-03' AS DATE);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	9	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03 00:00:00';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	9	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	13	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-02 23:59:59';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b <= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b = '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	9	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b >= '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b > '2009-04-03';
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	12	NULL	8	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403	index	NULL	PRIMARY	9	NULL	8	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	12	NULL	2	Using where; Using index
+1	SIMPLE	t1	p20090403	index	NULL	PRIMARY	9	NULL	2	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-03 00:00:01' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	10	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	10	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b < CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b <= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	12	NULL	6	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402	index	NULL	PRIMARY	9	NULL	6	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b = CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	12	NULL	3	Using where; Using index
+1	SIMPLE	t1	p20090402	index	NULL	PRIMARY	9	NULL	3	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b >= CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	13	Using where; Using index
 EXPLAIN PARTITIONS SELECT * FROM t1
 WHERE b > CAST('2009-04-02 23:59:58' AS DATETIME);
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	12	NULL	13	Using where; Using index
+1	SIMPLE	t1	p20090401,p20090402,p20090403,p20090404,p20090405	index	NULL	PRIMARY	9	NULL	13	Using where; Using index
 DROP TABLE t1;
 # Test with DATE column NOT NULL
 CREATE TABLE t1 (

=== modified file 'mysql-test/r/ps_1general.result'
--- mysql-test/r/ps_1general.result	2013-09-14 01:09:36 +0000
+++ mysql-test/r/ps_1general.result	2014-08-29 05:43:40 +0000
@@ -300,7 +300,7 @@ t2	MyISAM	10	Fixed	0	0	0	#	1024	0	NULL	#
 prepare stmt4 from ' show table status from test like ''t9%'' ';
 execute stmt4;
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment
-t9	MyISAM	10	Dynamic	2	216	432	#	2048	0	NULL	#	#	#	latin1_swedish_ci	NULL		
+t9	MyISAM	10	Dynamic	2	212	424	#	2048	0	NULL	#	#	#	latin1_swedish_ci	NULL		
 prepare stmt4 from ' show status like ''Threads_running'' ';
 execute stmt4;
 Variable_name	Value

=== modified file 'mysql-test/r/subselect.result'
--- mysql-test/r/subselect.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect.result	2014-08-29 05:45:01 +0000
@@ -3696,8 +3696,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/subselect2.result'
--- mysql-test/r/subselect2.result	2014-02-26 14:28:07 +0000
+++ mysql-test/r/subselect2.result	2014-08-29 05:47:12 +0000
@@ -287,7 +287,7 @@ ORDER BY mirror_date ASC
 ) AS calculated_result;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	<derived2>	ALL	NULL	NULL	NULL	NULL	2	
-2	DERIVED	t1	range	date	date	9	NULL	2	Using index condition; Using where; Rowid-ordered scan; Using filesort
+2	DERIVED	t1	range	date	date	6	NULL	2	Using index condition; Using where; Rowid-ordered scan; Using filesort
 SELECT * FROM (
 SELECT node_uid, date, mirror_date, @result := 0 AS result
 FROM t1
@@ -310,7 +310,7 @@ ORDER BY mirror_date ASC
 ) AS calculated_result;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	<derived2>	ALL	NULL	NULL	NULL	NULL	2	
-2	DERIVED	t1	range	date	date	9	NULL	2	Using index condition; Using where; Using filesort
+2	DERIVED	t1	range	date	date	6	NULL	2	Using index condition; Using where; Using filesort
 SELECT * FROM (
 SELECT node_uid, date, mirror_date, @result := 0 AS result
 FROM t1

=== modified file 'mysql-test/r/subselect_no_exists_to_in.result'
--- mysql-test/r/subselect_no_exists_to_in.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect_no_exists_to_in.result	2014-08-29 05:45:32 +0000
@@ -3699,8 +3699,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/subselect_no_mat.result'
--- mysql-test/r/subselect_no_mat.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect_no_mat.result	2014-08-29 05:48:14 +0000
@@ -3699,8 +3699,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/subselect_no_opts.result'
--- mysql-test/r/subselect_no_opts.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect_no_opts.result	2014-08-29 05:48:45 +0000
@@ -3695,8 +3695,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/subselect_no_scache.result'
--- mysql-test/r/subselect_no_scache.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect_no_scache.result	2014-08-29 05:49:24 +0000
@@ -3702,8 +3702,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/subselect_no_semijoin.result'
--- mysql-test/r/subselect_no_semijoin.result	2014-06-09 10:42:21 +0000
+++ mysql-test/r/subselect_no_semijoin.result	2014-08-29 05:49:56 +0000
@@ -3695,8 +3695,8 @@ WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1
 ORDER BY t1.t DESC LIMIT 1);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t2	system	NULL	NULL	NULL	NULL	1	
-1	PRIMARY	t1	index	NULL	PRIMARY	16	NULL	11	Using where; Using index
-2	SUBQUERY	t1	range	PRIMARY	PRIMARY	16	NULL	5	Using where; Using index
+1	PRIMARY	t1	index	NULL	PRIMARY	13	NULL	11	Using where; Using index
+2	SUBQUERY	t1	range	PRIMARY	PRIMARY	13	NULL	5	Using where; Using index
 SELECT * FROM t1,t2
 WHERE t1.t = (SELECT t1.t FROM t1
 WHERE t1.t < t2.t  AND t1.i2=1 AND t2.i1=t1.i1

=== modified file 'mysql-test/r/type_datetime.result'
--- mysql-test/r/type_datetime.result	2014-06-06 06:29:52 +0000
+++ mysql-test/r/type_datetime.result	2014-08-29 05:40:08 +0000
@@ -103,7 +103,7 @@ date	numfacture	expedition
 0000-00-00 00:00:00	1212	0001-00-00 00:00:00
 EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ref	expedition	expedition	8	const	1	
+1	SIMPLE	t1	ref	expedition	expedition	5	const	1	
 drop table t1;
 create table t1 (a datetime not null, b datetime not null);
 insert into t1 values (now(), now());
@@ -745,7 +745,7 @@ SET NAMES CP850;
 INSERT INTO t1 VALUES (1,'2010-04-12 22:30:12'), (2,'2010-04-12 22:30:12'), (3,'2010-04-12 22:30:12');
 EXPLAIN EXTENDED SELECT * FROM t1 FORCE INDEX(attime) WHERE AtTime = '2010-02-22 18:40:07';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	ref	AtTime	AtTime	9	const	1	100.00	
+1	SIMPLE	t1	ref	AtTime	AtTime	6	const	1	100.00	
 Warnings:
 Note	1003	select `test`.`t1`.`Id` AS `Id`,`test`.`t1`.`AtTime` AS `AtTime` from `test`.`t1` FORCE INDEX (`attime`) where (`test`.`t1`.`AtTime` = '2010-02-22 18:40:07')
 DROP TABLE t1;
@@ -773,7 +773,7 @@ f1
 t2 should be const
 explain select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y');
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	const	PRIMARY	PRIMARY	8	const	1	Using index
+1	SIMPLE	t2	const	PRIMARY	PRIMARY	5	const	1	Using index
 DROP TABLE t1,t2;
 #
 # Bug#57095: Wrongly chosen expression cache type led to a wrong

=== modified file 'mysql-test/r/type_time_6065.result'
--- mysql-test/r/type_time_6065.result	2014-06-11 08:08:08 +0000
+++ mysql-test/r/type_time_6065.result	2014-08-29 05:43:06 +0000
@@ -52,7 +52,7 @@ t2 force INDEX (col_datetime_key)
 WHERE col_time_key = col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where
-1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	9	test.t1.col_time_key	1	100.00	Using where; Using index
+1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
@@ -73,7 +73,7 @@ t2 force INDEX (col_datetime_key)
 WHERE col_datetime_key = col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where
-1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	9	test.t1.col_time_key	1	100.00	Using where; Using index
+1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` IGNORE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
@@ -136,7 +136,7 @@ t2 force INDEX (col_datetime_key)
 WHERE col_time_key = col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using where; Using index
-1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	9	test.t1.col_time_key	1	100.00	Using where; Using index
+1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
 SELECT * FROM
@@ -157,7 +157,7 @@ t2 force INDEX (col_datetime_key)
 WHERE col_datetime_key = col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	t1	index	col_time_key	col_time_key	4	NULL	5	100.00	Using where; Using index
-1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	9	test.t1.col_time_key	1	100.00	Using where; Using index
+1	SIMPLE	t2	ref	col_datetime_key	col_datetime_key	6	test.t1.col_time_key	1	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`col_time_key` AS `col_time_key`,`test`.`t2`.`col_datetime_key` AS `col_datetime_key` from `test`.`t1` FORCE INDEX (`col_time_key`) straight_join `test`.`t2` FORCE INDEX (`col_datetime_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
 SELECT * FROM
@@ -261,7 +261,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_time_key = col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
@@ -282,7 +282,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_datetime_key = col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
@@ -303,7 +303,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_time_key = col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using where; Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using where; Using index
 1	SIMPLE	t1	ref	col_time_key	col_time_key	4	test.t2.col_datetime_key	2	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` = `test`.`t2`.`col_datetime_key`)
@@ -324,7 +324,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_datetime_key = col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using where; Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using where; Using index
 1	SIMPLE	t1	ref	col_time_key	col_time_key	4	test.t2.col_datetime_key	2	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` = `test`.`t1`.`col_time_key`)
@@ -717,7 +717,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_time_key >= col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
@@ -748,7 +748,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_datetime_key >= col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
@@ -779,7 +779,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_time_key >= col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` >= `test`.`t2`.`col_datetime_key`)
@@ -810,7 +810,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_datetime_key >= col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` >= `test`.`t1`.`col_time_key`)
@@ -1153,7 +1153,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_time_key > col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
@@ -1179,7 +1179,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_datetime_key > col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
@@ -1205,7 +1205,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_time_key > col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` > `test`.`t2`.`col_datetime_key`)
@@ -1231,7 +1231,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_datetime_key > col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` > `test`.`t1`.`col_time_key`)
@@ -1629,7 +1629,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_time_key <= col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
@@ -1660,7 +1660,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_datetime_key <= col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
@@ -1691,7 +1691,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_time_key <= col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` <= `test`.`t2`.`col_datetime_key`)
@@ -1722,7 +1722,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_datetime_key <= col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` <= `test`.`t1`.`col_time_key`)
@@ -2065,7 +2065,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_time_key < col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
@@ -2091,7 +2091,7 @@ STRAIGHT_JOIN
 t1 ignore INDEX (col_time_key)
 WHERE col_datetime_key < col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	100.00	Using where; Using join buffer (flat, BNL join)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` IGNORE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)
@@ -2117,7 +2117,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_time_key < col_datetime_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t1`.`col_time_key` < `test`.`t2`.`col_datetime_key`)
@@ -2143,7 +2143,7 @@ STRAIGHT_JOIN
 t1 force INDEX (col_time_key)
 WHERE col_datetime_key < col_time_key;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	9	NULL	5	100.00	Using index
+1	SIMPLE	t2	index	col_datetime_key	col_datetime_key	6	NULL	5	100.00	Using index
 1	SIMPLE	t1	ALL	col_time_key	NULL	NULL	NULL	5	100.00	Range checked for each record (index map: 0x1)
 Warnings:
 Note	1003	select `test`.`t2`.`col_datetime_key` AS `col_datetime_key`,`test`.`t1`.`col_time_key` AS `col_time_key` from `test`.`t2` FORCE INDEX (`col_datetime_key`) straight_join `test`.`t1` FORCE INDEX (`col_time_key`) where (`test`.`t2`.`col_datetime_key` < `test`.`t1`.`col_time_key`)

=== modified file 'mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result'
--- mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result	2013-09-14 01:09:36 +0000
+++ mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result	2014-08-29 06:20:22 +0000
@@ -1625,7 +1625,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
 ### INSERT INTO `test`.`t1`
 ### SET
-###   @1=2001-02-03 10:20:30 /* DATETIME meta=0 nullable=1 is_null=0 */
+###   @1='2001-02-03 10:20:30' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
@@ -1642,7 +1642,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
 ### DELETE FROM `test`.`t1`
 ### WHERE
-###   @1=2001-02-03 10:20:30 /* DATETIME meta=0 nullable=1 is_null=0 */
+###   @1='2001-02-03 10:20:30' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
@@ -1675,7 +1675,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
 ### INSERT INTO `test`.`t1`
 ### SET
-###   @1=981184830 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
+###   @1=981184830 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
@@ -1693,7 +1693,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
 ### DELETE FROM `test`.`t1`
 ### WHERE
-###   @1=981184830 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
+###   @1=981184830 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
@@ -1726,7 +1726,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Write_rows: table id # flags: STMT_END_F
 ### INSERT INTO `test`.`t1`
 ### SET
-###   @1='11:22:33' /* TIME meta=0 nullable=1 is_null=0 */
+###   @1='11:22:33' /* TIME(0) meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;
@@ -1743,7 +1743,7 @@ BEGIN
 #010909  4:46:40 server id 1  end_log_pos # 	Delete_rows: table id # flags: STMT_END_F
 ### DELETE FROM `test`.`t1`
 ### WHERE
-###   @1='11:22:33' /* TIME meta=0 nullable=1 is_null=0 */
+###   @1='11:22:33' /* TIME(0) meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
 SET TIMESTAMP=1000000000/*!*/;

=== modified file 'mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result'
--- mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result	2013-09-14 01:09:36 +0000
+++ mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result	2014-08-29 06:19:10 +0000
@@ -2402,9 +2402,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2495,9 +2495,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2590,56 +2590,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=3 /* INT meta=0 nullable=1 is_null=0 */
 ### INSERT INTO `test`.`t1`
 ### SET
@@ -2671,9 +2671,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2764,9 +2764,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2844,9 +2844,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2937,9 +2937,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3017,9 +3017,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3110,56 +3110,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=3 /* INT meta=0 nullable=1 is_null=0 */
 ### SET
 ###   @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@@ -3190,9 +3190,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3283,9 +3283,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3363,56 +3363,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=4 /* INT meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Xid = #
@@ -3456,9 +3456,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3549,9 +3549,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3642,9 +3642,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3735,56 +3735,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=4 /* INT meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Xid = #

=== modified file 'mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result'
--- mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result	2013-09-14 01:09:36 +0000
+++ mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result	2014-08-29 08:19:10 +0000
@@ -2402,9 +2402,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2498,9 +2498,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2595,56 +2595,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=3 /* INT meta=0 nullable=1 is_null=0 */
 ### INSERT INTO `test`.`t1`
 ### SET
@@ -2676,9 +2676,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2771,9 +2771,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2851,9 +2851,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -2946,9 +2946,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3026,9 +3026,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3121,56 +3121,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=3 /* INT meta=0 nullable=1 is_null=0 */
 ### SET
 ###   @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@@ -3201,9 +3201,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3296,9 +3296,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3376,56 +3376,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=4 /* INT meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0
@@ -3471,9 +3471,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='9999:12:31' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=9999-12-31 23:59:59 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=2146522447 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='9999-12-31 23:59:59' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=2146522447 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2155 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='ÿ' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3566,9 +3566,9 @@ BEGIN
 ###   @26=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000000 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='1000:01:01' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=1000-01-01 00:00:00 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=75601 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='-838:59:59' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='1000-01-01 00:00:00' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=75601 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='-838:59:59' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=1901 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3661,9 +3661,9 @@ BEGIN
 ###   @26=000000009.999999999 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @27=000000001 /* DECIMAL(10,0) meta=2560 nullable=1 is_null=0 */
 ###   @28='2008:08:04' /* DATE meta=0 nullable=1 is_null=0 */
-###   @29=2008-08-04 16:18:06 /* DATETIME meta=0 nullable=1 is_null=0 */
-###   @30=1217855904 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31='16:18:47' /* TIME meta=0 nullable=1 is_null=0 */
+###   @29='2008-08-04 16:18:06' /* DATETIME(0) meta=0 nullable=1 is_null=0 */
+###   @30=1217855904 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31='16:18:47' /* TIME(0) meta=0 nullable=1 is_null=0 */
 ###   @32=2008 /* YEAR meta=0 nullable=1 is_null=0 */
 ###   @33='a' /* STRING(1) meta=65025 nullable=1 is_null=0 */
 ###   @34='' /* STRING(0) meta=65024 nullable=1 is_null=0 */
@@ -3756,56 +3756,56 @@ BEGIN
 ###   @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
 ###   @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
-###   @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
-###   @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
-###   @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @32=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @33=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @34=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @35=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @36=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @37=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @38=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @39=NULL /* TIMESTAMP meta=65027 nullable=1 is_null=1 */
-###   @40=NULL /* TIMESTAMP meta=57085 nullable=1 is_null=1 */
-###   @41=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @42=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @43=NULL /* TIMESTAMP meta=65026 nullable=1 is_null=1 */
-###   @44=NULL /* TIMESTAMP meta=61182 nullable=1 is_null=1 */
-###   @45=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @46=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @47=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @48=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @49=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @50=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @51=NULL /* TIMESTAMP meta=765 nullable=1 is_null=1 */
-###   @52=NULL /* TIMESTAMP meta=783 nullable=1 is_null=1 */
-###   @53=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @54=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @55=NULL /* TIMESTAMP meta=510 nullable=1 is_null=1 */
-###   @56=NULL /* TIMESTAMP meta=522 nullable=1 is_null=1 */
-###   @57=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @58=NULL /* TIMESTAMP meta=65024 nullable=1 is_null=1 */
-###   @59=NULL /* TIMESTAMP meta=65025 nullable=1 is_null=1 */
-###   @60=NULL /* TIMESTAMP meta=65279 nullable=1 is_null=1 */
-###   @61=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
-###   @62=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @63=NULL /* TIMESTAMP meta=255 nullable=1 is_null=1 */
-###   @64=NULL /* TIMESTAMP meta=261 nullable=1 is_null=1 */
-###   @65=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @66=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @67=NULL /* TIMESTAMP meta=1 nullable=1 is_null=1 */
-###   @68=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @69=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @70=NULL /* TIMESTAMP meta=2 nullable=1 is_null=1 */
-###   @71=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @72=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @73=NULL /* TIMESTAMP meta=3 nullable=1 is_null=1 */
-###   @74=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @75=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @76=NULL /* TIMESTAMP meta=4 nullable=1 is_null=1 */
-###   @77=NULL /* TIMESTAMP meta=63233 nullable=1 is_null=1 */
-###   @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
+###   @29=NULL /* type=18 meta=0 nullable=1 is_null=1 */
+###   @30=1000000000 /* TIMESTAMP(0) meta=0 nullable=0 is_null=0 */
+###   @31=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @32=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @33=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @34=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @35=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @36=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @37=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @38=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @39=NULL /* TIMESTAMP(0) meta=65027 nullable=1 is_null=1 */
+###   @40=NULL /* TIMESTAMP(0) meta=57085 nullable=1 is_null=1 */
+###   @41=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @42=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @43=NULL /* TIMESTAMP(0) meta=65026 nullable=1 is_null=1 */
+###   @44=NULL /* TIMESTAMP(0) meta=61182 nullable=1 is_null=1 */
+###   @45=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @46=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @47=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @48=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @49=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @50=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @51=NULL /* TIMESTAMP(0) meta=765 nullable=1 is_null=1 */
+###   @52=NULL /* TIMESTAMP(0) meta=783 nullable=1 is_null=1 */
+###   @53=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @54=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @55=NULL /* TIMESTAMP(0) meta=510 nullable=1 is_null=1 */
+###   @56=NULL /* TIMESTAMP(0) meta=522 nullable=1 is_null=1 */
+###   @57=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @58=NULL /* TIMESTAMP(0) meta=65024 nullable=1 is_null=1 */
+###   @59=NULL /* TIMESTAMP(0) meta=65025 nullable=1 is_null=1 */
+###   @60=NULL /* TIMESTAMP(0) meta=65279 nullable=1 is_null=1 */
+###   @61=NULL /* TIMESTAMP(0) meta=0 nullable=1 is_null=1 */
+###   @62=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @63=NULL /* TIMESTAMP(0) meta=255 nullable=1 is_null=1 */
+###   @64=NULL /* TIMESTAMP(0) meta=261 nullable=1 is_null=1 */
+###   @65=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @66=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @67=NULL /* TIMESTAMP(0) meta=1 nullable=1 is_null=1 */
+###   @68=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @69=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @70=NULL /* TIMESTAMP(0) meta=2 nullable=1 is_null=1 */
+###   @71=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @72=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @73=NULL /* TIMESTAMP(0) meta=3 nullable=1 is_null=1 */
+###   @74=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @75=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @76=NULL /* TIMESTAMP(0) meta=4 nullable=1 is_null=1 */
+###   @77=NULL /* TIMESTAMP(0) meta=63233 nullable=1 is_null=1 */
+###   @78=NULL /* TIMESTAMP(0) meta=63489 nullable=1 is_null=1 */
 ###   @79=4 /* INT meta=0 nullable=1 is_null=0 */
 # at #
 #010909  4:46:40 server id 1  end_log_pos # 	Query	thread_id=#	exec_time=#	error_code=0

=== modified file 'mysql-test/suite/innodb/r/data_types.result'
--- mysql-test/suite/innodb/r/data_types.result	2013-11-13 21:58:19 +0000
+++ mysql-test/suite/innodb/r/data_types.result	2014-08-29 05:46:28 +0000
@@ -112,7 +112,7 @@ t1_BLOB	DATA_BLOB
 t1_CHAR_100	DATA_CHAR	
 t1_CHAR_100_BINARY	DATA_MYSQL	
 t1_DATE	DATA_INT	
-t1_DATETIME	DATA_INT	
+t1_DATETIME	DATA_FIXBINARY	
 t1_DATETIME_6	DATA_FIXBINARY	
 t1_DECIMAL_10_3	DATA_FIXBINARY	
 t1_DECIMAL_10_3_UNSIGNED	DATA_FIXBINARY	UNSIGNED
@@ -137,8 +137,8 @@ t1_SET_BINARY	DATA_INT	UNSIGNED
 t1_SMALLINT	DATA_INT	
 t1_SMALLINT_UNSIGNED	DATA_INT	UNSIGNED
 t1_TEXT	DATA_BLOB	
-t1_TIME	DATA_INT	
-t1_TIMESTAMP	DATA_INT	UNSIGNED
+t1_TIME	DATA_FIXBINARY	
+t1_TIMESTAMP	DATA_FIXBINARY	UNSIGNED
 t1_TIMESTAMP_5	DATA_FIXBINARY	UNSIGNED
 t1_TIME_4	DATA_FIXBINARY	
 t1_TINYBLOB	DATA_BLOB	

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result'
--- mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result	2014-08-29 09:22:43 +0000
@@ -0,0 +1,83 @@
+include/master-slave.inc
+[connection master]
+SELECT @@global.mysql56_temporal_format AS on_master;
+on_master
+1
+SELECT @@global.mysql56_temporal_format AS on_slave;
+on_slave
+1
+CREATE TABLE t1
+(
+c0 TIME(0),
+c1 TIME(1),
+c2 TIME(2),
+c3 TIME(3),
+c4 TIME(4),
+c5 TIME(5),
+c6 TIME(6)
+);
+CREATE TABLE t2
+(
+c0 TIMESTAMP(0),
+c1 TIMESTAMP(1),
+c2 TIMESTAMP(2),
+c3 TIMESTAMP(3),
+c4 TIMESTAMP(4),
+c5 TIMESTAMP(5),
+c6 TIMESTAMP(6)
+);
+CREATE TABLE t3
+(
+c0 DATETIME(0),
+c1 DATETIME(1),
+c2 DATETIME(2),
+c3 DATETIME(3),
+c4 DATETIME(4),
+c5 DATETIME(5),
+c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+SELECT * FROM t1;;
+c0	01:01:01
+c1	01:01:01.1
+c2	01:01:01.11
+c3	01:01:01.111
+c4	01:01:01.1111
+c5	01:01:01.11111
+c6	01:01:01.111111
+SELECT * FROM t2;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT * FROM t3;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+SET @@global.mysql56_temporal_format=DEFAULT;
+SET @@global.mysql56_temporal_format=DEFAULT;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result'
--- mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result	2014-08-29 09:26:22 +0000
@@ -0,0 +1,85 @@
+include/master-slave.inc
+[connection master]
+SET @@global.mysql56_temporal_format=false;;
+SET @@global.mysql56_temporal_format=false;;
+SELECT @@global.mysql56_temporal_format AS on_master;
+on_master
+0
+SELECT @@global.mysql56_temporal_format AS on_slave;
+on_slave
+0
+CREATE TABLE t1
+(
+c0 TIME(0),
+c1 TIME(1),
+c2 TIME(2),
+c3 TIME(3),
+c4 TIME(4),
+c5 TIME(5),
+c6 TIME(6)
+);
+CREATE TABLE t2
+(
+c0 TIMESTAMP(0),
+c1 TIMESTAMP(1),
+c2 TIMESTAMP(2),
+c3 TIMESTAMP(3),
+c4 TIMESTAMP(4),
+c5 TIMESTAMP(5),
+c6 TIMESTAMP(6)
+);
+CREATE TABLE t3
+(
+c0 DATETIME(0),
+c1 DATETIME(1),
+c2 DATETIME(2),
+c3 DATETIME(3),
+c4 DATETIME(4),
+c5 DATETIME(5),
+c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	33	33
+t2	1	41	41
+t3	1	50	50
+SELECT * FROM t1;;
+c0	01:01:01
+c1	01:01:01.1
+c2	01:01:01.11
+c3	01:01:01.111
+c4	01:01:01.1111
+c5	01:01:01.11111
+c6	01:01:01.111111
+SELECT * FROM t2;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT * FROM t3;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	33	33
+t2	1	41	41
+t3	1	50	50
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+SET @@global.mysql56_temporal_format=DEFAULT;
+SET @@global.mysql56_temporal_format=DEFAULT;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result'
--- mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result	2014-08-29 09:36:32 +0000
@@ -0,0 +1,85 @@
+include/master-slave.inc
+[connection master]
+SET @@global.mysql56_temporal_format=false;;
+SET @@global.mysql56_temporal_format=true;;
+SELECT @@global.mysql56_temporal_format AS on_master;
+on_master
+0
+SELECT @@global.mysql56_temporal_format AS on_slave;
+on_slave
+1
+CREATE TABLE t1
+(
+c0 TIME(0),
+c1 TIME(1),
+c2 TIME(2),
+c3 TIME(3),
+c4 TIME(4),
+c5 TIME(5),
+c6 TIME(6)
+);
+CREATE TABLE t2
+(
+c0 TIMESTAMP(0),
+c1 TIMESTAMP(1),
+c2 TIMESTAMP(2),
+c3 TIMESTAMP(3),
+c4 TIMESTAMP(4),
+c5 TIMESTAMP(5),
+c6 TIMESTAMP(6)
+);
+CREATE TABLE t3
+(
+c0 DATETIME(0),
+c1 DATETIME(1),
+c2 DATETIME(2),
+c3 DATETIME(3),
+c4 DATETIME(4),
+c5 DATETIME(5),
+c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	33	33
+t2	1	41	41
+t3	1	50	50
+SELECT * FROM t1;;
+c0	01:01:01
+c1	01:01:01.1
+c2	01:01:01.11
+c3	01:01:01.111
+c4	01:01:01.1111
+c5	01:01:01.11111
+c6	01:01:01.111111
+SELECT * FROM t2;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT * FROM t3;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+SET @@global.mysql56_temporal_format=DEFAULT;
+SET @@global.mysql56_temporal_format=DEFAULT;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result'
--- mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result	2014-08-29 09:29:49 +0000
@@ -0,0 +1,85 @@
+include/master-slave.inc
+[connection master]
+SET @@global.mysql56_temporal_format=true;;
+SET @@global.mysql56_temporal_format=false;;
+SELECT @@global.mysql56_temporal_format AS on_master;
+on_master
+1
+SELECT @@global.mysql56_temporal_format AS on_slave;
+on_slave
+0
+CREATE TABLE t1
+(
+c0 TIME(0),
+c1 TIME(1),
+c2 TIME(2),
+c3 TIME(3),
+c4 TIME(4),
+c5 TIME(5),
+c6 TIME(6)
+);
+CREATE TABLE t2
+(
+c0 TIMESTAMP(0),
+c1 TIMESTAMP(1),
+c2 TIMESTAMP(2),
+c3 TIMESTAMP(3),
+c4 TIMESTAMP(4),
+c5 TIMESTAMP(5),
+c6 TIMESTAMP(6)
+);
+CREATE TABLE t3
+(
+c0 DATETIME(0),
+c1 DATETIME(1),
+c2 DATETIME(2),
+c3 DATETIME(3),
+c4 DATETIME(4),
+c5 DATETIME(5),
+c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+SELECT * FROM t1;;
+c0	01:01:01
+c1	01:01:01.1
+c2	01:01:01.11
+c3	01:01:01.111
+c4	01:01:01.1111
+c5	01:01:01.11111
+c6	01:01:01.111111
+SELECT * FROM t2;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT * FROM t3;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	33	33
+t2	1	41	41
+t3	1	50	50
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+SET @@global.mysql56_temporal_format=DEFAULT;
+SET @@global.mysql56_temporal_format=DEFAULT;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result'
--- mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result	2014-08-29 09:28:45 +0000
@@ -0,0 +1,85 @@
+include/master-slave.inc
+[connection master]
+SET @@global.mysql56_temporal_format=true;;
+SET @@global.mysql56_temporal_format=true;;
+SELECT @@global.mysql56_temporal_format AS on_master;
+on_master
+1
+SELECT @@global.mysql56_temporal_format AS on_slave;
+on_slave
+1
+CREATE TABLE t1
+(
+c0 TIME(0),
+c1 TIME(1),
+c2 TIME(2),
+c3 TIME(3),
+c4 TIME(4),
+c5 TIME(5),
+c6 TIME(6)
+);
+CREATE TABLE t2
+(
+c0 TIMESTAMP(0),
+c1 TIMESTAMP(1),
+c2 TIMESTAMP(2),
+c3 TIMESTAMP(3),
+c4 TIMESTAMP(4),
+c5 TIMESTAMP(5),
+c6 TIMESTAMP(6)
+);
+CREATE TABLE t3
+(
+c0 DATETIME(0),
+c1 DATETIME(1),
+c2 DATETIME(2),
+c3 DATETIME(3),
+c4 DATETIME(4),
+c5 DATETIME(5),
+c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+SELECT * FROM t1;;
+c0	01:01:01
+c1	01:01:01.1
+c2	01:01:01.11
+c3	01:01:01.111
+c4	01:01:01.1111
+c5	01:01:01.11111
+c6	01:01:01.111111
+SELECT * FROM t2;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT * FROM t3;;
+c0	2001-01-01 01:01:01
+c1	2001-01-01 01:01:01.1
+c2	2001-01-01 01:01:01.11
+c3	2001-01-01 01:01:01.111
+c4	2001-01-01 01:01:01.1111
+c5	2001-01-01 01:01:01.11111
+c6	2001-01-01 01:01:01.111111
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+t1	1	34	34
+t2	1	41	41
+t3	1	48	48
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+SET @@global.mysql56_temporal_format=DEFAULT;
+SET @@global.mysql56_temporal_format=DEFAULT;
+include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result'
--- mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result	2013-12-06 15:02:55 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb.result	2014-08-29 08:54:24 +0000
@@ -20,17 +20,31 @@ mysql050614_temporal1	CREATE TABLE `mysq
   `b` datetime(1) DEFAULT NULL,
   `c` timestamp(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1) ON UPDATE CURRENT_TIMESTAMP(1)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @@mysql56_temporal_format;
+@@mysql56_temporal_format
+1
 SET TIME_ZONE='+00:00';
 CREATE TABLE mysql050614_temporal0 (a time(0), b datetime(0), c timestamp(0)) engine=myisam;
 CREATE TABLE mysql050614_temporal1 (a time(1), b datetime(1), c timestamp(1)) engine=myisam;
 INSERT INTO mysql050614_temporal0 VALUES ('00:00:02','2001-01-01 00:00:02','2001-01-01 00:00:02');
 INSERT INTO mysql050614_temporal1 VALUES ('00:00:02.1','2001-01-01 00:00:02.2','2001-01-01 00:00:02.3');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+mysql050614_temporal0	2	13	26
+mysql050614_temporal1	1	16	16
 SELECT * FROM mysql050614_temporal0;
 a	b	c
 00:00:02	2001-01-01 00:00:02	2001-01-01 00:00:02
 SELECT * FROM mysql050614_temporal1;
 a	b	c
 00:00:02.1	2001-01-01 00:00:02.2	2001-01-01 00:00:02.3
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+mysql050614_temporal0	1	13	13
+mysql050614_temporal1	1	16	16
+SET @@global.mysql56_temporal_format=DEFAULT;
 DROP TABLE mysql050614_temporal0;
 DROP TABLE mysql050614_temporal1;
 include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result'
--- mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/r/rpl_temporal_mysql56_to_mariadb53.result	2014-08-29 08:53:41 +0000
@@ -0,0 +1,51 @@
+include/master-slave.inc
+[connection master]
+SET @@global.mysql56_temporal_format=false;;
+#
+# Testing replication from MariaDB-10.0 master
+# started over MySQL-5.6 data directory
+# to MariaDB-10.0 slave running with natively created tables
+#
+SET TIME_ZONE='+00:00';
+SHOW CREATE TABLE mysql050614_temporal0;
+Table	Create Table
+mysql050614_temporal0	CREATE TABLE `mysql050614_temporal0` (
+  `a` time DEFAULT NULL,
+  `b` datetime DEFAULT NULL,
+  `c` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW CREATE TABLE mysql050614_temporal1;
+Table	Create Table
+mysql050614_temporal1	CREATE TABLE `mysql050614_temporal1` (
+  `a` time(1) DEFAULT NULL,
+  `b` datetime(1) DEFAULT NULL,
+  `c` timestamp(1) NOT NULL DEFAULT CURRENT_TIMESTAMP(1) ON UPDATE CURRENT_TIMESTAMP(1)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @@mysql56_temporal_format;
+@@mysql56_temporal_format
+0
+SET TIME_ZONE='+00:00';
+CREATE TABLE mysql050614_temporal0 (a time(0), b datetime(0), c timestamp(0)) engine=myisam;
+CREATE TABLE mysql050614_temporal1 (a time(1), b datetime(1), c timestamp(1)) engine=myisam;
+INSERT INTO mysql050614_temporal0 VALUES ('00:00:02','2001-01-01 00:00:02','2001-01-01 00:00:02');
+INSERT INTO mysql050614_temporal1 VALUES ('00:00:02.1','2001-01-01 00:00:02.2','2001-01-01 00:00:02.3');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+mysql050614_temporal0	2	13	26
+mysql050614_temporal1	1	16	16
+SELECT * FROM mysql050614_temporal0;
+a	b	c
+00:00:02	2001-01-01 00:00:02	2001-01-01 00:00:02
+SELECT * FROM mysql050614_temporal1;
+a	b	c
+00:00:02.1	2001-01-01 00:00:02.2	2001-01-01 00:00:02.3
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
+TABLE_NAME	TABLE_ROWS	AVG_ROW_LENGTH	DATA_LENGTH
+mysql050614_temporal0	1	16	16
+mysql050614_temporal1	1	16	16
+SET @@global.mysql56_temporal_format=DEFAULT;
+DROP TABLE mysql050614_temporal0;
+DROP TABLE mysql050614_temporal1;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_format_default_to_default.test'
--- mysql-test/suite/rpl/t/rpl_temporal_format_default_to_default.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_format_default_to_default.test	2014-08-29 10:20:46 +0000
@@ -0,0 +1,76 @@
+--source include/master-slave.inc
+
+if ($force_master_mysql56_temporal_format)
+{
+  connection master;
+  eval SET @@global.mysql56_temporal_format=$force_master_mysql56_temporal_format;
+}
+
+if ($force_slave_mysql56_temporal_format)
+{
+  connection slave;
+  eval SET @@global.mysql56_temporal_format=$force_slave_mysql56_temporal_format;
+}
+
+connection master;
+SELECT @@global.mysql56_temporal_format AS on_master;
+connection slave;
+SELECT @@global.mysql56_temporal_format AS on_slave;
+connection master;
+
+CREATE TABLE t1
+(
+  c0 TIME(0),
+  c1 TIME(1),
+  c2 TIME(2),
+  c3 TIME(3),
+  c4 TIME(4),
+  c5 TIME(5),
+  c6 TIME(6)
+);
+CREATE TABLE t2
+(
+  c0 TIMESTAMP(0),
+  c1 TIMESTAMP(1),
+  c2 TIMESTAMP(2),
+  c3 TIMESTAMP(3),
+  c4 TIMESTAMP(4),
+  c5 TIMESTAMP(5),
+  c6 TIMESTAMP(6)
+);
+
+CREATE TABLE t3
+(
+  c0 DATETIME(0),
+  c1 DATETIME(1),
+  c2 DATETIME(2),
+  c3 DATETIME(3),
+  c4 DATETIME(4),
+  c5 DATETIME(5),
+  c6 DATETIME(6)
+);
+INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
+INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+sync_slave_with_master;
+
+connection slave;
+--query_vertical SELECT * FROM t1;
+--query_vertical SELECT * FROM t2;
+--query_vertical SELECT * FROM t3;
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
+
+connection master;
+DROP TABLE t1;
+DROP TABLE t2;
+DROP TABLE t3;
+
+connection slave;
+SET @@global.mysql56_temporal_format=DEFAULT;
+connection master;
+SET @@global.mysql56_temporal_format=DEFAULT;
+
+--source include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mariadb53.test'
--- mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mariadb53.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mariadb53.test	2014-08-29 10:10:47 +0000
@@ -0,0 +1,4 @@
+--let $force_master_mysql56_temporal_format=false;
+--let $force_slave_mysql56_temporal_format=false;
+
+--source rpl_temporal_format_default_to_default.test

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56.test'
--- mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56.test	2014-08-29 10:31:41 +0000
@@ -0,0 +1,14 @@
+#
+# MariaDB-5.3 fractional temporal types do not store metadata 
+# when running with --binlog-format=row, thus can replicate
+# only into a field with exactly the same data type and format.
+#
+# Skip when running with --binlog-format=row.
+# But mixed and statement formats should work without problems.
+#
+-- source include/have_binlog_format_mixed_or_statement.inc
+
+--let $force_master_mysql56_temporal_format=false;
+--let $force_slave_mysql56_temporal_format=true;
+
+--source rpl_temporal_format_default_to_default.test

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mariadb53.test'
--- mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mariadb53.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mariadb53.test	2014-08-29 10:10:58 +0000
@@ -0,0 +1,4 @@
+--let $force_master_mysql56_temporal_format=true;
+--let $force_slave_mysql56_temporal_format=false;
+
+--source rpl_temporal_format_default_to_default.test

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mysql56.test'
--- mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mysql56.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_format_mysql56_to_mysql56.test	2014-08-29 10:11:05 +0000
@@ -0,0 +1,4 @@
+--let $force_master_mysql56_temporal_format=true;
+--let $force_slave_mysql56_temporal_format=true;
+
+--source rpl_temporal_format_default_to_default.test

=== modified file 'mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb.test'
--- mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb.test	2013-12-06 15:02:55 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb.test	2014-08-29 08:52:48 +0000
@@ -1,5 +1,12 @@
 --source include/master-slave.inc
 
+if ($force_slave_mysql56_temporal_format)
+{
+  connection slave;
+  eval SET @@global.mysql56_temporal_format=$force_slave_mysql56_temporal_format;
+  connection master;
+}
+
 
 --echo #
 --echo # Testing replication from MariaDB-10.0 master
@@ -22,6 +29,7 @@ SHOW CREATE TABLE mysql050614_temporal0;
 SHOW CREATE TABLE mysql050614_temporal1;
 
 connection slave;
+SELECT @@mysql56_temporal_format;
 SET TIME_ZONE='+00:00';
 CREATE TABLE mysql050614_temporal0 (a time(0), b datetime(0), c timestamp(0)) engine=myisam;
 CREATE TABLE mysql050614_temporal1 (a time(1), b datetime(1), c timestamp(1)) engine=myisam;
@@ -29,11 +37,16 @@ CREATE TABLE mysql050614_temporal1 (a ti
 connection master;
 INSERT INTO mysql050614_temporal0 VALUES ('00:00:02','2001-01-01 00:00:02','2001-01-01 00:00:02');
 INSERT INTO mysql050614_temporal1 VALUES ('00:00:02.1','2001-01-01 00:00:02.2','2001-01-01 00:00:02.3');
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
 sync_slave_with_master;
 
 connection slave;
 SELECT * FROM mysql050614_temporal0;
 SELECT * FROM mysql050614_temporal1;
+SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 'mysql050614_temporal%' ORDER BY TABLE_NAME;
+SET @@global.mysql56_temporal_format=DEFAULT;
 
 connection master;
 DROP TABLE mysql050614_temporal0;

=== added file 'mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb53.test'
--- mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb53.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/rpl/t/rpl_temporal_mysql56_to_mariadb53.test	2014-08-29 08:51:11 +0000
@@ -0,0 +1,2 @@
+--let $force_slave_mysql56_temporal_format=false;
+--source rpl_temporal_mysql56_to_mariadb.test

=== added file 'mysql-test/suite/sys_vars/r/mysql56_temporal_format_basic.result'
--- mysql-test/suite/sys_vars/r/mysql56_temporal_format_basic.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/sys_vars/r/mysql56_temporal_format_basic.result	2014-08-29 05:36:38 +0000
@@ -0,0 +1,95 @@
+SET @start_value = @@global.mysql56_temporal_format;
+SELECT @start_value;
+@start_value
+1
+'#--------------------FN_DYNVARS_030_01------------------------#'
+SET @@global.mysql56_temporal_format = ON;
+SET @@global.mysql56_temporal_format = DEFAULT;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1
+'#---------------------FN_DYNVARS_030_02-------------------------#'
+SET @@global.mysql56_temporal_format = @start_value;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1
+'#--------------------FN_DYNVARS_030_03------------------------#'
+SET @@global.mysql56_temporal_format = ON;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1
+SET @@global.mysql56_temporal_format = OFF;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+0
+SET @@global.mysql56_temporal_format = 0;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+0
+SET @@global.mysql56_temporal_format = 1;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1
+'#--------------------FN_DYNVARS_030_04-------------------------#'
+SET @@global.mysql56_temporal_format = 2;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of '2'
+SET @@global.mysql56_temporal_format = -1;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of '-1'
+SET @@global.mysql56_temporal_format = TRUEF;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'TRUEF'
+SET @@global.mysql56_temporal_format = TRUE_F;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'TRUE_F'
+SET @@global.mysql56_temporal_format = FALSE0;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'FALSE0'
+SET @@global.mysql56_temporal_format = OON;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'OON'
+SET @@global.mysql56_temporal_format = ONN;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'ONN'
+SET @@global.mysql56_temporal_format = OOFF;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of 'OOFF'
+SET @@global.mysql56_temporal_format = 0FF;
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of '0FF'
+SET @@global.mysql56_temporal_format = ' ';
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of ' '
+SET @@global.mysql56_temporal_format = " ";
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of ' '
+SET @@global.mysql56_temporal_format = '';
+ERROR 42000: Variable 'mysql56_temporal_format' can't be set to the value of ''
+'#-------------------FN_DYNVARS_030_05----------------------------#'
+SET @@session.mysql56_temporal_format = 1;
+ERROR HY000: Variable 'mysql56_temporal_format' is a GLOBAL variable and should be set with SET GLOBAL
+SELECT @@session.mysql56_temporal_format;
+ERROR HY000: Variable 'mysql56_temporal_format' is a GLOBAL variable
+'#----------------------FN_DYNVARS_030_06------------------------#'
+SELECT IF(@@global.mysql56_temporal_format, "ON", "OFF") = VARIABLE_VALUE 
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
+WHERE VARIABLE_NAME='mysql56_temporal_format';
+IF(@@global.mysql56_temporal_format, "ON", "OFF") = VARIABLE_VALUE
+1
+'#---------------------FN_DYNVARS_030_07----------------------#'
+SET @@global.mysql56_temporal_format = TRUE;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1
+SET @@global.mysql56_temporal_format = FALSE;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+0
+'#---------------------FN_DYNVARS_030_08----------------------#'
+SET @@global.mysql56_temporal_format = 1;
+SELECT @@mysql56_temporal_format = @@global.mysql56_temporal_format;
+@@mysql56_temporal_format = @@global.mysql56_temporal_format
+1
+'#---------------------FN_DYNVARS_030_09----------------------#'
+SET mysql56_temporal_format = 1;
+ERROR HY000: Variable 'mysql56_temporal_format' is a GLOBAL variable and should be set with SET GLOBAL
+SET global.mysql56_temporal_format = 1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql56_temporal_format = 1' at line 1
+SELECT global.mysql56_temporal_format;
+ERROR 42S02: Unknown table 'global' in field list
+SELECT mysql56_temporal_format = @@session.mysql56_temporal_format;
+ERROR 42S22: Unknown column 'mysql56_temporal_format' in 'field list'
+SET @@global.mysql56_temporal_format = @start_value;
+SELECT @@global.mysql56_temporal_format;
+@@global.mysql56_temporal_format
+1

=== added file 'mysql-test/suite/sys_vars/r/mysql56_temporal_format_func.result'
--- mysql-test/suite/sys_vars/r/mysql56_temporal_format_func.result	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/sys_vars/r/mysql56_temporal_format_func.result	2014-08-27 11:42:41 +0000
@@ -0,0 +1,63 @@
+#
+# MariaDB-5.3 format
+#
+SET @@global.mysql56_temporal_format=false;
+CREATE TABLE t1 (a DATETIME NOT NULL, b DATETIME NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10','2001-01-01 10:10:10');
+SELECT * FROM t1;
+a	b
+2001-01-01 10:10:10	2001-01-01 10:10:10
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+8	17
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(5) NOT NULL, b DATETIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10.12345','2001-01-01 10:10:10.12345');
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+7	15
+SELECT * FROM t1;
+a	b
+2001-01-01 10:10:10.12345	2001-01-01 10:10:10.12345
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(5) NOT NULL,b TIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('10:10:10.12345','10:10:10.12345');
+SELECT * FROM t1;
+a	b
+10:10:10.12345	10:10:10.12345
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+5	11
+DROP TABLE t1;
+#
+# MySQL-5.6 format
+#
+SET @@global.mysql56_temporal_format=true;
+CREATE TABLE t1 (a DATETIME NOT NULL, b DATETIME NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10','2001-01-01 10:10:10');
+SELECT * FROM t1;
+a	b
+2001-01-01 10:10:10	2001-01-01 10:10:10
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+5	11
+DROP TABLE t1;
+CREATE TABLE t1 (a DATETIME(5) NOT NULL, b DATETIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10.12345','2001-01-01 10:10:10.12345');
+SELECT * FROM t1;
+a	b
+2001-01-01 10:10:10.12345	2001-01-01 10:10:10.12345
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+8	17
+DROP TABLE t1;
+CREATE TABLE t1 (a TIME(5) NOT NULL,b TIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('10:10:10.12345','10:10:10.12345');
+SELECT * FROM t1;
+a	b
+10:10:10.12345	10:10:10.12345
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+FIELD_LENGTH	DATA_LENGTH
+6	13
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=DEFAULT;

=== added file 'mysql-test/suite/sys_vars/t/mysql56_temporal_format_basic.test'
--- mysql-test/suite/sys_vars/t/mysql56_temporal_format_basic.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/sys_vars/t/mysql56_temporal_format_basic.test	2014-08-27 11:44:42 +0000
@@ -0,0 +1,165 @@
+############## mysql-test\t\mysql56_temporal_format_basic.test ################
+#                                                                             #
+# Variable Name: mysql56_temporal_format                                      #
+# Scope: GLOBAL                                                               #
+# Access Type: Dynamic                                                        #
+# Data Type: boolean                                                          #
+# Default Value: OFF                                                          #
+# Range:                                                                      #
+#                                                                             #
+# Creation Date: 2014-08-27                                                   #
+#                                                                             #
+# Description: Test Cases of Dynamic System Variable mysql56_temporal_format  #
+#              that checks the behavior of this variable in the following ways#
+#              * Default Value                                                #
+#              * Valid & Invalid values                                       #
+#              * Scope & Access method                                        #
+#              * Data Integrity                                               #
+#                                                                             #
+###############################################################################
+
+--source include/load_sysvars.inc
+######################################################################## 
+#                    START OF mysql56_temporal_format TESTS            #
+######################################################################## 
+
+
+###########################################################################
+# Saving initial value of mysql56_temporal_format in a temporary variable #
+###########################################################################
+
+SET @start_value = @@global.mysql56_temporal_format;
+SELECT @start_value;
+
+
+--echo '#--------------------FN_DYNVARS_030_01------------------------#'
+#############################################################
+#    Display the DEFAULT value of mysql56_temporal_format   #
+#############################################################
+
+SET @@global.mysql56_temporal_format = ON;
+SET @@global.mysql56_temporal_format = DEFAULT;
+SELECT @@global.mysql56_temporal_format;
+
+
+--echo '#---------------------FN_DYNVARS_030_02-------------------------#'
+############################################### 
+#     Verify default value of variable        #
+############################################### 
+
+SET @@global.mysql56_temporal_format = @start_value;
+SELECT @@global.mysql56_temporal_format;
+
+
+--echo '#--------------------FN_DYNVARS_030_03------------------------#'
+################################################################
+# Change the value of mysql56_temporal_format to a valid value #
+################################################################
+
+SET @@global.mysql56_temporal_format = ON;
+SELECT @@global.mysql56_temporal_format;
+SET @@global.mysql56_temporal_format = OFF;
+SELECT @@global.mysql56_temporal_format;
+SET @@global.mysql56_temporal_format = 0;
+SELECT @@global.mysql56_temporal_format;
+SET @@global.mysql56_temporal_format = 1;
+SELECT @@global.mysql56_temporal_format;
+
+
+--echo '#--------------------FN_DYNVARS_030_04-------------------------#'
+########################################################################### 
+# Change the value of mysql56_temporal_format to invalid value            #
+########################################################################### 
+
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = 2;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = -1;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = TRUEF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = TRUE_F;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = FALSE0;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = OON;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = ONN;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = OOFF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = 0FF;
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = ' ';
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = " ";
+--Error ER_WRONG_VALUE_FOR_VAR
+SET @@global.mysql56_temporal_format = '';
+
+
+--echo '#-------------------FN_DYNVARS_030_05----------------------------#'
+########################################################################### 
+# Test if accessing session mysql56_temporal_format gives error           #
+########################################################################### 
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.mysql56_temporal_format = 1;
+--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SELECT @@session.mysql56_temporal_format;
+
+
+--echo '#----------------------FN_DYNVARS_030_06------------------------#'
+####################################################################
+# Check if the value in GLOBAL Tables matches values in variable   #
+####################################################################
+
+SELECT IF(@@global.mysql56_temporal_format, "ON", "OFF") = VARIABLE_VALUE 
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
+WHERE VARIABLE_NAME='mysql56_temporal_format';
+
+
+--echo '#---------------------FN_DYNVARS_030_07----------------------#'
+################################################################### 
+#      Check if TRUE and FALSE values can be used on variable     #
+################################################################### 
+
+SET @@global.mysql56_temporal_format = TRUE;
+SELECT @@global.mysql56_temporal_format;
+SET @@global.mysql56_temporal_format = FALSE;
+SELECT @@global.mysql56_temporal_format;
+
+
+--echo '#---------------------FN_DYNVARS_030_08----------------------#'
+###############################################################################
+#    Check if accessing variable without SCOPE points to same global variable #
+###############################################################################
+
+SET @@global.mysql56_temporal_format = 1;
+SELECT @@mysql56_temporal_format = @@global.mysql56_temporal_format;
+
+--echo '#---------------------FN_DYNVARS_030_09----------------------#'
+############################################################################# 
+# Check if mysql56_temporal_format can be accessed with and without @@ sign #
+#############################################################################
+
+--Error ER_GLOBAL_VARIABLE
+SET mysql56_temporal_format = 1;
+--Error ER_PARSE_ERROR
+SET global.mysql56_temporal_format = 1;
+--Error ER_UNKNOWN_TABLE
+SELECT global.mysql56_temporal_format;
+--Error ER_BAD_FIELD_ERROR
+SELECT mysql56_temporal_format = @@session.mysql56_temporal_format;
+
+
+##############################  
+#   Restore initial value    #
+##############################
+
+SET @@global.mysql56_temporal_format = @start_value;
+SELECT @@global.mysql56_temporal_format;
+
+
+#############################################################
+# END OF mysql56_temporal_format TESTS                      #
+#############################################################

=== added file 'mysql-test/suite/sys_vars/t/mysql56_temporal_format_func.test'
--- mysql-test/suite/sys_vars/t/mysql56_temporal_format_func.test	1970-01-01 00:00:00 +0000
+++ mysql-test/suite/sys_vars/t/mysql56_temporal_format_func.test	2014-08-27 11:41:08 +0000
@@ -0,0 +1,66 @@
+#
+# This test checks that DATETIME, DATETIME(5), TIME(5) columns
+# occupy different data length depending on @@mysql56_temporal_format:
+#
+#  Type           MariaDB   MySQL
+#  ----           -------   -----
+#  DATETIME             8       5
+#  DATETIME(5)          7       8
+#  TIME(5)              5       6
+#
+# The DATETIME(1-3,4,6) and TIME(0-4,6) data types use the same size
+# in both MariaDB and MySQL formats.
+# TIMESTAMP(0-6) also uses the same size in both formats.
+#
+# We use two columns in the tests below, to make sure the record length
+# is longer than 7. Records whose fields occupy less then 7 bytes use
+# 7 bytes anyway (assuming the default MAX_ROWS values), to store deleted
+# record list pointers.
+#
+
+--echo #
+--echo # MariaDB-5.3 format
+--echo #
+SET @@global.mysql56_temporal_format=false;
+CREATE TABLE t1 (a DATETIME NOT NULL, b DATETIME NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10','2001-01-01 10:10:10');
+SELECT * FROM t1;
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(5) NOT NULL, b DATETIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10.12345','2001-01-01 10:10:10.12345');
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(5) NOT NULL,b TIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('10:10:10.12345','10:10:10.12345');
+SELECT * FROM t1;
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+--echo #
+--echo # MySQL-5.6 format
+--echo #
+
+SET @@global.mysql56_temporal_format=true;
+CREATE TABLE t1 (a DATETIME NOT NULL, b DATETIME NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10','2001-01-01 10:10:10');
+SELECT * FROM t1;
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a DATETIME(5) NOT NULL, b DATETIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('2001-01-01 10:10:10.12345','2001-01-01 10:10:10.12345');
+SELECT * FROM t1;
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a TIME(5) NOT NULL,b TIME(5) NOT NULL);
+INSERT INTO t1 VALUES ('10:10:10.12345','10:10:10.12345');
+SELECT * FROM t1;
+SELECT (AVG_ROW_LENGTH-1) DIV 2 AS FIELD_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
+DROP TABLE t1;
+
+SET @@global.mysql56_temporal_format=DEFAULT;

=== modified file 'mysql-test/t/old-mode.test'
--- mysql-test/t/old-mode.test	2014-03-07 20:05:28 +0000
+++ mysql-test/t/old-mode.test	2014-08-27 10:19:51 +0000
@@ -64,3 +64,21 @@ INSERT INTO t1 VALUES (NULL, '00:20:12')
 INSERT INTO t1 VALUES (NULL, '-00:20:12');
 SELECT IF(1,ADDDATE(IFNULL(a,b),0),1) FROM t1;
 DROP TABLE t1;
+
+--echo #
+--echo # MDEV-6649 Different warnings for TIME and TIME(N) when @@old_mode=zero_date_time_cast
+--echo #
+SET @@global.mysql56_temporal_format=true;
+SET @@old_mode=zero_date_time_cast;
+CREATE TABLE t1 (a TIME,b TIME(1));
+INSERT INTO t1 VALUES (TIME'830:20:30',TIME'830:20:30');
+SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=false;
+SET @@old_mode=zero_date_time_cast;
+CREATE TABLE t1 (a TIME,b TIME(1));
+INSERT INTO t1 VALUES (TIME'830:20:30',TIME'830:20:30');
+SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
+DROP TABLE t1;
+SET @@global.mysql56_temporal_format=DEFAULT;
+

=== modified file 'sql/field.cc'
--- sql/field.cc	2014-06-11 08:08:08 +0000
+++ sql/field.cc	2014-08-29 10:45:32 +0000
@@ -5042,7 +5042,8 @@ int Field_timestamp_with_dec::set_time()
 {
   THD *thd= get_thd();
   set_notnull();
-  store_TIME(thd->query_start(), thd->query_start_sec_part());
+  // Avoid writing microseconds into binlog for FSP=0
+  store_TIME(thd->query_start(), decimals() ? thd->query_start_sec_part() : 0);
   return 0;
 }
 
@@ -5442,6 +5443,21 @@ String *Field_time::val_str(String *str,
 }
 
 
+bool Field_time::check_zero_in_date_with_warn(ulonglong fuzzydate)
+{
+  if (!(fuzzydate & TIME_TIME_ONLY) && (fuzzydate & TIME_NO_ZERO_IN_DATE))
+  {
+    THD *thd= get_thd();
+    push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+                        ER_WARN_DATA_OUT_OF_RANGE,
+                        ER(ER_WARN_DATA_OUT_OF_RANGE), field_name,
+                        thd->get_stmt_da()->current_row_for_warning());
+    return true;
+  }
+  return false;
+}
+
+
 /**
   @note
   Normally we would not consider 'time' as a valid date, but we allow
@@ -5451,16 +5467,8 @@ String *Field_time::val_str(String *str,
  
 bool Field_time::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
 {
-  if (!(fuzzydate & TIME_TIME_ONLY) &&
-      (fuzzydate & TIME_NO_ZERO_IN_DATE))
-  {
-    THD *thd= get_thd();
-    push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
-                        ER_WARN_DATA_OUT_OF_RANGE,
-                        ER(ER_WARN_DATA_OUT_OF_RANGE), field_name,
-                        thd->get_stmt_da()->current_row_for_warning());
-    return 1;
-  }
+  if (check_zero_in_date_with_warn(fuzzydate))
+    return true;
   long tmp=(long) sint3korr(ptr);
   ltime->neg=0;
   if (tmp < 0)
@@ -5565,6 +5573,8 @@ double Field_time_with_dec::val_real(voi
 
 bool Field_time_hires::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
 {
+  if (check_zero_in_date_with_warn(fuzzydate))
+    return true;
   uint32 len= pack_length();
   longlong packed= read_bigendian(ptr, len);
 
@@ -5578,7 +5588,7 @@ bool Field_time_hires::get_date(MYSQL_TI
   ltime->time_type= MYSQL_TIMESTAMP_TIME;
   ltime->hour+= (ltime->month*32+ltime->day)*24;
   ltime->month= ltime->day= 0;
-  return !(fuzzydate & TIME_TIME_ONLY) && (fuzzydate & TIME_NO_ZERO_IN_DATE);
+  return false;
 }
 
 
@@ -5623,6 +5633,8 @@ void Field_timef::store_TIME(MYSQL_TIME
 
 bool Field_timef::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
 {
+  if (check_zero_in_date_with_warn(fuzzydate))
+    return true;
   longlong tmp= my_time_packed_from_binary(ptr, dec);
   TIME_from_longlong_time_packed(ltime, tmp);
   return false;

=== modified file 'sql/field.h'
--- sql/field.h	2014-08-07 16:06:56 +0000
+++ sql/field.h	2014-08-27 10:04:33 +0000
@@ -1885,6 +1885,7 @@ class Field_time :public Field_temporal
   virtual void store_TIME(MYSQL_TIME *ltime);
   int store_TIME_with_warning(MYSQL_TIME *ltime, const ErrConv *str,
                               int was_cut, int have_smth_to_conv);
+  bool check_zero_in_date_with_warn(ulonglong fuzzydate);
 public:
   Field_time(uchar *ptr_arg, uint length_arg, uchar *null_ptr_arg,
              uchar null_bit_arg, enum utype unireg_check_arg,

=== modified file 'sql/item.cc'
--- sql/item.cc	2014-08-07 16:06:56 +0000
+++ sql/item.cc	2014-08-27 07:27:31 +0000
@@ -1585,6 +1585,7 @@ Item_splocal::Item_splocal(const LEX_STR
 {
   maybe_null= TRUE;
 
+  sp_var_type= real_type_to_type(sp_var_type);
   m_type= sp_map_item_type(sp_var_type);
   m_field_type= sp_var_type;
   m_result_type= sp_map_result_type(sp_var_type);

=== modified file 'sql/mysqld.cc'
--- sql/mysqld.cc	2014-08-07 16:06:56 +0000
+++ sql/mysqld.cc	2014-08-27 05:36:18 +0000
@@ -425,6 +425,7 @@ my_bool opt_safe_user_create = 0;
 my_bool opt_show_slave_auth_info;
 my_bool opt_log_slave_updates= 0;
 my_bool opt_replicate_annotate_row_events= 0;
+my_bool opt_mysql56_temporal_format= 0;
 char *opt_slave_skip_errors;
 
 /*

=== modified file 'sql/mysqld.h'
--- sql/mysqld.h	2014-08-07 16:06:56 +0000
+++ sql/mysqld.h	2014-08-27 05:35:53 +0000
@@ -741,6 +741,7 @@ extern my_bool opt_master_verify_checksu
 extern my_bool opt_stack_trace;
 extern my_bool opt_expect_abort;
 extern my_bool opt_slave_sql_verify_checksum;
+extern my_bool opt_mysql56_temporal_format;
 extern ulong binlog_checksum_options;
 extern bool max_user_connections_checking;
 extern ulong opt_binlog_dbug_fsync_sleep;

=== modified file 'sql/sql_yacc.yy'
--- sql/sql_yacc.yy	2014-08-07 16:06:56 +0000
+++ sql/sql_yacc.yy	2014-08-27 11:45:51 +0000
@@ -6204,22 +6204,26 @@ type:
         | DATE_SYM
           { $$=MYSQL_TYPE_DATE; }
         | TIME_SYM opt_field_length
-          { $$=MYSQL_TYPE_TIME; }
+          { $$= opt_mysql56_temporal_format ?
+                MYSQL_TYPE_TIME2 : MYSQL_TYPE_TIME; }
         | TIMESTAMP opt_field_length
           {
             if (thd->variables.sql_mode & MODE_MAXDB)
-              $$=MYSQL_TYPE_DATETIME;
+              $$= opt_mysql56_temporal_format ?
+                  MYSQL_TYPE_DATETIME2 : MYSQL_TYPE_DATETIME;
             else
             {
               /* 
                 Unlike other types TIMESTAMP fields are NOT NULL by default.
               */
               Lex->type|= NOT_NULL_FLAG;
-              $$=MYSQL_TYPE_TIMESTAMP;
+              $$= opt_mysql56_temporal_format ?
+                  MYSQL_TYPE_TIMESTAMP2 : MYSQL_TYPE_TIMESTAMP;
             }
           }
         | DATETIME opt_field_length
-          { $$=MYSQL_TYPE_DATETIME; }
+          { $$= opt_mysql56_temporal_format ?
+                MYSQL_TYPE_DATETIME2 : MYSQL_TYPE_DATETIME; }
         | TINYBLOB
           {
             Lex->charset=&my_charset_bin;

=== modified file 'sql/sys_vars.cc'
--- sql/sys_vars.cc	2014-08-07 16:06:56 +0000
+++ sql/sys_vars.cc	2014-08-28 14:16:31 +0000
@@ -4815,3 +4815,8 @@ static Sys_var_mybool Sys_pseudo_slave_m
        SESSION_ONLY(pseudo_slave_mode), NO_CMD_LINE, DEFAULT(FALSE),
        NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(check_pseudo_slave_mode));
 
+static Sys_var_mybool Sys_mysql56_temporal_format(
+       "mysql56_temporal_format",
+       "Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME, DATETIME, TIMESTAMP columns.",
+       GLOBAL_VAR(opt_mysql56_temporal_format),
+       CMD_LINE(OPT_ARG), DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG);

=== modified file 'storage/innobase/dict/dict0stats.cc'
--- storage/innobase/dict/dict0stats.cc	2014-08-06 18:05:10 +0000
+++ storage/innobase/dict/dict0stats.cc	2014-08-28 14:21:35 +0000
@@ -194,7 +194,7 @@ dict_stats_persistent_storage_check(
 		{"table_name", DATA_VARMYSQL,
 			DATA_NOT_NULL, 192},
 
-		{"last_update", DATA_INT,
+		{"last_update", DATA_FIXBINARY,
 			DATA_NOT_NULL, 4},
 
 		{"n_rows", DATA_INT,
@@ -225,7 +225,7 @@ dict_stats_persistent_storage_check(
 		{"index_name", DATA_VARMYSQL,
 			DATA_NOT_NULL, 192},
 
-		{"last_update", DATA_INT,
+		{"last_update", DATA_FIXBINARY,
 			DATA_NOT_NULL, 4},
 
 		{"stat_name", DATA_VARMYSQL,

=== modified file 'storage/tokudb/mysql-test/tokudb_alter_table/r/fractional_time_alter_table.result'
--- storage/tokudb/mysql-test/tokudb_alter_table/r/fractional_time_alter_table.result	2014-03-26 08:33:54 +0000
+++ storage/tokudb/mysql-test/tokudb_alter_table/r/fractional_time_alter_table.result	2014-08-29 06:14:31 +0000
@@ -99,10 +99,10 @@ ERROR 42000: Table 'foo' uses an extensi
 alter table foo change d d datetime(2);
 ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change d d datetime(5);
+ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change d d datetime(6);
 ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change g g datetime(5);
-ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 drop table foo;
 create table foo (
 a time, 
@@ -149,10 +149,10 @@ ERROR 42000: Table 'foo' uses an extensi
 alter table foo change d d time(2);
 ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change d d time(5);
+ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change d d time(6);
 ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 alter table foo change g g time(5);
-ERROR 42000: Table 'foo' uses an extension that doesn't exist in this MariaDB version
 drop table foo;
 create table foo (a int, b int) engine=TokuDB;
 insert into foo values (1,2);

=== modified file 'storage/tokudb/mysql-test/tokudb_alter_table/t/fractional_time_alter_table.test'
--- storage/tokudb/mysql-test/tokudb_alter_table/t/fractional_time_alter_table.test	2013-09-09 11:59:38 +0000
+++ storage/tokudb/mysql-test/tokudb_alter_table/t/fractional_time_alter_table.test	2014-08-29 06:14:06 +0000
@@ -91,11 +91,11 @@ alter table foo change b b datetime(6);
 
 --error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d datetime(2);
+--error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d datetime(5);
 --error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d datetime(6);
 
---error ER_UNSUPPORTED_EXTENSION
 alter table foo change g g datetime(5);
 drop table foo;
 
@@ -137,11 +137,11 @@ alter table foo change b b time(6);
 
 --error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d time(2);
+--error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d time(5);
 --error ER_UNSUPPORTED_EXTENSION
 alter table foo change d d time(6);
 
---error ER_UNSUPPORTED_EXTENSION
 alter table foo change g g time(5);
 drop table foo;
 

=== modified file 'storage/xtradb/dict/dict0stats.cc'
--- storage/xtradb/dict/dict0stats.cc	2014-08-06 17:57:06 +0000
+++ storage/xtradb/dict/dict0stats.cc	2014-08-28 14:20:58 +0000
@@ -194,7 +194,7 @@ dict_stats_persistent_storage_check(
 		{"table_name", DATA_VARMYSQL,
 			DATA_NOT_NULL, 192},
 
-		{"last_update", DATA_INT,
+		{"last_update", DATA_FIXBINARY,
 			DATA_NOT_NULL, 4},
 
 		{"n_rows", DATA_INT,
@@ -225,7 +225,7 @@ dict_stats_persistent_storage_check(
 		{"index_name", DATA_VARMYSQL,
 			DATA_NOT_NULL, 192},
 
-		{"last_update", DATA_INT,
+		{"last_update", DATA_FIXBINARY,
 			DATA_NOT_NULL, 4},
 
 		{"stat_name", DATA_VARMYSQL,


Follow ups