For a join query with GROUP BY and/or ORDER BY and a view reference
in the FROM list the metadata erroneously showed empty table aliases
and database names for the view columns.
sql/item.h:
Fixed bug #28898.
Body of Item_ref::get_tmp_table_item method has been moved
to item.cc file.
mysql-test/t/metadata.test:
Updated test case for bug #28898.
sql/item.cc:
Fixed bug #28898.
The Item_ref::get_tmp_table_item method has been modified
to copy pointers to the table alias and database name to the new
Item_field object created for a field stored in the temporary
table.
mysql-test/r/metadata.result:
Updated test case for bug #28898.
sql/sql_select.cc:
Fixed bug #28898.
The change_to_use_tmp_fields function has been modified to
to copy pointers to the table alias and database name from
the Item_ref objects to the new Item_field objects created
for fields stored in the temporary table.
counters from relay
Updated the test to return columns vertically.
mysql-test/r/rpl_change_master.result:
Bug #29116: test updated
mysql-test/t/rpl_change_master.test:
Bug #29116: test updated
- Add test case for this already existing feature
mysql-test/r/mysqltest.result:
Update result file
mysql-test/t/mysqltest.test:
Add test case for this feature
- Move binlog related tests to binlog_innodb.test
- Remove "source include/have_log_bin.inc" from innodb.test
mysql-test/r/innodb.result:
Move binlog related tests to binlog_innodb.test
mysql-test/t/innodb.test:
Move binlog related tests to binlog_innodb.test
mysql-test/r/binlog_innodb.result:
Move binlog related tests to binlog_innodb.test
mysql-test/t/binlog_innodb.test:
Move binlog related tests to binlog_innodb.test
we use net->vio in my_net_local_init, but in the my_net_init
implementation we set it after the call, so work with unspecified
net->vio value
sql/net_serv.cc:
Bug #29117 (init_file test crashes with embedded server)
as we started using net->vio in my_net_local_init, we should set
it before the call
Fixed runtime to no longer allow the caching of queries with UDF calls.
mysql-test/r/udf.result:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
mysql-test/t/udf.test:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
sql/sql_yacc.yy:
Fixed code to set safe_to_cache_query=0 regardless if the function call is a UDF or SP. Where it was placed previously -- at the very end of the else testing for UDFs -- it only executed the statement if the function call was a stored procedure call.
Changed code to enforce that SQL_CACHE only in the first SELECT is used to turn on caching(as documented), but any SQL_NO_CACHE will turn off caching (not documented, but a useful behaviour, especially for machine generated queries). Added test cases to explicitly test the documented caching behaviour and test cases for the reported bug.
mysql-test/r/query_cache.result:
Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query.
Also added a bug specific test case to validate that the buggy behavior as reported has been fixed.
mysql-test/t/query_cache.test:
Added non-bug specific tests that ensure that only SQL_CACHE in the first SELECT is respected when encountered by the parser. These tests validate what is already documented, that only the outer most SELECTS can use the SQL_CACHE option to turn on caching. Because it would break existing SQL applications, we do not return an error if the SQL_CACHE expression is found in nested SELECTs. Also added test to validate nested SELECT can contain SQL_NO_CACHE and it will always turn off caching for the whole query.
Also added a bug specific test case to validate that the buggy behavior as reported has been fixed.
sql/sql_yacc.yy:
Added an explicit check to make sure "SELECT SQL_CACHE" only works on the first select in a query.
The parser will always hit the outermost SELECT first, and if the SQL_CACHE option is found it sets the safe_to_query flag in the lex. Then, if there are subseqent "uncachable" subqueries or functions, as it parses those elements it sets the safe_to_query to 0. However, this cause problems if nested SELECTs also used the SQL_CACHE option, because then it would set back safe_to_query to 1, even though there are uncacheable expressions previously parsed.
By adding the check to ensure only the first SELECT can turn caching on, it means a subsequent SQL_CACHE option can't turn caching back on after a uncacheable subsequery was already encountered.
into trift2.:/MySQL/M50/push-5.0
libmysqld/libmysqld.def:
Auto merged
VC++Files/mysql.sln:
Fix for "vio" seems not to be applicable in 5.0.
VC++Files/mysqldemb/mysqldemb.vcproj:
5.0 differs too much from 4.1 to merge this up,
also in 5.0 we use "cmake" now.
VC++Files/sql/mysqld.vcproj:
The fix in 4.1 was a backport, no use to merge it upwards.
represented by an expression of the type UNSIGNED INT and this
expression was evaluated to 0 then the function erroneously returned
the value of the first argument instead of an empty string.
This problem was introduced by the patch for bug 10963.
The problem has been resolved by a proper modification of the code of
Item_func_substr::val_str.
mysql-test/r/func_str.result:
Added a test case for bug #27130.
mysql-test/t/func_str.test:
Added a test case for bug #27130.