summaryrefslogtreecommitdiff
path: root/sql/time.cc
Commit message (Collapse)AuthorAgeFilesLines
* Don't use -lsupc++ with gcc 3.3 and below as this gives linking problems ↵monty@mysql.com2005-04-041-1/+2
| | | | | | | when linking staticly Fix that mysql.proc works with new VARCHAR fields Give warnings for wrong zero dates
* Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)monty@mysql.com2005-04-011-3/+3
| | | | | | CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912) ALTER TABLE now fails in STRICT mode if it generates warnings. Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
* Data truncation reporting implementation (libmysql) + post reviewkonstantin@mysql.com2004-12-161-162/+0
| | | | | | fixes. Still to do: - deploy my_strtoll10 in limbysql.c - add mysql_options option to switch MYSQL_DATA_TRUNCATED on and off.
* merge with 4.1monty@mysql.com2004-10-291-56/+3
|\
| * A fix and test case for Bug#6049 "Loss of sign when using prepared konstantin@mysql.com2004-10-161-56/+3
| | | | | | | | | | | | | | statements and negative time/date values". The bug was in wrong sprintf format used in the client library. The fix moves TIME -> string conversion functions to sql-common and utilized them in the client library.
* | Strict mode & better warningsmonty@mishka.local2004-09-281-19/+24
|/ | | | | | Under strict mode MySQL will generate an error message if there was any conversion when assigning data to a field. Added checking of date/datetime fields. If strict mode, give error if we have not given value to field without a default value (for INSERT)
* WL#1580: --start-datetime, --stop-datetime, --start-position (alias for ↵guilhem@mysql.com2004-07-291-157/+0
| | | | | | | | | | | --position) and --stop-position options for mysqlbinlog, with a test file. This enables user to say "recover my database to how it was this morning at 10:30" (mysqlbinlog "--stop-datetime=2003-07-29 10:30:00"). Using time functions into client/ made me move them out of sql/ into sql-common/. + (small) fix for BUG#4507 "mysqlbinlog --read-from-remote-server sometimes cannot accept 2 binlogs" (that is, on command line).
* Fix for Bug#4030 "Client side conversion string -> date type doesn't konstantin@mysql.com2004-06-241-557/+28
| | | | | | | | | | work (prepared statements)" and after-review fixes: - str_to_TIME renamed to str_to_datetime to pair with str_to_time - functions str_to_time and str_to_TIME moved to sql-common - send_data_str now supports MYSQL_TYPE_TIME, MYSQL_TIME_DATE, MYSQL_TIME_DATETIME types of user input buffers. - few more comments in the client library - a test case added.
* Unused variables removed (many files).konstantin@mysql.com2004-06-211-2/+0
|
* WL#1264 "Per-thread time zone support infrastructure".dlenev@brandersnatch.localdomain2004-06-181-64/+235
| | | | | | | | | | | | | | | | | | | | | Added basic per-thread time zone functionality (based on public domain elsie-code). Now user can select current time zone (from the list of time zones described in system tables). All NOW-like functions honor this time zone, values of TIMESTAMP type are interpreted as values in this time zone, so now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE (or proper PostgresSQL type). WL#1266 "CONVERT_TZ() - basic time with time zone conversion function". Fixed problems described in Bug #2336 (Different number of warnings when inserting bad datetime as string or as number). This required reworking of datetime realted warning hadling (they now generated at Field object level not in conversion functions). Optimization: Now Field class descendants use table->in_use member instead of current_thd macro.
* Fix skipp -> skip once and for all.paul@kite-hub.kitebird.com2004-06-031-1/+1
| | | | (Note: This affects only comments, not variable names.)
* Support for character set conversion in binary protocol: another gokonstantin@mysql.com2004-05-251-3/+119
| | | | | | | | | | after Monty's review. - Item_param was rewritten. - it turns out that we can't convert string data to character set of connection on the fly, because they first should be written to the binary log. To support efficient conversion we need to rewrite prepared statements binlogging code first.
* A comment for str_to_datetime().ram@gw.mysql.r18.ru2004-05-201-0/+14
|
* A fix (Bug #3728: Missing warning in 4.1).ram@gw.mysql.r18.ru2004-05-181-1/+1
|
* Fix for valgrind errors in str_to_TIME(using of uninitialize variable).gluh@gluh.mysql.r18.ru2004-03-181-1/+4
|
* Task #835: additional changes fot str_to_dategluh@gluh.mysql.r18.ru2004-03-151-16/+64
|
* Merge with 4.0.18monty@mysql.com2004-02-111-8/+10
|\
| * Fix for bug #2523 '"func_time" test fails on QNX'.dlenev@mysql.com2004-01-301-8/+11
| | | | | | | | | | | | | | Moved all range checks for TIMESTAMP value to my_gmt_sec(). Also fixed check of upper boundary of TIMESTAMP range (which also now will catch datetime values which are too small for TIMESTAMP in case if time_t is unsigned).
* | Merge with 4.0.17monty@mysql.com2003-12-171-20/+52
|\ \ | |/
| * Fix autoincrement for signed columns (Bug #1366)monty@mysql.com2003-12-121-1/+3
| | | | | | | | | | | | | | | | | | Fixed problem with char > 128 in QUOTE() function. (Bug #1868) Disable creation of symlinks if my_disable_symlink is set Fixed searching of TEXT with end space. (Bug #1651) Fixed caching bug in multi-table-update where same table was used twice. (Bug #1711) Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998) Fixed timestamp.test
| * WL#1175: more default_week_formats for iso compatibilitygluh@gluh.mysql.r18.ru2003-12-071-19/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New formats added for 'week()' function and 'default_week_format' option(4 - 7). Next formats is supported now: *Value* *Meaning* `0' Week starts on Sunday; First Sunday of the year starts week 1. Week() returns 0-53. `1' Week starts on Monday; Weeks numbered according to ISO 8601:1988. Week() returns 0-53. `2' Week starts on Sunday; First Sunday of the year starts week 1. Week() returns 1-53. `3' Week starts on Monday; Weeks numbered according to ISO 8601:1988. Week() returns 1-53. `4' Week starts on Sunday; Weeks numbered according to ISO 8601:1988. Week() returns 0-53. `5' Week starts on Monday; First Monday of the year starts week 1. Week() returns 0-53. `6' Week starts on Sunday; Weeks numbered according to ISO 8601:1988. Week() returns 1-53. `7' Week starts on Monday; First Monday of the year starts week 1. Week() returns 1-53.
* | Merge key cache structures to onemonty@mysql.com2003-11-201-1/+0
| | | | | | | | Fixed compiler warnings (IRIX C compiler and VC++)
* | Fixed access to uninitialized memory in protocol::store_timemonty@mysql.com2003-11-041-1/+2
| |
* | Removed some warnings reported by valgrindmonty@narttu.mysql.fi2003-11-041-7/+13
| | | | | | | | | | After merge fixes. Now code compiles, but there is still some valgrind warnings that needs to be fixed
* | Simplified 'wrong xxx name' error messages by introducing 'general' ↵monty@narttu.mysql.fi2003-11-031-275/+610
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ER_WRONG_NAME error Cleaned up (and disabled part of) date/time/datetime format patch. One can't anymore change default read/write date/time/formats. This is becasue the non standard datetime formats can't be compared as strings and MySQL does still a lot of datetime comparisons as strings Changed flag argument to str_to_TIME() and get_date() from bool to uint Removed THD from str_to_xxxx functions and Item class. Fixed core dump when doing --print-defaults Move some common string functions to strfunc.cc Dates as strings are now of type my_charset_bin instead of default_charset() Introduce IDENT_QUOTED to not have to create an extra copy of simple identifiers (all chars < 128) Removed xxx_FORMAT_TYPE enums and replaced them with the old TIMESTAMP_xxx enums Renamed some TIMESTAMP_xxx enums to more appropriate names Use defines instead of integers for date/time/datetime string lengths Added to build system and use the new my_strtoll10() function.
* | Scrum task 835 - text-to-datetime conversion functiongluh@gluh.mysql.r18.ru2003-10-201-43/+285
| |
* | SAPDB date/time finctionsgluh@gluh.mysql.r18.ru2003-07-081-0/+1
| |
* | Merge gluh@gw:/home/bk/mysql-4.1gluh@gluh.mysql.r18.ru2003-06-231-1/+12
|\ \ | | | | | | | | | into gluh.mysql.r18.ru:/home/gluh/mysql-4.1.DTFUNC
| * | Internal commitgluh@gluh.mysql.r18.ru2003-06-231-1/+12
| | |
* | | Merge with 4.0.13monty@narttu.mysql.fi2003-06-041-21/+35
|\ \ \ | |/ / |/| / | |/
| * Fixed problem with mysql prompt when server disconnect. (Bug 356)monty@narttu.mysql.fi2003-05-271-21/+35
| | | | | | | | | | | | Fixed problem with localtime -> gmt where some times resulted in different (but correct) timestamps. Now MySQL should use the smallest possible timestamp value in this case. (Bug 316)
* | Merge with 4.0.13monty@narttu.mysql.fi2003-05-191-141/+2
|\ \ | |/
| * Fixed that reading a DATE string of 000000 is interpreted as 0000-00-00 ↵monty@narttu.mysql.fi2003-05-051-140/+2
| | | | | | | | instead of 2000-00-00
* | Fixed problem when connecting to user without a password.monty@mashka.mysql.fi2003-02-141-2/+4
| | | | | | | | Fixed problem with LIKE and BINARY
* | Fixed a lot of wrong memory references as reported by valgrindmonty@mashka.mysql.fi2003-02-121-9/+27
| | | | | | | | | | | | | | | | | | Portability fixes Added new client function: mysql_get_server_version() New server help code (From Victor Vagin) Fixed wrong usage of binary() Disabled RTREE usage for now.
* | Move latin1 into a separarte filebar@bar.mysql.r18.ru2003-01-291-20/+20
| |
* | less use of system_charset_infobar@bar.mysql.r18.ru2002-12-191-24/+24
| |
* | rename of net_pkg.cc to protocol.ccmonty@mashka.mysql.fi2002-12-111-0/+17
| | | | | | | | | | Class for sending data from server to client (Protocol) This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.
* | Update after last merge. Fixes some wrong test results.monty@mashka.mysql.fi2002-10-031-13/+30
| |
* | Merge with 4.0.4monty@mashka.mysql.fi2002-10-021-21/+32
|\ \ | |/ |/|
| * Merge with 4.0.3monty@narttu.mysql.fi2002-08-301-21/+32
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Some simple optimzations, more comments and indentation changes. Add ` around database in 'use database' in binary log. Moved max_error_count and max_warning_count to variables struct. Removed SHOW_WARNS_COUNT and SHOW_ERRORS_COUNT calls. Changed string functions to use character set of first string argument as default return characterset (Each string function can change the above assumption if needed)
| | * New ctype functions/macros to support many charsets at a timebar@gw.udmsearch.izhnet.ru2002-03-121-21/+32
| | |
* | | Compare hostnames case insensitivemonty@hundin.mysql.fi2002-09-251-1/+18
|/ / | | | | | | Accept zero dates without warnings
* | Reverting facist C++ comment cleanupsalle@geopard.online.bg2002-08-021-20/+20
| |
* | Some salle@geopard.online.bg2002-07-171-20/+20
| | | | | | | | C++ comments cleanup
* | Big code cleanup/review before 4.0.2 release.monty@mashka.mysql.fi2002-06-111-1/+1
|/ | | | | (All commit emails since 4.0.1 checked) This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
* Update copyrightmonty@hundin.mysql.fi2001-12-061-4/+4
| | | | Fixed memory leak on shutdown (Affects the embedded version & MyODBC)
* Portability fixmonty@hundin.mysql.fi2001-11-071-5/+5
| | | | Cleanup typos (like SKIPP -> SKIP)
* merge with 3.23.44monty@hundin.mysql.fi2001-11-041-4/+2
|\
| * Portability fixesmonty@hundin.mysql.fi2001-10-311-4/+2
| | | | | | | | | | | | Fix for consistent 0000-00-00 date handling Close + open binary logs on flush tables Fix for AVG() in HAVING.