myisam/mi_write.c:
type conversion fixed
myisam/sort.c:
type conversion fixed
sql/ha_federated.cc:
type conversion fixed
sql/ha_heap.cc:
type conversion fixed
sql/ha_innodb.cc:
type conversion fixed
sql/ha_myisam.cc:
type conversion fixed
sql/opt_range.cc:
type conversion fixed
sql/sql_map.cc:
type conversion fixed
sql/sql_select.cc:
type conversion fixed
sql/sql_update.cc:
type conversion fixed
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
No warning was generated when a TIMESTAMP with a non-zero time part
was converted to a DATE value. This caused index lookup to assume
that this is a valid conversion and was returning rows that match
a comparison between a TIMESTAMP value and a DATE keypart.
Fixed by generating a warning on such a truncation.
mysql-test/r/derived.result:
Bug #31221: fixed an existing not-precise test case
mysql-test/r/ps_2myisam.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_3innodb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_4heap.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_5merge.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_6bdb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/ps_7ndb.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/type_date.result:
Bug #31221: Warnings cased by existing tests
mysql-test/r/type_datetime.result:
Bug #31221: test case
mysql-test/t/derived.test:
Bug #31221: fixed an existing not-precise test case
mysql-test/t/type_date.test:
Bug #31221: test case
sql/field.cc:
Bug #31221:
- Upgraded fix for bug 29729
- issue a warning only if the hh:mm:ss.msec is not zero consistently
for all the Field_newdate::store function
sql/item_timefunc.cc:
Bug #31221: don't ignore the errors when storing data
The BIG_TABLES define wasn't enabled on Windows.
#define added
include/config-win.h:
Bug #30638 why doesn't > 4294967295 rows work in myisam on windows.
BIG_TABLES enabled on Windows
Buffer used when setting variables was not dimensioned to accomodate
trailing '\0'. An overflow by one character was therefore possible.
CS corrects limits to prevent such overflows.
mysql-test/r/variables.result:
Try to overflow buffer used for setting system variables.
Unpatched server should throw a valgrind warning here.
Actual value and error message irrelevant, only length counts.
mysql-test/t/variables.test:
Try to overflow buffer used for setting system variables.
sql/set_var.cc:
Adjust maximum number of characters we can store in 'buff' by one
as strmake() will write a terminating '\0'.
updated result files
mysql-test/suite/funcs_1/r/innodb__datadict.result:
updated result file
mysql-test/suite/funcs_1/r/memory__datadict.result:
updated result file
mysql-test/suite/funcs_1/r/myisam__datadict.result:
updated result file
issue an error if string has illegal characters
mysql-test/r/ctype_utf8.result:
issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
issue an error if string has illegal characters
sql/item.cc:
issue an error if string has illegal characters
sql/item.h:
issue an error if string has illegal characters
sql/sql_yacc.yy:
issue an error if string has illegal characters
if remote server sends malicious response.
We need to check if the SHOW TABLE STATUS query we issue inside the
FEDERATED engine returned the result with the proper (or just sufficient)
number of rows. Otherwise statements like row[12] can crash the server.
sql/ha_federated.cc:
bug #29801 Federated engine crashes local server
if remote server sends malicious response.
Return with the error if the remote server return fewer rows than we need.
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset
mysql-test/r/ctype_ucs.result:
test result
mysql-test/r/ctype_utf8.result:
test result
mysql-test/t/ctype_ucs.test:
test case
mysql-test/t/ctype_utf8.test:
test case
sql/item.cc:
check_well_formed_result() moved from Item_str_func
sql/item.h:
check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
check_well_formed_result moved to Item
fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
check_well_formed_result moved to Item
sql/sql_yacc.yy:
added check for well formed string
The special case with NULL as a regular expression
was handled at prepare time. But in this special case
the item was not marked as fixed. This caused an assertion
at execution time.
Fixed my marking the item as fixed even when known to
return NULL at prepare time.
mysql-test/r/func_regexp.result:
Bug #31440: test case
mysql-test/t/func_regexp.test:
Bug #31440: test case
sql/item_cmpfunc.cc:
Bug #31440: mark the item as fixed even when
known to return NULL.
precision > 0 && scale <= precision'.
A sign of a resulting item of the IFNULL function was not
updated and the maximal length of this result was calculated
improperly. Correct algorithm was copy&pasted from the IF
function implementation.
sql/item_cmpfunc.cc:
Fixed bug #31471.
The Item_func_ifnull::fix_length_and_dec method has been
modified to update the Item_func_ifnull::unsigned_flag field
and to take this field into account when calculating the
Item_func_ifnull::max_length value.
(See Item_func_if::fix_length_and_dec for reference).
mysql-test/t/null.test:
Added test case for bug #31471.
mysql-test/r/null.result:
Added test case for bug #31471.
mysql-test/r/create.result:
Update test case after the bugfix of bug #31471.
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES
mysql-test/r/rpl_flush_log_loop.result:
test result
mysql-test/t/rpl_flush_log_loop.test:
test case
sql/set_var.cc:
added variables relay_log, relay_log_index, relay_log_info_file to init_vars[]
to make them visible within SHOW VARIABLES
removed now() call to make the test to be year independent
mysql-test/r/view.result:
result fix
mysql-test/t/view.test:
removed now() call to make the test to be year independent
Even though it returns NULL, the MAKETIME function did not have this property set,
causing a failed assertion (designed to catch exactly this).
Fixed by setting the nullability property of MAKETIME().
mysql-test/r/func_sapdb.result:
Bug#31160: Changed test result.
mysql-test/r/func_time.result:
Bug#31160: Test result.
mysql-test/t/func_time.test:
Bug#31160: Test case.
sql/item_timefunc.h:
Bug#31160: The fix: Initializing maybe_null to true
Completion of previous patch. Negative number were denied
as the second argument to NAME_CONST.
mysql-test/r/func_misc.result:
Bug#30832 completion: test result
mysql-test/t/func_misc.test:
Bug#30832 completion: test case
added negative numbers
sql/item_func.h:
Bug#30832 completion
The function that represents unary minus is considered a constant if the argument is.
Item_sum_distinct::setup(THD*): Assertion
There was an assertion to detect a bug in ROLLUP
implementation. However the assertion is not true
when used in a subquery context with non-cacheable
statements.
Fixed by turning the assertion to accepted case
(just like it's done for the other aggregate functions).
mysql-test/r/func_group.result:
Bug #31156: test case
mysql-test/t/func_group.test:
Bug #31156: test case
sql/item_sum.cc:
Bug #31156: make it OK to call setup() several times:
done for (e.g.) scalar subquery
when a divisor is less than 1 and its fractional part is very long.
For example:
1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789;
Stack buffer overflow has been fixed in the do_div_mod function.
strings/decimal.c:
Fixed bug #31019.
Stack buffer overflow has been fixed in the do_div_mod function:
a value of the upper bound of the buffer was increased where
a decrement is required.
mysql-test/t/type_decimal.test:
Added test case for bug #31019.
mysql-test/r/type_decimal.result:
Added test case for bug #31019.
into mysql.com:/home/hf/work/30286/my50-30286
myisam/rt_index.c:
Auto merged
myisam/rt_mbr.c:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/r/gis-rtree.result:
merging
As the result of DOUBLE claculations can be bigger
than DBL_MAX constant we use in code, we shouldn't use this constatn
as a biggest possible value.
Particularly the rtree_pick_key function set 'min_area= DBL_MAX' relying
that any rtree_area_increase result will be less so we return valid
key. Though in rtree_area_increase function we calculate the area
of the rectangle, so the result can be 'inf' if the rectangle is
huge enough, which is bigger than DBL_MAX.
Code of the rtree_pick_key modified so we always return a valid key.
myisam/rt_index.c:
Bug #30286 spatial index cause corruption and server crash!
always set the best_key with the first key we get, so we always return
somthing valid.
myisam/rt_mbr.c:
Bug #30286 spatial index cause corruption and server crash!
function comment extended
mysql-test/r/gis-rtree.result:
Bug #30286 spatial index cause corruption and server crash!
test result
mysql-test/t/gis-rtree.test:
Bug #30286 spatial index cause corruption and server crash!
test case
added check for hidden I_S tables for 'show columns|keys' commands
mysql-test/r/information_schema.result:
test result
mysql-test/t/information_schema.test:
test case
sql/sql_parse.cc:
added check for hidden I_S tables for 'show columns|keys' commands