Commit graph

120 commits

Author SHA1 Message Date
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
konstantin@mysql.com
a30fcdc690 Fix for Bug#4030 "Client side conversion string -> date type doesn't
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.
2004-06-24 19:08:36 +04:00
dlenev@brandersnatch.localdomain
09ba29e539 WL#1264 "Per-thread time zone support infrastructure".
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.
2004-06-18 10:11:31 +04:00
pem@mysql.com
71eddc362e Merging 4.1 to 5.0. 2004-05-26 17:04:45 +02:00
konstantin@mysql.com
f207b33a7b Support for character set conversion in binary protocol: another go
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.
2004-05-25 02:03:49 +04:00
pem@mysql.com
bf45960eef Merge 4.1 -> 5.0 2004-05-07 18:52:06 +02:00
monty@mysql.com
939ea71ecd Portability fixes
Change strtoll -> my_strtoll10()
Fixed bug in my_strntoul() and my_strntol() where we got different values on 32 and 64 bit systems (Bug #3472)
2004-05-07 01:43:17 +03:00
monty@mysql.com
a5d8b846fa after merge fixes 2004-05-05 21:24:21 +03:00
monty@mysql.com
d21d49a32a Merge with 4.0.19 2004-05-05 17:05:24 +03:00
serg@serg.mylan
8c2ce22e43 compatibility fix. warning removed 2004-05-03 18:26:50 +02:00
monty@mysql.com
f10d098f7d Fixed http address in some scripts (Bug #3460)
Output TIMESTAMP in 4.1 format for 4.1 tables (or for TIMESTAMP(19)) (portability fix)
Fixed that INTERVAL can handle big integers. (Bug #3498)
Fixed that hostname="" works identical as hostname="%" for table/column grants (Bug #3473)
2004-04-28 17:45:08 +03:00
pem@mysql.com
dfd59e296e Merge 4.1 -> 5.0. 2004-04-07 19:07:44 +02:00
hf@deer.(none)
386feb494b Fix for #3264 (FROM_DAYS doesn't work properly in range comparison)
Item_func_from_days::get_date didn't change 'hr', 'min' and some
other fields of incoming ltime, so they got random values.

bzeroing of the ltime added
2004-03-23 21:10:23 +04:00
bell@sanja.is.com.ua
2b45b53066 DBUG_ASSERT(fixed == 1); added to val*
small optimisation in signed_literal
2004-03-18 15:14:36 +02:00