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
convert(<invalid time>, datetime) in WHERE caused crash as function
returned (void*)NULL, but did not flag SQL NULL. It does now.
mysql-test/r/type_datetime.result:
show that convert() to datetime in a WHERE-clause will no longer crash
the server on invalid input.
mysql-test/t/type_datetime.test:
show that convert() to datetime in a WHERE-clause will no longer crash
the server on invalid input.
sql/item.cc:
When failing to process time values, do not just return (void*)NULL,
but flag SQL NULL as well so no caller will try to process the 0x0L.
This makes behaviour for Item::Item::val_decimal_from_date() and
Item::Item::val_decimal_from_time() identical.
Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.
mysql-test/r/type_decimal.result:
show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
mysql-test/t/type_decimal.test:
show that we allocate a large enough buffer for output of DECIMAL(a,a) [ZEROFILL].
without patch for bug#31227, valgrind will complain here; so will a
debug build.
sql/my_decimal.cc:
Reserve the space for the leading 0 (before the decimal point) in DECIMAL(a,a) ZEROFILL.
Doxygenise preamble of my_decimal2string().
This actually, fix for the patch for bug-27354. The problem with
the patch was that Item_func_sp::used_tables() was updated, but
Item_func_sp::const_item() was not. So, for Item_func_sp, we had
the following inconsistency:
- used_tables() returned RAND_TABLE, which means that the item
can produce "random" results;
- but const_item() returned TRUE, which means that the item is
a constant one.
The fix is to change Item_func_sp::const_item() behaviour: it must
return TRUE (an item is a constant one) only if a stored function
is deterministic and each of its arguments (if any) is a constant
item.
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Add test cases for BUG-31035, BUG-31191, BUG-31226
sql/item_func.cc:
Make Item::const_item() be consistent with Item::used_tables().
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
Bug#28878: InnoDB tables with UTF8 character set and indexes cause wrong result for DML
When making key reference buffers over CHAR fields whitespace (0x20) must be used to fill in the remaining space in the field's buffer. This is what Field_string::store() does. Fixed Field_string::get_key_image() to do the same.
mysql-test/r/innodb_mysql.result:
Bug#28878: test case
mysql-test/t/innodb_mysql.test:
Bug#28878: test case
sql/field.cc:
Bug#28878: Fill with space instead of binary zeros.
mysql-test/r/ndb_condition_pushdown.result:
if ScanFilter is too large, abort or optionaly discard it
mysql-test/t/ndb_condition_pushdown.test:
if ScanFilter is too large, abort or optionaly discard it
ndb/include/kernel/signaldata/ScanTab.hpp:
if ScanFilter is too large, abort or optionaly discard it
ndb/include/ndbapi/Ndb.hpp:
if ScanFilter is too large, abort or optionaly discard it
ndb/include/ndbapi/NdbScanFilter.hpp:
if ScanFilter is too large, abort or optionaly discard it
ndb/include/ndbapi/ndbapi_limits.h:
if ScanFilter is too large, abort or optionaly discard it
ndb/src/ndbapi/NdbScanFilter.cpp:
if ScanFilter is too large, abort or optionaly discard it
ndb/src/ndbapi/NdbScanOperation.cpp:
if ScanFilter is too large, abort or optionaly discard it
ndb/src/ndbapi/ndberror.c:
if ScanFilter is too large, abort or optionaly discard it
sql/ha_ndbcluster_cond.cc:
if ScanFilter is too large, abort or optionaly discard it
This is for bug #29446 "Specifying a myisam_sort_buffer > 4GB on 64 bit machines not possible". Support for myisam_sort_buffer_size > 4 GB on 64-bit Windows will be looked at later in 5.2.
mysql-test/r/variables.result:
Fixed the test.
mysql-test/t/variables.test:
Fixed the test.
mysys/my_getopt.c:
Print a warning to the error log if a user sets an option to a value greater than the option's maximum value.
sql/set_var.cc:
Issue an SQL warning if a user assignes a value greater than the variable's maximum value.
The function str_to_date has a field to say whether it's invoked constant
arguments. But this member was not initialized, causing the function to
think that it could use a cache of the format type when said cache was in
fact not initialized.
Fixed by initializing the field to false.
mysql-test/r/type_date.result:
Bug#30942: Test result
mysql-test/t/type_date.test:
Bug#30942: Test case
sql/item_timefunc.h:
Bug#30942: Initialized const_item to false
end-of-line check missed in Gis_read_stream::get_next_word,
what can lead to crashes (expecially with NULL strings).
End-of-line check added
sql/gstream.cc:
Bug #30955 geomfromtext() crasher
mysql-test/r/gis.result:
Bug #30955 geomfromtext() crasher.
test result
mysql-test/t/gis.test:
Bug #30955 geomfromtext() crasher.
test case
The Item_func_rollup_const class is used for wrapping constants to avoid
wrong result for ROLLUP queries with DISTINCT and a constant in the select
list. This class is also used to wrap up a NULL constant but its null_value
wasn't set accordingly. This led to a server crash.
Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.
mysql-test/t/olap.test:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
mysql-test/r/olap.result:
Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
sql/item_func.h:
Bug#31095: Unexpected NULL constant caused server crash.
Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
to the end of output if the --comments switch is on.
The only way to suppress this line is to use --skip-comments/--compact
switch.
New switch has been added to the mysqldump client command line:
--dump-date.
For the compatibility with previous releases, by default the --dump-date
is on.
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
client/client_priv.h:
Fixed bug #31077.
New OPT_DUMP_DATE option has been added to implement
the mysqldump client --dump-date switch.
client/mysqldump.c:
Fixed bug #31077.
The opt_dump_date variable has been added to imlements
the mysqldump cliemt --dump-date switch.
By default this switch is on (for compatibility with previous
releases).
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
mysql-test/t/mysqldump.test:
Added test case for bug #31077.
mysql-test/r/mysqldump.result:
Added test case for bug #31077.
Corrected test case for the bug#29908.
mysql-test/t/view_grant.test:
Corrected test case for the bug#29908.
mysql-test/r/view_grant.result:
Corrected test case for the bug#29908.
The NAME_CONST function is required to work correctly with constants only.
When executed with functions that return types other than those returned by
Item::field_type (string, int, decimal, or real), the result gets cast to
one of those types. This cannot happen for constants.
Fixed by only allowing constants as arguments to NAME_CONST.
mysql-test/r/func_misc.result:
Bug#30832: Test result
mysql-test/t/func_misc.test:
Bug#30832: Test case
sql/item.h:
Bug#30832: The fix
When calculating the result length of an integer DIV function
the number of decimals was used without checking the result type
first. Thus an uninitialized number of decimals was used for some
types. This caused an excessive amount of memory to be allocated
for the field's buffer and crashed the server.
Fixed by using the number of decimals only for data types that
can have decimals and thus have valid decimals number.
mysql-test/r/func_math.result:
Bug #30587: test case
mysql-test/t/func_math.test:
Bug #30587: test case
sql/item_func.cc:
Bug #30587: Don't use decimals on a type that doesn't have them.
When expanding a * in a USING/NATURAL join the check for table access
for both tables in the join was done using the grant information of the
first one.
Fixed by getting the grant information for the current table while
iterating through the columns of the join.
mysql-test/r/grant2.result:
Bug #30468: test case
mysql-test/t/grant2.test:
Bug #30468: test case
sql/sql_acl.cc:
Bug #30468: correctly check column grants
sql/sql_acl.h:
Bug #30468: correctly check column grants
sql/sql_base.cc:
Bug #30468: correctly check column grants
sql/sql_insert.cc:
Bug #30468: correctly check column grants
When storing the VIEW the CREATE VIEW command is reconstructed
from the parse tree. While constructing the command string
the index hints specified should also be printed.
Fixed by adding code to print the index hints when printing a
table in the FROM clause.
mysql-test/r/view.result:
Bug #28702: test case
mysql-test/t/view.test:
Bug #28702: test case
sql/sql_select.cc:
Bug #28702: preserve index hints in a VIEW definition.
sql/table.h:
Bug #28702: preserve index hints in a VIEW definition.
Improve test for shm on windows
mysql-test/include/windows.inc:
improve "skip message" and don't require a result file
mysql-test/r/shm.result:
Update result after adding more tests
mysql-test/t/shm-master.opt:
Add $MTR_BUILD_THREAD to get a unique shared memory base name
mysql-test/t/shm.test:
Run a bunch of more test to check shm
mysql-test/r/named_pipe.result:
New BitKeeper file ``mysql-test/r/named_pipe.result''
mysql-test/t/named_pipe-master.opt:
New BitKeeper file ``mysql-test/t/named_pipe-master.opt''
mysql-test/t/named_pipe.test:
New BitKeeper file ``mysql-test/t/named_pipe.test''
into sita.local:/Users/tsmith/m/bk/maint/50
client/mysql.cc:
Auto merged
client/mysqldump.c:
Auto merged
mysql-test/Makefile.am:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/archive.result:
Don't care about the "after insert delayed" record when since
we can't guarantee the order it's been inserted
mysql-test/t/archive.test:
Don't care about the "after insert delayed" record when since
we can't guarantee the order it's been inserted
into macbook.local:/Users/kgeorge/mysql/work/B28701-merged-5.0-opt
sql/sql_view.cc:
Auto merged
mysql-test/r/view.result:
merge with 5.0-opt
mysql-test/t/view.test:
merge with 5.0-opt
type of the result.
There are several functions that accept parameters of different types.
The result field type of such functions was determined based on
the aggregated result type of its arguments. As the DATE and the DATETIME
types are represented by the STRING type, the result field type
of the affected functions was always STRING for DATE/DATETIME arguments.
The affected functions are COALESCE, IF, IFNULL, CASE, LEAST/GREATEST, CASE.
Now the affected functions aggregate the field types of their arguments rather
than their result types and return the result of aggregation as their result
field type.
The cached_field_type member variable is added to the number of classes to
hold the aggregated result field type.
The str_to_date() function's result field type now defaults to the
MYSQL_TYPE_DATETIME.
The agg_field_type() function is added. It aggregates field types with help
of the Field::field_type_merge() function.
The create_table_from_items() function now uses the
item->tmp_table_field_from_field_type() function to get the proper field
when the item is a function with a STRING result type.
libmysql/libmysql.c:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The client library now accepts the NEWDATE type as a string.
sql/item_cmpfunc.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
Now the fix_length_and_dec functions of the
Item_func_ifnull,Item_func_if, Item_func_case, Item_func_coalesce
classes are use agg_field_type function to find out the type of their
result field.
sql/item_cmpfunc.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The cached_field type is added to the Item_func_case, Item_func_if and
Item_func_coalesce classes.
The field_type function is added to the Item_func_ifnull, Item_func_if,
Item_func_coalesce, Item_func_case classes.
sql/item_func.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The Item_func_min_max::fix_length_and_dec function now uses the agg_field_type
function to find out the correct type of the result field.
sql/item_func.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The cached_field_type variable is added to the Item_func_min_max class.
sql/item_timefunc.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The result of the str_to_date function now defaults to the
DATETIME type.
sql/mysql_priv.h:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The prototype of the agg_field_type function is added.
sql/protocol.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The Protocol_simple::store function is now used to store fields of NEWDATE type.
sql/sql_insert.cc:
Bug#27216: functions with parameters of different date types may return wrong
type of the result.
The create_table_from_items function now uses the
tmp_table_field_from_field_type function to get field for items with the
STRING result type.
mysql-test/r/date_formats.result:
A test case result corrected after fixing bug#27216.
mysql-test/r/type_datetime.result:
Added a test case for the bug#27216: functions with parameters of different
date types may return wrong type of the result.
mysql-test/t/type_datetime.test:
Added a test case for the bug#27216: functions with parameters of different
date types may return wrong type of the result.
led to creating corrupted index.
While execution of the CREATE .. SELECT SQL_BUFFER_RESULT statement the
engine->start_bulk_insert function was called twice. On the first call
On the first call MyISAM disabled all non-unique indexes and on the second
call it decides to not re-enable them because all indexes was disabled.
Due to this no indexes was actually created during CREATE TABLE thus
producing crashed table.
Now the select_inset class has is_bulk_insert_mode flag which prevents
calling the start_bulk_insert function twice.
The flag is set in the select_create::prepare, select_insert::prepare2
functions and the select_insert class constructor.
The flag is reset in the select_insert::send_eof function.
mysql-test/t/insert_select.test:
A test case is added for the bug#30384: Having SQL_BUFFER_RESULT option in the
CREATE .. KEY(..) .. SELECT led to creating corrupted index.
mysql-test/r/insert_select.result:
A test case is added for the bug#30384: Having SQL_BUFFER_RESULT option in the
CREATE .. KEY(..) .. SELECT led to creating corrupted index.
sql/sql_class.h:
Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.
The is_bulk_insert_mode flag is added to the select_insert class.
sql/sql_insert.cc:
Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.
The is_bulk_insert_mode is set in the select_create::prepare, select_insert::prepare2
functions and the select_insert class constructor.
The flag is reset in the select_insert::send_eof function.
- Add extra insert
mysql-test/r/archive.result:
Add an extra insert to guarantee that the delayed
insert shows up in the table
mysql-test/t/archive.test:
Add an extra insert to guarantee that the delayed
insert shows up in the table
clean up SHOW GRANTS so it will show host-names with case as entered.
make REVOKE and friends case-sensitive to make things more intuitive.
Patch by Martin Friebe.
mysql-test/r/grant.result:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
clean up after test so random order of tests is possible
mysql-test/r/grant3.result:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
mysql-test/t/grant.test:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
clean up after test so random order of tests is possible
mysql-test/t/grant3.test:
Bug#19828: Case sensitivity in hostname leads to inconsistent behavior
Show that REVOKE, SHOW GRANTS etc. are now consistently case-sensitive.
Non-definer of a view was allowed to alter that view. Due to this the alterer
can elevate his access rights to access rights of the view definer and thus
modify data which he wasn't allowed to modify. A view defined with
SQL SECURITY INVOKER can't be used directly for access rights elevation.
But a user can first alter the view SQL code and then alter the view to
SQL SECURITY DEFINER and thus elevate his access rights. Due to this
altering a view with SQL SECURITY INVOKER is also prohibited.
Now the mysql_create_view function allows ALTER VIEW only to the view
definer or a super user.
mysql-test/t/view_grant.test:
Added a test case for the bug#29908: A user can gain additional access through the
ALTER VIEW.
A test case was adjusted after fixfing bug#29908.
mysql-test/r/view_grant.result:
Added a test case for the bug#29908: A user can gain additional access through the
ALTER VIEW.
sql/sql_view.cc:
Bug#29908: A user can gain additional access through the ALTER VIEW.
Now the mysql_create_view function allows ALTER VIEW only to the view
definer or a super user.
added get_field_default_value() function which obtains default value from the field
(used in store_create_info() & get_schema_column_record() functions)
mysql-test/r/alter_table.result:
result fix
mysql-test/r/create.result:
result fix
mysql-test/r/ctype_collate.result:
result fix
mysql-test/r/ctype_recoding.result:
result fix
mysql-test/r/default.result:
result fix
mysql-test/r/gis.result:
result fix
mysql-test/r/grant.result:
result fix
mysql-test/r/information_schema.result:
result fix
mysql-test/r/key.result:
result fix
mysql-test/r/mysql.result:
result fix
mysql-test/r/ps_1general.result:
result fix
mysql-test/r/show_check.result:
result fix
mysql-test/r/sp.result:
result fix
mysql-test/r/type_enum.result:
result fix
mysql-test/r/type_ranges.result:
result fix
mysql-test/t/information_schema.test:
test case
The optimizer sets index traversal in reverse order only if there are
used key parts that are not compared to a constant.
However using the primary key as an ORDER BY suffix rendered the check
incomplete : going in reverse order must still be used even if
all the parts of the secondary key are compared to a constant.
Fixed by relaxing the check and set reverse traversal even when all
the secondary index keyparts are compared to a const.
Also account for the case when all the primary keys are compared to a
constant.
mysql-test/r/innodb_mysql.result:
Bug #31001: test case
mysql-test/t/innodb_mysql.test:
Bug #31001: test case
sql/sql_select.cc:
Bug #31001:
- account for the case when all the primary key parts are compared
to a constant
- force test_if_skip_sort_order to go backwards over the key even
when the number of keyparts used is the same as the number of
keyparts equal to a constant. (because of the primary key
suffix).
- The bug was caused by COUNT(DISTINCT ...) code using Unique object in
a way that assumed that BIT(N) column occupies a contiguous space in
temp_table->record[0] buffer.
- The fix is to make COUNT(DISTINCT ...) code instruct create_tmp_table to
create temporary table with column of type BIGINT, not BIT(N).
mysql-test/r/type_bit.result:
BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results
- Testcase
mysql-test/t/type_bit.test:
BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results
- Testcase
sql/item_sum.cc:
BUG#30324: Grouping queries with COUNT(DISTINCT bit column) return wrong results
- Make COUNT(DISTINCT ...) code instruct create_tmp_table to create
temporary table with BIGINT, not BIT(N) column.
Declaring an all space column name in the SELECT FROM DUAL or in a view
leads to misleading warning message:
"Leading spaces are removed from name ' '".
The Item::set_name method has been modified to raise warnings like
"Name ' ' has become ''" in case of the truncation of an all
space identifier to an empty string identifier instead of the
"Leading spaces are removed from name ' '" warning message.
sql/item.cc:
Fixed bug #27695.
The Item::set_name method has been modified to raise warnings like
"Name ' ' has become ''" in case of the truncation of an all
space identifier to an empty string identifier instead of the
"Leading spaces are removed from name ' '" warning message.
sql/share/errmsg.txt:
Fixed bug #27695.
mysql-test/t/select.test:
Added test case for bug #27695.
mysql-test/r/select.result:
Added test case for bug #27695.
into mysql.com:/home/svoj/devel/mysql/BUG30590/mysql-5.0-engines
heap/hp_delete.c:
Auto merged
heap/hp_rfirst.c:
Auto merged
heap/hp_rnext.c:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/t/heap_btree.test:
Manual merge.
DELETE query against memory table with btree index may remove
not all matching rows. This happens only when DELETE uses
index read method to find matching rows. E.g. for queries
like DELETE FROM t1 WHERE a=1.
Fixed by reverting fix for BUG9719 and applying proper solution.
heap/hp_delete.c:
Reverted fix for BUG9719 as it makes queries like
DELETE FROM t1 WHERE a=1 to remove not all matching
rows (assuming this is memory table and there is btree
key over `a`).
This happens because we calculate info->lastkey_len in
heap_rkey(). When we enter heap_rnext(), info->lastkey_len
is 0 (set by hp_rb_delete_key()). We need to preserve
info->lastkey_len in this situation, otherwise
tree_search_key() will always return smallest value in
a tree.
heap/hp_rfirst.c:
If we're performing index_first on a table that was taken from
table cache, info->lastkey_len is initialized to previous query.
Thus we set info->lastkey_len to proper value for subsequent
heap_rnext() calls.
This is needed for DELETE queries only, otherwise this variable is
not used.
Note that the same workaround may be needed for heap_rlast(), but
for now heap_rlast() is never used for DELETE queries.
heap/hp_rnext.c:
An optimization for DELETE queries that use index_first()/index_next().
Use faster tree_search_edge() instead of tree_search_key().
mysql-test/r/heap_btree.result:
A test case for BUG#30590.
mysql-test/t/heap_btree.test:
A test case for BUG#30590.
in get_index_for_order(), don't walk over the end of the index key parts
when matching index description and needed ordering.
mysql-test/r/delete.result:
BUG#30385: Testcase
mysql-test/t/delete.test:
BUG#30385: Testcase
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 the
lengths of constants are correctly passed.
sql/udf_example.def:
Add new example functions to windows dll export list.
into weblab.(none):/home/marcsql/TREE/mysql-5.0-rt-merge
mysql-test/r/sp.result:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
DELETE FROM ... USING ... statements with the following type of
ambiguous aliasing gave unexpected results:
DELETE FROM t1 AS alias USING t1, t2 AS alias WHERE t1.a = alias.a;
This query would leave table t1 intact but delete rows from t2.
Fixed by changing DELETE FROM ... USING syntax so that only alias
references (as opposed to alias declarations) may be used in FROM.
mysql-test/r/delete.result:
Bug#30234: Test Result
mysql-test/t/delete.test:
Bug#30234: Test Case
sql/sql_yacc.yy:
Bug#30234:
- Added parser rule table_alias_ref_list that contains a list of table
aliases only.
- Added parser rule table_alias_ref that sets the TL_OPTION_ALIAS in
order to turn off semantic checking that applies only for table names.
Use view db name as thread default database, in order to ensure
that the view is parsed and prepared correctly.
mysql-test/r/sp.result:
test result
mysql-test/t/sp.test:
test case
sql/sql_parse.cc:
copy thd->db_length to table_list->db_length
sql/sql_view.cc:
Use view db name as thread default database, in order to ensure
that the view is parsed and prepared correctly.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
/*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.
The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
mysql-test/r/mysqldump-compat.result:
Added test case for bug #30126.
mysql-test/t/mysqldump-compat.opt:
Added test case for bug #30126.
mysql-test/t/mysqldump-compat.test:
Added test case for bug #30126.
sql/sql_parse.cc:
Fixed bug #30126.
The mysqldump client uses the "SHOW CREATE DATABASE" query to
obtain the "CREATE DATABASE" statement from that database.
The 4.x server doesn't recognise that query, and mysqldump
forms the "CREATE DATABASE" statement from scratch.
That statement was formed incorrectly.
To enforce the mysqldump client to create that statement from
scratch, debugging code has been added to the mysql_execute_command
function: in tcase of the --loose-debug=d,4x_server_emul option,
the server returns parse error to client to emulate old behaviour.
The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
client/mysqldump.c:
Fixed bug #30126.
The init_dumping_tables function has been modified to output semicolon
outside of commentaries.
Problem:
In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded.
Fix:
If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter).
This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting:
- Nested server-side and/or client-side comments are not supported by mysql.cc
- Using client-side macros in multi-line server-side comments is not supported
- All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server).
client/mysql.cc:
If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro.
mysql-test/r/mysql.result:
Added a test case for bug #30164.
mysql-test/t/mysql.test:
Added a test case for bug #30164.
comments)
Before this fix, the server would accept queries that contained comments,
even when the comments were not properly closed with a '*' '/' marker.
For example,
select 1 /* + 2 <EOF>
would be accepted as
select 1 /* + 2 */ <EOF>
and executed as
select 1
With this fix, the server now rejects queries with unclosed comments
as syntax errors.
Both regular comments ('/' '*') and special comments ('/' '*' '!') must be
closed with '*' '/' to be parsed correctly.
mysql-test/r/comments.result:
Unbalanced comments are a syntax error.
mysql-test/t/comments.test:
Unbalanced comments are a syntax error.
sql/sql_lex.cc:
Unbalanced comments are a syntax error.
seems to be converted as varbinary.
The bug has been already fixed. This CS just adds a test case for it.
mysql-test/r/sp.result:
Update result file.
mysql-test/t/sp.test:
Test case for BUG#13675.
into linux-st28.site:/home/martin/mysql/src/bugx/my50-bugx
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_select.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
SCCS merged
This is a performance bug, affecting in particular the bison generated code
for the parser.
Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
bit_expr -> bit_term
bit_term -> bit_factor
bit_factor -> value_expr
value_expr -> term
term -> factor
etc
This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.
With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.
Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.
See the bug report for performance data.
mysql-test/r/parser_precedence.result:
Improved test coverage for operator precedence
mysql-test/t/parser_precedence.test:
Improved test coverage for operator precedence
sql/sql_yacc.yy:
Simplified the grammar to improve performances
Currently the Last_query_cost session status variable shows
only the cost of a single flat subselect. For complex queries
(with subselects or unions etc) Last_query_cost is not valid
as it was showing the cost for the last optimized subselect.
Fixed by reseting to zero Last_query_cost when the complete
cost of the query cannot be determined.
Last_query_cost will be non-zero only for single flat queries.
mysql-test/r/status.result:
Bug #30377: test case
mysql-test/t/status.test:
Bug #30377: test case
sql/sql_lex.h:
Bug #30377: helper function
sql/sql_select.cc:
Bug #30377: don't assign cost if not on single level statement
- Merge sslaccept and sslconnect.
- Atomically "reset" vio to VIO_TYPE_SSL when the SSL connection has
succeeded, this avoids having to revert anything and thus protects
against "close_active_vio" in the middle.
- Add some variance to the testcase
mysql-test/t/rpl_ssl.test:
Add some variance by running two selects before stopping the slave
Check that number of records in t1 are equal on master and slave
vio/viossl.c:
Rewrite sslconnect and sslaccept to automically "reset" the vio
to VIO_TYPE_SSL. Also use the fd from 'SSL_get_fd' to avoid
setting vio->sd to -1, that previously occured when "close_active_vio"
was called during connect/accept.
Merge the two function since they were exactly the same except for one line.
Update the DBUG printouts to be generic(i.e use peer instead of client/server).
The optimization that uses a unique index to remove GROUP BY, did not
ensure that the index was actually used, thus violating the ORDER BY
that is impled by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
simply removed.
BitKeeper/etc/ignore:
Added support-files/mysqld_multi.server tests/bug25714 cscope.in.out cscope.out cscope.po.out to the ignore list
mysql-test/r/distinct.result:
Bug#30596: Changed test case.
Prior to Bug#16458, These queries use temp table and filesort. The
bug was that they used a temp table. However, that patch removed
filesort also, in which case we can no longer gurantee correct ordering.
mysql-test/r/group_by.result:
Bug#30596: Correct result
mysql-test/r/innodb_mysql.result:
Bug#30596: Test case for innodb. Here, as opposed to for MyISAM, row
lookup is done using index whenever the index covers the group list.
mysql-test/t/group_by.test:
Bug#30596: Test case
mysql-test/t/innodb_mysql.test:
Bug#30596: Test case
sql/sql_select.cc:
Bug#30596: The fix, replacing GROUP BY with ORDER BY unless
ORDER BY [NULL|<constant>]
If, after the tables are locked, one of the conditions to read from a
HANDLER table is not met, the handler code wrongly jumps to a error path
that won't unlock the tables.
The user-visible effect is that after a error in a handler read command,
all subsequent handler operations on the same table will hang.
The fix is simply to correct the code to jump to the (same) error path that
unlocks the tables.
mysql-test/r/handler.result:
Bug#30632 test case result
mysql-test/t/handler.test:
Bug#30632 test case
sql/sql_handler.cc:
Always unlock the internal and external table level locks if any of the conditions
(including errors) to read from a HANDLER table are not met.
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.
The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.
Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.
Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.
Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.
mysql-test/r/innodb-deadlock.result:
Bug#25164 test case result
mysql-test/t/innodb-deadlock.test:
Bug#25164 test case. The CREATE TABLE may fail depending on the character set
of the system and filesystem, but it should never hang.
sql/lock.cc:
Unlock the storage engine "external" table level locks, if the MySQL thr_lock
locking subsystem detects a deadlock error.
This is a performance bug, related to the parsing or 'OR' and 'AND' boolean
expressions.
Let N be the number of expressions involved in a OR (respectively AND).
When N=1
For example, "select 1" involve only 1 term: there is no OR operator.
In 4.0 and 4.1, parsing expressions not involving OR had no overhead.
In 5.0, parsing adds some overhead, with Select->expr_list.
With this patch, the overhead introduced in 5.0 has been removed,
so that performances for N=1 should be identical to the 4.0 performances,
which are optimal (there is no code executed at all)
The overhead in 5.0 was in fact affecting significantly some operations.
For example, loading 1 Million rows into a table with INSERTs,
for a table that has 100 columns, leads to parsing 100 Millions of
expressions, which means that the overhead related to Select->expr_list
is executed 100 Million times ...
Considering that N=1 is by far the most probable expression,
this case should be optimal.
When N=2
For example, "select a OR b" involves 2 terms in the OR operator.
In 4.0 and 4.1, parsing expressions involving 2 terms created 1 Item_cond_or
node, which is the expected result.
In 5.0, parsing these expression also produced 1 node, but with some extra
overhead related to Select->expr_list : creating 1 list in Select->expr_list
and another in Item_cond::list is inefficient.
With this patch, the overhead introduced in 5.0 has been removed
so that performances for N=2 should be identical to the 4.0 performances.
Note that the memory allocation uses the new (thd->mem_root) syntax
directly.
The cost of "is_cond_or" is estimated to be neglectable: the real problem
of the performance degradation comes from unneeded memory allocations.
When N>=3
For example, "select a OR b OR c ...", which involves 3 or more terms.
In 4.0 and 4.1, the parser had no significant cost overhead, but produced
an Item tree which is difficult to evaluate / optimize during runtime.
In 5.0, the parser produces a better Item tree, using the Item_cond
constructor that accepts a list of children directly, but at an extra cost
related to Select->expr_list.
With this patch, the code is implemented to take the best of the two
implementations:
- there is no overhead with Select->expr_list
- the Item tree generated is optimized and flattened.
This is achieved by adding children nodes into the Item tree directly,
with Item_cond::add(), which avoids the need for temporary lists and memory
allocation
Note that this patch also provide an extra optimization, that the previous
code in 5.0 did not provide: expressions are flattened in the Item tree,
based on what the expression already parsed is, and not based on the order
in which rules are reduced.
For example : "(a OR b) OR c", "a OR (b OR c)" would both be represented
with 2 Item_cond_or nodes before this patch, and with 1 node only with this
patch. The logic used is based on the mathematical properties of the OR
operator (it's associative), and produces a simpler tree.
sql/item_cmpfunc.h:
Improved performances for parsing boolean expressions
sql/sql_yacc.yy:
Improved performances for parsing boolean expressions
mysql-test/r/parser_precedence.result:
Added test cases to cover boolean operator precedence
mysql-test/t/parser_precedence.test:
Added test cases to cover boolean operator precedence
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
Although the query cache doesn't support retrieval of statements containing
column level access control, it was still possible to cache such statements
thus wasting memory.
This patch extends the access control check on the target tables to avoid
caching a statement with column level restrictions.
Views are excepted and can be cached but only retrieved by super user account.
mysql-test/t/query_cache_with_views.test:
Rename: mysql-test/t/view_query_cache.test -> mysql-test/t/query_cache_with_views.test
mysql-test/r/query_cache_with_views.result:
Rename: mysql-test/r/view_query_cache.result -> mysql-test/r/query_cache_with_views.result
mysql-test/r/query_cache.result:
Modified test case to allow caching of views
mysql-test/t/query_cache.test:
Modified test case to allow caching of views
sql/sql_cache.cc:
Allow caching of views
added SUPER_ACL check for I_S.TRIGGERS
mysql-test/r/information_schema.result:
result fix
mysql-test/r/information_schema_db.result:
result fix
mysql-test/t/information_schema.test:
test case
sql/sql_show.cc:
added SUPER_ACL check for I_S.TRIGGERS
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
mysql-test/r/query_cache.result:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
Although the query cache doesn't support retrieval of statements containing
column level access control, it was still possible to cache such statements
thus wasting memory.
This patch extends the access control check on the target tables to avoid
caching a statement with column level restrictions.
mysql-test/r/query_cache.result:
Added test
mysql-test/t/query_cache.test:
Added test
sql/sql_cache.cc:
The function check_table_access leaves the artifact
grant.want_privileges= 1, if a statement refers to tables with column level
privileges. To avoid the statement from being stored into the query cache,
it is enough to check this flag and set 'safe_to_cache_query' to zero.
sql/sql_cache.h:
- Removed 'static' attribute or class methods
- Added THD parameter to process_and_count_tables
HEAP tables can't index BIT fields. Due to this when grouping by such fields is
needed they are converted to a fields of the LONG type when temporary table
is being created. But a side effect of this is that a wrong type of BIT
fields is returned to a client.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
mysql-test/t/type_bit.test:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
mysql-test/r/type_bit.result:
Added a test case for the bug#30245: A wrong type of a BIT field is reported when grouped by it.
sql/sql_select.cc:
Bug#30245: A wrong type of a BIT field is reported when grouped by it.
Now the JOIN::prepare and the create_distinct_group functions are create
additional hidden copy of BIT fields to preserve original fields untouched.
New hidden fields are used for grouping instead.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
mysql-test/r/select.result:
Added a test case for bug #30396.
mysql-test/t/select.test:
Added a test case for bug #30396.
sql/item_cmpfunc.h:
Removed max_members from the COND_EQUAL class as not useful anymore.
sql/sql_base.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.cc:
Added the max_equal_elems field to the st_select_lex structure.
sql/sql_lex.h:
Added the max_equal_elems field to the st_select_lex structure.
The field contains the maximal number of elements in multiple equalities
built for the query conditions.
sql/sql_select.cc:
Fixed bug #30396.
The bug caused memory corruption for some queries with top OR level
in the WHERE condition if they contained equality predicates and
other sargable predicates in disjunctive parts of the condition.
The corruption happened because the upper bound of the memory
allocated for KEY_FIELD and SARGABLE_PARAM internal structures
containing info about potential lookup keys was calculated incorrectly
in some cases. In particular it was calculated incorrectly when the
WHERE condition was an OR formula with disjuncts being AND formulas
including equalities and other sargable predicates.
The max_equal_elems field to the st_select_lex structure is used now
to calculate the above mentioned upper bound. The field contains the
maximal number of elements in multiple equalities built for the query
conditions.
mysql_ha_open calls mysql_ha_close on the error path (unsupported) to close the (opened) table before inserting it into the tables hash list handler_tables_hash) but mysql_ha_close only closes tables which are on the hash list, causing the table to be left open and locked.
This change moves the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close (mysql_ha_close).
mysql-test/r/handler.result:
Bug#25856 test result
mysql-test/t/handler.test:
Bug#25856 test case
sql/sql_handler.cc:
Move the table close logic into a separate function that is always called on the error path of mysql_ha_open or on a normal handler close
ORDER BY is used
The range analysis module did not correctly signal to the
handler that a range represents a ref (EQ_RANGE flag). This causes
non-range queries like
SELECT ... FROM ... WHERE keypart_1=const, ..., keypart_n=const
ORDER BY ... FOR UPDATE
to wait for a lock unneccesarily if another running transaction uses
SELECT ... FOR UPDATE on the same table.
Fixed by setting EQ_RANGE for all range accesses that represent
an equality predicate.
mysql-test/r/innodb_mysql.result:
bug#28570: Test Result
mysql-test/t/innodb_mysql.test:
bug#28570: Test Case
sql/handler.cc:
bug#28570: Updated comment
sql/opt_range.cc:
bug#28570: Removed the criterion that key has to be unique (HA_NOSAME) in
order for the EQ_RANGE flag to be set. It is sufficient that the range
represent a ref access.
ChangeSet@1.2575, 2007-08-07 19:16:06+02:00, msvensson@pilot.(none) +2 -0
Bug#26793 mysqld crashes when doing specific query on information_schema
- Drop the newly created user user1@localhost
- Cleanup testcase
mysql-test/r/ndb_bug26793.result:
mysql-test/r/ndb_bug26793.result@1.3, 2007-08-07 19:16:04+02:00, msvensson@pilot.(none)
+1 -6
Update test result
mysql-test/t/ndb_bug26793.test:
mysql-test/t/ndb_bug26793.test@1.3, 2007-08-07 19:16:04+02:00, msvensson@pilot.(none) +8
-11
- Remove the drop/restore of anonymous users - there are no such users
by default anymore(if there were, they would probably be in mysql.user)
- Switch back to default connection before cleanup
- Drop user1@localhost as part of cleanup
Write test results to var/log
Add test for "source" and variable expansion
client/mysqltest.c:
Improve error messages
Write .reject file to the location specified by --logdir
mysql-test/mysql-test-run.pl:
Pass logdir to mysqltest, to get test results written to var/log
mysql-test/r/mysqltest.result:
Update test results
mysql-test/t/mysqltest.test:
Add test for "source" and variable expansion
Update test after writing result in var/log
also fix "while" and "connect"
It's now possible to write "if("
client/mysqltest.c:
Don't require a space between for example "if" and "(". This should
also fix "while" and "connect"
mysql-test/t/mysqltest.test:
Remove space between if and ( to check it works
into pilot.(none):/data/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
client/mysqltest.c:
- Remove the extra newline first in the file produced by
write_file and append_file
- Add check for too many arguments passed to 'check_command_args'
mysql-test/r/mysqltest.result:
Update test result
mysql-test/t/mysqltest.test:
Add test to check that no extra newline is created
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/item.cc:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Twiddle the "replicaCount" and "fragCount" variable when restore data from different endian.
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Add byte order variable
ndb/tools/restore/Restore.cpp:
Twiddle blob, datatime,timestamp when do restore in different endian.
mysql-test/r/ndb_restore_different_endian_data.result:
Test case result for restore data from different endian
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1-0.1.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1-0.2.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.1.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.1.log:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.2.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.2.log:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1-0.1.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1-0.2.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.1.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.1.log:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.2.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.2.log:
Test case data
mysql-test/t/ndb_restore_different_endian_data.test:
Test case for restore data from different endian
under terms of bug#28875 for better performance.
The change appeared to require more changes in item_cmpfunc.cc,
which is dangerous in 5.0.
Conversion between a latin1 column and an ascii string constant
stopped to work.
mysql-test/r/ctype_recoding.result:
Adding test case.
mysql-test/t/ctype_recoding.test:
Adding test case.
into pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/mysqltest.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
- Update comments
- Make "write_file" fail if file already exist
- Remove temporary files created by test cases
client/mysqltest.c:
Improve function comments
Make write_file fail if file already exist
mysql-test/r/mysqltest.result:
Update test result after adding new test and updating description
of argumements to chmod
mysql-test/t/bootstrap.test:
Remove temporary file created by testcase
mysql-test/t/mysql.test:
Remove temporary file created by testcase
mysql-test/t/mysqladmin.test:
Remove temporary file created by testcase
mysql-test/t/mysqltest.test:
Remove temporary file created by testcase
Add test to show that "write_file" fails if file already exist
mysql-test/t/sp-destruct.test:
Remove temporary file created by testcase
Two character mappings were way off (backtick and tilde were "E"
and "Y"!), and three others were slightly rotated. The first
would cause collisions, and the latter was probably benign.
Now, assign the character mappings exactly to their normal values.
sql/share/charsets/ascii.xml:
Change the character mapping for
"`" to "`" (was "E") and
"[" to "[" (was "\") and
"\" to "\" (was "]") and
"]" to "]" (was "[") and
"~" to "~" (was "Y").
strings/ctype-extra.c:
Generated from charsets directory.
mysql-test/r/ctype_ascii.result:
Add new test file.
Test all combinations of printable letter comparisons for
similarity.
mysql-test/t/ctype_ascii.test:
Add new test file.
Test all combinations of printable letter comparisons for
similarity.
MySQL replicates the time zone only when operations that involve
it are performed. This is controlled by a flag. But this flag
is set only on successful operation.
The flag must be set also when there is an error that involves
a timezone (so the master would replicate the error to the slaves).
Fixed by moving the setting of the flag before the operation
(so it apples to errors as well).
mysql-test/r/rpl_timezone.result:
Bug #29536: test case
mysql-test/t/rpl_timezone.test:
Bug #29536: test case
sql/field.cc:
Bug #29536: move setting of the flag before the operation
(so it apples to errors as well).
sql/time.cc:
Bug #29536: move setting of the flag before the operation
(so it apples to errors as well).
Update comments
Add more tests for "let from query"
client/mysqltest.c:
Remove NOT_YET code
Update comments
mysql-test/r/mysqltest.result:
Add more tests for "let from query"
mysql-test/t/mysqltest.test:
Add more tests for "let from query"
into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
This bug manifested itself for queries with grouping by columns of
the BIT type. It led to wrong comparisons of bit-field values and
wrong result sets.
Bit-field values never cannot be compared as binary values. Yet
the class Field_bit had an implementation of the cmp method that
compared bit-fields values as binary values.
Also the get_image and set_image methods of the base class Field
cannot be used for objects of the Field_bit class.
Now these methods are declared as virtual and specific implementations
of the methods are provided for the class Field_bit.
mysql-test/r/type_bit.result:
Added a test case for bug #30219.
mysql-test/t/type_bit.test:
Added a test case for bug #30219.
sql/field.h:
Fix bug #30219.
This bug manifested itself for queries with grouping by columns of
the BIT type. It led to wrong comparisons of bit-field values and
wrong result sets.
Bit-field values never cannot be compared as binary values. Yet
the class Field_bit had an implementation of the cmp method that
compared bit-fields values as binary values.
Also the get_image and set_image methods of the base class Field
cannot be used for objects of the Field_bit class.
Now these methods are declared as virtual and specific implementations
of these methods are provided for the class Field_bit.
into dl145h.mysql.com:/data0/mkindahl/mysql-5.0-2team
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
A test case was waiting for a fixed number of seconds for a specific
state of the slave IO thread to take place.
Fixed by waiting in a loop for that specific thread state instead
(or timeout).
mysql-test/t/rpl_relayspace.test:
Bug #25228: fixed test case
- Move the code to generate test report to the test tool(in this
case mysqltest) where the best control of what failed is
- Simplify the code in mysql-test-run.pl
- mysqltest will now find what diff to use in a best effort attempt
using "diff -u", "diff -c" and finally dumping the two files verbatim
in the report.
client/mysqltest.c:
- Add new option --tail-lines indicating how many lines of the result to output
when generating report for a failure
- Remove eval_result, noone knows what it should do and it's not used.
- Add support for best effort execution of systems builtin "diff",
try with "diff -u" and "diff -c" and if that fails dump the whole content
of teh two files to report
- Use one common function when comapring two files, used when test
has completed and the result should be compared to the .result file
as well as using it from myqltest's builtin diff_files command.
- Output the last lines og the result so far in the report that mysqltest
generates in case of a test failure.
mysql-test/lib/mtr_report.pl:
- Remove code for generating diff between .reject and .result file,
that is handled by mysqltest(or the test tool) from now on.
- Add better comments
mysql-test/mysql-test-run.pl:
- Remove the --udiff flag to mysql-test-run.pl, if the systems diff supports
unified diff it will be used automatically
- Remove the code for "mtr_show_failed_diff", the report from mysqltest
will know include the diff so if mysqltest(or another test tool)
fails, just display it's report what went wrong
- Pass --tail-lines=20 to mysqltest to it will shos the last 20 lines
from the result in the report in case of failure.
mysql-test/r/mysqltest.result:
Update result file now when the output from mysqltest has been sent to /dev/null
mysql-test/t/mysqltest.test:
- Improve tests for --diff_files
- Remove temporary files in var/tmp generated in the fly
- Send output from test for --diff_files to /deb/null since only the error
code it returns are of interest and tyhe outpu may vary depending
on what builtin diff is being used.
into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
strings/conf_to_src.c:
Auto merged
strings/ctype-extra.c:
Auto merged
mysql-test/r/ctype_ucs.result:
After merge fix
mysql-test/t/ctype_ucs.test:
After merge fix
(Regression, caused by a patch for the bug 22646).
Problem: when result type of date_format() was changed from
binary string to character string, mixing date_format()
with a ascii column in CONCAT() stopped to work.
Fix:
- adding "repertoire" flag into DTCollation class,
to mark items which can return only pure ASCII strings.
- allow character set conversion from pure ASCII to other character sets.
include/m_ctype.h:
Defining new flags.
Adding new function prototypes.
mysql-test/r/ctype_ucs.result:
Adding tests.
mysql-test/r/ctype_utf8.result:
Adding tests.
mysql-test/r/func_time.result:
Adding tests.
mysql-test/t/ctype_ucs.test:
Adding tests.
mysql-test/t/ctype_utf8.test:
Adding tests.
mysql-test/t/func_time.test:
Adding test.
mysys/charset.c:
Adding pure ASCII detection when loading a dynamic character set.
sql/item.cc:
- Moving detection of a Unicode superset into function.
- Adding detection of a ASCII subset.
- Adding creation of to-ASCII character set convertor when
safe_charset_converter() failed and when the argument.
repertoire is know to be pure ASCII.
sql/item.h:
- Adding "repertoire" member into DTCollation class.
- Adding "repertoire" argument to constructors.
- Adding new methods:
set_repertoire_from_charset()
set_repertoire_from_value()
sql/item_func.cc:
Adding "repertoire" argument.
sql/item_strfunc.cc:
Adding "repertoire" argument.
sql/item_timefunc.cc:
Initializing the result repertoire taking into account the "is_ascii"
flag of the current locale.
sql/sql_lex.cc:
Detect 7bit strings, return in Lex->text_string_is_7bit.
sql/sql_lex.h:
Adding new member into LEX structure.
Adding new member into Lex_input_stream
sql/sql_string.cc:
Allow simple copy from pure ASCII to a ASCII-based character set.
sql/sql_yacc.yy:
Depening on Lex->text_string_is_7bit and character set features,
create Item_string with MY_REPERTOIRE_ASCII when it is possible.
strings/conf_to_src.c:
- Adding printing of the "MY_CS_PUREASCII" flag
- Adding printing of copyright
strings/ctype-extra.c:
Recreating ctype-extra.c: ascii_general_ci and ascii_bin
are now marked with MY_CS_PUREASCII flag.
strings/ctype.c:
Adding new functions.
The SELECT query with more than 31 nested dependent SELECT queries returned
wrong result.
New error message has been added: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT.
It will be reported as: "Too high level of nesting for select".
sql/sql_parse.cc:
Fixed bug #27352.
The Item_sum::register_sum_func method has been modified to return
TRUE on exceeding of allowed level of SELECT nesting and to report
corresponding error message.
sql/unireg.h:
Fixed bug #27352.
Constant definition has been added: maximal allowed level of SELECT nesting.
mysql-test/t/select.test:
Updated test case for bug #27352.
mysql-test/r/select.result:
Updated test case for bug #27352.
sql/share/errmsg.txt:
Fixed bug #27352.
New error message has been added: ER_TOO_HIGH_LEVEL_OF_NESTING_FOR_SELECT.
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
sql/handler.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into ramayana.hindu.god:/home/tsmith/m/bk/maint/50
mysql-test/r/federated.result:
Auto merged
mysql-test/t/federated.test:
Auto merged
sql/ha_federated.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
error 1159 ' ' (fixed by the patch for Bug 25679)
mysql-test/r/federated.result:
Update results (Bug#18287)
mysql-test/t/federated.test:
Add a test case for Bug#18287 create federated table always times out,
error 1159 ' '
restores from mysqlbinlog out
Problem: using "mysqlbinlog | mysql" for recoveries the connection_id()
result may differ from what was used when issuing the statement.
Fix: if there is a connection_id() in a statement, write to binlog
SET pseudo_thread_id= XXX; before it and use the value later on.
mysql-test/r/mysqlbinlog.result:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- test result.
mysql-test/t/mysqlbinlog.test:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- test case.
sql/item_create.cc:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- set thread_specific_used flag for the connection_id() function.
sql/item_func.cc:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- always return thd->variables.pseudo_thread_id as a connection_id()
result, as it contains a proper value for both master and slave.
sql/log_event.cc:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- set LOG_EVENT_THREAD_SPECIFIC_F event flag if thread_specific_used
is set.
sql/sql_class.cc:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- thd->thread_specific_used introduced, which is set if thread specific
value(s) used in a statement.
sql/sql_class.h:
Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out
- thd->thread_specific_used introduced, which is set if thread specific
value(s) used in a statement.
mysql-test/r/func_time.result:
Update results (use fixed datetime values instead of NOW()).
mysql-test/t/func_time.test:
Use fixed datetime values instead of NOW(): the test would have a sporadic
failure when current day changed between two consequtive calls to
NOW(). The test actually tests FROM_DAYS/TO_DAYS functions,
so use of NOW() is not necessary.
- test result.
Problem: we don't proper handle "" value of the --myisam-recover option.
Fix: turn off myisam recovering if --myisam-recover="" is set.
mysql-test/r/show_check.result:
Fix for bug #30088: Can't disable myisam-recover by a value of "".
- test result.
mysql-test/t/show_check-master.opt:
Fix for bug #30088: Can't disable myisam-recover by a value of "".
- test case.
mysql-test/t/show_check.test:
Fix for bug #30088: Can't disable myisam-recover by a value of "".
- test case.
sql/mysqld.cc:
Fix for bug #30088: Can't disable myisam-recover by a value of "".
- turn off myisam recovering if --myisam-recover="" is passed.
into bodhi.(none):/opt/local/work/mysql-5.0-runtime
client/mysqldump.c:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
sql/sql_base.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/t/innodb_mysql.test:
Manual merge.
sql/sql_table.cc:
Manual merge.
into magare.gmz:/home/kgeorge/mysql/autopush/B27417-5.0-opt
sql/handler.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
SELECT statement itself returns empty.
As a result of this bug 'SELECT AGGREGATE_FUNCTION(fld) ... GROUP BY'
can return one row instead of an empty result set.
When GROUP BY only has fields of constant tables
(with a single row), the optimizer deletes the group_list.
After that we lose the information about whether we had an
GROUP BY statement. Though it's important
as SELECT min(x) from empty_table; and
SELECT min(x) from empty_table GROUP BY y; have to return
different results - the first query should return one row,
second - an empty result set.
So here we add the 'group_optimized_away' flag to remember this case
when GROUP BY exists in the query and is removed
by the optimizer, and check this flag in end_send_group()
mysql-test/r/group_by.result:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test result
mysql-test/r/insert_select.result:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test result
mysql-test/t/group_by.test:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
This is additional testcase that is more basic than the
original bug's testcase and has the same reason.
mysql-test/t/insert_select.test:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
test case
sql/sql_select.cc:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
Remember the 'GROUP BY was optimized away' case in the JOIN::group_optimized
and check this in the end_send_group()
sql/sql_select.h:
Bug #29717 INSERT INTO SELECT inserts values even if
SELECT statement itself returns empty.
JOIN::group_optimized member added to remember the 'GROUP BY optimied away'
case
Bug #27417 thd->no_trans_update.stmt lost value inside of SF-exec-stack
Once had been set the flag might later got reset inside of a stored routine
execution stack.
The reason was in that there was no check if a new statement started at time
of resetting.
The artifact affects most of binlogable DML queries. Notice, that multi-update
is wrapped up within
bug@27716 fix, multi-delete bug@29136.
Fixed with saving parent's statement flag of whether the statement modified
non-transactional table, and unioning (merging) the value with that was gained
in mysql_execute_command.
Resettling thd->no_trans_update members into thd->transaction.`member`;
Asserting code;
Effectively the following properties are held.
1. At the end of a substatement thd->transaction.stmt.modified_non_trans_table
reflects the fact if such a table got modified by the substatement.
That also respects THD::really_abort_on_warnin() requirements.
2. Eventually thd->transaction.stmt.modified_non_trans_table will be computed as
the union of the values of all invoked sub-statements.
That fixes this bug#27417;
Computing of thd->transaction.all.modified_non_trans_table is refined to base to
the stmt's value for all the case including insert .. select statement which
before the patch had an extra issue bug@28960.
Minor issues are covered with mysql_load, mysql_delete, and binloggin of insert in
to temp_table select.
The supplied test verifies limitely, mostly asserts. The ultimate testing is defered
for bug@13270, bug@23333.
mysql-test/r/mix_innodb_myisam_binlog.result:
results changed
mysql-test/t/mix_innodb_myisam_binlog.test:
regression test incl the related bug#28960.
sql/ha_ndbcluster.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/handler.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/handler.h:
new member added
sql/log.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/set_var.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/sp_head.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
and saving and merging stmt's flag at the end of a substatement.
sql/sql_class.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/sql_class.h:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/sql_delete.cc:
correcting basic delete incl truncate branch and multi-delete queries to set
stmt.modified_non_trans_table;
optimization to set the flag at the end of per-row loop;
multi-delete still has an extra issue similar to bug#27716 of multi-update
- to be address with bug_29136 fix.
sql/sql_insert.cc:
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/sql_load.cc:
eliminating a separate issue where the stmt flag was saved and re-stored after
write_record that actually could change it and the change would be lost but
should remain permanent;
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
sql/sql_parse.cc:
initialization to transaction.stmt.modified_non_trans_table at the common part
of all types of statements processing - mysql_execute_command().
sql/sql_table.cc:
moving the reset up to the mysql_execute_command() caller
sql/sql_update.cc:
correcting update query case (multi-update part of the issues covered by other
bug#27716 fix)
thd->transaction.{all,stmt}.modified_non_trans_table
instead of
thd->no_trans_update.{all,stmt}
into moonbone.local:/mnt/gentoo64/work/24989-bug-5.0-opt-mysql
sql/ha_innodb.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
When innodb detects a deadlock it calls ha_rollback_trans() to rollback the
main transaction. But such action isn't allowed from inside of triggers and
functions. When it happen the 'Explicit or implicit commit' error is thrown
even if there is no commit/rollback statements in the trigger/function. This
leads to the user confusion.
Now the convert_error_code_to_mysql() function doesn't call the
ha_rollback_trans() function directly but rather calls the
mark_transaction_to_rollback function and returns an error.
The sp_rcontext::find_handler() now doesn't allow errors to be caught by the
trigger/function error handlers when the thd->is_fatal_sub_stmt_error flag
is set. Procedures are still allowed to catch such errors.
The sp_rcontext::find_handler function now accepts a THD handle as a parameter.
The transaction_rollback_request and the is_fatal_sub_stmt_error flags are
added to the THD class. The are initialized by the THD class constructor.
Now the ha_autocommit_or_rollback function rolls back main transaction
when not in a sub statement and the thd->transaction_rollback_request
is set.
The THD::restore_sub_statement_state function now resets the
thd->is_fatal_sub_stmt_error flag on exit from a sub-statement.
sql/ha_innodb.cc:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
Now the convert_error_code_to_mysql() function doesn't call the
ha_rollback_trans() function directly but rather calls the
mark_transaction_to_rollback function and returns an error.
sql/handler.cc:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
Now the ha_autocommit_or_rollback function rolls back main transaction
when not in a sub statement and the thd->transaction_rollback_request
is set.
mysql-test/r/innodb-big.result:
Added a test case for the bug#24989: The DEADLOCK error is improperly handled by
InnoDB.
mysql-test/t/innodb-big.test:
Added a test case for the bug#24989: The DEADLOCK error is improperly handled by
InnoDB.
sql/sql_class.h:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
The transaction_rollback_request and the is_fatal_sub_stmt_error flags are
added to the THD class.
sql/sql_class.cc:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
Initialization of the transaction_rollback_request and the
is_fatal_sub_stmt_error flags are added to the THD class constructor.
The mark_transaction_to_rollback function is added.
The THD::restore_sub_statement_state function now resets the
thd->is_fatal_sub_stmt_error flag on exit from a sub-statement.
sql/sp_rcontext.h:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
The sp_rcontext::find_handler function now accepts a THD handle as a parameter.
The in_sub_stmt flag is added to the sp_rcontext class.
sql/sp_rcontext.cc:
Bug#24989: The DEADLOCK error is improperly handled by InnoDB.
The sp_rcontext::find_handler() now doesn't allow errors to be caught by the
trigger/function error handlers when the thd->is_fatal_sub_stmt_error flag
is set. Instead it tries to find a most inner procedure that isn't called
directly or indirectly from any function/trigger.
Procedures are still allowed to catch such errors.
The sp_rcontext::find_handler function now accepts a THD handle as a parameter.
SP with local variables with non-ASCII names crashed the server.
The server replaces SP local variable names with NAME_CONST calls
when putting statements into the binary log. It used UTF8-encoded
item names as variable names for the replacement inside NAME_CONST
calls. However, statement string may be encoded by any
known character set by the SET NAMES statement.
The server used byte length of UTF8-encoded names to increment
the position in the query string that led to array index overrun.
sql/item.cc:
Fixed bug #30120.
The Item_splocal class constructor has been modified to
accept new parameter `len_in_q': the byte length of
variable name in the query string.
sql/item.h:
Fixed bug #30120.
The Item_splocal class has been modified to keep new
field `len_in_query': the byte length of variable name in
the query string.
sql/sp_head.cc:
Fixed bug #30120.
The subst_spvars function has been modified to increment
position in the query string by the lengths of not
encoded variable names instead of byte length of names
encoded to UTF-8.
sql/sql_yacc.yy:
Fixed bug #30120.
The simple_ident rule action has been modified to
pass the byte length of the local variable name token
to the Item_splocal object constructor.
mysql-test/t/sp.test:
Updated test case for bug #30120.
mysql-test/r/sp.result:
Updated test case for bug #30120.
into gleb.loc:/home/uchum/work/bk/5.0-opt
sql/sql_base.cc:
Auto merged
mysql-test/r/sp.result:
Merge with local tree.
mysql-test/t/sp.test:
Merge with local tree.
Using view columns by their names during an execution of
a prepared SELECT statement or a SELECT statement inside
a SP caused a memory leak.
sql/sql_base.cc:
Fixed bug #29834.
The find_field_in_view function has been modified to
use the execution memory root for the Item_direct_view_ref
objects allocation at non-first executions of
a PS/SP instead of the statement memory.
mysql-test/t/sp.test:
Updated test case for bug #29834.
mysql-test/r/sp.result:
Updated test case for bug #29834.
information schema table.
The get_schema_views_record() function fills records in the view table of
the informations schema with data about given views. Among other info
the is_updatable flag is set. But the check whether the view is updatable or
not wasn't covering all cases thus sometimes providing wrong info.
This might led to a user confusion.
Now the get_schema_views_record function additionally calls to the
view->can_be_merge() function to find out whether the view can be updated or
not.
mysql-test/t/view.test:
Added a test case for the bug#30020: Insufficient check led to a wrong info
provided by the information schema table.
mysql-test/r/view.result:
Added a test case for the bug#30020: Insufficient check led to a wrong info
provided by the information schema table.
sql/sql_show.cc:
Bug#30020: Insufficient check led to a wrong info provided by the
information schema table.
Now the get_schema_views_record function additionally calls to the
view->can_be_merge() function to find out whether the view can be updated or
not.
The subst_spvars function is used to create query string with SP variables
substituted with their values. This string is used later for the binary log
and for the query cache. The problem is that the
query_cache_send_result_to_client function requires some additional space
after the query to store database name and query cache flags. This
space wasn't reserved by the subst_spvars function which led to a memory
corruption and crash.
Now the subst_spvars function reserves additional space for the query cache.
mysql-test/t/query_cache.test:
Added a test case for the bug#29856: Insufficient buffer space led to a server crash.
mysql-test/r/query_cache.result:
Added a test case for the bug#29856: Insufficient buffer space led to a server crash.
sql/sp_head.cc:
Bug#29856: Insufficient buffer space led to a server crash.
Now the subst_spvars function reserves additional space for the query cache.