into mysql.com:/home/hf/work/31758/my51-31758
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.h:
Auto merged
mysql-test/r/func_str.result:
merging
into mysql.com:/home/hf/work/31758/my50-31758
mysql-test/t/func_str.test:
Auto merged
mysql-test/r/func_str.result:
merging
sql/item_strfunc.h:
merging
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
argument, which is wrong.
Both can be NULL with notnull arguments, so that's fixed.
mysql-test/r/func_str.result:
Bug #31758 inet_ntoa, oct crashes server with null+filesort
test case
mysql-test/t/func_str.test:
Bug #31758 inet_ntoa, oct crashes server with null+filesort
test result
sql/item_strfunc.h:
Bug #31758 inet_ntoa, oct crashes server with null+filesort
missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
into polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550
mysql-test/t/func_str.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_strfunc.h:
Auto merged
mysql-test/r/func_str.result:
Manual merge.
Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account.
This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().
mysql-test/r/func_str.result:
Import patch bug288550.patch
mysql-test/t/func_str.test:
Import patch bug288550.patch
sql/item.cc:
Import patch bug288550.patch
sql/item.h:
Import patch bug288550.patch
sql/item_strfunc.h:
Import patch bug288550.patch
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
represented by an expression of the type UNSIGNED INT and this
expression was evaluated to 0 then the function erroneously returned
the value of the first argument instead of an empty string.
This problem was introduced by the patch for bug 10963.
The problem has been resolved by a proper modification of the code of
Item_func_substr::val_str.
mysql-test/r/func_str.result:
Added a test case for bug #27130.
mysql-test/t/func_str.test:
Added a test case for bug #27130.
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/r/bigint.result:
Merge with 5.0-opt.
mysql-test/t/bigint.test:
Merge with 5.0-opt.
sql/item_func.cc:
Merge with 5.0-opt.
of its arguments was evaluated to NULL, while the predicate
LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE.
This happened because the Item_func_locate::fix_length_and_dec
method by mistake set the value of the maybe_null flag for
the function item to 0. In consequence of this the function
was considered as the one that could not ever return NULL.
mysql-test/r/func_str.result:
Added a test case for bug #27932.
mysql-test/t/func_str.test:
Added a test case for bug #27932.
into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/key.result:
Auto merged
mysql-test/r/row.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/subselect3.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/key.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
mysql-test/t/view.test:
Manually merged
sql/sql_lex.h:
Manually merged
The function CRC32() returns unsigned integer.
But the metadata (the unsigned flag) for the
function was set incorrectly.
As a result type arithmetics based on the
function's metadata (like finding the concise
type of an temporary table column to hold the result)
returned incorrect results.
Fixed by returning correct type information.
This fix is based on code contributed by Martin Friebe
(martin@hybyte.com) on 2007-03-30.
mysql-test/r/func_str.result:
Bug #27530: test case
mysql-test/t/func_str.test:
Bug #27530: test case
sql/item_strfunc.h:
Bug #27530: Marked CRC32() as returning unsigned
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
into pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
- Add extra test case from bug#27073
- Change "if" to be optimized for count > 0
mysql-test/r/func_str.result:
Add test case from bug#27073
mysql-test/t/func_str.test:
Add test case from bug#27073
sql/item_strfunc.cc:
Change the if statemnet to be optimized for the normal case where count > 0
into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt
mysql-test/r/explain.result:
Auto merged
mysql-test/r/func_default.result:
Auto merged
mysql-test/r/func_regexp.result:
Auto merged
mysql-test/r/func_test.result:
Auto merged
mysql-test/r/having.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/varbinary.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_union.cc:
Auto merged
mysql-test/r/func_str.result:
Manually merged
mysql-test/t/func_str.test:
Manually merged
When the SUBSTRING() function was used over a LONGTEXT field the max_length of
the SUBSTRING() result was wrongly calculated and set to 0. As the max_length
parameter is used while tmp field creation it limits the length of the result
field and leads to printing an empty string instead of the correct result.
Now the Item_func_substr::fix_length_and_dec() function correctly calculates
the max_length parameter.
mysql-test/t/func_str.test:
Added a test case for the bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
mysql-test/r/func_str.result:
Added a test case for the bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
sql/item_strfunc.cc:
Bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
Now the Item_func_substr::fix_length_and_dec() function correctly calculates
the max_length parameter.
into magare.gmz:/home/kgeorge/mysql/autopush/B26281-5.0-opt
sql/item_strfunc.cc:
Auto merged
mysql-test/r/func_str.result:
resolved test merge conflicts
mysql-test/t/func_str.test:
resolved test merge conflicts
Fixed boundry checks in the INSERT() function:
were one off.
mysql-test/r/func_str.result:
Bug #26281: test case
mysql-test/t/func_str.test:
Bug #26281: test case
sql/item_strfunc.cc:
Bug #26281: fixed boundry checks
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merging
mysql-test/r/sp.result:
merging
mysql-test/r/view.result:
merging
mysql-test/t/func_str.test:
merging
mysql-test/t/view.test:
merging
into mysql.com:/home/hf/work/mrg/mysql-5.0-opt
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merging
mysql-test/r/sp.result:
merging
mysql-test/r/view.result:
merging
mysql-test/t/func_str.test:
merging
mysql-test/t/view.test:
merging
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
BUILD/check-cpu:
Auto merged
mysql-test/r/explain.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_test.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/update.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/explain.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_in.result:
SCCS merged
mysql-test/r/order_by.result:
SCCS merged
mysql-test/r/sp.result:
merging
mysql-test/t/func_in.test:
SCCS merged
mysql-test/t/order_by.test:
SCCS merged
mysql-test/t/view.test:
merging
sql/item_cmpfunc.h:
merging
sql/mysql_priv.h:
merging
sql/sql_select.cc:
SCCS merged
to return NULL for non-NULL arguments.
This is not the case as it can return NULL
for invalid hexidecimal strings.
Fixed by setting the maybe_null flag.
mysql-test/r/func_str.result:
Bug #26537: test case
mysql-test/t/func_str.test:
Bug #26537: test case
sql/item_strfunc.h:
Bug #26537: item_unhex() can return NULLs
even for guaranteed non-null arguments.
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
- Return empty string also if count is unsigned and value is 0
mysql-test/r/func_str.result:
Update test result
mysql-test/t/func_str.test:
Add test case for using an unsigned value as count parameter
for REPEAT
sql/item_strfunc.cc:
The repeat function should return the emptystring if
count is unsigned and equal to zero or
count is signed and less than or equal to zero
into macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/group_by.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/insert.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/subselect.result:
merge 5.0-opt -> 5.1-opt
mysql-test/t/group_by.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/insert.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/subselect.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/view.test:
merge 5.0-opt -> 5.1-opt
sql/item_cmpfunc.h:
merge 5.0-opt -> 5.1-opt
sql/item_strfunc.h:
merge 5.0-opt -> 5.1-opt
into moonbone.local:/work/latest-5.0-opt-mysql
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/sql_delete.cc:
Auto merged
mysql-test/r/delete.result:
Manual merge
mysql-test/r/func_str.result:
Manual merge
mysql-test/t/delete.test:
Manual merge
correctly.
The Item_func::print method was used to print the Item_func_encode and the
Item_func_decode objects. The last argument to ENCODE and DECODE functions
is a plain C string and thus Item_func::print wasn't able to print it.
The print() method is added to the Item_func_encode class. It correctly
prints the Item_func_encode and the Item_func_decode objects.
mysql-test/t/func_str.test:
Added a test case for bug#23409: Arguments of the ENCODE() and the
> DECODE() functionswere not printed correctly.
mysql-test/r/func_str.result:
Added a test case for bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
sql/item_strfunc.h:
Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
The print() method is added to the Item_func_encode class.
sql/item_strfunc.cc:
Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
The print() method is added to the Item_func_encode class. It correctly
prints the Item_func_encode and the Item_func_decode objects.
Handling of large signed/unsigned values was not consistent, so some string functions could return bogus results.
The current fix is to simply patch up the val_str() methods for those string items.
It would be good clean this code up in general, to make similar problems much harder to make. This is left as an exercise for the reader.
mysql-test/r/func_str.result:
Update test results for bug #24947
mysql-test/t/func_str.test:
Add test case for bug #24947
sql/item_strfunc.cc:
Adjust some string function Items' val_str() methods to handle large signed/unsigned arguments properly
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/lib/mtr_process.pl:
Use local.
mysql-test/r/func_str.result:
SCCS merged
mysql-test/t/func_str.test:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
server-tools/instance-manager/mysql_connection.cc:
Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
SCCS merged
into bodhi.local:/opt/local/work/mysql-5.0-runtime
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/t/wait_for_socket.sh:
Manual merge.
sql/sql_cache.cc:
Manual merge.
Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could
only accept a constant for some parameters.
After this change, this restriction has been removed. An implication is that
these functions can also be used in prepared statements.
The change consist of changing the following classes:
- Item_func_benchmark
- Item_func_encode
- Item_func_decode
- Item_func_format
to:
- only accept Item* in the constructor,
- and evaluate arguments during calls to val_xxx()
which fits the general design of all the other functions.
The 'TODO' items identified in item_create.cc during the work done for
Bug 21114 are addressed by this fix, as a natural consequence of aligning
the design.
In the 'func_str' test, a single very long test line involving an explain
extended select with many functions has been rewritten into multiple
separate tests, to improve maintainability.
The result of explain extended select decode(encode(...)) has changed,
since the encode and decode functions now print all their parameters.
mysql-test/r/func_str.result:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/parser.result:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/ps.result:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/func_str.test:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/parser.test:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/ps.test:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_create.cc:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.cc:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.h:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.cc:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.h:
Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/func_str.result:
Add result for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
mysql-test/t/func_str.test:
Add test case for bug#17047: CHAR() and IN() can return NULL without
signaling NULL result.
sql/item_strfunc.cc:
Add Item_str_func::fix_fields() implementation, and set maybe_null to
TRUE if we are in the SQL mode that requires some functions to return
null even if they normally do not.
sql/item_strfunc.h:
Add declaration of Item_str_func::fix_fields().
Do not reset maybe_null in Item_func_char::fix_length_and_dec().
on large length
Problem: Most (all) of the numeric inputs were being coerced into
int (32 bit) sized variables. Works OK for sane inputs; any input
larger than 2^32 (or 2^31 for signed vars) exihibited predictable
wrapping behavior (up to about 10^18) and then started having really
strange behaviour past that point (since the conversion to 64 bit int
from the DECIMAL type can do weird things on out of range numbers).
Solution: 1) Add many tests. 2) Convert input from (u)long type to
(u)longlong. 3) Do (sometimes multiple) sanity checks on input,
keeping in mind that sometimes a negative longlong is not a negative
longlong (if the unsigned_flag is set). 4) Emulate existing behavior
w/rt negative and "small" out-of-bounds values.
mysql-test/r/func_str.result:
Additional test results for #10963
mysql-test/t/func_str.test:
Additional test results for #10963
sql/item_func.cc:
Used larger type for counting, to avoid truncation.
sql/item_strfunc.cc:
Fix for #10963, including comments and cleaned up logic
equal constant under any circumstances.
In fact this substitution can be allowed if the field is
not of a type string or if the field reference serves as
an argument of a comparison predicate.
mysql-test/r/func_str.result:
Added test cases for bug #21698.
mysql-test/r/heap_hash.result:
Adjusted results after the fix for bug #21198.
mysql-test/t/func_str.test:
Added test cases for bug #21698.
sql/item.cc:
Fixed bug #21198.
Added a method to check whether a field reference can be
substituted for a constant equal to the field.
This substitution is allowed if the field is not of a type string
or if the field reference serves as an argument of a comparison
predicate.
sql/item.h:
Fixed bug #21698.
Added a new virtual transformation method for a item 'compile'
with two callback function parameters.
Added a new virtual method 'subst_argument_checker' to be used
as an amnalyzer method.
This method is supposed to set its in/out argument to NULL for
the nodes where substitution of a string field for a constant
is not valid.
sql/item_cmpfunc.cc:
Fixed bug #21698.
Added an implementation of the compile method for class Item_cond.
First it processes the Item_cond node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_cmpfunc.h:
Fixed bug #21698.
Added the implementations of 'subst_argument_checker'
for the Item_func and Item_cond classes.
This method is supposed to set its in/out argument to NULL for
the nodes where substitution of a string field for a constant
is not valid.
Added the declaration of an implementation of the compile method for
class Item_cond.
First it processes the Item_cond node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_func.cc:
Fixed bug #21698.
Added an implementation of the compile method for class Item_func.
First it processes the Item_func node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/item_func.h:
Fixed bug #21698.
Added the declaration of the implementation of the compile method for
class Item_func.
First it processes the Item_func node with a callback function and if
the latter returns TRUE it proceeds with a transformation performed by
another callback function.
sql/sql_select.cc:
Fixed bug #21698.
Limited the conditions at which a field can be substituted
a for an equal constant in a formula.
This substitution is allowed if the field is not of a type string
or if the field reference serves as an argument of a comparison
predicate.
into lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/time.cc:
Auto merged
into olga.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
for class Item_func_trim.
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
[{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
[remstr FROM] str
mysql-test/r/func_str.result:
Added a test case for bug #17526: uncorrect print method
for class Item_func_trim.
mysql-test/t/func_str.test:
Added a test case for bug #17526: incorrect print method
for class Item_func_trim.
sql/item_strfunc.cc:
Fixed bug #17526: incorrect print method
for class Item_func_trim.
Added an implementation for the virtual function print
in the class Item_func_trim.
The implementation takes into account the fact the TRIM
function takes the arguments in the following forms:
[{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
[remstr FROM] str
sql/item_strfunc.h:
Fixed bug #17526: incorrect print method
for class Item_func_trim.
Added an implementation for the virtual function print
in the class Item_func_trim.
Declared a virtual method to return the mode of the TRIM
function: LEADING, TRAILING or BOTH.
Added implementations of this method for Item_func_trim and
its descendants Item_func_ltrim and Item_func_rtrim.
Adding test case.
item_strfunc.cc:
bug#11728 string function LEFT, strange undocumented behaviour
Fixing LEFT and RIGHT return NULL if the second
argument is NULL.
sql/item_strfunc.cc:
bug#11728 string function LEFT, strange undocumented behaviour
Fixing LEFT and RIGHT return NULL if the second
argument is NULL.
mysql-test/t/func_str.test:
Adding test case.
mysql-test/r/func_str.result:
Adding test case.
into olga.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
The implementation of the method Item_func_reverse::val_str
for the REVERSE function modified the argument of the function.
This led to wrong results for expressions that contained
REVERSE(ref) if ref occurred somewhere else in the expressions.
mysql-test/r/func_str.result:
Added a test case for bug #18243.
mysql-test/t/func_str.test:
Added a test case for bug #18243.
sql/item_strfunc.cc:
Fixed bug #18243.
The implementation of the method Item_func_reverse::val_str
for the REVERSE function modified the argument of the function.
This led to wrong results for expressions that contained
REVERSE(ref) if ref occurred somewhere else in the expressions.
The implementation of Item_func_reverse::val_str has been changed
to make the argument intact.
sql/item_strfunc.h:
Fixed bug #18243.
Added tmp_value to the Item_func_reverse class to store
the result of the function. It erroneously replaced the
argument before this fix.
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
mysql-test/r/cast.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
argument can lead to a wrong result.
md5() and sha() functions treat their arguments as case sensitive strings.
But when they are compared their arguments were compared as a case
insensitive strings which leads to two functions with different arguments
and thus different results to being identical. This can lead to a wrong
decision made in the range optimizer and thus lead to a wrong result set.
Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
functions now set binary collation on their arguments.
sql/item_strfunc.cc:
Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.
Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
functions now set binary collation on their arguments.
mysql-test/r/func_str.result:
Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.
mysql-test/t/func_str.test:
Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.