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
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.
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.
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()
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
my_regex.h:
Rename: regex/regex.h -> regex/my_regex.h
client/mysqltest.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
os2/MySQL-Source.icc:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/Makefile.am:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/debug.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/debug.ih:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/engine.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/engine.ih:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/main.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/main.ih:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/regcomp.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/regerror.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/regerror.ih:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/my_regex.h:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/regexec.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/regfree.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
regex/reginit.c:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
sql/item_cmpfunc.cc:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
sql/item_cmpfunc.h:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
sql/mysqld.cc:
Prefix regex functions/types with "my_" as our
library is not compatible with normal regex lib.
index doesn't return correct result
item_cmpfunc.cc:
Use charset of LIKE to decide whether
to use 8bit or Unicode "escape" value.
But use charset of "escape" to scan escape character.
strings/ctype-xxx.c:
We cannot reduce "end" pointer using charpos(),
because of possible escape characters in the string.
Limit the loop using count of written characters instead.
ctype_like_escape.inc:
new file
mysql-test/t/ctype_xxx:
mysql-test/r/ctype_xxx:
Adding test case.
strings/ctype-big5.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead.
strings/ctype-cp932.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-gbk.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-mb.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-simple.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-sjis.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-tis620.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
strings/ctype-ucs2.c:
Bug#13046: LIKE pattern matching using prefix index doesn't return correct
result
We cannot change "end" pointer using charpos(),
because of possible escape characters.
Use limit by count of written characters instead
mysql-test/t/ctype_big5.test:
Adding test case.
mysql-test/t/ctype_cp932.test:
Adding test case.
mysql-test/t/ctype_gbk.test:
Adding test case.
mysql-test/t/ctype_latin1.test:
Adding test case.
mysql-test/t/ctype_sjis.test:
Adding test case.
mysql-test/t/ctype_tis620.test:
Adding test case.
mysql-test/t/ctype_uca.test:
Adding test case.
mysql-test/t/ctype_ucs.test:
Adding test case.
mysql-test/t/ctype_ujis.test:
Adding test case.
mysql-test/t/ctype_utf8.test:
Adding test case.
mysql-test/r/ctype_big5.result:
Adding test case.
mysql-test/r/ctype_cp932.result:
Adding test case.
mysql-test/r/ctype_gbk.result:
Adding test case.
mysql-test/r/ctype_latin1.result:
Adding test case.
mysql-test/r/ctype_sjis.result:
Adding test case.
mysql-test/r/ctype_tis620.result:
Adding test case.
mysql-test/r/ctype_uca.result:
Adding test case.
mysql-test/r/ctype_ucs.result:
Adding test case.
mysql-test/r/ctype_ujis.result:
Adding test case.
mysql-test/r/ctype_utf8.result:
Adding test case.
sql/item_cmpfunc.cc:
More fixes.
Fix for bug #13025; Server crash in filesort because wrong call to handler::position()
client/mysqltest.c:
Code cleanup during review
mysql-test/r/innodb.result:
Added test case for bug #13025; Server crash in filesort because wrong call to handler::position()
mysql-test/t/innodb.test:
Added test case for bug #13025; Server crash in filesort because wrong call to handler::position()
sql/filesort.cc:
Don't call handler::position() if row was not found
sql/item_cmpfunc.cc:
Indentation changes
sql/sql_select.cc:
Moved variable to outer level
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
The classes Item_func_between, Item_func_if, Item_func_in are modified.
Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
The class Item_func_opt_neg is added to factor out the functionality
common for the modified classes Item_func_between and Item_func_in.
item_cmpfunc.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
Item_func_in::fix_fields(). They correct generic calculation of
the not_null_tables attribute when it is needed.
Modified Item_func_between::val_int(), Item_func_in::val_int().
opt_range.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
The function get_mm_tree() is modified. There cannot be NOT before
BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
now [NOT]BETWEEN/IN expressions.
sql_yacc.yy:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
join_outer.result:
Fixed some testcases results (bugs #12101, #12102)
join_outer.test:
Added testcases for bugs #12101, #12102
mysql-test/t/join_outer.test:
Added testcases for bugs #12101, #12102
mysql-test/r/join_outer.result:
Fixed some testcases results (bugs #12101, #12102)
sql/sql_yacc.yy:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
sql/opt_range.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
The function get_mm_tree() is modified. There cannot be NOT before
BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
now [NOT]BETWEEN/IN expressions.
sql/item_cmpfunc.cc:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
Item_func_in::fix_fields(). They correct generic calculation of
the not_null_tables attribute when it is needed.
Modified Item_func_between::val_int(), Item_func_in::val_int().
sql/item_cmpfunc.h:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
for some expressions.
The classes Item_func_between, Item_func_if, Item_func_in are modified.
Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
The class Item_func_opt_neg is added to factor out the functionality
common for the modified classes Item_func_between and Item_func_in.
adding test case.
item_cmpfunc.cc:
Bug#12611
ESCAPE + LIKE do not work when the escape char is a multibyte one
Additional fix for 8bit character sets:
escape character must be converted into
operation character set.
sql/item_cmpfunc.cc:
Bug#12611
ESCAPE + LIKE do not work when the escape char is a multibyte one
Additional fix for 8bit character sets:
escape character must be converted into
operation character set.
mysql-test/t/func_like.test:
adding test case.
mysql-test/r/func_like.result:
adding test case.
item_cmpfunc.cc:
Pass unicode value as "escape" argument to my_wildcmp
if a multibyte character set is used.
For single byte character set nothing has changed:
native (non-unicode) character code is still passed.
ctype_utf8.result, ctype_utf8.test:
adding test case
sql/item_cmpfunc.cc:
Bug#12611: ESCAPE + LIKE do not work when the escape char is a multibyte one
Pass unicode code instead of native code as
"escape" argument to my_wildcmp.
mysql-test/t/ctype_utf8.test:
adding test
mysql-test/r/ctype_utf8.result:
adding test
Added a test case for bug #12392.
item_cmpfunc.cc:
Fixed bug #12392.
Missing handling of rows containing NULL components
when evaluating IN predicates caused a crash.
sql/item_cmpfunc.cc:
Fixed bug #12392.
Missing handling of rows containing NULL components
when evaluating IN predicates caused a crash.
mysql-test/r/subselect.result:
Added a test case for bug #12392.
mysql-test/t/subselect.test:
Added a test case for bug #12392.
Added a test case for bug #11142.
item_cmpfunc.cc:
Fixed bug #11142.
Implementation of Item_func_nullif::is_null was corrected.
sql/item_cmpfunc.cc:
Fixed bug #11142.
Implementation of Item_func_nullif::is_null was corrected.
mysql-test/t/func_if.test:
Added a test case for bug #11142.
mysql-test/r/func_if.result:
Added a test case for bug #11142.
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable
mysql-test/r/func_gconcat.result:
Move innodb specific test to innodb.test
Changed table name r2 -> t2
More test to see how ROLLUP was optimized
mysql-test/r/innodb.result:
Moved test here form func_gconcat
mysql-test/r/olap.result:
New test results after optimization
mysql-test/t/func_gconcat.test:
Move innodb specific test to innodb.test
Changed table name r2 -> t2
More test to see how ROLLUP was optimized
mysql-test/t/innodb.test:
Moved test here form func_gconcat
sql/field.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_berkeley.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_blackhole.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_heap.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_innodb.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isam.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isammrg.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisam.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisammrg.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_ndbcluster.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/handler.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/hash_filo.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_cmpfunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_func.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called
sql/item_geofunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_strfunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_subselect.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_sum.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_timefunc.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_uniq.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/log_event.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/mysql_priv.h:
Change key_map_full to not be const as we are giving it a proper value on startup
sql/mysqld.cc:
Move key_map variables here and initialize key_map_full properly
sql/opt_range.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/opt_range.h:
Fix that test_quick_select() works with any ammount of keys
sql/procedure.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol_cursor.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/set_var.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_analyse.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_class.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_crypt.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_insert.cc:
Fixed that max_rows is ulong
sql/sql_list.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_map.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_olap.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_select.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
Fixed that ROLLUP don't have to always create a temporary table
Added new argument to remove_const() to make above possible
Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
sql/sql_string.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_table.cc:
Simple optimizations
Fixed wrong checking of build_table_path() in undef-ed code
sql/sql_udf.cc:
Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_yacc.yy:
removed extra {}
Set #pragma implementation" earlier
Many files:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
client/sql_string.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
mysys/raid.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/field.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_berkeley.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_blackhole.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_heap.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_innodb.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isam.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isammrg.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisam.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisammrg.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_ndbcluster.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/handler.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/hash_filo.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_cmpfunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_func.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_geofunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_strfunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_subselect.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_sum.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_timefunc.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/log_event.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/opt_range.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/procedure.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol_cursor.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/set_var.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_class.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_list.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_map.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_olap.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_archive.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_select.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_string.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_udf.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_example.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_tina.cc:
Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/tztime.cc:
Set #pragma implementation" earlier
platforms": yet another issue with floating pointer comparisons.
The fix uses the workaround with volatiles.
sql/item_cmpfunc.cc:
A fix for the failing mysql_client_test on some Intel platforms
when compiled with optimization.
We don't use -ffloat-store compileation as it may slow all
floating point operations.
(No really critical errors found, but a few possible wrong results)
innobase/dict/dict0dict.c:
Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
mysql-test/r/select_found.result:
Add missing drop table
mysql-test/r/type_set.result:
More tests
mysql-test/t/select_found.test:
Add missing drop table
mysql-test/t/type_set.test:
More tests
mysys/my_init.c:
Avoid warning from purify (purify doesn't handle getrusage() properly)
sql/field.h:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/filesort.cc:
enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/item_cmpfunc.cc:
Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
sql/mysqld.cc:
Wait for signal handler to stop when running --bootstrap
(Fixes warning from purify)
sql/sql_insert.cc:
Initialize slot used by innodb.cc (not critical)
sql/sql_lex.h:
Better comments
sql/sql_repl.cc:
memcmp -> bcmp() to avoid warning from purify
sql/sql_select.cc:
Fix for out-of-bound memory reference when doing DISTINCT on const expressions
strings/ctype-simple.c:
Fixes to not access uninitialized memory
(Not critical)
Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
This will ensure that any reference to these has a valid value.
Generalized the code for split_sum_func()
BitKeeper/etc/ignore:
added support-files/ndb-config-2-node.ini
mysql-test/r/group_by.result:
More complicated test to assure that rand() is only calulated once
mysql-test/r/user_var.result:
Back to old results :( (ok but not perfect)
mysql-test/t/group_by.test:
More complicated test to assure that rand() is only calulated once
sql/item.cc:
Better bugfix for "HAVING when refering to RAND()"
This will ensure that when refering to things like RAND() in HAVING through an alias we will not recalculate that rand() value in the HAVING part but use the value in the row
Generalize split_sum_func()
sql/item.h:
Better bugfix for "HAVING when refering to RAND()"
T
sql/item_cmpfunc.cc:
Better bugfix for "HAVING when refering to RAND()"
Use generalized split_sum_func2() function
sql/item_func.cc:
Better bugfix for "HAVING when refering to RAND()"
Use generalized split_sum_func2() function
sql/item_row.cc:
Better bugfix for "HAVING when refering to RAND()"
Use generalized split_sum_func2() function
sql/item_strfunc.cc:
Better bugfix for "HAVING when refering to RAND()"
Use generalized split_sum_func2() function
sql/sql_list.h:
Add functions to concatenate lists
sql/sql_select.cc:
Better bugfix for "HAVING when refering to RAND()"
Ensure that references in HAVING, ORDER BY or GROUP BY are calculated after fields in SELECT.
This will ensure that any reference to these has a valid value.
(BUG 8216)
mysql-test/r/group_by.result:
New test case
mysql-test/r/user_var.result:
Test changed (to be more correct) with bug fix
mysql-test/t/group_by.test:
Added test for HAVING bug
sql/item_cmpfunc.cc:
Fixed bug in HAVING when refering to RAND()
sql/item_func.cc:
Fixed bug in HAVING when refering to RAND()
sql/item_row.cc:
Fixed bug in HAVING when refering to RAND()
sql/item_strfunc.cc:
Fixed bug in HAVING when refering to RAND()
sql/unireg.h:
Added PSEUDO_TABLES_BITS for easy testing of real table reference
by item->val_str() may be a substring of the passed string.
Disallow string=its_substring assignment in String::operator=().
mysql-test/r/func_misc.result:
Testcase for BUG#7716
mysql-test/t/func_misc.test:
Testcase for BUG#7716
sql/item_cmpfunc.cc:
Fix for BUG#7716: in in_string::set() take into account that the string returned
by item->val_str(S) may be not S but use the buffer owned by S.
sql/sql_string.h:
* Added assert: String& String::operator=(const String&) may not be used to do
assignments like str = string_that_uses_buffer_owned_by_str
* Added String::uses_buffer_owned_by().
Bug#7834 Illegal mix of collations in IN operator
IN was the first function supporting
character set convertion.
agg_arg_charsets() was written afterwards,
which is more flexible.
Now IN just reuses this function.
sql/item_cmpfunc.cc:
Bug#7834 Illegal mix of collations in IN operator
IN was the first function supporting
character set convertion.
agg_arg_charsets() was written afterwards,
which is more flexible.
Now IN just reuses this function.
not default_charset_into. It fixes the
problem that in some cases numbers where
treated as CHAR(N), not as BINARY(N), e.g.
wrong 'charsetnr' when sent to the client side.
2. IFNULL didn't aggregate argument charsets
and collations, so IFNULL(1,'a') produced
a CHAR(N). Now produces a BINARY(N).
3. SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
4. Tests were fixed accordingly. No new tests were
made, as the old onces cover everything.
mysql-test/r/analyse.result:
SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
mysql-test/r/case.result:
Test fix according to the changes
mysql-test/r/metadata.result:
Test fix according to the changes
mysql-test/r/ps_1general.result:
Test fix according to the changes
mysql-test/r/ps_2myisam.result:
Test fix according to the changes
mysql-test/r/ps_3innodb.result:
Test fix according to the changes
mysql-test/r/ps_4heap.result:
Test fix according to the changes
mysql-test/r/ps_5merge.result:
Test fix according to the changes
mysql-test/r/ps_6bdb.result:
Test fix according to the changes
mysql-test/r/ps_7ndb.result:
Test fix according to the changes
mysql-test/r/union.result:
Test fix according to the changes
sql/item.cc:
Item is now BINARY by default
sql/item_cmpfunc.cc:
IFNULL now collects arguments collations/charsets
like other functions do.
Added test cases for bug #7351.
item_cmpfunc.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
If in the predicate v IN (SELECT a FROM t WHERE cond)
v is null, then the result of the predicate is either
INKNOWN or FALSE. It is FALSE if the subquery returns
an empty set.
item_subselect.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
The problem was due to not a quite legal transformation
for 'IN' subqueries. A subquery containing a predicate
of the form
v IN (SELECT a FROM t WHERE cond)
was transformed into
EXISTS(SELECT a FROM t WHERE cond AND (a=v OR a IS NULL)).
Yet, this transformation is valid only if v is not null.
If v is null, then, in the case when
(SELECT a FROM t WHERE cond) returns an empty set the value
of the predicate is FALSE, otherwise the result of the
predicate is INKNOWN.
The fix resolves this problem by changing the result
of the transformation to
EXISTS(SELECT a FROM t WHERE cond AND (v IS NULL OR (a=v OR a IS NULL)))
in the case when v is nullable.
The new transformation prevents applying the lookup
optimization for IN subqueries. To make it still
applicable we have to introduce guarded access methods.
sql/item_subselect.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
The problem was due to not a quite legal transformation
for 'IN' subqueries. A subquery containing a predicate
of the form
v IN (SELECT a FROM t WHERE cond)
was transformed into
EXISTS(SELECT a FROM t WHERE cond AND (a=v OR a IS NULL)).
Yet, this transformation is valid only if v is not null.
If v is null, then, in the case when
(SELECT a FROM t WHERE cond) returns an empty set the value
of the predicate is FALSE, otherwise the result of the
predicate is INKNOWN.
The fix resolves this problem by changing the result
of the transformation to
EXISTS(SELECT a FROM t WHERE cond AND (v IS NULL OR (a=v OR a IS NULL)))
in the case when v is nullable.
The new transformation prevents applying the lookup
optimization for IN subqueries. To make it still
applicable we have to introduce guarded access methods.
sql/item_cmpfunc.cc:
Fixed bug #7351: incorrect result for a query with a
subquery returning empty set.
If in the predicate v IN (SELECT a FROM t WHERE cond)
v is null, then the result of the predicate is either
INKNOWN or FALSE. It is FALSE if the subquery returns
an empty set.
mysql-test/t/subselect.test:
Added test cases for bug #7351.
mysql-test/r/subselect.result:
Added test cases for bug #7351.
* Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item.cc:
* More comments
* Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item.h:
Assert added
sql/item_cmpfunc.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item_func.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item_strfunc.h:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item_subselect.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/item_sum.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/set_var.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/sql_base.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/sql_handler.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/sql_help.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
sql/sql_select.cc:
Backport of safety measures from 5.0: make numeorous replaces:
s/item->fix_fields()/if (!item->fixed) item->fix_fields()
* Added Item_ref::set_properties
* Item_ref::Item_ref now expects to get in *item either
NULL - then fix_fields() will be called later or
ptr to Item it will refer to - then an equivalent of fix_fields() call is performed
sql/item.cc:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties
* Adjusted Item_ref::Item_ref calls to match new calling convention
sql/item.h:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties
* Item_ref::Item_ref now expects to get in *item either
NULL - then fix_fields() will be called later or
ptr to Item it will refer to - then an equivalent of fix_fields() call is performed
sql/item_cmpfunc.cc:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Adjusted Item_ref::Item_ref calls to match new calling convention
sql/item_func.cc:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties
* Adjusted Item_ref::Item_ref calls to match new calling convention
sql/item_row.cc:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties
* Adjusted Item_ref::Item_ref calls to match new calling convention
sql/item_strfunc.cc:
Merge of fix for BUG#6976 continued: pulling in some Item_ref changes from 5.0
* Added Item_ref::set_properties
* Adjusted Item_ref::Item_ref calls to match new calling convention
The problem in 4.1 was the same as in 4.0 - fix_fields() not called for created Item_ref.
The fix is similar too - initialize Item_refs in ctor (but don't interfere with cases when
Item_ref is used by subselects).
sql/item.cc:
Fix for BUG#6976 ported from 4.0
sql/item_cmpfunc.cc:
Fix for BUG#6976 ported from 4.0
sql/item_func.cc:
Fix for BUG#6976 ported from 4.0
sql/item_row.cc:
Fix for BUG#6976 ported from 4.0
sql/item_strfunc.cc:
Fix for BUG#6976 ported from 4.0
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
mysql-test/r/rpl_start_stop_slave.result:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/type_enum.result:
merged test cases
mysql-test/t/type_enum.test:
merged test cases
Added auto-correct of field length for enum/set tables for ALTER TABLE
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
mysql-test/r/rpl_start_stop_slave.result:
Fixed wrong test
mysql-test/r/type_enum.result:
Added test for wrong enum/set length after alter table
mysql-test/t/ps.test:
removed empty line
mysql-test/t/type_enum.test:
Added test for wrong enum/set length after alter table
sql/field.cc:
Added auto-correct of field length for enum/set tables.
This is becasue of a bug in previous MySQL 4.1 versions where the length for enum/set was set incorrectly after ALTER TABLE
sql/item_cmpfunc.cc:
Simple optimization
sql/mysql_priv.h:
Made local function global
sql/set_var.cc:
Simple cleanup
sql/sql_table.cc:
Simple cleanups & optimizations
BitKeeper/etc/logging_ok:
auto-union
innobase/srv/srv0srv.c:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/slave.cc:
Auto merged
(Cleanups and better bug fixes)
mysql-test/r/select.result:
Fixed test after wrong merge
mysql-test/t/select.test:
Fixed test after wrong merge
scripts/mysql_fix_privilege_tables.sh:
Don't read defaults files
sql/item_cmpfunc.cc:
Fix wrong value for not_null_tables_cache
sql/item_cmpfunc.h:
Remove wrong patch (flags are set in fix_length_and_dec())
sql/item_func.h:
Fix wrong value for not_null_tables_cache
sql/slave.cc:
Fixed indentation
- A new flag MY_CS_CSSORT was introduced for case sensitivity.
- Item_func_regexp doesn't substiture ICASE not only
for binary collations but for case sensitive collations as well.
fixed null processing in NOT operation used in ALL subquery (Bug #6247)
mysql-test/r/subselect.result:
new tests of ALL/ANY wiews
mysql-test/t/subselect.test:
new tests of ALL/ANY wiews
sql/item_cmpfunc.cc:
fixed special NOT ALL processing
fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
sql/item_cmpfunc.h:
fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
sql/item_subselect.cc:
reporting empty result added for max/min subqueries
sql/item_subselect.h:
reporting empty result added for max/min subqueries
sql/item_sum.cc:
reporting empty result added fox max/min aggregate functions
sql/item_sum.h:
reporting empty result added fox max/min aggregate functions
sql/sql_class.cc:
reporting empty result added for max/min subqueries
sql/sql_parse.cc:
reporting empty result added for max/min subqueries
sql/sql_union.cc:
reporting empty result added for max/min subqueries