Commit graph

133 commits

Author SHA1 Message Date
jimw@mysql.com
2f0c098ef5 Fix '%h', '%I', and '%l' format specifiers in TIME_FORMAT()
to handle large time values as documented. (Bug #10590)
2005-05-27 16:41:53 -07:00
dlenev@mysql.com
814d4bf3e8 Merge mysql.com:/home/dlenev/src/mysql-4.1-bg10040
into mysql.com:/home/dlenev/src/mysql-5.0-merges
2005-04-25 11:35:30 +04:00
dlenev@brandersnatch.localdomain
a4a4c5cb69 Fix for func_sapdb failures on 64-bit platforms (aka Bug #10040
"'func_sapdb' fails on 64bit build hosts")
2005-04-25 11:25:40 +04:00
dlenev@mysql.com
a95ede0527 Manual merge of patch for bug #8068 "TIMEDIFF with first negative
argument gives wrong result" (and similar bug in ADDTIME/SUBTIME)
into 5.0 tree.
2005-04-18 14:29:31 +04:00
monty@mysql.com
48de1ff277 Don't generate message in send_kill_message() if wrong data. (Caused core dump for wrong data in ALTER TABLE on some system) 2005-04-05 01:19:48 +03:00
monty@mysql.com
201ee3eb78 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
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)
2005-04-01 15:04:50 +03:00
monty@mysql.com
332b7ed4a1 Give warnings if wrong date/time/datetime argument for STR_TO_DATE
Small fixes while doing review of new pushed code
More test cases for decimal
2005-03-30 16:00:31 +03:00
dlenev@brandersnatch.localdomain
aae37f5ea5 Fix for bug #8068 "TIMEDIFF with first negative argument gives wrong
result" (and similar bug in ADDTIME/SUBTIME).

Both Item_func_add_time/Item_func_timediff::val_str() now use
calc_time_diff() function which was backported from 5.0 (and which
was was fixed to properly handle microseconds part of its second 
argument). Also now we correctly set sign of result in case when
first argument is negative and second is positive.
2005-03-28 16:20:55 +04:00
dlenev@mysql.com
2276bfa374 Manual merge of fixes for bugs #7899 "CREATE TABLE .. SELECT .. and
CONVERT_TZ() function does not work well together" and bug #7705 
"CONVERT_TZ() crashes with subquery/WHERE on index column" in 5.0
tree.
2005-01-28 10:22:50 +03:00
dlenev@mysql.com
c80c503a1b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-tzbug
2005-01-28 09:32:43 +03:00
ingo@mysql.com
48488e483a Merge mysql.com:/home/mydev/mysql-4.1-4100
into mysql.com:/home/mydev/mysql-5.0-5000
2005-01-27 12:18:02 +01:00
bar@mysql.com
858171cb6f item_timefunc.cc:
CAST now always return a well-formed character string.
2005-01-27 14:51:16 +04:00
dlenev@brandersnatch.localdomain
80282016c2 Fix for bug #7899 "CREATE TABLE .. SELECT .. and CONVERT_TZ() function
does not work well together". Now using simplier and more correct
implementation of st_lex::unlink_first_table()/link_first_table_back() 
(It also nicely handles case when global table list is created because
of implictly used time zone tables). (2nd attempt)

Fix for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
column". Implemented new approach for caching objects for constant
time zone arguments. Now instead of determining whenever these arguments
are constants and performing time zone lookup at fix_fields() stage, we
do it on first get_date() invocation.

Cleanup of global @@time_zone variable handling.
2005-01-26 22:25:02 +03:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
dlenev@brandersnatch.localdomain
31d3aabb49 Porting fix for bug #7586 "TIMEDIFF for sec+microsec not working properly"
to 5.0 tree (since it was lost during last merge).
2005-01-15 20:02:46 +03:00
dlenev@brandersnatch.localdomain
23c9e0a75a Fix for bug #7586 "TIMEDIFF for sec+microsec not working properly". 2005-01-12 12:18:36 +03:00
monty@mysql.com
309b1a2b6c Merge with 4.1 tree to get fix for INSERT IGNORE ... ON DUPLICATE KEY 2005-01-03 23:04:52 +02:00
serg@sergbook.mysql.com
a04fc26c54 manually merged 2004-12-31 15:26:24 +01:00
dlenev@brandersnatch.localdomain
cd98fcf4e9 Merged fixes for bug #7297 "Two digit year should be interpreted
correctly even with zero month and day" and bug #7515 "from_unixtime(0)
now returns NULL instead of the Epoch" into 4.1 tree.
2004-12-30 23:44:42 +03:00
dlenev@mysql.com
4ef7ac5c09 Manual merge of fix for bugs of #7297 and #7515 into 4.1 tree. 2004-12-30 21:37:32 +03:00
dlenev@mysql.com
2878395ab1 Fix for bug #7515 "from_unixtime(0) now returns NULL instead of
the Epoch". (With after review fixes).
2004-12-30 21:18:10 +03:00
dlenev@brandersnatch.localdomain
d70bd3f8fb Fix for bug #6914 "Problems using time()/date() output in expressions".
When we cast datetime value to DATE (TIME) type we should throw away its
time (date) part. This was not done properly if CAST() function was used
in datetime expressions.
2004-12-30 13:39:01 +03:00
dlenev@brandersnatch.localdomain
7b9fd879f6 Fix for bug #7458 "Microseconds are gobbled from the string result of
STR_TO_DATE() function if there is another format specifier after %f 
in format string". Also small cleanup of STR_TO_DATE() implementation.
(After review version.)
2004-12-22 18:58:25 +03:00
serg@serg.mylan
2d3dd65cc1 merged 2004-11-20 18:36:41 +01:00
dlenev@mysql.com
5627dddb93 Manual merge of fix for bug #6439 "from_unixtime() function returns
wrong datetime values for too big argument" from 4.0 tree to 4.1 tree.
2004-11-19 19:19:45 +03:00
dlenev@mysql.com
5ddc564d89 Proposed fix for bug #6439 "from_unixtime() function returns wrong datetime
values for too big argument".

Added range checking for from_unixtime() argument, cleaned up code 
a bit.
2004-11-15 16:11:13 +03:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
brian@avenger.(none)
f05daf02ba Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump) 2004-11-11 18:58:57 -08:00
monty@mysql.com
d45bbae2de Fix for valgrind/purify for variables that the compiler touches but that doesn't affect the outcome of the tests 2004-11-09 14:46:26 +02:00
monty@mysql.com
1087186657 Merge with 4.1 to get new thd->mem_root handling 2004-11-08 17:53:32 +02:00
monty@mysql.com
b903a129e2 Simpler arena swapping code
Now thd->mem_root is a pointer to thd->main_mem_root and THR_MALLOC is a pointer to thd->mem_root.
This gives us the following benefits:
- Allow us to easily detect if arena has already been swapped before (this fixes a bug in setup_conds() where arena was swaped twice in some cases)
- Faster swaps of arenas (as we don't have to copy the whole MEM_ROOT)
- We don't anymore have to call my_pthread_setspecific_ptr(THR_MALLOC,...) to change where memory is alloced. Now it's enough to set thd->mem_root
2004-11-08 01:13:54 +02:00
monty@mysql.com
071001950e Merge with 4.1 to get in latest bug fixes 2004-11-04 15:06:24 +02:00
monty@mysql.com
afbe601302 merge with 4.1 2004-10-29 19:26:52 +03:00
bar@mysql.com
7577c8bfc9 A fix according to Monty's request:
"uint *errors" is now a non-optional parameter in String:copy()
and copy_and_convert().
2004-10-29 17:00:39 +05:00
bar@mysql.com
217d83a69f Bug#6202: ENUMs are not case sensitive even if declared BINARY 2004-10-25 17:51:26 +05:00
bell@sanja.is.com.ua
4714a6e744 errors without code removed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
2004-10-20 04:04:37 +03:00
konstantin@mysql.com
33fb5ab61b A fix and test case for Bug#6049 "Loss of sign when using prepared
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.
2004-10-16 00:12:59 +04:00
dlenev@brandersnatch.localdomain
2511990c97 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.
2004-10-01 18:54:06 +04:00
monty@mishka.local
f2941380c4 Strict mode & better warnings
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)
2004-09-28 20:08:00 +03:00
monty@mysql.com
49cd04b510 Merge on pull 2004-09-09 07:26:28 +03:00
bar@mysql.com
2c86049dec Bug #5228 ORDER BY CAST(enumcol) sorts incorrectly under certain conditions 2004-09-07 15:42:19 +05:00
monty@mysql.com
31122efde7 Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
2004-09-06 15:14:10 +03:00
bell@sanja.is.com.ua
36667b6a91 fixed printing of characters casting operartion (BUG#5264) 2004-09-02 00:11:40 +03:00
dlenev@brandersnatch.localdomain
da36c03a51 Portablity fix.
hpux11 compiler dislikes empty array initializers.
2004-08-17 12:05:34 +04:00
dlenev@brandersnatch.localdomain
f49d4f5350 Fix for bug #4508 "CONVERT_TZ() function with new time zone as param crashes server".
Instead of trying to open time zone tables during calculation of CONVERT_TZ() function
or setting of @@time_zone variable we should open and lock them with the rest of 
statement's table (so we should add them to global table list) and after that use such 
pre-opened tables for loading info about time zones.
2004-08-10 12:42:31 +04:00
dlenev@brandersnatch.localdomain
1902790634 Fix for bug #4756 "STR_TO_DATE() returning bad results with AM/PM".
Added support of converion specifiers mentioned in manual but missing in code.
2004-08-06 10:01:29 +04:00
serg@serg.mylan
f9de714945 misc fixes for compile-time errors 2004-07-21 00:45:08 +02:00
dlenev@brandersnatch.localdomain
ec9eb5eaa6 Fix warnings in sql/item_timefunc.cc which popped up during windows builds. 2004-07-16 07:35:41 +04:00
monty@mysql.com
1e31199995 Merge with 4.1.3-beta 2004-07-07 11:29:39 +03:00