This bug is a side-effect of bug fix#16377. NOW() is optimized in
BETWEEN to integer constants to speed up query execution. When view is being
created it saves already modified query and thus becomes wrong.
The agg_cmp_type() function now substitutes constant result DATE/TIME functions
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.
mysql-test/t/view.test:
Added a test case for bug#15950: NOW() optimized away in VIEWs
mysql-test/r/view.result:
Added a test case for bug#15950: NOW() optimized away in VIEWs
sql/item_cmpfunc.cc:
Fixed bug#15950: NOW() optimized away in VIEWs
The agg_cmp_type() function now substitutes constant result DATE/TIME functions
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.
into mysql.com:/home/psergey/mysql-5.0-opt
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/subselect.test:
Manual merge
sql/mysql_priv.h:
Manual merge
Two functions have different ideas of what a string should look like;
one of them reads memory it assumes the other one may have written.
And "if you assume ..."
We now use a more defensive variety of the assuming function, this fixes
a warning thrown by the valgrind tool.
sql/item_cmpfunc.cc:
c_ptr() makes incorrect assumptions about the string we get from
out of args[0]->val_str(&tmp); c_str_safe() is more defensive.
In some functions dealing with strings and character sets, the wrong
pointers were saved for restoration in THD::rollback_item_tree_changes().
This could potentially cause random corruption or crashes.
Fixed by passing the original Item ** locations, not local stack copies.
Also remove unnecessary use of default arguments.
sql/item.cc:
Function agg_item_charsets() now handles non-consequtive Item *'s.
sql/item.h:
Remove use of default argument.
sql/item_cmpfunc.cc:
Remove use of default argument.
sql/item_func.cc:
Remove use of default argument.
sql/item_func.h:
Function agg_item_charsets() now handles non-consequtive Item *'s.
sql/item_strfunc.cc:
Pass original Item **'s to agg_arg_charsets(), not local copies, to ensure
proper restoration in THD::rollback_item_tree_changes().
sql/item_sum.cc:
Remove use of default argument.
Added test case for bug#18759 Incorrect string to numeric conversion.
select.test:
Added test case for bug#18759 Incorrect string to numeric conversion.
item_cmpfunc.cc:
Cleanup after fix for bug#18360 removal
sql/item_cmpfunc.cc:
Cleanup after fix for bug#18360 removal
mysql-test/t/select.test:
Added test case for bug#18759 Incorrect string to numeric conversion.
mysql-test/r/select.result:
Added test case for bug#18759 Incorrect string to numeric conversion.
Reverted fix for bug#18360
mysql-test/t/func_in.test:
Reverted fix for bug#18360
mysql-test/r/func_in.result:
Reverted fix for bug#18360
sql/item_cmpfunc.cc:
Reverted fix for bug#18360
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
Fix for bug#16716 for --ps-protocol mode.
item_cmpfunc.cc:
Fix for a memory allocation/freeing problem in agg_cmp_type() after fix
for bug#16377. Few language corrections.
sql/item_cmpfunc.cc:
Fix for a memory allocation/freeing problem in agg_cmp_type(). Few language corrections.
sql/item_strfunc.cc:
Fix for bug#16716 for --ps-protocol mode.
After merge fix
mysql-test/r/func_time.result:
After merge fix
mysql-test/r/func_concat.result:
After merge fix
mysql-test/r/cast.result:
After merge fix
sql/item_cmpfunc.h:
After merge fix
sql/item_cmpfunc.cc:
After merge fix
sql/field.cc:
After merge fix
mysql-test/r/cast.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/structs.h:
Auto merged
can lead to a wrong result.
All date/time functions has the STRING result type thus their results are
compared as strings. The string date representation allows a user to skip
some of leading zeros. This can lead to wrong comparison result if a date/time
function result is compared to such a string constant.
The idea behind this bug fix is to compare results of date/time functions
and data/time constants as ints, because that date/time representation is
more exact. To achieve this the agg_cmp_type() is changed to take in the
account that a date/time field or an date/time item should be compared
as ints.
This bug fix is partially back ported from 5.0.
The agg_cmp_type() function now accepts THD as one of parameters.
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.
From the Item_func_between::fix_length_and_dec() function removed the part
which was converting date/time constants to int if possible. Now this is
done by the agg_cmp_type() function.
The new function result_as_longlong() is added to the Item class.
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.
Correct val_int() methods are implemented for classes Item_date_typecast,
Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
classes are derived from Item_str_func and Item_str_func::val_int() converts
its string value to int without regard to the date/time type of these items.
Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant. This is done
to get a correct result of comparisons like date_time_function() = string_constant.
mysql-test/r/cast.result:
Fixed wrong test case result after bug fix#16377.
sql/item_timefunc.h:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
The result_as_longlong() function is set to return TRUE for these classes:
Item_date, Item_date_func, Item_func_curtime, Item_func_sec_to_time,
Item_date_typecast, Item_time_typecast, Item_datetime_typecast,
Item_func_makedate.
sql/item_timefunc.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.Correct val_int() methods are implemented for classes Item_date_typecast,
Item_func_makedate, Item_time_typecast, Item_datetime_typecast.
sql/item_cmpfunc.h:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant.
sql/field.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
Field::set_warning(), Field::set_datetime_warning() now use current_thd to get thd if table isn't set.
sql/item_cmpfunc.cc:
Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
The agg_cmp_type() function now accepts THD as one of parameters.
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.
sql/item.h:
The new function result_as_longlong() is added to the Item class.
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.
mysql-test/t/func_time.test:
Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
mysql-test/r/func_time.result:
Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.
The IN() function uses agg_cmp_type() to aggregate all types of its arguments
to find out some common type for comparisons. In this particular case the
char() and the int was aggregated to double because char() can contain values
like '1.5'. But all strings which do not start from a digit are converted to
0. thus 'a' and 'z' become equal.
This behaviour is reasonable when all function arguments are constants. But
when there is a field or an expression this can lead to false comparisons. In
this case it makes more sense to coerce constants to the type of the field
argument.
The agg_cmp_type() function now aggregates types of constant and non-constant
items separately. If some non-constant items will be found then their
aggregated type will be returned. Thus after the aggregation constants will be
coerced to the aggregated type.
mysql-test/t/func_in.test:
Added test case for bug#18360: Incorrect type coercion in IN() results in false comparison.
mysql-test/r/func_in.result:
Added test case for bug#18360: Incorrect type coercion in IN() results in false comparison.
sql/item_cmpfunc.cc:
Fixed bug#18360: Incorrect type coercion in IN() results in false comparison.
The agg_cmp_type() function now aggregates types of constant and non-constant
items separately. If some non-constant items will be found then their
aggregated type will be returned. Thus after the aggregation constants will
be coerced to the aggregated type.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
mysql-test/r/view.result:
SCCS merged
mysql-test/t/view.test:
SCCS merged
This bug was introduced when the patch resolving the
performance problem 17164 was applied. As a result
of that modification the not_null_tables attributes
were calculated incorrectly for constant OR conditions.
This triggered invalid conversion of outer joins into
inner joins.
mysql-test/r/join_outer.result:
Added a test case for bug #19816.
mysql-test/t/join_outer.test:
Added a test case for bug #19816.
The convert_constant_item() function converts constant items to ints on
prepare phase to optimize execution speed. In this case it tries to evaluate
subselect which contains a derived table and is contained in a derived table.
All derived tables are filled only after all derived tables are prepared.
So evaluation of subselect with derived table at the prepare phase will
return a wrong result.
A new flag with_subselect is added to the Item class. It indicates that
expression which this item represents is a subselect or contains a subselect.
It is set to 0 by default. It is set to 1 in the Item_subselect constructor
for subselects.
For Item_func and Item_cond derived classes it is set after fixing any argument
in Item_func::fix_fields() and Item_cond::fix_fields accordingly.
The convert_constant_item() function now doesn't convert a constant item
if the with_subselect flag set in it.
mysql-test/t/view.test:
Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/t/subselect.test:
Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/view.result:
Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/subselect.result:
Added test case for bug#19077: A nested materialized derived table is used before being populated.
sql/item_subselect.cc:
Fixed bug#19077: A nested materialized derived table is used before being populated.
The Item_subselect class constructor sets new with_subselect flag to 1.
sql/item_func.cc:
Fixed bug#19077: A nested materialized derived table is used before being populated.
The Item_func::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item_cmpfunc.cc:
Fixed bug#19077: A nested materialized derived table is used before being populated.
The convert_constant_item() function now doesn't convert a constant item
with the with_subselect flag set.
The Item_cond::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item.cc:
Fixed bug#19077: A nested materialized derived table is used before being populated.
Set new with_subselect flag to default value - 0 in the Item constructor.
sql/item.h:
Fixed bug#19077: A nested materialized derived table is used before being populated.
A new flag with_subselect is added to the Item class. It indicates that
expression which this item represents is a subselect or contains a subselect.
It is set to 0 by default.
into mysql.com:/usr/local/mysql/mysql-5.0-mtr-fix
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/t/case.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
mysql-test/r/case.result:
SCCS merged
If the second or the third argument of a BETWEEN predicate was
a constant expression, like '2005.09.01' - INTERVAL 6 MONTH,
while the other two arguments were fields then the predicate
was evaluated incorrectly and the query returned a wrong
result set.
The bug was introduced in 5.0.17 when in the fix for 12612.
mysql-test/r/func_time.result:
Added a test case for bug #18618.
mysql-test/t/func_time.test:
Added a test case for bug #18618.
The function agg_cmp_type in item_cmpfunc.cc neglected the fact that
the first argument in a BETWEEN/IN predicate could be a field of a view.
As a result in the case when the retrieved table was hidden by a view
over it and the arguments in the BETWEEN/IN predicates are of
the date/time type the function did not perform conversion of
the constant arguments to the same format as the first field argument.
If formats of the arguments differed it caused wrong a evaluation of
the predicates.
mysql-test/r/view.result:
Added a test case for bug #16069.
mysql-test/t/view.test:
Added a test case for bug #16069.
Multiple equalities were not adjusted after reading constant tables.
It resulted in neglecting good index based methods that could be
used to access of other tables.
mysql-test/r/having.result:
Adjusted a test case results after fix for bug #16504.
mysql-test/r/select.result:
Added a test case for bug #16504.
mysql-test/r/subselect.result:
Adjusted a test case results after fix for bug #16504.
mysql-test/r/varbinary.result:
Adjusted a test case results after fix for bug #16504.
mysql-test/t/select.test:
Added a test case for bug #16504.
sql/item.cc:
Fixed bug #16504.
An Item_equal object may contain only a constant member.
It may happen after reading constant tables.
sql/item_cmpfunc.cc:
Fixed bug #16504.
Added method Item_equal::check_const that check appearance of new
constant items in a multiple equality.
sql/item_cmpfunc.h:
Fixed bug #16504.
Added method Item_equal::check_const that check appearance of new
constant items in a multiple equality.
sql/sql_select.cc:
Fixed bug #16504.
Adjusted multiple equalities after reading constant tables.
Fixed a few typo in comments.
If the WHERE condition of a query contained an ORed FALSE term
then the set of tables whose rows cannot serve for null complements
in outer joins was determined incorrectly. It resulted in blocking
possible conversions of outer joins into joins for such queries.
mysql-test/r/join_outer.result:
Added a test case for bug #17164.
mysql-test/t/join_outer.test:
Added a test case for bug #17164.
When the Item_cond::fix_fields() function reduces cond tree, it in loop
scans it's own list and when it founds Item_cond with same function (AND
or OR) it does next things: 1) replaces that item with item's list. 2)
empties item's list. Due to this operation is done twice - for update and
for view, at the update phase cond's list of lower view is already empty.
Empty list returns ref to itself, thus making endless loop by replacing
list with itself, emptying, replacing again and so on. This results in
server hung up.
To the Item_cond::fix_fields() function added check that ensures that
list being replaced with isn't empty.
mysql-test/t/view.test:
Added test for bug#17726: Not checked empty list caused endless loop
mysql-test/r/view.result:
Added test for bug#17726: Not checked empty list caused endless loop
sql/item_cmpfunc.cc:
Fixed bug#17726: Not checked empty list caused endless loop
To the Item_cond::fix_fields() function added check that ensures that
list being replaced with isn't empty.
removed unnecessary calculation of cache value
otherwise Join::preapre tries to calculate
undefined values(filed values)
mysql-test/r/type_decimal.result:
Fix for bug#17826 'type_decimal' fails with ps-protocol
test case, this test case reproduce the same bug but without PS protocol
mysql-test/t/type_decimal.test:
Fix for bug#17826 'type_decimal' fails with ps-protocol
test case, this test case reproduce the same bug but without PS protocol
mysql-test/r/bigint.result:
test result
mysql-test/t/bigint.test:
testcase
sql/item.h:
unsigned_arg is a separate parameter now
sql/item_cmpfunc.cc:
we can get unsigned field from the signed Item - from string
like '1234'
The Item_func_if::fix_length_and_dec() function when calculating length of
result doesn't take into account unsigned_flag. But it is taken when
calculating length of temporary field. This result in creating field that
shorter than needed. Due to this, in the reported query 40.0 converted to 9.99.
The function Item_func_if::fix_length_and_dec() now adds 1 to the max_length if
the unsigned_flag isn't set.
sql/item_cmpfunc.cc:
Fixed bug#16272: IF function with decimal args can produce wrong result
The function Item_func_if::fix_length_and_dec() now adds 1 to the max_length if
the unsigned_flag isn't set.
mysql-test/r/func_if.result:
Added test case for bug#16272: IF function with decimal args can produce wrong result
mysql-test/t/func_if.test:
Added test case for bug#16272: IF function with decimal args can produce wrong result
return incorrect result set for a select SQL request"
mysql-test/r/ps.result:
Test results fixed (Bug#12734)
mysql-test/t/ps.test:
A test case for Bug#12734
sql/item_cmpfunc.cc:
Reset canDoTurboBM in Item_func_like::cleanup()
sql/item_cmpfunc.h:
Add Item_func_like::cleanup()
select result
Item equal objects are employed only at the optimize phase. Usually they are not
supposed to be evaluated. Yet in some cases we call the method val_int() for
them. Here we have to take care of restricting the predicate such an object
represents f1=f2= ...=fn to the projection of known fields fi1=...=fik.
Added a check for field's table being const in Item_equal::val_int().
If the field's table is not const val_int() just skips that field when
evaluating Item_equal.
mysql-test/t/select.test:
Added test case for bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
mysql-test/r/select.result:
Added test case for bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
mysql-test/r/func_group.result:
Corrected test result for bug #12882 after fix for bug#15633
sql/item_cmpfunc.h:
Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
Added comment about fields from non-const tables in class description.
sql/item_cmpfunc.cc:
Fixed bug #15633: Evaluation of Item_equal for non-const table caused wrong select result
Added check for field's table being const in Item_equal::val_int().
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
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/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into mysql.com:/home/jimw/my/mysql-5.0-clean
mysql-test/r/func_equal.result:
Auto merged
mysql-test/t/func_equal.test:
Auto merged
sql/item_cmpfunc.cc:
SCCS merged
A typo bug caused loss of a predicate of the form field=const in some cases.
mysql-test/r/select.result:
Added a test case for bug #15106.
mysql-test/t/select.test:
Added a test case for bug #15106.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.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/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
sql/field.cc:
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
Bad examples of usage of a string with its length fixed.
sql/handler.cc:
Inefficient usage of String::append() fixed.
sql/item.cc:
Bad examples of usage of a string with its length fixed.
sql/item.h:
A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
Inefficient using of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
Bad examples of usage of a string with its length fixed.
sql/key.cc:
Bad examples of usage of a string with its length fixed.
sql/log.cc:
Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
The dummy parser hook allocated.
sql/opt_range.cc:
Inefficient usage of String::append() fixed.
sql/parse_file.cc:
Bad examples of usage of a string with its length fixed.
A hook for unknown keys added to the parser.
sql/parse_file.h:
A hook for unknown keys added to the parser.
sql/protocol.cc:
A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
A warning for old format config file.
sql/slave.cc:
Bad examples of usage of a string with its length fixed.
sql/sp.cc:
Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
The macro definition moved to sql_string.h to
be accessible in all parts of server.
sql/sql_table.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
A dummy hook used for parsing views.
sql/structs.h:
The macro definition moved to sql_string.h to be
accessible in all parts of server.
sql/table.cc:
A bad example of usage of a string with its length fixed.
sql/tztime.cc:
A bad example of usage of a string with its length fixed.
are done for the = operator, such as when doing a comparison with a large
unsigned number that was quoted. (Bug #12612)
mysql-test/r/func_equal.result:
Add new results
mysql-test/t/func_equal.test:
Add new test
sql/item_cmpfunc.cc:
Handle FIELD_ITEM that can be compared as a longlong in agg_cmp_type()
instead of in each of the places it is called.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
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_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Invalid date like 2000-02-32 wasn't converted to int, which lead to not
using index and comparison with field as astring, which results in slow
query execution.
convert_constatn_item() and get_mm_leaf() now forces MODE_INVALID_DATES to
allow such conversion.
sql/item.h:
Fix bug #14093 Query takes a lot of time when date format is not valid
To Item_int_with_ref added method real_item() which returns ref.
sql/item_cmpfunc.cc:
Fix bug #14093 Query takes a lot of time when date format is not valid
convert_constant_item() now allows conversion of invalid dates like 2000-01-32 to int to make it possible to use index when comparing fields with such dates.
sql/opt_range.cc:
Fix bug #14093 Query takes a lot of time when date format is not valid
get_mm_leaf() modified so it allows index usage for comparing fields with invalid dates like 2000-01-32.
mysql-test/r/select.result:
Test case for bug#14093 Query takes a lot of time when date format is not valid
mysql-test/t/select.test:
Test case for bug#14093 Query takes a lot of time when date format is not valid
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES
or has length of 0 or 1 in every other situation.
(approved patch applied on a up-to-date tree re-commit)
mysql-test/r/select.result:
results of test for bug 12595
mysql-test/t/select.test:
test for bug #12595 (ESCAPE must be exactly one character long)
sql/item_cmpfunc.cc:
if ESCAPE was in the statement check whether its length is
different than 1. In NO_BACKSLASH_ESCAPES mode only length of 1 is
allowed, otherwise the length could be 0 or 1 character (code point
in the sense of Unicode).
sql/item_cmpfunc.h:
pass variable from the parsing stage - whether
ESCAPE clause was found in the statement
sql/sql_help.cc:
pass FALSE for escape_used_in_parsing because we
want the default mode of no error checking - our internal code.
sql/sql_lex.cc:
initialized variable used to transfer information during
parsing up in the stack when reducing in the grammar
sql/sql_lex.h:
new variable used for transfering information when
reducing in the grammar.
sql/sql_yacc.yy:
initialize Lex->escape_used and then use it when reducing.
This is needed as fix for bug #12595 to distinguish between
situation where ESCAPE was found and when not because internally
we may pass a string an empty string and there is no other way
to find out whether this is correct or not in case of
NO_BACKSLASH_ESCAPES mode, which allows only length of 1 if
ESCAPE is part of the SQL statement.
allowed set functions aggregated in outer subqueries, allowed nested set functions.
mysql-test/r/func_gconcat.result:
Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
Changed Item_field::fix_fields to calculate attributes used when checking context conditions
for set functions.
Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_cmpfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_func.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_row.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_strfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_subselect.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/item_sum.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_class.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_lex.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
sql/sql_prepare.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_update.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
into msdesk.(none):/home/msvensson/mysql-5.0
BUILD/SETUP.sh:
Auto merged
BitKeeper/deleted/.del-ctype-cp932.c:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.result:
Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
BitKeeper/deleted/.del-ndb_range_bounds.pl~ff7e47a35fb44c74:
Auto merged
innobase/os/os0sync.c:
Auto merged
mysql-test/r/ctype_tis620.result:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_uca.test:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/ctype_ujis.test:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-gbk.c:
Auto merged
strings/ctype-simple.c:
Auto merged
strings/ctype-sjis.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
client/mysql.cc:
Sam change in both 4.1 and 5.0
mysql-test/r/ctype_uca.result:
Merge
mysql-test/r/ctype_ujis.result:
Merge
strings/ctype-mb.c:
Merge
strings/ctype-tis620.c:
Merge