diff options
author | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-04-18 17:36:05 -0700 |
---|---|---|
committer | Jacob Mathew <jacob.mathew@mariadb.com> | 2017-04-18 17:36:05 -0700 |
commit | 0b52b28b91eac1018d865f2f918b83c416565f2f (patch) | |
tree | 1c6be57c366715e0aa134e225e60c1604029eecc /mysql-test | |
parent | 38af34bb2143f2a7ce82d2e241d8995f419a7f29 (diff) | |
download | mariadb-git-0b52b28b91eac1018d865f2f918b83c416565f2f.tar.gz |
MDEV-10355 Weird error message upon CREATE TABLE with DEFAULTbb-10.2-MDEV-10355
Fixed handling of default values with cached temporal functions so that the
CREATE TABLE statement now succeeds.
Fixed virtual column session cleanup.
Fixed the error message.
Added quoting of date/time values in cases when this was omitted.
Added a test case in default.test.
Updated test result files.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/default.result | 15 | ||||
-rw-r--r-- | mysql-test/r/derived_cond_pushdown.result | 28 | ||||
-rw-r--r-- | mysql-test/r/explain_json.result | 6 | ||||
-rw-r--r-- | mysql-test/r/range.result | 18 | ||||
-rw-r--r-- | mysql-test/r/range_mrr_icp.result | 18 | ||||
-rw-r--r-- | mysql-test/r/type_time.result | 16 | ||||
-rw-r--r-- | mysql-test/t/default.test | 14 |
7 files changed, 72 insertions, 43 deletions
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result index 4a3f25cb8f4..2780ed3b168 100644 --- a/mysql-test/r/default.result +++ b/mysql-test/r/default.result @@ -1941,6 +1941,21 @@ SELECT * FROM t1; a b c 2003-02-01 2003-05-01 12:05:55 128885 DROP TABLE t1; +CREATE OR REPLACE TABLE t1 ( col INT DEFAULT ( 1 LIKE ( NOW() BETWEEN '2000-01-01' AND '2012-12-12' ) ) ); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `col` int(11) DEFAULT (1 like (current_timestamp() between '2000-01-01' and '2012-12-12')) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SET timestamp = UNIX_TIMESTAMP( '2004-04-04' ); +INSERT INTO t1 VALUES( DEFAULT ); +SET timestamp = DEFAULT; +INSERT INTO t1 VALUES( DEFAULT ); +SELECT * FROM t1; +col +1 +0 +DROP TABLE t1; # # Hybrid type functions # diff --git a/mysql-test/r/derived_cond_pushdown.result b/mysql-test/r/derived_cond_pushdown.result index 021633200e1..d51b01b6690 100644 --- a/mysql-test/r/derived_cond_pushdown.result +++ b/mysql-test/r/derived_cond_pushdown.result @@ -7118,7 +7118,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", + "const_condition": "2 < 2 or <in_optimizer>(2,<exists>(subquery#3))", "table": { "table_name": "t1", "access_type": "system", @@ -7202,7 +7202,7 @@ EXPLAIN { "query_block": { "select_id": 1, - "const_condition": "0 or <in_optimizer>(2,<exists>(subquery#3))", + "const_condition": "2 < 2 or <in_optimizer>(2,<exists>(subquery#3))", "table": { "table_name": "t1", "access_type": "system", @@ -7668,7 +7668,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "v1.b = 2", + "attached_condition": "v1.b = count(t2.c)", "materialized": { "query_block": { "select_id": 3, @@ -7725,7 +7725,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "v1.f = 2", + "attached_condition": "v1.f = count(t.pk)", "materialized": { "query_block": { "select_id": 3, @@ -7745,7 +7745,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "v2.pk > 2" + "attached_condition": "v2.pk > count(t.pk)" }, "buffer_type": "flat", "buffer_size": "256Kb", @@ -7804,7 +7804,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 3", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -7861,7 +7861,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 2.7100000381469727", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -7913,7 +7913,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 3.21", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -7965,7 +7965,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 'aa'", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -8019,7 +8019,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 2007-05-28 00:00:00", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -8071,7 +8071,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 2007-05-28", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -8123,7 +8123,7 @@ EXPLAIN "access_type": "ALL", "rows": 3, "filtered": 100, - "attached_condition": "sq.i = 10:00:02", + "attached_condition": "sq.i = min(t2.j)", "materialized": { "query_block": { "select_id": 2, @@ -8214,7 +8214,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "v1.c = NULL", + "attached_condition": "v1.c = min(t2.c)", "materialized": { "query_block": { "select_id": 3, @@ -8317,7 +8317,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "<cache>(<in_optimizer>(1,<exists>(subquery#2))) or v1.c = 'foo'", + "attached_condition": "<in_optimizer>(1,<exists>(subquery#2)) or v1.c = 'foo'", "materialized": { "query_block": { "select_id": 3, diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result index 1af67cf6a4e..f416e5c2554 100644 --- a/mysql-test/r/explain_json.result +++ b/mysql-test/r/explain_json.result @@ -811,7 +811,7 @@ EXPLAIN "ref": ["func"], "rows": 2, "filtered": 100, - "attached_condition": "trigcond(<cache>(outer_t1.a) = t1.a or t1.a is null)", + "attached_condition": "trigcond(outer_t1.a = t1.a or t1.a is null)", "using_index": true } }, @@ -825,7 +825,7 @@ EXPLAIN "buffer_type": "flat", "buffer_size": "256Kb", "join_type": "BNL", - "attached_condition": "t2.b <> outer_t1.a and trigcond(<cache>(outer_t1.a) = t1.a or t1.a is null)" + "attached_condition": "t2.b <> outer_t1.a and trigcond(outer_t1.a = t1.a or t1.a is null)" } } } @@ -1106,7 +1106,7 @@ EXPLAIN "access_type": "ALL", "rows": 2, "filtered": 100, - "attached_condition": "(case when convert(t1.a using utf8) = <cache>(_utf8'a' collate utf8_bin) then NULL else t1.a end)" + "attached_condition": "(case when convert(t1.a using utf8) = _utf8'a' collate utf8_bin then NULL else t1.a end)" } } } diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 28f5cf635d0..3c57ab980c3 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -2371,7 +2371,7 @@ EXPLAIN "used_key_parts": ["a", "b"], "rows": 7, "filtered": 100, - "attached_condition": "(t1.a,t1.b) in (<cache>((2,3)),<cache>((3,3)),<cache>((8,8)),<cache>((7,7)))" + "attached_condition": "(t1.a,t1.b) in ((2,3),(3,3),(8,8),(7,7))" } } } @@ -2431,7 +2431,7 @@ EXPLAIN "used_key_parts": ["a"], "rows": 5, "filtered": 100, - "attached_condition": "(t1.a,t1.b + t1.a) in (<cache>((4,9)),<cache>((8,8)),<cache>((7,7)))" + "attached_condition": "(t1.a,t1.b + t1.a) in ((4,9),(8,8),(7,7))" } } } @@ -2498,7 +2498,7 @@ EXPLAIN "rows": 3, "filtered": 100, "index_condition": "t2.d is not null", - "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))" + "attached_condition": "(t2.d,t2.e) in ((3,3),(7,7),(2,2))" }, "table": { "table_name": "t1", @@ -2581,7 +2581,7 @@ EXPLAIN "ref": ["test.t1.a"], "rows": 12, "filtered": 100, - "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1" + "attached_condition": "(t1.a,t2.e) in ((3,3),(7,7),(8,8)) and length(t2.f) = 1" } } } @@ -2666,7 +2666,7 @@ EXPLAIN "used_key_parts": ["e"], "rows": 6, "filtered": 100, - "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1 and t2.d is not null" + "attached_condition": "(t2.d,t2.e) in ((4,4),(7,7),(8,8)) and length(t2.f) = 1 and t2.d is not null" }, "table": { "table_name": "t1", @@ -2716,7 +2716,7 @@ EXPLAIN "rows": 5, "filtered": 100, "index_condition": "t2.d is not null", - "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1" + "attached_condition": "(t2.d,t2.e) in ((4,4),(7,7),(8,8)) and length(t2.f) = 1" }, "table": { "table_name": "t1", @@ -2830,7 +2830,7 @@ EXPLAIN "ref": ["test.t1.a"], "rows": 3, "filtered": 100, - "attached_condition": "(t1.a,t2.e) in ((t2.e,t1.a + 1),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1" + "attached_condition": "(t1.a,t2.e) in ((t2.e,t1.a + 1),(7,7),(8,8)) and length(t2.f) = 1" } } } @@ -2870,7 +2870,7 @@ EXPLAIN "rows": 13, "filtered": 100, "index_condition": "t1.a is not null", - "attached_condition": "(t1.a,2) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and length(t1.c) = 1" + "attached_condition": "(t1.a,2) in ((2,2),(7,7),(8,8)) and length(t1.c) = 1" }, "table": { "table_name": "t2", @@ -2958,7 +2958,7 @@ EXPLAIN "rows": 13, "filtered": 100, "index_condition": "t1.a is not null", - "attached_condition": "(t1.a,1 + 1) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and length(t1.c) = 1" + "attached_condition": "(t1.a,1 + 1) in ((2,2),(7,7),(8,8)) and length(t1.c) = 1" }, "table": { "table_name": "t2", diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result index f2860aaab76..445f0877586 100644 --- a/mysql-test/r/range_mrr_icp.result +++ b/mysql-test/r/range_mrr_icp.result @@ -2373,7 +2373,7 @@ EXPLAIN "used_key_parts": ["a", "b"], "rows": 7, "filtered": 100, - "attached_condition": "(t1.a,t1.b) in (<cache>((2,3)),<cache>((3,3)),<cache>((8,8)),<cache>((7,7)))", + "attached_condition": "(t1.a,t1.b) in ((2,3),(3,3),(8,8),(7,7))", "mrr_type": "Rowid-ordered scan" } } @@ -2434,7 +2434,7 @@ EXPLAIN "used_key_parts": ["a"], "rows": 5, "filtered": 100, - "attached_condition": "(t1.a,t1.b + t1.a) in (<cache>((4,9)),<cache>((8,8)),<cache>((7,7)))", + "attached_condition": "(t1.a,t1.b + t1.a) in ((4,9),(8,8),(7,7))", "mrr_type": "Rowid-ordered scan" } } @@ -2503,7 +2503,7 @@ EXPLAIN "rows": 3, "filtered": 100, "index_condition": "t2.d is not null", - "attached_condition": "(t2.d,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((2,2)))", + "attached_condition": "(t2.d,t2.e) in ((3,3),(7,7),(2,2))", "mrr_type": "Rowid-ordered scan" }, "table": { @@ -2588,7 +2588,7 @@ EXPLAIN "ref": ["test.t1.a"], "rows": 12, "filtered": 100, - "attached_condition": "(t1.a,t2.e) in (<cache>((3,3)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1" + "attached_condition": "(t1.a,t2.e) in ((3,3),(7,7),(8,8)) and length(t2.f) = 1" } } } @@ -2673,7 +2673,7 @@ EXPLAIN "used_key_parts": ["e"], "rows": 6, "filtered": 100, - "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1 and t2.d is not null", + "attached_condition": "(t2.d,t2.e) in ((4,4),(7,7),(8,8)) and length(t2.f) = 1 and t2.d is not null", "mrr_type": "Rowid-ordered scan" }, "table": { @@ -2724,7 +2724,7 @@ EXPLAIN "rows": 5, "filtered": 100, "index_condition": "t2.d is not null", - "attached_condition": "(t2.d,t2.e) in (<cache>((4,4)),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1", + "attached_condition": "(t2.d,t2.e) in ((4,4),(7,7),(8,8)) and length(t2.f) = 1", "mrr_type": "Rowid-ordered scan" }, "table": { @@ -2840,7 +2840,7 @@ EXPLAIN "ref": ["test.t1.a"], "rows": 3, "filtered": 100, - "attached_condition": "(t1.a,t2.e) in ((t2.e,t1.a + 1),<cache>((7,7)),<cache>((8,8))) and length(t2.f) = 1" + "attached_condition": "(t1.a,t2.e) in ((t2.e,t1.a + 1),(7,7),(8,8)) and length(t2.f) = 1" } } } @@ -2880,7 +2880,7 @@ EXPLAIN "rows": 13, "filtered": 100, "index_condition": "t1.a is not null", - "attached_condition": "(t1.a,2) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and length(t1.c) = 1", + "attached_condition": "(t1.a,2) in ((2,2),(7,7),(8,8)) and length(t1.c) = 1", "mrr_type": "Rowid-ordered scan" }, "table": { @@ -2969,7 +2969,7 @@ EXPLAIN "rows": 13, "filtered": 100, "index_condition": "t1.a is not null", - "attached_condition": "(t1.a,1 + 1) in (<cache>((2,2)),<cache>((7,7)),<cache>((8,8))) and length(t1.c) = 1", + "attached_condition": "(t1.a,1 + 1) in ((2,2),(7,7),(8,8)) and length(t1.c) = 1", "mrr_type": "Rowid-ordered scan" }, "table": { diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index a827fb19943..2aabd98229d 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -989,7 +989,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=TIME('00:00:00') AND COALESCE(a)=DATE('2015-0 id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '00:00:00' # TIME cast + DATE literal SELECT * FROM t1 WHERE COALESCE(a)=TIME('00:00:00') AND COALESCE(a)=DATE'2015-09-11'; a @@ -999,7 +999,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=TIME('00:00:00') AND COALESCE(a)=DATE'2015-09 id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '00:00:00' # TIME literal + DATE cast SELECT * FROM t1 WHERE COALESCE(a)=TIME'00:00:00' AND COALESCE(a)=DATE('2015-09-11'); a @@ -1029,7 +1029,7 @@ SELECT * FROM t1 WHERE COALESCE(a)='00:00:00' AND COALESCE(a)=DATE('2015-09-11') id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '00:00:00' and coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '00:00:00' and coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' # TIME-alike string literal + DATE literal SELECT * FROM t1 WHERE COALESCE(a)='00:00:00' AND COALESCE(a)=DATE'2015-09-11'; a @@ -1049,7 +1049,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=0 AND COALESCE(a)=DATE('2015-09-11'); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 0 and coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 0 and coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' # TIME-alike integer literal + DATE literal SELECT * FROM t1 WHERE COALESCE(a)=0 AND COALESCE(a)=DATE'2015-09-11'; a @@ -1069,7 +1069,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)=TIME('00:0 id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' # DATE cast + TIME literal SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)=TIME'00:00:00'; a @@ -1079,7 +1079,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)=TIME'00:00 id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' # DATE cast + TIME-alike string literal SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)='00:00:00'; a @@ -1089,7 +1089,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)='00:00:00' id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 and coalesce(`test`.`t1`.`a`) = '00:00:00' +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' and coalesce(`test`.`t1`.`a`) = '00:00:00' # DATE cast + TIME-alike integer literal SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)=0; a @@ -1099,7 +1099,7 @@ SELECT * FROM t1 WHERE COALESCE(a)=DATE('2015-09-11') AND COALESCE(a)=0; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = 2015-09-11 00:00:00 and coalesce(`test`.`t1`.`a`) = 0 +Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where coalesce(`test`.`t1`.`a`) = '2015-09-11 00:00:00' and coalesce(`test`.`t1`.`a`) = 0 # DATE literal + TIME cast SELECT * FROM t1 WHERE COALESCE(a)=DATE'2015-09-11' AND COALESCE(a)=TIME('00:00:00'); a diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test index 85f99806fc9..84ef620de04 100644 --- a/mysql-test/t/default.test +++ b/mysql-test/t/default.test @@ -1289,6 +1289,20 @@ INSERT INTO t1 (a,b) VALUES ('2003-02-01','2003-05-01 12:05:55'); SELECT * FROM t1; DROP TABLE t1; +# +# MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT +# +# Column default value expression that includes a temporal function +# +CREATE OR REPLACE TABLE t1 ( col INT DEFAULT ( 1 LIKE ( NOW() BETWEEN '2000-01-01' AND '2012-12-12' ) ) ); +SHOW CREATE TABLE t1; +SET timestamp = UNIX_TIMESTAMP( '2004-04-04' ); +INSERT INTO t1 VALUES( DEFAULT ); +SET timestamp = DEFAULT; +INSERT INTO t1 VALUES( DEFAULT ); +SELECT * FROM t1; +DROP TABLE t1; + --echo # --echo # Hybrid type functions |