Problem: When GET_FORMAT() is called two times from the upper
level function (e.g. LEAST in the bug report), on the second
call "res= args[0]->val_str(...)" and str point to the same
String object.
1. Fix: changing the order from
- get val_str into tmp_value then convert to str
to
- get val_str into str then convert to tmp_value
The new order is more correct: the purpose of "str" parameter
is exactly to call val_str() for arguments.
The purpose of String class members (like tmp_value) is to do further
actions on the result.
Doing it in the other way around give unexpected surprises.
2. Using str_value instead of str to do padding, for the same reason.
Fixed a number of memory leaks discovered by valgrind.
dbug/dbug.c:
This is actually an addendum to the fix for bug #52629:
- there is no point in limiting the fix to just global
variables, session ones are also affected.
- zero all fields when allocating a new 'state' structure so
that FreeState() does not deal with unitialized data later.
- add a check for a NULL pointer in DBUGCloseFile()
mysql-test/r/partition_error.result:
Added a test case for bug #56709.
mysql-test/r/variables_debug.result:
Added a test case for bug #56709.
mysql-test/t/partition_error.test:
Added a test case for bug #56709.
mysql-test/t/variables_debug.test:
Added a test case for bug #56709.
sql/item_timefunc.cc:
There is no point in declaring 'value' as a member of
Item_extract and dynamically allocating memory for it in
Item_extract::fix_length_and_dec(), since this string is only
used as a temporary storage in Item_extract::val_int().
sql/item_timefunc.h:
Removed 'value' from the Item_extract class definition.
sql/sql_load.cc:
- we may need to deallocate 'buffer' even when 'error' is
non-zero in some cases, since 'error' is public, and there is
external code modifying it.
- assign NULL to buffer when deallocating it so that we don't
do it twice in the destructor
- there is no point in changing 'error' in the destructor.
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
Fixed crash caused by x64 int/long incompatibility introduced
in Bug #29125.
sql/item_timefunc.cc:
Fixed crash caused by int/long incompatibility on x64 systems.
Changed two "uint" casts and a "long" declartion to "int" in order to
ensure that the integer sign is preserved.
See Bug #48739 for details.
Problem: Item_char_typecast reported wrong max_length when
casting to BINARY, which lead, in particular, in wrong
"ORDER BY BINARY(char_column)" results.
Fix: making Item_char_typecast report correct max_length.
@ mysql-test/r/ctype_utf16.result
Fixing old incorrect test result.
@ mysql-test/r/ctype_utf32.result
Fixing old incorrect test result.
@ mysql-test/r/ctype_utf8.result
Adding new test
@ mysql-test/t/ctype_utf8.test
Adding new test
@ sql/item_timefunc.cc
Making Item_char_typecast report correct max_length
when cast is done to BINARY.
Fixed crash caused by x64 int/long incompatibility introduced
in Bug #29125.
sql/item_timefunc.cc:
Fixed crash caused by int/long incompatibility on x64 systems.
Changed two "uint" casts and a "long" declartion to "int" in order to
ensure that the integer sign is preserved.
See Bug #48739 for details.
sql/opt_range.cc:
Removed duplicate code (if statement must have been duplicated during earlier merge).
sql/sql_partition.cc:
After mergeing bug#46362 and bug#20577, the NULL partition was also searched
when col = const, fixed by checking if = or range.
Problem was that the partition containing NULL values
was pruned away, since '2001-01-01' < '2001-02-00' but
TO_DAYS('2001-02-00') is NULL.
Added the NULL partition for RANGE/LIST partitioning on TO_DAYS()
function to be scanned too.
Also fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
mysql-test/include/partition_date_range.inc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added include file to decrease test code duplication
mysql-test/r/partition_pruning.result:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added test results
mysql-test/r/partition_range.result:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Updated test result.
This fix adds the partition containing NULL values to
the list of partitions to be scanned.
mysql-test/t/partition_pruning.test:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added test case
sql/item.h:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Added MONOTONIC_*INCREASE_NOT_NULL values to be used by TO_DAYS.
sql/item_timefunc.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Calculate the number of days as return value even for invalid dates.
This is so that pruning can be used even for invalid dates.
sql/opt_range.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Fixed a bug that added ALLOW_INVALID_DATES to sql_mode
(SELECT * FROM t WHERE date_col < '1999-99-99' on a RANGE/LIST
partitioned table would add it).
sql/partition_info.h:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Resetting ret_null_part when a single partition is to be used, this
to avoid adding the NULL partition.
sql/sql_partition.cc:
Bug#20577: Partitions: use of to_days() function leads to selection failures
Always include the NULL partition if RANGE or LIST.
Use the returned value for the function for pruning, even if
it is marked as NULL, so that even '2000-00-00' can be
used for pruning, even if TO_DAYS('2000-00-00') is NULL.
Changed == to >= in get_next_partition_id_list to avoid
crash if part_iter->part_nums is not correctly setup.
There were a problem since pruning uses the field
for comparison (while evaluate_join_record uses longlong),
resulting in pruning failures when comparing DATE to DATETIME.
Fix was to always comparing DATE vs DATETIME as DATETIME,
by adding ' 00:00:00' to the DATE string.
And adding optimization for comparing with 23:59:59, so that
DATETIME_col > '2001-02-03 23:59:59' ->
TO_DAYS(DATETIME_col) > TO_DAYS('2001-02-03 23:59:59') instead
of '>='.
mysql-test/r/partition_pruning.result:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Updated result-file
mysql-test/t/partition_pruning.test:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Added testcases.
sql-common/my_time.c:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
removed duplicate assignment.
sql/item.cc:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Changed field_is_equal_to_item into field_cmp_to_item, to
better handling DATE vs DATETIME comparision.
sql/item.h:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Updated comment
sql/item_timefunc.cc:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Added optimization (pruning) of DATETIME where time-part is
23:59:59
sql/opt_range.cc:
Bug#46362: Endpoint should be set to false for TO_DAYS(DATE)
Using the new stored_field_cmp_to_item for better pruning.
with gcc 4.3.2
Compiling MySQL with gcc 4.3.2 and later produces a number of
warnings, many of which are new with the recent compiler
versions.
This bug will be resolved in more than one patch to limit the
size of changesets. This is the first patch, fixing a number
of the warnings, predominantly "suggest using parentheses
around && in ||", and empty for and while bodies.
with gcc 4.3.2
Compiling MySQL with gcc 4.3.2 and later produces a number of
warnings, many of which are new with the recent compiler
versions.
This bug will be resolved in more than one patch to limit the
size of changesets. This is the first patch, fixing a number
of the warnings, predominantly "suggest using parentheses
around && in ||", and empty for and while bodies.
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
The MONTHNAME/DAYNAME functions
returns binary string, so the LOWER/UPPER functions
are not effective on the result of MONTHNAME/DAYNAME call.
Character set of the MONTHNAME/DAYNAME function
result has been changed to connection character set.
include/m_ctype.h:
added my_charset_repertoire function
mysql-test/r/ctype_ucs.result:
test result
mysql-test/r/func_time.result:
test result
mysql-test/t/ctype_ucs.test:
test case
mysql-test/t/func_time.test:
test case
sql/item_timefunc.cc:
Item_func_monthname::fix_length_and_dec and
Item_func_dayname::fix_length_and_dec methods have been
modified to use connection character set
sql/item_timefunc.h:
Item_func_monthname::fix_length_and_dec and
Item_func_dayname::fix_length_and_dec methods have been
modified to use connection character set
sql/mysql_priv.h:
added max_month_name_length, max_day_name_length fields into MY_LOCALE struct
sql/mysqld.cc:
The test_lc_time_sz function controls modifications
of the locale database in debugging mode.
sql/sql_locale.cc:
initialization of max_month_name_length, max_day_name_length fields
strings/ctype.c:
added my_charset_repertoire function
returns truncated results
Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR
we incorrectly set its max length in some cases that may lead
to truncated results returned.
Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's
max length.
mysql-test/r/ctype_utf8.result:
Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
returns truncated results
- test result.
mysql-test/t/ctype_utf8.test:
Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
returns truncated results
- test case.
sql/item_timefunc.cc:
Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
returns truncated results
- calculating Item_char_typecast::max_length use initial
argument's charset mbmaxlen instead of from_cs->mbmaxlen,
as from_cs may differ in some case (see comment above).
between 5.0 and 5.1.
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
- be completely in UTF8;
- not contain character set introducers.
For more information, see WL4052.
mysql-test/include/ddl_i18n.check_views.inc:
Add a test case for Bug#30217.
mysql-test/r/ddl_i18n_koi8r.result:
Update result file.
mysql-test/r/ddl_i18n_utf8.result:
Update result file.
mysql-test/r/information_schema.result:
Update result file.
mysql-test/r/information_schema_db.result:
Update result file.
mysql-test/r/mysqldump.result:
Update result file.
mysql-test/r/show_check.result:
Update result file.
mysql-test/t/ddl_i18n_koi8r.test:
Add a test case for Bug#30217.
mysql-test/t/ddl_i18n_utf8.test:
Add a test case for Bug#30217.
mysql-test/t/mysqldump.test:
Add a test case for Bug#30217.
sql/ha_ndbcluster.cc:
Add a parameter to print().
sql/item.cc:
1. Add a parameter to print().
2. Item_string::print():
- Do not append character set introducer to the text literal
if we're building a query for INFORMATION_SCHEMA;
- Convert text literal to UTF8 if we're building a query
for INFORMATION_SCHEMA.
sql/item.h:
Add a parameter to print().
sql/item_cmpfunc.cc:
Add a parameter to print().
sql/item_cmpfunc.h:
Add a parameter to print().
sql/item_func.cc:
Add a parameter to print().
sql/item_func.h:
Add a parameter to print().
sql/item_geofunc.h:
Add a parameter to print().
sql/item_row.cc:
Add a parameter to print().
sql/item_row.h:
Add a parameter to print().
sql/item_strfunc.cc:
Add a parameter to print().
sql/item_strfunc.h:
Add a parameter to print().
sql/item_subselect.cc:
Add a parameter to print().
sql/item_subselect.h:
Add a parameter to print().
sql/item_sum.cc:
Add a parameter to print().
sql/item_sum.h:
Add a parameter to print().
sql/item_timefunc.cc:
Add a parameter to print().
sql/item_timefunc.h:
Add a parameter to print().
sql/mysql_priv.h:
Add a parameter to print().
sql/sp_head.cc:
Add a parameter to print().
sql/sql_lex.cc:
Add a parameter to print().
sql/sql_lex.h:
Add a parameter to print().
sql/sql_parse.cc:
Add a parameter to print().
sql/sql_select.cc:
Add a parameter to print().
sql/sql_show.cc:
Add a parameter to print().
sql/sql_test.cc:
Add a parameter to print().
sql/sql_view.cc:
Build INFORMATION_SCHEMA query from Item-tree.
sql/sql_yacc.yy:
Build INFORMATION_SCHEMA query from Item-tree.
sql/table.h:
Add a parameter to print().
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/item_sum.cc:
Manual merge.
w/ Field_date instead of Field_newdate
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls.
mysql-test/r/type_decimal.result:
Bug #33256: removed redundant warnings
sql/field.h:
Bug #33256: Add a constructor similar to Field_date::Field_date()
sql/item.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_sum.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.cc:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
sql/item_timefunc.h:
Bug #33256: Use Field_newdate instead of Field_date
for all temp tables and CREATE .. SELECT
into mysql.com:/misc/mysql/32770/51-32770
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
sql/field.cc:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_geofunc.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/records.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/unireg.h:
Auto merged
sql/item.cc:
manual merge
sql/log_event.cc:
manual merge
sql/protocol.cc:
manual merge
sql/sp_head.cc:
manual merge
sql/sql_base.cc:
manual merge
sql/sql_parse.cc:
manual merge
sql/sql_select.cc:
manual merge
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
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge
client/mysqldump.c:
Auto merged
include/my_base.h:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
mysql-test/lib/mtr_cases.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/records.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
storage/myisam/sort.c:
Auto merged
mysql-test/t/log_state.test:
Manual merge fix-up
mysql-test/include/mix1.inc:
Manual merge
mysql-test/r/ctype_ucs.result:
Manual merge
mysql-test/r/func_misc.result:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/r/key.result:
Manual merge
mysql-test/r/log_state.result:
Manual merge
mysql-test/suite/binlog/t/binlog_killed.test:
Manual merge
mysql-test/t/ctype_ucs.test:
Manual merge
mysql-test/t/func_misc.test:
Manual merge
mysql-test/t/key.test:
Manual merge
sql/item_strfunc.h:
Manual merge
strings/ctype-simple.c:
Manual merge
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
libmysql/CMakeLists.txt:
Auto merged
libmysql/Makefile.shared:
Auto merged
myisam/ft_boolean_search.c:
Auto merged
myisam/sort.c:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/mysql-test-run.pl:
Manual merge
mysql-test/r/ctype_ucs.result:
Manual merge
mysql-test/r/func_misc.result:
Manual merge
mysql-test/t/binlog_killed.test:
Manual merge
mysql-test/t/ctype_ucs.test:
Manual merge
mysql-test/t/func_misc.test:
Manual merge
sql/item_strfunc.h:
Manual merge
strings/ctype-simple.c:
Manual merge
into mysql.com:/misc/mysql/31990/51-31990
mysql-test/r/cast.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.
Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.
mysql-test/r/cast.result:
Show that HOUR(), MINUTE(), ... return sensible values when used
on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
Show that this coincides with how DATE-columns behave.
mysql-test/t/cast.test:
Show that HOUR(), MINUTE(), ... return sensible values when used
on DATE-cast objects, namely NULL for NULL-dates and 0 otherwise.
Show that this coincides with how DATE-columns behave.
sql/item_timefunc.cc:
Add get_time() method to DATE-cast object to overload
the method in Item superclass that would return spurious
results. Return zero-result; flag NULL if input was NULL.
sql/item_timefunc.h:
Add get_time() declaration to DATE-cast object.
into magare.gmz:/home/kgeorge/mysql/work/B31221-5.1-opt
mysql-test/r/derived.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/type_date.test:
Auto merged
BitKeeper/deleted/.del-ps_6bdb.result:
Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
Auto merged
sql/field.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
mysql-test/r/type_date.result:
merge 5.0-opt -> 5.1-opt
No warning was generated when a TIMESTAMP with a non-zero time part
was converted to a DATE value. This caused index lookup to assume
that this is a valid conversion and was returning rows that match
a comparison between a TIMESTAMP value and a DATE keypart.
Fixed by generating a warning on such a truncation.
mysql-test/r/derived.result:
Bug #31221: fixed an existing not-precise test case
mysql-test/r/ps_2myisam.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_3innodb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_4heap.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_5merge.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_6bdb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_7ndb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/type_date.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/type_datetime.result:
Bug #31221: test case
mysql-test/t/derived.test:
Bug #31221: fixed an existing not-precise test case
mysql-test/t/type_date.test:
Bug #31221: test case
sql/field.cc:
Bug #31221:
- Upgraded fix for bug 29729
- issue a warning only if the hh:mm:ss.msec is not zero consistently
for all the Field_newdate::store function
sql/item_timefunc.cc:
Bug #31221: don't ignore the errors when storing data
into sunlight.local:/local_work/merge-5.1-opt-mysql
libmysql/libmysql.c:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/protocol.cc:
Auto merged
sql/sql_class.h:
Auto merged
mysql-test/r/type_datetime.result:
Manually merged
mysql-test/t/type_datetime.test:
Manually merged
sql/item_cmpfunc.cc:
Manually merged
sql/item_cmpfunc.h:
Manually merged
sql/sql_insert.cc:
Manually merged
type of the result.
There are several functions that accept parameters of different types.
The result field type of such functions was determined based on
the aggregated result type of its arguments. As the DATE and the DATETIME
types are represented by the STRING type, the result field type
of the affected functions was always STRING for DATE/DATETIME arguments.
The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.
Now the affected functions aggregate the field types of their arguments rather
than their result types and return the result of aggregation as their result
field type.
The cached_field_type member variable is added to the number of classes to
hold the aggregated result field type.
The str_to_date() function's result field type now defaults to the
MYSQL_TYPE_DATETIME.
The agg_field_type() function is added. It aggregates field types with help
of the Field::field_type_merge() function.
The create_table_from_items() function now uses the
item->tmp_table_field_from_field_type() function to get the proper field
when the item is a function with a STRING result type.
libmysql/libmysql.c:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The client library now accepts the NEWDATE type as a string.
sql/item_cmpfunc.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
Now the fix_length_and_dec functions of the
Item_func_ifnull,Item_func_if, Item_func_case, Item_func_coalesce
classes are use agg_field_type function to find out the type of their
result field.
sql/item_cmpfunc.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The cached_field type is added to the Item_func_case, Item_func_if and
Item_func_coalesce classes.
The field_type function is added to the Item_func_ifnull, Item_func_if,
Item_func_coalesce, Item_func_case classes.
sql/item_func.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The Item_func_min_max::fix_length_and_dec function now uses the agg_field_type
function to find out the correct type of the result field.
sql/item_func.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The cached_field_type variable is added to the Item_func_min_max class.
sql/item_timefunc.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The result of the str_to_date function now defaults to the
DATETIME type.
sql/mysql_priv.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The prototype of the agg_field_type function is added.
sql/protocol.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The Protocol_simple::store function is now used to store fields of NEWDATE type.
sql/sql_insert.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The create_table_from_items function now uses the
tmp_table_field_from_field_type function to get field for items with the
STRING result type.
mysql-test/r/date_formats.result:
A test case result corrected after fixing bug#27216.
mysql-test/r/type_datetime.result:
Added a test case for the bug#27216: functions with parameters of different
date types may return wrong type of the result.
mysql-test/t/type_datetime.test:
Added a test case for the bug#27216: functions with parameters of different
date types may return wrong type of the result.
- Introduced val_int_endpoint() function which converts between func
argument intervals and func value intervals for monotonic functions.
- Made partition interval analyzer use part_expr->val_int_endpoint()
to check if the edge values should be included.
mysql-test/r/partition_pruning.result:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Testcase
mysql-test/t/partition_pruning.test:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Testcase
sql/item.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added Item_field::val_int_endpoint() implementation
sql/item.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added Item::val_int_endpoint() which converts intervals from argument
space to function value space for unary monotonic functions.
sql/item_timefunc.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added val_int_endpoint() for TO_DAYS and YEAR functions.
sql/item_timefunc.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Added val_int_endpoint() for TO_DAYS and YEAR functions.
sql/partition_info.h:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Removed partition_info::range_analysis_include_bounds as it is no longer
needed.
sql/sql_partition.cc:
BUG#27927: Partition pruning not optimal with TO_DAYS and YEAR functions
- Make partition interval analyzer use part_expr->val_int_endpoint() to
check if the edge values should be included.
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysys/charset.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/log_event.cc:
Auto merged
into mysql.com:/home/bar/mysql-work/mysql-5.1.b28875
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysys/charset.c:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_string.cc:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-extra.c:
Auto merged
strings/ctype.c:
Auto merged
include/m_ctype.h:
After merge fix
mysql-test/r/ctype_ucs.result:
After merge fix
mysql-test/r/func_time.result:
After merge fix
mysql-test/t/ctype_ucs.test:
After merge fix
mysql-test/t/func_time.test:
After merge fix
sql/sql_lex.cc:
After merge fix
sql/sql_lex.h:
After merge fix
sql/sql_yacc.yy:
After merge fix
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-extra.c:
Auto merged
mysql-test/r/ctype_ucs.result:
After merge fix
mysql-test/t/ctype_ucs.test:
After merge fix
(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.
--long-query-time is now given in seconds with microseconds as decimals
--min_examined_row_limit added for slow query log
long_query_time user variable is now double with 6 decimals
Added functions to get time in microseconds
Added faster time() functions for system that has gethrtime() (Solaris)
We now do less time() calls.
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
set_var.cc and my_getopt() can now handle DOUBLE variables.
All time() calls changed to my_time()
my_time() now does retry's if time() call fails.
Added debug function for stopping in mysql_admin_table() when tables are locked
Some trivial function and struct variable renames to avoid merge errors.
Fixed compiler warnings
Initialization of some time variables on windows moved to my_init()
include/my_getopt.h:
Added support for double arguments
include/my_sys.h:
Fixed wrong type to packfrm()
Added new my_time functions
include/mysql/plugin.h:
Added support for DOUBLE
libmysql/CMakeLists.txt:
Added new time functions
libmysql/Makefile.shared:
Added new time functions
mysql-test/r/variables.result:
Testing of long_query_time
mysql-test/t/variables.test:
Testing of long_query_time
mysys/charset.c:
Fixed compiler warnings
mysys/default_modify.c:
Fixed compiler warnings
mysys/hash.c:
Fixed compiler warnings
mysys/mf_getdate.c:
Use my_time()
mysys/mf_iocache2.c:
Fixed compiler warnings
mysys/mf_pack.c:
Fixed compiler warnings
mysys/mf_path.c:
Fixed compiler warnings
mysys/my_append.c:
Fixed compiler warnings
mysys/my_compress.c:
Fixed compiler warnings
mysys/my_copy.c:
Fixed compiler warnings
mysys/my_gethwaddr.c:
Fixed compiler warnings
mysys/my_getopt.c:
Added support for double arguments
mysys/my_getsystime.c:
Added functions to get time in microseconds.
Added faster time() functions for system that has gethrtime() (Solaris)
Moved windows initialization code to my_init()
mysys/my_init.c:
Added initializing of variables needed for windows time functions
mysys/my_static.c:
Added variables needed for windows time functions
mysys/my_static.h:
Added variables needed for windows time functions
mysys/my_thr_init.c:
Added THR_LOCK_time, used for faster my_time()
mysys/mysys_priv.h:
Added THR_LOCK_time, used for faster my_time()
mysys/thr_alarm.c:
time() -> my_time()
sql/event_data_objects.cc:
end_time() -> set_current_time()
sql/event_queue.cc:
end_time() -> set_current_time()
sql/event_scheduler.cc:
Fixed compiler warnings
sql/field.h:
Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers
sql/item.h:
Added decimal to Item_float(double)
sql/item_cmpfunc.h:
Added decimal to Item_float(double)
sql/item_timefunc.cc:
time() -> my_time()
sql/item_xmlfunc.cc:
Fixed compiler warning
sql/lock.cc:
lock_time() -> set_time_after_lock()
sql/log.cc:
Timing in slow query log to file is now done in microseconds
Changed some while() loops to for() loops.
Fixed indentation
time() -> my_time()
sql/log.h:
Slow query logging is now done based on microseconds
sql/log_event.cc:
time() -> my_time()
Fixed arguments to new Item_float()
sql/mysql_priv.h:
Fixed compiler warnings
Added opt_log_slow_slave_statements
sql/mysqld.cc:
Added --log_slow_slave_statements and --min_examined_row_limit
--long-query-time now takes a double argument with microsecond resolution
Don't write shutdown message when using --help
Removed not needed \n
Thread create time and connect time is now done in microseconds
time() -> my_time()
Avoid some time() calls
sql/net_serv.cc:
Fixed compiler warnings
sql/parse_file.cc:
time() -> my_time()
sql/set_var.cc:
Added support for DOUBLE variables
Added support for variables that are given in seconds with microsecond resolution
sql/set_var.h:
Added support for variables that are given in seconds with microsecond resolution
sql/slave.cc:
Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given
time() -> my_time()
sql/sql_cache.h:
Fixed compiler warning()
sql/sql_class.cc:
Initialize new THD variables
sql/sql_class.h:
long_query_time is now in microseconds
Added min_examined_row_limit
Reordered some THD elements for higher efficency
Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock)
Start of query is now recorded both in seconds and in microseconds.
Following renames was made for more clarity and avoid merge problems from earlier versions:
connect_time -> connect_utime
thr_create_time -> thr_create_utime
end_time() -> set_current_time()
lock_time() -> set_time_after_lock()
Added THD::start_utime, which is start of query in microseconds from some arbitary time
Added function THD::current_utime()
Removed safe_time() as retry's are handled in my_time()
sql/sql_connect.cc:
User resources are now using microsecond resolution
sql/sql_insert.cc:
end_time() -> set_current_time()
sql-common/client.c:
time() -> my_time()
sql/sql_parse.cc:
Testing if we should print to slow_query_log() is now done with microsecond precission.
If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this.
sql/sql_select.cc:
Simplify code now that Item_float() takes decimals as argument
sql/sql_show.cc:
time() -> my_time()
Added support for SYS_DOUBLE
sql/sql_table.cc:
Added debug function for stopping in mysql_admin_table() when tables are locked
sql/structs.h:
intime -> reset_utime
The Item_date_typecast::val_int function doesn't reset null_value flag.
This makes all values that follows the first null value to be treated as nulls
and led to a wrong result.
Now the Item_date_typecast::val_int function correctly sets the null_value flag
for both null and non-null values.
mysql-test/t/cast.test:
Added a test case for the bug#29898: Item_date_typecast::val_int doesn't reset
the null_value flag.
mysql-test/r/cast.result:
Added a test case for the bug#29898: Item_date_typecast::val_int doesn't reset
the null_value flag.
sql/item_timefunc.cc:
Bug#29898: Item_date_typecast::val_int doesn't reset the null_value flag.
Now the Item_date_typecast::val_int function correctly sets the null_value flag
for both null and non-null values.