From c3f665dc66d7ddb068875be9e78eb9b7a0d250e6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 9 Jun 2011 17:23:39 +0200 Subject: bugfixes: microsecond(TIME) alter table datetime<->datetime(6) max(TIME), mix(TIME) mysql-test/t/func_if.test: fix the test case of avoid overflow sql/field.cc: don't use make_date() and make_time() sql/field.h: correct eq_def() for temporal fields sql/item.cc: move datetime caching from Item_cache_int to Item_cache_temporal sql/item.h: move datetime caching from Item_cache_int to Item_cache_temporal sql/item_func.cc: use existing helper methods, don't duplicate sql/item_sum.cc: argument cache must use argument's cmp_type, not result_type. sql/item_timefunc.cc: use existing methods, don't tuplicate. remove unused function. fix micorseconds() to support TIME argument sql/mysql_priv.h: dead code sql/time.cc: dead code --- mysql-test/t/func_if.test | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test/t/func_if.test') diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test index 8142f57c0de..bbe9958685a 100644 --- a/mysql-test/t/func_if.test +++ b/mysql-test/t/func_if.test @@ -161,8 +161,9 @@ DROP TABLE t1; # CREATE TABLE t1 (c LONGTEXT); -INSERT INTO t1 VALUES(1), (2), (3), (4), ('12345678901234567890'); +INSERT INTO t1 VALUES(1), (2), (3), (4), ('1234567890123456789'); +SELECT IF(1, CAST(c AS UNSIGNED), 0) FROM t1; SELECT * FROM (SELECT MAX(IF(1, CAST(c AS UNSIGNED), 0)) FROM t1) AS te; SELECT * FROM (SELECT MAX(IFNULL(CAST(c AS UNSIGNED), 0)) FROM t1) AS te; -- cgit v1.2.1