summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <msvensson@shellback.(none)>2006-11-29 15:44:09 +0100
committerunknown <msvensson@shellback.(none)>2006-11-29 15:44:09 +0100
commitd988576610f49682fbb5d51bf4697a66c25f2043 (patch)
tree9a20c4415bb69ebb31576302a0e46beb9863997e /sql/item_timefunc.cc
parent4f912e049871bf3a4a708dc66477d4b55247bddd (diff)
parentb51cf266293929dec21e41bdc97c4eead4884f0e (diff)
downloadmariadb-git-d988576610f49682fbb5d51bf4697a66c25f2043.tar.gz
Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint BitKeeper/etc/ignore: auto-union Makefile.am: Auto merged client/mysql.cc: Auto merged client/mysql_upgrade.c: Auto merged client/mysqltest.c: Auto merged extra/yassl/src/ssl.cpp: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysql-test/mysql-test-run-shell.sh: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/udf.result: Auto merged mysql-test/t/alter_table.test: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/limit.test: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/system_mysql_db_fix30020.test: Auto merged mysql-test/t/udf.test: Auto merged mysql-test/t/view_grant.test: Auto merged mysys/Makefile.am: Auto merged scripts/mysql_fix_privilege_tables.sql: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_handler.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/my_time.c: Auto merged sql/sql_table.cc: Auto merged extra/yassl/taocrypt/include/algebra.hpp: Remove fix as it conflicts with "import from yassl" and it's been fixed there sql/ha_ndbcluster.cc: Merge fix of warnings sql/sql_base.cc: Merge
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc27
1 files changed, 7 insertions, 20 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 008496b1e90..44d9a063e7a 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1369,11 +1369,9 @@ bool get_interval_value(Item *args,interval_type int_type,
interval->second= array[0];
interval->second_part= array[1];
break;
- /* purecov: begin deadcode */
- case INTERVAL_LAST:
- DBUG_ASSERT(0);
- break;
- /* purecov: end */
+ case INTERVAL_LAST: /* purecov: begin deadcode */
+ DBUG_ASSERT(0);
+ break; /* purecov: end */
}
return 0;
}
@@ -1395,17 +1393,6 @@ String *Item_date::val_str(String *str)
}
-int Item_date::save_in_field(Field *field, bool no_conversions)
-{
- TIME ltime;
- if (get_date(&ltime, TIME_FUZZY_DATE))
- return set_field_to_null(field);
- field->set_notnull();
- field->store_time(&ltime, MYSQL_TIMESTAMP_DATE);
- return 0;
-}
-
-
longlong Item_date::val_int()
{
DBUG_ASSERT(fixed == 1);
@@ -2200,7 +2187,7 @@ void Item_extract::fix_length_and_dec()
case INTERVAL_HOUR_MICROSECOND: max_length=13; date_value=0; break;
case INTERVAL_MINUTE_MICROSECOND: max_length=11; date_value=0; break;
case INTERVAL_SECOND_MICROSECOND: max_length=9; date_value=0; break;
- case INTERVAL_LAST: DBUG_ASSERT(0); break; /* purecov: deadcode */
+ case INTERVAL_LAST: DBUG_ASSERT(0); break; /* purecov: deadcode */
}
}
@@ -2270,8 +2257,7 @@ longlong Item_extract::val_int()
ltime.second_part)*neg;
case INTERVAL_SECOND_MICROSECOND: return ((longlong)ltime.second*1000000L+
ltime.second_part)*neg;
- case INTERVAL_LAST: DBUG_ASSERT(0); return(0); /* purecov: deadcode */
- /* purecov: end */
+ case INTERVAL_LAST: DBUG_ASSERT(0); break; /* purecov: deadcode */
}
return 0; // Impossible
}
@@ -2386,7 +2372,8 @@ String *Item_char_typecast::val_str(String *str)
{ // Safe even if const arg
char char_type[40];
my_snprintf(char_type, sizeof(char_type), "%s(%lu)",
- cast_cs == &my_charset_bin ? "BINARY" : "CHAR", (ulong) length);
+ cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
+ (ulong) length);
if (!res->alloced_length())
{ // Don't change const str