mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_list.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
of untouched rows in full table scans".
SELECT ... FOR UPDATE/LOCK IN SHARE MODE statements as well as
UPDATE/DELETE statements which were executed using full table
scan were not releasing locks on rows which didn't satisfy
WHERE condition.
This bug surfaced in 5.0 and affected NDB tables. (InnoDB tables
intentionally don't support such unlocking in default mode).
This problem occured because code implementing join didn't call
handler::unlock_row() for rows which didn't satisfy part of condition
attached to this particular table/level of nested loop. So we solve
the problem adding this call.
Note that we already had this call in place in 4.1 but it was lost
(actually not quite correctly placed) when we have introduced nested
joins.
Also note that additional QA should be requested once this patch is
pushed as interaction between handler::unlock_row() and many recent
MySQL features such as subqueries, unions, views is not tested enough.
mysql-test/r/ndb_lock.result:
Enabled back part of the test that covers bug #20390 "SELECT FOR
UPDATE does not release locks of untouched rows in full table scans".
Adjusted test in such way that it now covers both execution paths
in which we unlock non-matching rows inspected during table scan.
mysql-test/t/ndb_lock.test:
Enabled back part of the test that covers bug #20390 "SELECT FOR
UPDATE does not release locks of untouched rows in full table scans".
Adjusted test in such way that it now covers both execution paths
in which we unlock non-matching rows inspected during table scan.
sql/sql_select.cc:
evaluate_join_record() should call handler::unlock_row() for records
which don't satisfy condition which was pushed-down to this table/level
of nested loop.
We just put back the thing that we already have in 4.1 and which was lost
when we have introduced nested joins.
into bodhi.local:/opt/local/work/mysql-5.0-runtime
heap/hp_block.c:
Auto merged
mysql-test/r/view.result:
Auto merged
server-tools/instance-manager/listener.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_string.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
heap/hp_write.c:
SCCS merged
aliases ignored
When a column reference to a column in JOIN USING is resolved and a new
Item is created for this column the user defined name was lost.
This fix preserves the alias by setting the name of the new Item to the
original alias.
mysql-test/r/join.result:
BUG#25106: A USING clause in combination with a VIEW results in column
aliases ignored
- test case
mysql-test/t/join.test:
BUG#25106: A USING clause in combination with a VIEW results in column
aliases ignored
- test case
sql/sql_base.cc:
BUG#25106: A USING clause in combination with a VIEW results in column
aliases ignored
- take the alias of the Item to be replaced and set it into the newly
allocated Item.
In the method Item_field::fix_fields we try to resolve the name of
the field against the names of the aliases that occur in the select
list. This is done by a call of the function find_item_in_list.
When this function finds several occurrences of the field name
it sends an error message to the error queue and returns 0.
Yet the code did not take into account that find_item_in_list
could return 0 and tried to dereference the returned value.
mysql-test/r/order_by.result:
Added a test case for bug #25427.
mysql-test/t/order_by.test:
Added a test case for bug #25427.
sql/item.cc:
Fixed bug #25427.
In the method Item_field::fix_fields we try to resolve the name of
the field against the names of the aliases that occur in the select
list. This is done by a call of the function find_item_in_list.
When this function finds several occurrences of the field name
it sends an error message to the error queue and returns 0.
Yet the code did not take into account that find_item_in_list
could return 0 and tried to dereference the returned value.
used.
The Item::save_in_field() function is called from fill_record() to fill the
new row with data while execution of the CREATE TABLE ... SELECT statement.
Item::save_in_field() calls val_xxx() methods in order to get values.
val_xxx() methods do not take into account the result field. Due to this
Item_func_set_user_var::val_xxx() methods returns values from the original
table, not from the temporary one.
The save_in_field() member function is added to the Item_func_set_user_var
class. It detects whether the result field should be used and properly updates
the value of the user variable.
sql/item_func.cc:
Bug#16861: User defined variable can have a wrong value if a tmp table was used.
Added the save_in_field() member function to the Item_func_set_user_var class.
sql/item_func.h:
Bug#16861: User defined variable can have a wrong value if a tmp table was used.
Added the save_in_field() member function to the Item_func_set_user_var class.
mysql-test/r/user_var.result:
Extended the test case for bug#18681: User defined variable can have a wrong value if
a tmp table was used.
mysql-test/t/user_var.test:
Extended the test case for bug#18681: User defined variable can have a wrong value if
a tmp table was used.
A BINARY field is represented by the Field_string class. The space character
is used as the filler for unused characters in such a field. But a BINARY field
should use \x00 instead.
Field_string:reset() now detects whether the current field is a BINARY one
and if so uses the \x00 character as a default value filler.
sql/field.h:
Bug#14171: Wrong internal default value for a BINARY field.
Field_string:reset() now detects whether the current field is a BINARY one
and if so uses the \x00 character as a default value filler.
mysql-test/r/type_binary.result:
Added a test case for the bug#14171: Wrong internal default value for a BINARY field.
mysql-test/t/type_binary.test:
Added a test case for the bug#14171: Wrong internal default value for a BINARY field.
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug25027
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/sql_lex.cc:
Auto merged
The optimizer removes expressions from GROUP BY/DISTINCT
if they happen to participate in a <expression> = <const>
predicates of the WHERE clause (the idea being that if
it's always equal to a constant it can't have multiple
values).
However for predicates where the expression and the
constant item are of different result type this is not
valid (e.g. a string column compared to 0).
Fixed by additional check of the result types of the
expression and the constant and if they differ the
expression don't get removed from the group by list.
mysql-test/r/distinct.result:
Bug #15881: cast problems
- test case
mysql-test/t/distinct.test:
Bug #15881: cast problems
- test case
sql/sql_select.cc:
Bug #15881: cast problems
- can't use <expr>=<const> to remove GROUP BY/DISTINCT cols
if they're not of the same type.
This bug appeared after the patch for bug 21390 that had added some code
to handle outer joins with no matches after substitution of a const
table in an efficient way. That code as it is cannot be applied to the case
of nested outer join operations. Being applied to the queries with
nested outer joins the code can cause crashes or wrong result sets.
The fix blocks row substitution for const inner tables of an outer join
if the inner operand is not a single table.
mysql-test/r/join_nested.result:
Added a test case for bug #24345.
mysql-test/t/join_nested.test:
Added a test case for bug #24345.
into mysql.com:/d2/hf/opt/my50-opt
myisam/mi_check.c:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
into mysql.com:/d2/hf/common/my50-common
mysql-test/t/mysqladmin.test:
Auto merged
sql/item_func.cc:
Auto merged
libmysqld/lib_sql.cc:
merging
mysql-test/t/distinct.test:
merging
sql/sql_prepare.cc:
SCCS merged
libmysqld/lib_sql.cc:
error message moved to 'stmt'
mysql-test/t/distinct.test:
temporary disabled in embedded server
mysql-test/t/mysqladmin.test:
disabled in embedded server
sql/sql_prepare.cc:
superfluous #ifndef removed
into poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
ndb/src/ndbapi/Ndbif.cpp:
Auto merged
ndb/test/ndbapi/testBasic.cpp:
Auto merged
ndb/test/ndbapi/testIndex.cpp:
Auto merged
repair it
Multi-table delete that is optimized with QUICK_RANGE reports table
corruption.
DELETE statement must not use KEYREAD optimization, and sets
table->no_keyread to 1. This was ignored in QUICK_RANGE optimization.
With this fix QUICK_RANGE optimization honors table->no_keyread
value and does not enable KEYREAD when it is requested.
mysql-test/r/index_merge.result:
Fixed a test case according to fix for bug#25048.
mysql-test/r/index_merge_ror.result:
A test case for bug#25048.
mysql-test/t/index_merge_ror.test:
A test case for bug#25048.
sql/opt_range.cc:
Do not use key read when head->no_keyread is set.
InnoDB timeout behavior (Bug #24200)
mysql-test/t/innodb_mysql-master.opt:
Set --innodb-lock-wait-timeout=2, since test for bug #24200 times out.
This *could* cause random test failures if some long-running transaction concurrency is being tested. However, such a test really should go in innodb-big or some other test file.
Handling of large signed/unsigned values was not consistent, so some string functions could return bogus results.
The current fix is to simply patch up the val_str() methods for those string items.
It would be good clean this code up in general, to make similar problems much harder to make. This is left as an exercise for the reader.
mysql-test/r/func_str.result:
Update test results for bug #24947
mysql-test/t/func_str.test:
Add test case for bug #24947
sql/item_strfunc.cc:
Adjust some string function Items' val_str() methods to handle large signed/unsigned arguments properly
into kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build-work
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/query_cache_notembedded.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
mysql-test/t/rpl000015.test:
SCCS merged
mysql-test/t/rpl000017.test:
SCCS merged
spatial index
While executing OPTIMIZE TABLE on MyISAM tables the server re-creates the
index file(s) in order to sort them physically by the key. This cannot be
done for R-tree indexes as it makes no sense.
The server was not checking the type of the index and was accessing an
R-tree index as if it was a B-tree.
Fixed by preventing sorting the index file if it contains an R-tree index.
myisam/mi_check.c:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- disable sorting the index file if it contains an R-tree index.
mysql-test/r/gis-rtree.result:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- test case
mysql-test/t/gis-rtree.test:
Bug #23578: Corruption prevents Optimize table from working properly with a
spatial index
- test case
If SELECT-part of CREATE VIEW statement contains '\Z',
it is not handled correctly.
The problem was in String::print().
Symbol with code 032 (26) is replaced with '\z',
which is not supported by the lexer.
The fix is to replace the symbol with '\Z'.
mysql-test/r/view.result:
Update result file.
mysql-test/t/view.test:
Add test case for BUG#24293.
sql/sql_string.cc:
We should replace 032 with \Z, since lexer does not understand \z.
the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case
insensitive (or whatever the default charset is), whereas finding and
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table.
mysql-test/r/udf.result:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
mysql-test/t/udf.test:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
sql/sql_udf.cc:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- use the exact function name in deleting from mysql.proc.
Blocked evaluation of constant objects of the classes
Item_func_is_null and Item_is_not_null_test at the
prepare phase in the cases when the objects used subqueries.
mysql-test/r/ps.result:
Extended test case for bug #25027.
mysql-test/t/ps.test:
Extended test case for bug #25027.
sql/sql_lex.cc:
Returned back the assertion in st_select_lex_unit::set_limit,
removed by the previous commit for this bug.
into mysql.com:/home/svoj/devel/mysql/BUG23404/mysql-5.0-engines
mysql-test/r/alter_table.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
sql/sql_parse.cc:
SCCS merged