LAST_DAY() says it returns a DATE, not a DATETIME, but didn't zero the time fields.
Adapted from a patch kindly supplied by Claudio Cherubino.
mysql-test/r/func_time.result:
show that LAST_DAY() returns only a DATE, not a DATETIME
mysql-test/t/func_time.test:
show that LAST_DAY() returns only a DATE, not a DATETIME
sql/item_timefunc.cc:
zero time-fields as we return only a DATE
This is a regression from 2007-05-18 when code to zero out the returned struct was
added to number_to_datetime(); zero for time_type corresponds to MYSQL_TIMESTAMP_DATE.
We now explicitly set the type we return (MYSQL_TIMESTAMP_DATETIME).
mysql-test/r/func_time.result:
show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
as string and as integer.
mysql-test/t/func_time.test:
show that DATE_ADD() behaves the same for YYYYMMDDhhmmss given
as string and as integer.
sql-common/my_time.c:
explictly set return type in number_to_datetime()
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().
mysql-test/r/func_sapdb.result:
Bug#31160: Changed test result.
mysql-test/r/func_time.result:
Bug#31160: Test result.
mysql-test/t/func_time.test:
Bug#31160: Test case.
sql/item_timefunc.h:
Bug#31160: The fix: Initializing maybe_null to true
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-2team
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
include/m_ctype.h:
Defining new flags.
Adding new function prototypes.
mysql-test/r/ctype_ucs.result:
Adding tests.
mysql-test/r/ctype_utf8.result:
Adding tests.
mysql-test/r/func_time.result:
Adding tests.
mysql-test/t/ctype_ucs.test:
Adding tests.
mysql-test/t/ctype_utf8.test:
Adding tests.
mysql-test/t/func_time.test:
Adding test.
mysys/charset.c:
Adding pure ASCII detection when loading a dynamic character set.
sql/item.cc:
- Moving detection of a Unicode superset into function.
- Adding detection of a ASCII subset.
- Adding creation of to-ASCII character set convertor when
safe_charset_converter() failed and when the argument.
repertoire is know to be pure ASCII.
sql/item.h:
- Adding "repertoire" member into DTCollation class.
- Adding "repertoire" argument to constructors.
- Adding new methods:
set_repertoire_from_charset()
set_repertoire_from_value()
sql/item_func.cc:
Adding "repertoire" argument.
sql/item_strfunc.cc:
Adding "repertoire" argument.
sql/item_timefunc.cc:
Initializing the result repertoire taking into account the "is_ascii"
flag of the current locale.
sql/sql_lex.cc:
Detect 7bit strings, return in Lex->text_string_is_7bit.
sql/sql_lex.h:
Adding new member into LEX structure.
Adding new member into Lex_input_stream
sql/sql_string.cc:
Allow simple copy from pure ASCII to a ASCII-based character set.
sql/sql_yacc.yy:
Depening on Lex->text_string_is_7bit and character set features,
create Item_string with MY_REPERTOIRE_ASCII when it is possible.
strings/conf_to_src.c:
- Adding printing of the "MY_CS_PUREASCII" flag
- Adding printing of copyright
strings/ctype-extra.c:
Recreating ctype-extra.c: ascii_general_ci and ascii_bin
are now marked with MY_CS_PUREASCII flag.
strings/ctype.c:
Adding new functions.
mysql-test/r/func_time.result:
Update results (use fixed datetime values instead of NOW()).
mysql-test/t/func_time.test:
Use fixed datetime values instead of NOW(): the test would have a sporadic
failure when current day changed between two consequtive calls to
NOW(). The test actually tests FROM_DAYS/TO_DAYS functions,
so use of NOW() is not necessary.
into mysql.com:/home/ram/work/b23616/b23616.5.0
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
If we compare two items A and B, with B being (a constant) of a
larger type, then A gets promoted to B's type for comparison if
it's a constant, function, or CAST() column, but B gets demoted
to A's type if A is a (not explicitly CAST()) column. This is
counter-intuitive and not mandated by the standard.
Disabling optimisation where it would be lossy so field value
will properly get promoted and compared as binary string (rather
than as integers).
mysql-test/include/ps_conv.inc:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/r/func_time.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Show that everything works as expected.
mysql-test/r/ps_2myisam.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/r/ps_3innodb.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/r/ps_4heap.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/r/ps_5merge.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/r/ps_7ndb.result:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Fix certain queries to still work.
mysql-test/t/func_time.test:
Bug #21103: DATE column not compared as DATE
When comparing a DATE field with a DATETIME constant, we now compare
as DATETIMEs, not as DATEs. Show that everything works as expected.
sql/field.cc:
Bug #21103: DATE column not compared as DATE
#0 stores the date only as a 3-byte integer; save_in_field() in
#1 saves 'this' in field's format (DATE), #2 "converts a constant
item to an int and replaces the original item" -- consequently,
this replaces the Item_string "2006-11-06 04:08:36.0" with the
Item_int_with_ref 20061106.
#0 Field_newdate::store (this=0x8d26880, from=0x8d5e658 "2006-11-06
04:08:36.0", len=21, cs=0x88022c0) at field.cc:5344
#1 0x0817e3b0 in Item_string::save_in_field (this=0x8d5e670, field=0x8d26880, no_conversions=true) at item.cc:4340
#2 0x081b22ae in convert_constant_item (thd=0x8d25240, field=0x8d26880, item=0x8d5e74c) at item_cmpfunc.cc:245
#3 0x081b8a36 in Item_bool_func2::fix_length_and_dec (this=0x8d5e6f8) at item_cmpfunc.cc:309
#4 0x081a3427 in Item_func::fix_fields (this=0x8d5e6f8, thd=0x8d25240, ref=0x8d5f5fc) at item_func.cc:190
#5 0x0825bc2d in setup_conds (thd=0x8d25240, tables=0x8d5e410, leaves=0x8d5e410, conds=0x8d5f5fc) at sql_base.cc:4941
...
Disabling optimisation where it would be lossy so field value will
properly get promoted and compared as binary string (rather than as
integers).
into mysql.com:/home/ram/work/b23616/b23616.5.0
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
Checking for NULL before calling the val_xxx()
methods only checks for such arguments that are
known to be NULLs at compile time.
The arguments that may or may not contain
NULLs (e.g. function calls and possibly others)
are not checked at all.
Fixed by first calling the val_xxx() method and
then checking for null in SEC_TO_TIME().
In addition QUARTER() was not returning 0 (as all the
val_int() functions do when processing a NULL value).
mysql-test/r/func_time.result:
Bug #25643: SEC_TO_TIME function problem
- test case
mysql-test/t/func_time.test:
Bug #25643: SEC_TO_TIME function problem
- test case
sql/item_timefunc.cc:
Bug #25643: SEC_TO_TIME function problem
- null handling fixed for QUARTER() and SEC_TO_TIME()
Consider double values as legal date{time} function's arguments
(i.e. allow dates in internal format YYYYMMDDHHMMSS.XXXXXX).
mysql-test/r/func_sapdb.result:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- result adjusted.
mysql-test/r/func_time.result:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- test result.
mysql-test/t/func_time.test:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- test case.
sql-common/my_time.c:
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
- consider '.' as an acceptable separator for dates like YYYYYMMDDHHMMSS.XXXXXX
into mysql.com:/usr/home/ram/work/bug22229/my50-bug22229
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
into neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
mysql-test/Makefile.am:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge of changes for RPM
into mysql.com:/usr/home/ram/work/bug23653/my50-bug23653
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
into outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/t/rename.test:
choose one of the race problem solutions. It was solved
differently in -runtime and mainstream
As get_arg0_date() in the Item_func_last_day::get_date() returns
0000-00-00 date sometimes, we have to check ltime->month for 0 after the call.
mysql-test/r/func_time.result:
Fix for bug #23653: Crash if last_day('0000-00-00')
- test result.
mysql-test/t/func_time.test:
Fix for bug #23653: Crash if last_day('0000-00-00')
- test case.
sql/item_timefunc.cc:
Fix for bug #23653: Crash if last_day('0000-00-00')
- return error if month is 0.
into alik.:/mnt/raid/alik/MySQL/devel/5.0-merged-5.0-rt
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/rename.test:
Auto merged
sql-common/my_time.c:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
into outpost.site:/home/cps/mysql/trees/4.1-runtime-bug9191
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
into mysql.com:/home/cps/mysql/trees/5.0-runtime-bug9191
configure.in:
Auto merged
include/my_time.h:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/timezone2.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/timezone2.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/time.cc:
Auto merged
BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003:
Auto merged
sql-common/my_time.c:
manual merge
sql/item_timefunc.cc:
manual merge
sql/tztime.cc:
manual merge
(4.1 version, with post-review fixes)
The fix for another Bug (6439) limited FROM_UNIXTIME() to
TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT,
however unix timestamp in general is not considered to be limited
by this value. All dates up to power(2,31)-1 are valid.
This patch extends allowed TIMESTAMP range so, that max
TIMESTAMP value is power(2,31)-1. It also corrects
FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that
max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME()
is fixed accordingly to allow conversion of dates up to
2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ()
function to allow extended range of dates.
The main problem solved in the patch is possible overflows
of variables, used in broken-time representation to time_t
conversion (required for UNIX_TIMESTAMP).
acinclude.m4:
Add new macro to check time_t range
configure.in:
Call the macro to check time_t range
include/my_time.h:
Move time-related defines to proper place.
Add a function to perform a rough check if
a TIMESTAMP value fits into the boundaries.
Note: it is defined as "static inline", as
otherwise libmysql won't compile (due to the
way how gcc handles "inline" directive).
mysql-test/r/func_time.result:
Update test result
mysql-test/r/timezone.result:
Update test result
mysql-test/r/timezone2.result:
Update test result
mysql-test/t/func_time.test:
Add test for Bug#9191 and update test to be consistent
with new TIMESTAMP boundaries
mysql-test/t/timezone.test:
Update old tests to be consistent
with new TIMESTAMP boundaries
mysql-test/t/timezone2.test:
Update tests for convert_tz to be consistent with new
TIMESTAMP boundaries
sql/item_timefunc.cc:
Fix convert_tz to allow dates from the new (extended)
TIMESTAMP range
sql/mysql_priv.h:
Move time handling defaults to my_time.h
sql-common/my_time.c:
Because of increased TIMESTAMP_MAX_VALUE overflows in my_system_gmt_sec()
became possible. Here we make it safe against the overflows by stepping
back from the boundary dates which are likely to trigger them.
sql/time.cc:
Update TIME_to_timestamp to allow conversion of
extended date range
sql/tztime.cc:
Fix new (4.1) implementation of broken-down time representation
to time_t conversion routine to avoid overflows during conversion
of boundary dates
mysql-test/r/timezone4.result:
New BitKeeper file ``mysql-test/r/timezone4.result''
mysql-test/t/timezone4-master.opt:
New BitKeeper file ``mysql-test/t/timezone4-master.opt''
mysql-test/t/timezone4.test:
New BitKeeper file ``mysql-test/t/timezone4.test''
From the manual:
date arithmetic operations require complete dates and do not work with
incomplete dates such as '2006-07-00' or badly malformed dates.
mysql-test/r/func_time.result:
Fix for bug #22229: Bug in DATE_ADD()
- test result.
mysql-test/t/func_time.test:
Fix for bug #22229: Bug in DATE_ADD()
- test case.
sql/item_timefunc.cc:
Fix for bug #22229: Bug in DATE_ADD()
- Item_func_str_to_date::get_date() should return NULL if TIME_NO_ZERO_DATE
flag is set and year||month||day is 0.
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
sql-common/my_time.c:
Auto merged
sql/field.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/time.cc:
Auto merged
mysql-test/r/func_time.result:
Manually merged
mysql-test/t/func_time.test:
Manually merged
mysql-test/r/func_time.result:
Fixed func_time test when merging the fix for bug #11655 and bug #20927 to 5.0
sql/item_timefunc.cc:
Fixed compilation when merging the fix for bug #11655 and bug #20927 to 5.0
into polly.local:/home/kaa/src/maint/m41-maint--07OGk
sql/field.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
Manually merged
mysql-test/t/func_time.test:
Manually merged
- bug #11655 "Wrong time is returning from nested selects - maximum time exists
- input and output TIME values were not validated properly in several conversion functions
- bug #20927 "sec_to_time treats big unsigned as signed"
- integer overflows were not checked in several functions. As a result, input values like 2^32 or 3600*2^32 were treated as 0
- BIGINT UNSIGNED values were treated as SIGNED in several functions
- in cases where both input string truncation and out-of-range TIME value occur, only 'truncated incorrect time value' warning was produced
include/my_time.h:
Added defines for the TIME limits
Added defines for the warning flags set by str_to_time() and check_time_range()
Added check_time_range() declaration
mysql-test/r/func_sapdb.result:
Fixed testcases which relied on incorrect TIMEDIFF() behaviour
mysql-test/r/func_time.result:
Fixed testcase which relied on incorrect behaviour
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
mysql-test/t/func_time.test:
Added testcases for out-of-range values in SEC_TO_TIME(), TIME_TO_SEC(), ADDTIME(), SUBTIME() and EXTRACT()
sql-common/my_time.c:
Added check_time_range() to be used from str_to_time() and item_timefunc.cc
Added new out-of-range flag to str_to_time() warnings
Use '%u' instead of '%d' in my_*_to_str() because the arguments are unsigned
sql/field.cc:
Replaced out-of-range checks with checks for flags returned by str_to_time()
sql/item_timefunc.cc:
Added wrappers over make_datetime() and make_time() which perform out-of-range checks on input values
Moved common code in Item_func_sec_to_time::val_str() and Item_func_sec_to_time::val_int() into a separate function sec_to_time()
Replaced calls to make_datetime() with make_datetime_with_warn() in Item_func_add_time and Item_func_timediff
Checks for 'unsigned int' overflows in Item_func_maketime
Use make_time_with_warn() instead of make_time() in Item_func_maketime
Fixed incorrect sizeof() in Item_func_str_to_date::get_time()
sql/time.cc:
Check for return value of str_to_time() along with warning flags
- Type casting was not consequent, thus when adding a DATE type with
a WEEK interval the result type was DATETIME and not DATE as is the
norm.
- By changing the order of the date internal enumerations the deviant
type casting is resolved (Item_date_add_interval::fix_length_and_dec()
which determines result type for this operation assumes that addition
of any interval with value <= INTERVAL_DAY to date value will result
in date). There are two independant places to change:
interval_names[] and interval_type.
mysql-test/r/func_date_add.result:
Updated result file for type casting test
mysql-test/r/func_time.result:
Updated result file for type casting test
mysql-test/t/func_date_add.test:
Added test for type casting when adding intervals to date.
sql/item_timefunc.cc:
Changed order of "week" key word to match the date interval enumeration.
sql/item_timefunc.h:
Changed the order of the enumeration to better follow interval sizes.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_string.cc:
Auto merged
strings/strtod.c:
Auto merged
client/mysql.cc:
Manual merge.
mysql-test/r/ctype_utf8.result:
Manual merge.
into mysql.com:/usr/home/ram/work/mysql-4.1-maint
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
sql/item.h:
Auto merged
sql/log.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Corrected test case after removal of fix for bug#16377
type_date.test:
Corrected test case after removal of fix for bug#16377
item_cmpfunc.cc:
Removed changes to the agg_cmp_type() made in the for bug#16377
mysql-test/t/type_date.test:
Corrected test case after removal of fix for bug#16377
mysql-test/t/func_time.test:
Corrected test case after removal of fix for bug#16377
mysql-test/r/type_date.result:
Corrected test case after removal of fix for bug#16377
mysql-test/r/query_cache.result:
Corrected test case after removal of fix for bug#16377
mysql-test/r/func_time.result:
Corrected test case after removal of fix for bug#16377
sql/item_cmpfunc.cc:
Removed changes to the agg_cmp_type() made in the for bug#16377
Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server. Fixed.
(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)
mysql-test/r/func_time.result:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
mysql-test/t/func_time.test:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
sql/sql_string.cc:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
because it is magic for, "no conversion."
into salvation.intern.azundris.com:/home/tnurnberg/21913/my50-21913
21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server. Fixed.
(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)
mysql-test/r/func_time.result:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
mysql-test/t/func_time.test:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
sql/sql_string.cc:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
because it is magic for, "no conversion."
Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server. Fixed.
(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)
mysql-test/r/func_time.result:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
mysql-test/t/func_time.test:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Prove DATE_FORMAT() no longer crashes the server when character_set_results is
NULL (which is a legal value and means, "no conversion").
sql/sql_string.cc:
Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
because it is magic for, "no conversion."
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.
mysql-test/r/func_time.result:
Bug#19844: time_format in Union truncates values
show time_format() handles %H and %k correctly four > 99 hours
mysql-test/t/func_time.test:
Bug#19844: time_format in Union truncates values
show time_format() handles %H and %k correctly four > 99 hours
sql/item_timefunc.cc:
Bug#19844: time_format in Union truncates values
unbreak promises we make about field-length of %H and %k in
time_format() so they coincide with the actual range rather
than just 0..23. the docs say we must operate outside that
range, so we'd better do it right.
---
Bug#19844: time_format in Union truncates values
unbreak promises we make about field-length of %H and %k in
time_format() so they coincide with the actual range rather
than just 0..23. the docs say we must operate outside that
range, so we'd better do it right.
One digit values are padded to two digits with %H, "longer"
values are handled correctly up to seven digits including
any sign.
(clarified comments as per jimw's suggestion.)
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
configure.in:
Auto merged
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
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.
mysql-test/r/func_time.result:
Additional test results
mysql-test/t/func_time.test:
Additional tests
sql/item_timefunc.cc:
Fix for timestamp diff issue. Added microsecond precision when
comparing months or quarters; previously only examined date for
these comparisons.
into siva.hindu.god:/usr/home/tim/m/bk/global-50
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field.cc:
Auto merged
into mysql.com:/opt/local/work/mysql-5.0-merge
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/func_time.result:
Manual merge.
mysql-test/t/func_time.test:
Manual merge.
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.
The solution is to remember that original value.
mysql-test/r/auto_increment.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
Add result for bug#17203.
mysql-test/r/subselect.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
Add test case for bug#17203.
sql/sql_lex.cc:
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore
SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user.
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
mysql-test/r/func_sapdb.result:
test cases for date range edge cases added
mysql-test/r/func_time.result:
test cases for date range edge cases added
mysql-test/t/func_sapdb.test:
test cases for date range edge cases added
mysql-test/t/func_time.test:
test cases for date range edge cases added
- The setting of "ENV{'TZ'}" doesn't affect the timezone
used by MySQL Server on Windows.
- Explicitly set timezone to "+03:00" in test case before
doing the calculatiosn to check that there is three hours
difference between utc and local time.
(Magnus' fix)
mysql-test/r/func_time.result:
Update test results
mysql-test/t/func_time.test:
Set timezone to GMT-3, to make it possible to use "interval 3 hour"