Commit graph

237 commits

Author SHA1 Message Date
jani@ua141d10.elisa.omakaista.fi
8dd0b2d0ae Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
2006-10-17 19:54:44 +03:00
jani@ua141d10.elisa.omakaista.fi
02f29377fd Changed several char* to LEX_STRING*. 2006-10-16 19:57:33 +03:00
jimw@rama.(none)
7a23b1baf7 Merge rama.(none):/home/jimw/my/mysql-5.0-clean
into  rama.(none):/home/jimw/my/mysql-5.1-clean
2006-09-28 20:20:33 -07:00
jimw@rama.(none)
68eadc8a79 Merge rama.(none):/home/jimw/my/mysql-4.1-clean
into  rama.(none):/home/jimw/my/mysql-5.0-clean
2006-09-28 18:09:10 -07:00
evgen@moonbone.local
8cf9781717 Merge moonbone.local:/work/tmp_merge-5.0-mysql
into  moonbone.local:/work/tmp_merge-5.1-opt-mysql
2006-08-29 18:58:50 +04:00
tnurnberg@salvation.intern.azundris.com
0ead4ec836 Merge salvation.intern.azundris.com:/home/tnurnberg/work/mysql-4.1-maint-20987
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-maint-20987
2006-08-22 14:03:52 +02:00
cmiller@zippy.cornsilk.net
ff57b304a4 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
2006-08-21 12:55:43 -04:00
jimw@rama.(none)
cb6a084076 Bug #2717: include/my_global.h mis-defines __attribute__
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
  __attribute__((format(...))) safely, make more use of the format attribute,
  and fix some of the warnings that this turns up (plus a bonus unrelated one).
2006-08-17 12:25:40 -07:00
iggy@rolltop.ignatz42.dyndns.org
00ab7be7b9 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_20328
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-merge
2006-08-16 19:31:33 -04:00
kostja@bodhi.local
04c97488f9 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-08-12 21:06:51 +04:00
tnurnberg@salvation.intern.azundris.com
170392850d Bug#19844: time_format in Union truncates values
time_format() claimed %H and %k would return at most two digits
(hours 0-23), but this coincided neither with actual behaviour
nor with docs.  this is not visible in simple queries; forcing
a temp-table is probably the easiest way to see this.  adjusted
the return-length appropriately; the alternative would be to
adjust the docs to say that behaviour for > 99 hours is undefined.
---
Bug#19844: time_format in Union truncates values

time_format() claimed %H and %k would return at most two digits
(hours 0-23), but this coincided neither with actual behaviour
nor with docs.  this is not visible in simple queries; forcing
a temp-table is probably the easiest way to see this.  adjusted
the return-length appropriately; the alternative would be to
adjust the docs to say that behaviour for > 99 hours is undefined.
2006-08-10 15:37:24 +02:00
tnurnberg@salvation.intern.azundris.com
dbf62f252a Bug #20987: str_to_date doesn't accept user variable for specification
str_to_date() would sometimes render NULL if %D was used as rule other than last.
since this was due to two pointers getting mixed up in the server, this behaviour
seemed somewhat non-deterministic at SQL level.
2006-08-07 07:35:28 +02:00
igreenhoe/greenman@anubis.greendragongames.com
61a3a8e95c Fix for bug #16226 (timestamp_diff truncation issue when requesting
difference between timestamp in values of months and quarters.)

Problem:  when requesting timestamp diff in months or quarters, it
would only examine the date (and not the time) for the comparison.

Solution:  increased precision of comparison.
2006-07-28 20:51:17 -07:00
kostja@bodhi.local
73189969f3 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-07-26 23:33:25 +04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
483d0e3b4a Backporting Kostja's changes made for 5.0 into 4.1.
Please use "ul" when merging this changeset to 5.0.
2006-07-18 15:53:12 +05:00
kostja@bodhi.local
bd183d42dc Fix a valgrind warning in type_date test. 2006-07-12 19:19:43 +04:00
kostja@bodhi.local
a2c0cdd75b Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge-41
2006-07-08 02:30:07 +04:00
ingo@chilla.local
db0e7774aa Merge chilla.local:/home/mydev/mysql-5.0-ateam
into  chilla.local:/home/mydev/mysql-5.1-ateam
2006-07-06 13:18:00 +02:00
ingo@mysql.com
a21071d912 Merge mysql.com:/home/mydev/mysql-4.1-bug14400
into  mysql.com:/home/mydev/mysql-5.0-ateam
2006-07-05 11:20:10 +02:00
bar@mysql.com
3855520138 WL#2928 Date Translation NRE
(implemented by by Josh Chamas)
2006-07-04 17:40:40 +05:00
evgen@moonbone.local
3cc6d95d18 Merge 2006-06-30 02:03:09 +04:00
kroki@mysql.com
49cc2904d2 Dec. 31st, 9999 is still a valid date, only starting with Jan 1st 10000 things become invalid (Bug #12356) 2006-06-27 19:33:59 +04:00
evgen@moonbone.local
79c91f6214 Manually merged 2006-06-18 14:56:35 +04:00
evgen@moonbone.local
7f24667598 Manually merged 2006-06-17 02:11:12 +04:00
evgen@moonbone.local
28cf3c3e64 Manually merged 2006-06-17 00:58:36 +04:00
serg@serg.mylan
d00b56549c String::set(double) and set(longlong) -> set_real() and set_int()
fix Field::store(double) being used instead of store(longlong)

NB: overloading functions is evil
2006-06-16 12:17:20 +02:00
igor@rurik.mysql.com
88b0e989b6 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0
2006-06-14 20:00:36 -07:00
evgen@moonbone.local
e35a0ca4b7 Manually merged 2006-06-14 23:54:08 +04:00
evgen@moonbone.local
67de8c46a5 Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.

All date/time functions has the STRING result type thus their results are
compared as strings. The string date representation allows a user to skip 
some of leading zeros. This can lead to wrong comparison result if a date/time 
function result is compared to such a string constant.

The idea behind this bug fix is to compare results of date/time functions
and data/time constants as ints, because that date/time representation is 
more exact. To achieve this the agg_cmp_type() is changed to take in the
account that a date/time field or an date/time item should be compared 
as ints.

This bug fix is partially back ported from 5.0.

The agg_cmp_type() function now accepts THD as one of parameters. 
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.

From the Item_func_between::fix_length_and_dec() function removed the part
which was converting date/time constants to int if possible. Now this is 
done by the agg_cmp_type() function.

The new function result_as_longlong() is added to the Item class. 
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.

Correct val_int() methods are implemented for classes Item_date_typecast, 
Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
classes are derived from Item_str_func and Item_str_func::val_int() converts
its string value to int without regard to the date/time type of these items.

Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant. This is done
to get a correct result of comparisons like date_time_function() = string_constant.
2006-06-13 19:09:24 +04:00
igor@rurik.mysql.com
940fe6fea6 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2006-06-09 17:56:08 -07:00
ramil@mysql.com
19e312af08 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16546
2006-06-06 09:10:28 +05:00
jani@a193-229-222-105.elisa-laajakaista.fi
c81b4c01bf Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
2006-05-30 16:07:49 +03:00
monty@mysql.com
97b941d924 Remove dflt_field from field structure as this was only needed when createing temporary table and I found another soultion that doesn't increase the size of the field structure for all table instances. (Better fix for bug #19089)
Fixed compiler warnings
Fixed valgrind warning in Item_date_add_intervall::eq. (Recoding of bugfix #19490)
2006-05-24 11:56:59 +03:00
igor@rurik.mysql.com
62f61f527f Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0
2006-05-17 11:46:21 -07:00
tnurnberg@mysql.com
d1311e1ac7 Bug#18997: DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value
if input year for date_add() / date_sub() with INTERVAL is low enough for
calc_daynr() to possibly return incorrect results (calc_daynr() has no information
on whether the year is low because it was a two-digit year ('77) or because it
was a really low four-digit year (0077) and will indiscriminately try to turn the
value into a four-digit year by adding 1900 or 2000 respectively), the functions
will now throw NULL.
2006-05-16 03:32:24 +02:00
cmiller@zippy.(none)
d8330e2858 Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-05-15 19:26:49 -04:00
igor@rurik.mysql.com
90f227043b Fixed bug #19490. The bug that caused server crash manifested
itself when executing queries referring to a view with GROUP BY
an expression containing non-constant interval.
It happened because Item_date_add_interval::eq neglected the
fact that the method can be applied to an expression of the form
    date(col) + interval time_to_sec(col) second
at the time when col could not be evaluated yet.
An attempt to evaluate time_to_sec(col) in this method resulted
in a crash.
2006-05-12 18:24:38 -07:00
ramil@mysql.com
a2466179ce Merge mysql.com:/usr/home/ram/work/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-5.0
2006-05-10 18:27:42 +05:00
ramil@mysql.com
cf0fc729f8 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b18501
2006-05-10 13:27:48 +05:00
jani@ua141d10.elisa.omakaista.fi
083f8455c7 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new
2006-05-09 20:50:29 +03:00
jani@ua141d10.elisa.omakaista.fi
c8e5ade80c Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
2006-05-05 00:22:01 +03:00
jani@ua141d10.elisa.omakaista.fi
06d6b7472b Fixed Bug#11324:
TIME_FORMAT using "%l:%i" returns 36:00 with 24:00:00 in TIME column
2006-05-04 20:19:37 +03:00
jani@ua141d10.elisa.omakaista.fi
526e1a70e2 Fix for Bug#11326. 2006-05-04 19:31:10 +03:00
ramil@mysql.com
2d52881789 Fix for bug #16546: DATETIME+0 not always coerced the same way 2006-05-02 18:00:44 +05:00
ramil@mysql.com
8cdd68a830 Fix for bug #18501: Server crashes with monthname(). 2006-04-25 14:34:19 +05:00
svoj@april.(none)
a83c4b6841 Merge april.(none):/home/svoj/devel/mysql/merge/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.1-new
2006-04-24 19:53:38 +05:00
bar@mysql.com
a9e3092102 item_timefunc.cc:
5.0 additional fix for b#18691
  Handle DECIMAL the same with INT and REAL.
2006-04-17 15:36:25 +05:00
bar@mysql.com
3fef2ba6aa Merge mysql.com:/usr/home/bar/mysql-4.1.b18691
into  mysql.com:/usr/home/bar/mysql-5.0
2006-04-17 15:01:55 +05:00
bar@mysql.com
45293fc346 Bug#18691: Converting number to UNICODE string returns invalid result.
Conversion from int and real numbers to UCS2 didn't work fine: 
CONVERT(100, CHAR(50) UNICODE)
CONVERT(103.9, CHAR(50) UNICODE)

The problem appeared because numbers have binary charset, so,
simple charset recast binary->ucs2 was performed
instead of real conversion.

Fixed to make numbers pretend to be non-binary.
2006-04-13 10:55:48 +05:00
igor@rurik.mysql.com
fb75fcde65 Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0
2006-04-12 13:23:11 -07:00