into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/field.cc:
Auto merged
mysql-test/r/insert.result:
SCCS merged
mysql-test/t/insert.test:
SCCS merged
numbers into char fields" and bug #12860 "Difference in zero padding of
exponent between Unix and Windows"
Rewrote the code that determines what 'precision' argument should be
passed to sprintf() to fit the string representation of the input number
into the field.
We get finer control over conversion by pre-calculating the exponent, so
we are able to determine which conversion format, 'e' or 'f', will be
used by sprintf().
We also remove the leading zero from the exponent on Windows to make it
compatible with the sprintf() output on other platforms.
mysql-test/r/insert.result:
Added test cases for bug #26788 and bug #31152.
mysql-test/t/cast.test:
Removed --replace_result, since the result is now correct on Windows.
mysql-test/t/insert.test:
Added test cases for bug #26788 and bug #31152.
mysql-test/t/type_float.test:
Removed --replace_result, since the result is now correct on Windows.
mysql-test/t/variables.test:
Removed --replace_result, since the result is now correct on Windows.
sql/field.cc:
Rewrote the code that determines what 'precision' argument should be
passed to sprintf() to fit the string representation of the input number
into the field.
We get finer control over conversion by pre-calculating the exponent, so
we are able to determine which conversion format, 'e' or 'f', will be
used by sprintf().
Server failed in assert() when we tried to create a DECIMAL() temp field
with a scale of more than the allowed 30. Now we limit the scale to the
allowed maximum. A truncation warning is thrown as necessary.
mysql-test/r/type_newdecimal.result:
Show that out of range DECIMAL temp fields will no longer
stop the server with an assert.
mysql-test/t/type_newdecimal.test:
Show that out of range DECIMAL temp fields will no longer
stop the server with an assert.
sql/sql_select.cc:
When creating DECIMAL() temp field, ascertain we stay within allowed
limits. If not, truncate and warn.
names include backticks or blank
Problem: mysqlcheck doesn't escape backtick characters in the table names.
Fix: escape them.
client/mysqlcheck.c:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- escape backtick characters in the table names.
mysql-test/r/mysqlcheck.result:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- test result.
mysql-test/t/mysqlcheck.test:
Fix for bug #30654: mysqlcheck fails during upgrade of tables whose
names include backticks or blank
- test case.
JOIN, and ORDER BY
Problem: improper maximum length calculation of the CASE function leads to
decimal value truncation (storing/retrieving decimal field values).
Fix: accurately calculate maximum length/unsigned flag/decimals parameters
of the CASE function.
mysql-test/r/case.result:
Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY
- test result.
mysql-test/t/case.test:
Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY
- test case.
sql/item_cmpfunc.cc:
Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY
- accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
sql/item_cmpfunc.h:
Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE,
JOIN, and ORDER BY
- accurately calculate Item_func_case::max_length/unsigned_flag/decimals.
file .\ha_innodb.
Problem: if a partial unique key followed by a non-partial one we declare
the second one as a primary key.
Fix: sort non-partial unique keys before partial ones.
include/my_base.h:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
mysql-test/r/innodb_mysql.result:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test result.
mysql-test/r/key.result:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test result.
mysql-test/t/innodb_mysql.test:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test case.
mysql-test/t/key.test:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test case.
sql/sql_table.cc:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
sql/structs.h:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
into mysql.com:/home/ram/work/b31615/b31615.5.0
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
mysql-test/mysql-test-run.pl:
Use an array to store the valgrind options
Deprecate --valgrind-options=s and instead use --valgrind-option(but allow
PushBuild's) --valgrind-options=s usage.
Make the variables local
into anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines.merge
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/t/heap_btree.test:
Auto merged
Problem: lying to the optimizer that a function (Item_func_inet_ntoa)
cannot return NULL values leads to unexpected results (in the case group
keys creation/comparison is broken).
Fix: Item_func_inet_ntoa::maybe_null should be set properly.
mysql-test/r/func_misc.result:
Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
- test result.
mysql-test/t/func_misc.test:
Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
- test case.
sql/item_strfunc.h:
Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'
- set Item_func_inet_ntoa::maybe_null flag.
into lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/udf_example.c:
Auto merged
sql/udf_example.def:
Auto merged
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.
mysql-test/r/udf.result:
Test case to check constants passed UDFs.
mysql-test/t/udf.test:
Test case to check constants passed UDFs.
sql/item_func.cc:
UDF _init functions are now passed the length of the constants, rather than the max length of the var containing the constant.
sql/udf_example.c:
Added check_const_len functions. The check_const_len_init functions checks that lengths of constants are correctly passed.
sql/udf_example.def:
Add new example functions to windows dll export list.
Problem: currently, UCS-2 cannot be used as a client character set.
Fix: raise an error if one attempts to set it to USC-2.
mysql-test/r/ctype_ucs.result:
Fix for bug#31615: crash after set names ucs2 collate xxx
- test result.
mysql-test/t/ctype_ucs.test:
Fix for bug#31615: crash after set names ucs2 collate xxx
- test case.
sql/set_var.cc:
Fix for bug#31615: crash after set names ucs2 collate xxx
- raise an error if one is going to set character_set_client to UCS-2.
sql/set_var.h:
Fix for bug#31615: crash after set names ucs2 collate xxx
- raise an error if one is going to set character_set_client to UCS-2.
into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
myisam/sort.c:
Auto merged
mysql-test/r/repair.result:
Auto merged
mysql-test/t/repair.test:
Auto merged
The root cause of the issue was that the CREATE FUNCTION grammar,
for User Defined Functions, was using the sp_name rule.
The sp_name rule is intended for fully qualified stored procedure names,
like either ident.ident, or just ident but with a default database
implicitly selected.
A UDF does not have a fully qualified name, only a name (ident), and should
not use the sp_name grammar fragment during parsing.
The fix is to re-organize the CREATE FUNCTION grammar, to better separate:
- creating UDF (no definer, can have AGGREGATE, simple ident)
- creating Stored Functions (definer, no AGGREGATE, fully qualified name)
With the test case provided, another issue was exposed which is also fixed:
the DROP FUNCTION statement was using sp_name and also failing when no database
is implicitly selected, when droping UDF functions.
The fix is also to change the grammar so that DROP FUNCTION works with
both the ident.ident syntax (to drop a stored function), or just the ident
syntax (to drop either a UDF or a Stored Function, in the current database)
mysql-test/r/sp-error.result:
Adjust test results
mysql-test/r/udf.result:
Adjust test results
mysql-test/t/sp-error.test:
Adjust test results
mysql-test/t/udf.test:
Adjust test results
sql/sql_parse.cc:
CREATE UDF FUNCTION does not use a fully qualified name.
sql/sql_yacc.yy:
Fix grammar for CREATE / DROP FUNCTION, FOR udf
Improve error messages for select no_such_function()
Problem:
my_strntoull10rnd_8bit() handled incorrectly cases when the input
string contains a decimal point and is long enough to overrun the
'unsigned long long' type. The position of the decimal point was not
taken into account which resulted in miscalculated numbers and
truncation to appropriate SQL data type limits.
Solution:
Fix my_strntoull10rnd_8bit() to take the position of a decimal point
into account in such cases.
mysql-test/r/insert.result:
Added a test case for bug #30453.
mysql-test/t/insert.test:
Added a test case for bug #30453.
strings/ctype-simple.c:
In cases when the 'unsigned long long' type is overrun by the input
string and a decimal point has occurred, adjust the 'shift' according to
the position of the decimal point and skip all subsequent digits.
makedate() will fold years below 100 into the 1970-2069 range. CS removes code
that also wrongly folded years between 100 and 200 into that range, which should
be left unchanged. Backport from 5.1.
mysql-test/r/func_sapdb.result:
Show that makedate() works correctly for 100 <= year < 200.
mysql-test/t/func_sapdb.test:
Show that makedate() works correctly for 100 <= year < 200.
sql-common/my_time.c:
Remove unnecessary date magic. Syncs behaviour with 5.1+
and manual.
Problem: GROUP_CONCAT(DISTINCT BIT_FIELD...) uses a tree to store keys;
which are constructed using a temporary table fields,
see Item_func_group_concat::setup().
As a) we don't store null bits in the tree where the bit fields store parts
of their data and b) there's no method to properly compare two table records
we've got problem.
Fix: convert BIT fields to INT in the temporary table used.
mysql-test/r/func_gconcat.result:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- test result.
mysql-test/t/func_gconcat.test:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- test case.
sql/item_sum.cc:
Fix for bug #31154: field.h:1649: virtual int Field_bit::cmp(const uchar*, const uchar*): Assertion
- force the create_tmp_table() to convert BIT columns to INT
in order to be able to compare records containing BIT fields.
myisam_sort_buffer_size.
An incorrect length of the sort buffer was used when calculating the
maximum number of keys. When myisam_sort_buffer_size is small enough,
this could result in the number of keys < number of
BUFFPEK structures which in turn led to use of uninitialized BUFFPEKs.
Fixed by correcting the buffer length calculation.
myisam/sort.c:
Use a correct buffer length when calculating the maximum number of keys.
Assert that for each BUFFPEK structure there is at least one
corresponding key. Otherwise we would fail earlier and not reach
merge_buffers().
mysql-test/r/repair.result:
Added a test case for bug #31174.
mysql-test/t/repair.test:
Added a test case for bug #31174.