into mysql.com:/d2/hf/mrg/mysql-5.0-opt
CMakeLists.txt:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/innodb_mysql.result:
merging
mysql-test/t/innodb_mysql.test:
merging
into gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt-13191
mysql-test/r/innodb_mysql.result:
SCCS merged
mysql-test/t/innodb_mysql.test:
SCCS merged
sql/field.cc:
Merge with 4.1, fix of bug #13191.
sql/field.h:
Merge with 4.1, fix of bug #13191.
sql/key.cc:
Merge with 4.1, fix of bug #13191.
INSERT...ON DUPLICATE KEY UPDATE may cause error 1032:
"Can't find record in ..." if we are inserting into
InnoDB table unique index of partial key with
underlying UTF-8 string field.
This error occurs because INSERT...ON DUPLICATE uses a wrong
procedure to copy string fields of multi-byte character sets
for index search.
mysql-test/t/innodb_mysql.test:
Added test case for bug #13191.
mysql-test/r/innodb_mysql.result:
Added test case for bug #13191.
sql/field.h:
Fixed bug #13191.
Field_string::get_key_image() virtual function was overloaded
to implement copying of variable length character (UTF-8) fields.
Field::get_key_image() function prototype has been changed to
return byte size of copied data.
sql/field.cc:
Fixed bug #13191.
Field_string::get_key_image() virtual function was overloaded
to implement copying of variable length character (UTF-8) fields.
Field::get_key_image() function prototype has been changed to
return byte size of copied data.
sql/key.cc:
Fixed bug #13191.
INSERT...ON DUPLICATE KEY UPDATE may cause error 1032:
"Can't find record in ...".
This error occurs because INSERT...ON DUPLICATE uses
a wrong procedure to copy field parts for index search.
key_copy() function has been fixed.
This bug occurs when error message length exceeds allowed limit: my_error()
function outputs "%s" sequences instead of long string arguments.
Formats like %-.64s are very common in errmsg.txt files, however my_error()
function simply ignores precision of those formats.
mysys/my_error.c:
Fixed bug #20710.
This bug occurs when error message length exceeds allowed limit: my_error()
function output "%s" sequences instead of long string arguments.
my_error() function has been fixed to accept formats like %-.64s.
mysql-test/t/alter_table.test:
Added test case for bug #20710.
mysql-test/r/alter_table.result:
Added test case for bug #20710.
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
- unsigned flag was not handled correctly for a number of mathematical funcions, which led to incorrect results
- passing large values as the number of decimals to ROUND() resulted in incorrect results and even server crashes in some cases
- reverted the fix and the testcase for bug #10083 as it violates the manual
- fixed some testcases which relied on broken ROUND() behavior
mysql-test/r/func_math.result:
- Removed the testcase for bug #10083 (not a bug according to the manual)
- Changed the testcase for bug #9837 to expect a correct ROUND() behavior
- Added testcases for bug #24912 and all related bugs found
mysql-test/r/type_newdecimal.result:
Fixed a truncate() testcase which relied on broken behavior
mysql-test/t/func_math.test:
- Removed the testcase for bug #10083 (not a bug according to the manual)
- Changed the testcase for bug #9837 to expect a correct ROUND() behavior
- Added testcases for bug #24912 and all related bugs found
sql/item_func.cc:
Various changes to fix bug #24912 and all related bugs found:
- honor unsigned_flag in various Item_* functions
- correctly handle out-of-range numbers of decimals in Item_func_round::fix_length_and_dec()
- changed the argument specifying the number of decimals in my_double_round() from int to longlong, added a new argument to pass the 'unsigned flag'
- changed my_double_round() to correctly handle large values passed as the 'number of decimals' argument
- added a my_double_round() analog for BIGINT UNSIGNED arguments (my_unsigned_round())
- fixed Item_func_round()::int_op() to not overflow even when the result is within integer range
- fixed a bug Item_founc_round()::decimal_op() which resulted in crash when a large number of decimals was passed to my_decimal_round()
sql/item_func.h:
Various fixed to correctly handle unsigned values.
sql/item_strfunc.cc:
Changed the call to my_double_round() to match the new declaration.
sql/mysql_priv.h:
Changed the declaration for my_double_round() to be able pass arbitrary integers as number of decimals (both signed and unsigned)
Before this fix, the parser would sometime change where a token starts by
altering Lex_input_string::tok_start, which later confused the code in
sql_yacc.yy that needs to capture the source code of a SQL statement,
like to represent the body of a stored procedure.
This line of code in sql_lex.cc :
case MY_LEX_USER_VARIABLE_DELIMITER:
lip->tok_start= lip->ptr; // Skip first `
would <skip the first back quote> ... and cause the bug reported.
In general, the responsibility of sql_lex.cc is to *find* where token are
in the SQL text, but is *not* to make up fake or incomplete tokens.
With a quoted label like `my_label`, the token starts on the first quote.
Extracting the token value should not change that (it did).
With this fix, the lexical analysis has been cleaned up to not change
lip->tok_start (in the case found for this bug).
The functions get_token() and get_quoted_token() now have an extra
parameters, used when some characters from the beginning of the token need
to be skipped when extracting a token value, like when extracting 'AB' from
'0xAB', for example, for a HEX_NUM token.
This exposed a bad assumption in Item_hex_string and Item_bin_string,
which has been fixed:
The assumption was that the string given, 'AB', was in fact preceded in
memory by '0x', which might be false (it can be preceded by "x'" and
followed by "'" -- or not be preceded by valid memory at all)
If a name is needed for Item_hex_string or Item_bin_string, the name is
taken from the original and true source code ('0xAB'), and assigned in
the select_item rule, instead of relying on assumptions related to how
memory is used.
mysql-test/r/sp.result:
Lex_input_stream::tok_start must point at the real start of a token.
mysql-test/t/sp.test:
Lex_input_stream::tok_start must point at the real start of a token.
sql/item.cc:
Lex_input_stream::tok_start must point at the real start of a token.
sql/sql_lex.cc:
Lex_input_stream::tok_start must point at the real start of a token.
sql/sql_yacc.yy:
Lex_input_stream::tok_start must point at the real start of a token.
tests/mysql_client_test.c:
Fixed failing build on the windows platform.
mysql-test/r/ps_7ndb.result:
The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_6bdb.result:
The result of the adjusted test case after fix for bug#27590.
sql/item_cmpfunc.cc:
A warning is fixed.
into moonbone.local:/mnt/gentoo64/work/16377-bug-5.0-opt-mysql
mysql-test/r/subselect.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
into moonbone.local:/mnt/gentoo64/work/27590-bug-5.0-opt-mysql
mysql-test/r/subselect.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
The BETWEEN function was comparing DATE/DATETIME values either as ints or as
strings. Both methods have their disadvantages and may lead to a wrong
result.
Now BETWEEN function checks whether all of its arguments has the STRING result
types and at least one of them is a DATE/DATETIME item. If so it sets up
two Arg_comparator obects to compare with the compare_datetime() comparator
and uses them to compare such items.
Added two Arg_comparator object members and one flag to the
Item_func_between class for the correct DATE/DATETIME comparison.
The Item_func_between::fix_length_and_dec() function now detects whether
it's used for DATE/DATETIME comparison and sets up newly added Arg_comparator
objects to do this.
The Item_func_between::val_int() now uses Arg_comparator objects to perform
correct DATE/DATETIME comparison.
The owner variable of the Arg_comparator class now can be set to NULL if the
caller wants to handle NULL values by itself.
Now the Item_date_add_interval::get_date() function ajusts cached_field type according to the detected type.
mysql-test/t/type_datetime.test:
Added a test case for the bug#16377: Wrong DATE/DATETIME comparison in BETWEEN function.
mysql-test/r/type_datetime.result:
Added a test case for the bug#16377: Wrong DATE/DATETIME comparison in BETWEEN function.
mysql-test/r/query_cache.result:
A test case result corrected after the fix for bug#16377.
sql/item_timefunc.cc:
Bug#16377: Wrong DATE/DATETIME comparison in BETWEEN function.
Now the Item_date_add_interval::get_date() function ajusts cached_field type according to the detected type.
sql/item_cmpfunc.cc:
Bug#16377: Wrong DATE/DATETIME comparison in BETWEEN function.
The Item_func_between::fix_length_and_dec() function now detects whether
it's used for DATE/DATETIME comparison and sets up newly added Arg_comparator
objects to do this.
The Item_func_between::val_int() now uses Arg_comparators to perform correct
DATE/DATETIME comparison.
The owner variable of the Arg_comparator class now can be set to NULL if the
caller wants to handle NULL values by itself.
sql/item_cmpfunc.h:
Bug#16377: Wrong DATE/DATETIME comparison in BETWEEN function.
Added two Arg_comparator object members and one flag
to the Item_func_between class for the correct DATE/DATETIME comparison.
into moonbone.local:/mnt/gentoo64/work/16377-bug-5.0-opt-mysql
mysql-test/r/subselect.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
DATE and DATETIME can be compared either as strings or as int. Both
methods have their disadvantages. Strings can contain valid DATETIME value
but have insignificant zeros omitted thus became non-comparable with
other DATETIME strings. The comparison as int usually will require conversion
from the string representation and the automatic conversion in most cases is
carried out in a wrong way thus producing wrong comparison result. Another
problem occurs when one tries to compare DATE field with a DATETIME constant.
The constant is converted to DATE losing its precision i.e. losing time part.
This fix addresses the problems described above by adding a special
DATE/DATETIME comparator. The comparator correctly converts DATE/DATETIME
string values to int when it's necessary, adds zero time part (00:00:00)
to DATE values to compare them correctly to DATETIME values. Due to correct
conversion malformed DATETIME string values are correctly compared to other
DATE/DATETIME values.
As of this patch a DATE value equals to DATETIME value with zero time part.
For example '2001-01-01' equals to '2001-01-01 00:00:00'.
The compare_datetime() function is added to the Arg_comparator class.
It implements the correct comparator for DATE/DATETIME values.
Two supplementary functions called get_date_from_str() and get_datetime_value()
are added. The first one extracts DATE/DATETIME value from a string and the
second one retrieves the correct DATE/DATETIME value from an item.
The new Arg_comparator::can_compare_as_dates() function is added and used
to check whether two given items can be compared by the compare_datetime()
comparator.
Two caching variables were added to the Arg_comparator class to speedup the
DATE/DATETIME comparison.
One more store() method was added to the Item_cache_int class to cache int
values.
The new is_datetime() function was added to the Item class. It indicates
whether the item returns a DATE/DATETIME value.
sql/item.cc:
Bug#27590: Wrong DATE/DATETIME comparison.
One more store() method was added to the Item_cache_int class to cache int
values.
The new is_datetime() function was added to the Item class. It indicates
whether the item returns a DATE/DATETIME value.
sql/item.h:
Bug#27590: Wrong DATE/DATETIME comparison.
One more store() method was added to the Item_cache_int class to cache int
values.
The new is_datetime() function was added to the Item class. It indicates
whether the item returns a DATE/DATETIME value.
sql/item_cmpfunc.cc:
Bug#27590: Wrong DATE/DATETIME comparison.
The compare_datetime() function is added to the Arg_comparator class.
It implements the correct comparator for DATE/DATETIME values.
Two supplementary functions called get_date_from_str() and get_datetime_value()
are added. The first one extracts DATE/DATETIME value from a string and the
second one retrieves the correct DATE/DATETIME value from an item.
The new Arg_comparator::can_compare_as_dates() function is added and used
to check whether two given items can be compared by the compare_datetime()
comparator.
sql/item_cmpfunc.h:
Bug#27590: Wrong DATE/DATETIME comparison.
The compare_datetime() function is added to the Arg_comparator class.
It implements the correct comparator for DATE/DATETIME values.
Two supplementary functions called get_date_from_str() and get_datetime_value()
are added. The first one extracts DATE/DATETIME value from a string and the
second one retrieves the correct DATE/DATETIME value from an item.
The new Arg_comparator::can_compare_as_dates() function is added and used
to check whether two given items can be compared by the compare_datetime()
comparator.
Two caching variables were added to the Arg_comparator class to speedup the
DATE/DATETIME comparison.
mysql-test/include/ps_conv.inc:
Test case adjusted after fix for bug#27590.
mysql-test/r/distinct.result:
Test cases results are corrected after fix for bug#27590.
sql/sql_select.cc:
Bug#27590: Wrong DATE/DATETIME comparison.
The test_if_equality_guarantees_uniqueness() function now uses
Arg_comparator::can_compare_as_dates() to detect comparable DATE/DATETIME items.
mysql-test/r/ps_2myisam.result:
The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_3innodb.result:
The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_4heap.result:
The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_5merge.result:
The result of the adjusted test case after fix for bug#27590.
mysql-test/r/subselect.result:
Test cases results are corrected after fix for bug#27590.
mysql-test/r/type_datetime.result:
Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
mysql-test/t/type_datetime.test:
Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
tests/mysql_client_test.c:
Test case adjusted after fix for bug#27590.
into magare.gmz:/home/kgeorge/mysql/autopush/B27363-5.0-opt
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
Validity checks for nested set functions
were not taking into account that the enclosed
set function may be on a nest level that is
lower than the nest level of the enclosing set
function.
Fixed by :
- propagating max_sum_func_level
up the enclosing set functions chain.
- updating the max_sum_func_level of the
enclosing set function when the enclosed set
function is aggregated above or on the same
nest level of as the level of the enclosing
set function.
- updating the max_arg_level of the enclosing
set function on a reference that refers to
an item above or on the same nest level
as the level of the enclosing set function.
- Treating both Item_field and Item_ref as possibly
referencing items from outer nest levels.
mysql-test/r/subselect.result:
Bug #27363: test cases
mysql-test/t/subselect.test:
Bug #27363: test cases
sql/item.cc:
Bug #27363:
Treat the reference as an outer reference for the
enclosing set function even if it's referencing
an item that is above the nest level of the
enclosing set function.
Consider both Item_field and Item_ref.
sql/item_sum.cc:
Bug #27363: Use the enclosed set function aggregation
level to mark the enclosing set function even
if it's aggregated on a level that is above the
nest level of the enclosing set function.
Pass max_sum_func_level up the accending branch of the
recursion because it must take into account each
directly or indirectly nested set function.
INSERT into InnoDB table may cause "ERROR 1062 (23000): Duplicate entry..."
errors or lost records after multi-row INSERT of the form:
"INSERT INTO t (id...) VALUES (NULL...) ON DUPLICATE KEY UPDATE id=VALUES(id)",
where "id" is an AUTO_INCREMENT column.
It happens because InnoDB handler forgets to save next insert id after
updating of auto_increment column with new values. As result of that
last insert id stored inside InnoDB dictionary tables differs from it's
cached thd->next_insert_id value.
sql/ha_innodb.cc:
Fixed bug #27650.
INSERT into InnoDB table may cause "ERROR 1062 (23000): Duplicate entry..."
errors or lost records after multi-row INSERT of the form:
"INSERT INTO t (id...) VALUES (NULL...) ON DUPLICATE KEY UPDATE id=VALUES(id)",
where "id" is an AUTO_INCREMENT column.
It happens because InnoDB handler forgets to save next insert id after
updating of auto_increment column with new values. As result of that
last insert id stored inside InnoDB dictionary tables differs from it's
cached thd->next_insert_id value.
ha_innobase::write_row() function has been corrected.
mysql-test/t/innodb_mysql.test:
Added a test case for bug #27650.
mysql-test/r/innodb_mysql.result:
Added a test case for bug #27650.
When fields are inserted instead of * in the select list they were not marked
for check for the ONLY_FULL_GROUP_BY mode.
The Field_iterator_table::create_item() function now marks newly created
items for check when in the ONLY_FULL_GROUP_BY mode.
The setup_wild() and the insert_fields() functions now maintain the
cur_pos_in_select_list counter for the ONLY_FULL_GROUP_BY mode.
sql/sql_base.cc:
Bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
The setup_wild() and the insert_fields() functions now maintain the
cur_pos_in_select_list counter for the ONLY_FULL_GROUP_BY mode.
sql/table.cc:
Bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
The Field_iterator_table::create_item() function now marks newly created
items for check when in the ONLY_FULL_GROUP_BY mode.
mysql-test/r/group_by.result:
Added a test case for the bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
mysql-test/t/group_by.test:
Added a test case for the bug#27874: Non-grouped columns are allowed by * in ONLY_FULL_GROUP_BY mode.
into mysql.com:/home/ram/work/b27515/b27515.5.0
mysql-test/r/grant.result:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/sql_parse.cc:
Auto merged
In multi_update::send_data(), the counter of matched rows was not correctly incremented, when during insertion of a new row to a temporay table it had to be converted from HEAP to MyISAM.
This fix changes the logic to increment the counter of matched rows in the following cases:
1. If the error returned from write_row() is zero.
2. If the error returned from write_row() is non-zero, is neither HA_ERR_FOUND_DUPP_KEY nor HA_ERR_FOUND_DUPP_UNIQUE, and a call to create_myisam_from_heap() succeeds.
mysql-test/r/update.result:
Added a test case for bug #22364 "Inconsistent "matched rows" when executing UPDATE"
mysql-test/t/update.test:
Added a test case for bug #22364 "Inconsistent "matched rows" when executing UPDATE"
sql/sql_update.cc:
In multi_update::send_data(), the counter of matched rows was not correctly incremented, when during insertion of a new row to a temporay table it had to be converted from HEAP to MyISAM.
This fix changes the logic to increment the counter of matched rows in the following cases:
1. If the error returned from write_row() is zero.
2. If the error returned from write_row() is non-zero, is neither HA_ERR_FOUND_DUPP_KEY nor HA_ERR_FOUND_DUPP_UNIQUE, and a call to create_myisam_from_heap() succeeds.
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
client/mysql.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
FORCE_INIT_OF_VARS was not defined for the
debug builds on Windows. This caused LINT_INIT
macro to be defined as NOP and this triggers
false alarms about use of uninitialized with
the runtime libs of some Visual Studio versions.
Fixed by defining FORCE_INIT_OF_VARS to match the
state of the Windows
CMakeLists.txt:
Bug #27811: added the missing build option
mysql-test/r/windows.result:
Bug #27811: test case
mysql-test/t/windows.test:
Bug #27811: test case
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
Makefile.am:
Auto merged
client/mysql_upgrade.c:
Auto merged
sql/mysql_priv.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
sql/item_cmpfunc.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
into gshchepa.loc:/home/uchum/work/bk-trees/mysql-5.0-opt-27704
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/row.test:
Auto merged
mysql-test/r/row.result:
Test case updated for Bug#27704 (incorrect comparison
of rows with NULL components).
sql/item_cmpfunc.cc:
Bug#27704: incorrect comparison of rows with NULL components.
sql/item_cmpfunc.h:
Bug#27704: incorrect comparison of rows with NULL components.
Cosmetic fix.
Support for NULL components was incomplete for row comparison,
fixed. Added support for abort_on_null at compare_row() like
in 5.x
sql/item_cmpfunc.h:
Bug#27704: incorrect comparison of rows with NULL components
Added support for abort_on_null at Item_bool_func2
like in 5.x
sql/item_cmpfunc.cc:
Bug#27704: incorrect comparison of rows with NULL components
Support for NULL components was incomplete for row comparison,
fixed. Added support for abort_on_null at compare_row() like
in 5.x
mysql-test/t/row.test:
Test case updated for Bug#27704 (incorrect comparison
of rows with NULL components)
mysql-test/r/row.result:
Test case updated for Bug#27704 (incorrect comparison
of rows with NULL components)
mysql-test/r/subselect.result:
Test case updated for Bug#27704 (incorrect comparison
of rows with NULL components)
This bug was intruduced by the fix for bug#17212 (in 4.1). It is not
ok to call test_if_skip_sort_order since this function will
alter the execution plan. By contract it is not ok to call
test_if_skip_sort_order in this context.
This bug appears only in the case when the optimizer has chosen
an index for accessing a particular table but finds a covering
index that enables it to skip ORDER BY. This happens in
test_if_skip_sort_order.
mysql-test/r/key.result:
Bug#24778
test case.
The bug causes the result to be the empty set.
mysql-test/t/key.test:
Bug#24778
The minimal test case that reveals the bug. The reason for such a
complicated schema is that we have to convince the optimizer to
pick one index, then discard it in order to be able to skip
ORDER BY.
sql/sql_select.cc:
bug#24778
Removed the call to test_if_skip_sort_order that constituted the
bug.
into romeo.(none):/home/bk/merge-mysql-5.0
client/mysql.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.cc:
Auto merged
When merging views into the enclosing statement
the ORDER BY clause of the view is merged to the
parent's ORDER BY clause.
However when the VIEW is merged into an UNION
branch the ORDER BY should be ignored.
Use of ORDER BY for individual SELECT statements
implies nothing about the order in which the rows
appear in the final result because UNION by default
produces unordered set of rows.
Fixed by ignoring the ORDER BY clause from the merge
view when expanded in an UNION branch.
mysql-test/r/view.result:
Bug #27786: test case
mysql-test/t/view.test:
Bug #27786: test case
sql/sql_lex.h:
Bug #27786: add a is_union() inlined function
Returns true if the unit represents an UNION.
sql/sql_view.cc:
Bug #27786: ignore ORDER BY in mergeable views when in UNION context
Fix test case: add drop table
mysql-test/t/innodb_mysql.test:
Fix test case: add drop table
mysql-test/r/innodb_mysql.result:
Fix test case: add drop table
Add test case for Bug #27210: INNODB ON DUPLICATE KEY UPDATE
mysql-test/r/innodb_mysql.result:
Add test case for Bug #27210: INNODB ON DUPLICATE KEY UPDATE
mysql-test/t/innodb_mysql.test:
Add test case for Bug #27210: INNODB ON DUPLICATE KEY UPDATE
client/mysql_upgrade.c:
Add defines for WEXITSTATUS
Pass arguments on command line instead of --defaults-file=<temp file>
mysql-test/r/mysql_upgrade.result:
When testing that mysql_upgrade detect if mysqlcheck fails, use an option that
is used on all platforms.
mysql-test/t/mysql_upgrade.test:
When testing that mysql_upgrade detect if mysqlcheck fails, use an option that
is used on all platforms.
scripts/comp_sql.c:
Some compilers have a max string length, insert a newline at
every 512th char in long strings
into mysql.com:/home/ram/work/b22824/my50-b22824
sql/item_cmpfunc.cc:
Auto merged
mysql-test/r/strict.result:
merging
mysql-test/t/strict.test:
merging
NULL MERGE: this ChangeSet will be null merged into mysql-5.1
Fixes:
- Bug #26662: mysqld assertion when creating temporary (InnoDB) table on a tmpfs filesystem
Fix by not open(2)ing with O_DIRECT but rather calling fcntl(2) to set
this flag immediately after open(2)ing. This way an error caused by
O_DIRECT not being supported can easily be ignored.
- Bug #23313: AUTO_INCREMENT=# not reported back for InnoDB tables
- Bug #21404: AUTO_INCREMENT value reset when Adding FKEY (or ALTER?)
Report the current value of the AUTO_INCREMENT counter to MySQL.
innobase/configure.in:
Apply innodb-5.0-ss1405 snapshot
Revision r1396:
branches/5.0: Merge r1395 from trunk:
* Fix Bug#26662 by not open(2)ing with O_DIRECT but rather calling fcntl(2)
to set this flag immediately after open(2)ing. This way an error caused by
O_DIRECT not being supported can easily be ignored.
* Add support for skipping the OS caching on Solaris by calling directio()
instead of fcntl().
innobase/os/os0file.c:
Apply innodb-5.0-ss1405 snapshot
Revision r1394:
branches/5.0: Merge r1391 from trunk:
Merge the bodies of os_file_handle_error() and os_file_handle_error_no_exit()
into a generic function which is called from both os_file_handle_error() and
os_file_handle_error_no_exit()
Revision r1396:
branches/5.0: Merge r1395 from trunk:
* Fix Bug#26662 by not open(2)ing with O_DIRECT but rather calling fcntl(2)
to set this flag immediately after open(2)ing. This way an error caused by
O_DIRECT not being supported can easily be ignored.
* Add support for skipping the OS caching on Solaris by calling directio()
instead of fcntl().
mysql-test/r/innodb.result:
Apply innodb-5.0-ss1405 snapshot
Revision r1405:
branches/5.0: Merge r1404 from trunk:
Report the current value of the AUTO_INCREMENT counter to MySQL.
(Bug #23313, Bug #21404)
ha_innobase::update_create_info(): New function, to report
the auto_increment_value.
mysql-test/t/innodb.test:
Apply innodb-5.0-ss1405 snapshot
Revision r1405:
branches/5.0: Merge r1404 from trunk:
Report the current value of the AUTO_INCREMENT counter to MySQL.
(Bug #23313, Bug #21404)
ha_innobase::update_create_info(): New function, to report
the auto_increment_value.
sql/ha_innodb.cc:
Apply innodb-5.0-ss1405 snapshot
Revision r1405:
branches/5.0: Merge r1404 from trunk:
Report the current value of the AUTO_INCREMENT counter to MySQL.
(Bug #23313, Bug #21404)
ha_innobase::update_create_info(): New function, to report
the auto_increment_value.
sql/ha_innodb.h:
Apply innodb-5.0-ss1405 snapshot
Revision r1405:
branches/5.0: Merge r1404 from trunk:
Report the current value of the AUTO_INCREMENT counter to MySQL.
(Bug #23313, Bug #21404)
ha_innobase::update_create_info(): New function, to report
the auto_increment_value.
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
CMakeLists.txt:
Auto merged
Makefile.am:
Auto merged
include/my_global.h:
Auto merged
sql/mysql_priv.h:
Auto merged
into mysql.com:/home/svoj/devel/mysql/BUG24342/mysql-5.0-engines
myisam/mi_rkey.c:
Auto merged
myisam/myisamdef.h:
Auto merged
myisammrg/myrg_rkey.c:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/r/merge.result:
SCCS merged
- Improve mysql_upgrade and add comments describing it's logic
- Don't look for mysql and mysqlcheck randomly, use dir where mysql_upgrade
was started from
- Don't look for mysql_fix_privilege_tables.sql randomly, compile
in the mysql_fix_privilege_tables.sql file and use that to upgrade
the system tables of MySQL
- Check for any unexpected error returned from runnning the mysql_fix_privilege_tables SQL
- Fix bug#26639, bug#24248 and bug#25405
BitKeeper/etc/ignore:
Added scripts/comp_sql scripts/mysql_fix_privilege_tables_sql.c to the ignore list
CMakeLists.txt:
Build files also in scripts/
Makefile.am:
Build scripts/ a little earlier to make
the scripts/mysql_fix_privilege_tables_sql.c file available
when client/ is built
client/mysql_upgrade.c:
Updated version of mysql_upgrade with comments and logical functions
include/my_global.h:
Move IF_WIN macro to my_global.h fr from sql/mysql_priv.h
mysql-test/r/mysql_upgrade.result:
Update result
mysql-test/t/mysql_upgrade.test:
Add more tests for different bugs related to mysql_upgrade
scripts/Makefile.am:
Build comp_sql and mysql_fix_privilege_tables_sql.c
sql/mysql_priv.h:
Move IF_WIN macro to my_global.h fr from sql/mysql_priv.h
scripts/CMakeLists.txt:
New BitKeeper file ``scripts/CMakeLists.txt''
scripts/comp_sql.c:
New BitKeeper file ``scripts/comp_sql.c''
conditions when executing an equijoin query with WHERE condition
containing a subquery predicate of the form join_attr NOT IN (SELECT ...).
To resolve a problem of the correct evaluation of the expression
attr NOT IN (SELECT ...)
an array of guards is created to make it possible to filter out some
predicates of the EXISTS subquery into which the original subquery
predicate is transformed, in the cases when a takes the NULL value.
If attr is defined as a field that cannot be NULL than such an array
is not needed and is not created.
However if the field a occurred also an an equijoin predicate t2.a=t1.b
and table t1 is accessed before table t2 then it may happen that the
the EXISTS subquery is pushed down to the condition evaluated just after
table t1 has been accessed. In this case any occurrence of t2.a is
substituted for t1.b. When t1.b takes the value of NULL an attempt is
made to turn on the corresponding guard. This action caused a crash as
no guard array had been created.
Now the code of Item_in_subselect::set_cond_guard_var checks that the guard
array has been created before setting a guard variable on. Otherwise the
method does nothing. It cannot results in returning a row that could be
rejected as the condition t2.a=t1.b will be checked later anyway.
mysql-test/r/subselect3.result:
Added a test case for bug #27870.
mysql-test/t/subselect3.test:
Added a test case for bug #27870.
sql/item_subselect.h:
Fixed bug #27870. The bug that causes crashes manifests itself at some
conditions when executing an equijoin query with WHERE condition
containing a subquery predicate of the form join_attr NOT IN (SELECT ...).
Forced Item_in_subselect::set_cond_guard_var to check that the guard
array has been created before setting a guard variable on. Otherwise the
method does nothing.
into bk-internal.mysql.com:/data0/bk/mysql-5.0-marvel
sql/ha_ndbcluster.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
Added missed DROP privilege check on the original table for RENAME TABLE command.
mysql-test/r/grant.result:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- test result.
mysql-test/t/grant.test:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- test case.
sql/sql_parse.cc:
Fix for bug #27515: DROP previlege is not required anymore for RENAME TABLE
- added DROP privilege check on the original table for RENAME TABLE command.
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow
Using strmov() to copy an argument may cause overflow
if the argument's length is bigger than the buffer:
use strmake instead.
Also, we have to encrease the error message buffer size to fit
the longest message.
client/mysql.cc:
Fix for
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow
- use strmake() instead of strmov() to avoid buffer overflow.
mysql-test/r/mysql.result:
Fix for
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow
- test result.
mysql-test/t/mysql.test:
Fix for
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow
- test case.
mysys/charset.c:
Fix for
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow
- encrease error message buffer size to fit the (possible) longest message.
into moonbone.local:/mnt/gentoo64/work/27321-bug-5.0-opt-mysql
mysql-test/r/subselect3.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/subselect.result:
Manually merged
mysql-test/t/subselect.test:
Manually merged
mysql-test/t/subselect3.test:
Manually merged
The Item_outer_ref class based on the Item_direct_ref class was always used
to represent an outer field. But if the outer select is a grouping one and the
outer field isn't under an aggregate function which is aggregated in that
outer select an Item_ref object should be used to represent such a field.
If the outer select in which the outer field is resolved isn't grouping then
the Item_field class should be used to represent such a field.
This logic also should be used for an outer field resolved through its alias
name.
Now the Item_field::fix_outer_field() uses Item_outer_field objects to
represent aliased and non-aliased outer fields for grouping outer selects
only.
Now the fix_inner_refs() function chooses which class to use to access outer
field - the Item_ref or the Item_direct_ref. An object of the chosen class
substitutes the original field in the Item_outer_ref object.
The direct_ref and the found_in_select_list fields were added to the
Item_outer_ref class.
mysql-test/t/subselect3.test:
Some test cases were corrected after the fix for the bug#27321.
mysql-test/r/subselect3.result:
Some test cases were corrected after the fix for the bug#27321.
mysql-test/t/subselect.test:
Added a test case for the bug#27321: Wrong subquery result in a grouping select.
mysql-test/r/subselect.result:
Added a test case for the bug#27321: Wrong subquery result in a grouping select.
Some test cases were corrected after this fix.
sql/sql_union.cc:
Bug#27321: Wrong subquery result in a grouping select.
Cleanup of the inner_refs_list.
sql/sql_select.cc:
Bug#27321: Wrong subquery result in a grouping select.
Now the fix_inner_refs() function chooses which class to use to access outer
field - the Item_ref or the Item_direct_ref. An object of the chosen class
substitutes the original field in the Item_outer_ref object.
A comment is corrected.
sql/item.cc:
Bug#27321: Wrong subquery result in a grouping select.
Now the Item_field::fix_outer_field() uses Item_outer_field objects to
represent aliased and non-aliased outer fields for grouping outer selects
only.
sql/item.h:
Bug#27321: Wrong subquery result in a grouping select.
The direct_ref and the found_in_select_list fields were added to the
Item_outer_ref class.
When a table status is requested by statement like SHOW TABLE
STATUS and there is another statement (e.g. DELETE) sets
number of records to 0 concurrently, we may get division by
zero error, which crashes a server.
This is fixed by using thread local variable x->records instead
of shared info->state->records when we check if it is zero and
divide by it.
myisam/mi_info.c:
Information schema does not lock a table when it requests table
state info. If another thread sets info->state->records to 0
after we check if it is 0 and before we divide by it we may get
division by zero error.
Check and divide by local x->records variable instead of shared
info->state->records.
Problem: single byte do_varstring1() function was called, which didn't
check limit on "number of character", and checked only "number of bytes".
Fix: adding a multi-byte aware function do_varstring1_mb(),
to limit on "number of characters"
mysql-test/r/ctype_utf8.result:
Adding test case
mysql-test/t/ctype_utf8.test:
Adding test case
sql/field_conv.cc:
Adding missing function to copy VARCHAR strings
having one length byte.
Fix for when memory pre-allocation fails.
mysys/my_alloc.c:
Added code to null-out the pre-alloc pointer if allocation fails. This is necessary for the next time this procedure is called.
mysql-test/r/variables-big.result:
Added "big" test for bug fix Bug #27322.
mysql-test/t/variables-big.test:
Added "big" test for bug fix Bug #27322.
IGNORE/USE/FORCE INDEX hints were honored when choosing FULLTEXT
index.
With this fix these hints are ignored. For regular indexes we may
perform table scan instead of index lookup when IGNORE INDEX was
specified. We cannot do this for FULLTEXT in NLQ mode.
mysql-test/r/fulltext.result:
A test case for bug#25951.
mysql-test/t/fulltext.test:
A test case for bug#25951.
sql/item_func.cc:
IGNOR/USE/FORCE INDEX hints should not be honored when choosing FULLTEXT
index.
Use proper bitmap, that is not modified by IGNORE/USE/FORCE INDEX hints.
Support of views wasn't implemented for the TRUNCATE statement.
Now TRUNCATE on views has the same semantics as DELETE FROM view:
mysql_truncate() checks whether the table is a view and falls back
to delete if so.
In order to initialize properly the LEX::updatable for a view
st_lex::can_use_merged() now allows usage of merged views for the
TRUNCATE statement.
mysql-test/r/truncate.result:
Added a test case for the Bug#5507: TRUNCATE does not work with views.
mysql-test/t/truncate.test:
Added a test case for the Bug#5507: TRUNCATE does not work with views.
sql/sql_lex.cc:
Bug#5507: TRUNCATE does not work with views.
can_use_merged() was denying of usage of merged views for a
TRUNCATE statement. This results in improper initialization
of view LEX::updatable. Fixed.
sql/sql_delete.cc:
Bug#5507: TRUNCATE does not work with views.
1.mysql_truncate() was lacking of check whether the table is view. Added.
2.mysql_truncate() calls mysql_delete(), but mysql_delete() always reports
errors as "DELETE" errors. Fixed.
mysql-test/t/view.test:
Updated test case for Bug#14540: OPTIMIZE, ANALYZE, REPAIR applied
to not a view.
mysql-test/r/view.result:
Updated test case for Bug#14540: OPTIMIZE, ANALYZE, REPAIR applied
to not a view.
Added error code ER_QUERY_INTERRUPTED to the list of special errors
that prevent the slave from starting to execute a query.
sql/slave.cc:
Added ER_QUERY_INTERRUPTED to special error code that prevents statement
from being executed on slave.
mysql-test/r/rpl_critical_errors.result.txt:
New BitKeeper file ``mysql-test/r/rpl_critical_errors.result.txt''
mysql-test/t/rpl_critical_errors.test:
New BitKeeper file ``mysql-test/t/rpl_critical_errors.test''
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
client/mysqldump.c:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysys/my_malloc.c:
Auto merged
mysys/my_static.c:
Auto merged
mysys/safemalloc.c:
Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
sql/ha_archive.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql-common/client.c:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
mysql-test/r/sp.result:
Merged from main 5.0
sql/sql_load.cc:
Merged from main 5.0
- parse indexname using "split" instead of sscanf, as not to break at space
- test case with space in key
- enclose names in printout
mysql-test/r/ndb_restore.result:
Bug #27758 Restoring NDB backups makes table usable in SQL nodes
- change to using an index with space to reproduce bug
mysql-test/t/ndb_restore.test:
Bug #27758 Restoring NDB backups makes table usable in SQL nodes
- change to using an index with space to reproduce bug
ndb/tools/restore/consumer_restore.cpp:
Bug #27758 Restoring NDB backups makes table usable in SQL nodes
- parse indexname using "split" instead of sscanf, as not to break at space
- enclose names in printout
ndb/tools/restore/restore_main.cpp:
Bug #27758 Restoring NDB backups makes table usable in SQL nodes
- enclose names in printout
sql/ha_ndbcluster.cc:
Bug #27758 Restoring NDB backups makes table usable in SQL nodes
- correct error message
- Add testcase for SSL connection from mysqldump to mysqld
mysql-test/r/openssl_1.result:
Add test result
mysql-test/t/openssl_1.test:
Add test case for mysqldump with SSL connection to mysqld
are used as arguments of the IN predicate.
Added a function to check compatibility of row expressions. Made sure that this
function to be called for Item_func_in objects by fix_length_and_dec().
mysql-test/r/row.result:
Added a test case for bug #27484.
mysql-test/t/row.test:
Added a test case for bug #27484.
The function CRC32() returns unsigned integer.
But the metadata (the unsigned flag) for the
function was set incorrectly.
As a result type arithmetics based on the
function's metadata (like finding the concise
type of an temporary table column to hold the result)
returned incorrect results.
Fixed by returning correct type information.
This fix is based on code contributed by Martin Friebe
(martin@hybyte.com) on 2007-03-30.
mysql-test/r/func_str.result:
Bug #27530: test case
mysql-test/t/func_str.test:
Bug #27530: test case
sql/item_strfunc.h:
Bug #27530: Marked CRC32() as returning unsigned
MERGE engine may return incorrect values when several representations
of equal keys are present in the index. For example "groß" and "gross"
or "gross" and "gross " (trailing space), which are considered equal,
but have different lengths.
The problem was that key length was not recalculated after key lookup.
Only MERGE engine is affected.
myisam/mi_rkey.c:
info->lastkey gets rewritten by mi_search. Later we recalculate found lastkey
length. This is done to make sure that mi_rnext_same gets true, found (not
searched) lastkey length. Searched and found key lengths may be different,
for example in case searched key is "groß" and found is "gross" or in case
a key has trailing spaces.
Unfortunately we recalculate found lastkey length only for first
underlying table. To recalculate found key length for non-first underlying
table we need to know how much key segments were used to create this key.
When mi_rkey is called for first underlying table of a merge table, store
offset to last used key segment.
Restore last_used_keyseg variable when mi_rkey is called for non-first
underlying table.
myisam/myisamdef.h:
Added last_used_keyseg variable to MI_INFO. It is used by merge engine to calculate
key length.
myisammrg/myrg_rkey.c:
Pass last used key segment returned by first table key read to other
table key reads.
mysql-test/r/merge.result:
A test case for bug#24342.
mysql-test/t/merge.test:
A test case for bug#24342.
Added a test case.
The problem was fixed by the fix for bug #17379.
The problem was that because of some conditions
the optimizer always preferred range or full index
scan access methods to lookup access methods even
when the latter were much cheaper.
mysql-test/r/select.result:
Bug #19372: test case.
The problem was fixed by the patch for bug #17379
mysql-test/t/select.test:
Bug #19372: test case.
The problem was fixed by the patch for bug #17379
The optimizer transforms DISTINCT into a GROUP BY
when possible.
It does that by constructing the same structure
(a list of ORDER instances) the parser makes when
parsing GROUP BY.
While doing that it also eliminates duplicates.
But if a duplicate is found it doesn't advance the
pointer to ref_pointer array, so the next
(and subsequent) ORDER structures point to the wrong
element in the SELECT list.
Fixed by advancing the pointer in ref_pointer_array
even in the case of a duplicate.
mysql-test/r/distinct.result:
Bug #27659: test case
mysql-test/t/distinct.test:
Bug #27659: test case
sql/sql_select.cc:
Bug #27659: use correct ref_pointer_array element
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
client/mysqltest.c:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
SCCS merged
into pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
client/mysqltest.c:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
issue an error in strict mode
if enum|set column has duplicates members in 'create table'
mysql-test/r/strict.result:
test case
mysql-test/t/strict.test:
test case
sql/sql_table.cc:
issue an error in strict mode
if enum|set has duplicates members
Problem: setting/displaying @@LC_TIME_NAMES didn't distinguish between
GLOBAL and SESSION variable types - always SESSION variable
was set/shonw.
Fix: set either global or session value.
Also, "mysqld --lc-time-names" was added to set "global default" value.
mysql-test/r/variables.result:
Adding test cases
mysql-test/t/variables.test:
Adding test cases
sql/mysql_priv.h:
Declaring variable for global default.
sql/mysqld.cc:
Adding --lc-time-names
sql/set_var.cc:
Distinguish between GLOBAL and SESSION variables.
sql/sql_class.cc:
Don't initialize to en_US, use global_system_variables value instead.
Problem: output was empty if the result is empty.
Fix: print XML header and footer, even if the result
is empty, to produce well-formed XML output.
client/mysql.cc:
Print header and footer even on empty set, when --xml
mysql-test/r/client_xml.result:
Adding test case
mysql-test/t/client_xml.test:
Adding test case
NO_AUTO_VALUE_ON_ZERO mode.
The table->auto_increment_field_not_null variable wasn't reset after
reading a row which may lead to inserting a wrong value to the auto-increment
field to the following row.
The table->auto_increment_field_not_null variable is reset now right after a
row is being written in the read_fixed_length() and the read_sep_field()
functions.
Removed wrong setting of the table->auto_increment_field_not_null variable in
the read_sep_field() function.
mysql-test/t/loaddata.test:
Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the
NO_AUTO_VALUE_ON_ZERO mode.
mysql-test/r/loaddata.result:
Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the
NO_AUTO_VALUE_ON_ZERO mode.
sql/sql_load.cc:
Bug#27586: Wrong autoinc value assigned by LOAD DATA in the
NO_AUTO_VALUE_ON_ZERO mode.
The table->auto_increment_field_not_null variable is reset now right after a
row is being written in the read_fixed_length() and the read_sep_field()
functions.
Remove wrong setting of the table->auto_increment_field_not_null variable in
the read_sep_field() function.
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
include/my_base.h:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
sql/sql_update.cc:
Auto merged
sql/ha_ndbcluster.cc:
Merge
into dev3-240.dev.cn.tlan:/home/justin.he/mysql/mysql-5.0/mysql-5.0-ndb-bj.merge
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_table.cc:
Auto merged
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
client/mysqltest.c:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/r/mysqltest.result:
SCCS merged