summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
authorunknown <jani@ua141d10.elisa.omakaista.fi>2006-10-16 19:57:33 +0300
committerunknown <jani@ua141d10.elisa.omakaista.fi>2006-10-16 19:57:33 +0300
commite94087c5ddc3f5b61ce69cfd51240d1a16999597 (patch)
tree41ed5c3ff46289c94adeb49c1b9ebe71aba20dd7 /sql/item_timefunc.cc
parent1b6858ea50c55bfff29d9796aed91166eda2b4ea (diff)
downloadmariadb-git-e94087c5ddc3f5b61ce69cfd51240d1a16999597.tar.gz
Changed several char* to LEX_STRING*.
BUILD/SETUP.sh: Added check for CCACHE_DISABLE. If set, do not use ccache at all. BUILD/compile-pentium-gcov: Moved CCACHE_DISABLE up before going into SETUP.sh. Added debug_extra_flags to extra_flags. mysql-test/r/create.result: Added tests for incorrect database names. mysql-test/r/ctype_create.result: Added tests for incorrect alter database names. mysql-test/r/events.result: Added tests for incorrect database names. mysql-test/r/grant.result: Output changed to capital letters. mysql-test/t/alter_table.test: Removed extra empty line mysql-test/t/create.test: Added tests for incorrect database names. mysql-test/t/ctype_create.test: Added tests for incorrect name handling mysql-test/t/events.test: Added tests for incorrect database names. sql/item_timefunc.cc: Added dummy case to avoid compiler warning. sql/mysql_priv.h: Changed argument from char pointer to LEX_STRING pointer. sql/mysqld.cc: Added a missing component from struct. sql/sql_class.h: Added function LEX_STRING_make that sets the string and length. sql/sql_db.cc: Changed several char pointers to lex_strings. sql/sql_lex.cc: name is now LEX_STRING sql/sql_lex.h: Changed name to LEX_STRING. sql/sql_parse.cc: Changed several char pointers to lex_strings. db_length needed a trick, because in old client protocol there was an extra char zero added to the string. check_db_name() now takes LEX_STRING pointer as an argument. Changed remove_escape() to take LEX_STRING pointer as an argument. Removed COM_CREATE_DB and COM_DROP_DB. These are obsolete. sql/sql_table.cc: char* -> LEX_STRING* sql/sql_yacc.yy: Changed char* -> LEX_STRING* sql/table.cc: check_db_name() now takes LEX_STRING* as argument instead of char*. Optimized code a bit. tests/mysql_client_test.c: Added test for (short) status. After defining out (ifdef) COM_DROP_DB and COM_CREATE_DB in mysqld.cc mysql_client_test needed to be informed that failing in recognizing these commands is not fatal error anymore.
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index f603cafd89d..c4f0fed88f7 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1249,6 +1249,9 @@ bool get_interval_value(Item *args,interval_type int_type,
interval->second= array[0];
interval->second_part= array[1];
break;
+ case INTERVAL_LAST: /* purecov: begin deadcode */
+ DBUG_ASSERT(0);
+ break; /* purecov: end */
}
return 0;
}
@@ -2088,6 +2091,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 */
}
}
@@ -2157,6 +2161,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); break; /* purecov: deadcode */
}
return 0; // Impossible
}