allowed set functions aggregated in outer subqueries, allowed nested set functions.
mysql-test/r/func_gconcat.result:
Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
Added test cases for bug #12762.
Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
Changed Item_field::fix_fields to calculate attributes used when checking context conditions
for set functions.
Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_cmpfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_func.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_row.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_strfunc.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
aggregated in outer subquries.
sql/item_subselect.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/item_sum.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_class.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_lex.h:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
sql/sql_prepare.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries and a bitmap of nesting levels showing
in what subqueries a set function can be aggregated.
sql/sql_update.cc:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.
Introduced next levels for subqueries.
BUG#13108
mysql-test/r/federated.result:
added test results for federated alter table
mysql-test/t/federated.test:
added test for federated alter table
sql/examples/ha_example.cc:
supports table re-creation
sql/examples/ha_tina.cc:
supports table re-creation
sql/ha_blackhole.cc:
supports table re-creation
sql/ha_federated.cc:
added flag for not supporting alter
sql/ha_heap.cc:
supports table recreation
sql/ha_myisam.cc:
supports table recreation
sql/ha_myisammrg.cc:
supports table re-creation
sql/handler.cc:
implemented flag check function
sql/handler.h:
added additional handlerton flags
created a function to test flags
replace ha_supports_generate macro with call to flag check
sql/sql_delete.cc:
replaced ha_supports_generate with handlerton flag check
sql/sql_table.cc:
added check for handlerton check for alter support
client/mysql.cc:
Don't use c_ptr() for cgets() and ensure buffer is not overwritten
mysql-test/r/cast.result:
More test for CAST(0x.... as signed)
sql/opt_sum.cc:
Fix bugs found during review
- Changed code to be able to remove one if
- Ensure that count == 0 only if is_exact_count == TRUE
sql/sql_delete.cc:
Ensure 'allow_sum_func' is reset before call to setup_conds
sql/sql_lex.cc:
allow_sum_func doesn't have to be reset for each query
(It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_load.cc:
Move set of auto_increment_field_not_null so that it's not set if field value is NULL
sql/sql_prepare.cc:
allow_sum_func doesn't have to be reset for each query
(It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_update.cc:
Ensure 'allow_sum_func' is reset before call to setup_conds
Not fixed in 4.1 as not critical. Also I'm correcting error checking of multi-UPDATE/DELETE
when it comes to binlogging, to make it consistent with when we rollback the statement.
mysql-test/r/rpl_multi_delete.result:
result update
mysql-test/r/rpl_multi_update.result:
result update
mysql-test/t/rpl_multi_delete.test:
test for BUG#13348
mysql-test/t/rpl_multi_update.test:
test of BUG#13348
sql/sql_delete.cc:
We now binlog multi-DELETE even if no row was updated (like we do for DELETE).
I'm also correcting some error checking (< instead of <=), basing myself on when we rollback.
sql/sql_update.cc:
we now binlog multi-UPDATE even if no row was updated (like we do for UPDATE).
Adding to existing tests to test new behaviour.
I'm also correcting some error checking (< instead of <=), basing myself on when we rollback.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
BitKeeper/etc/config:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
into mysql.com:/home/mydev/mysql-5.0-5000
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_delete.cc:
After merge fix.
sql/ha_innodb.cc:
Add 'value' parameter to reset_auto_increment.
sql/ha_innodb.h:
Add 'value' parameter to reset_auto_increment.
sql/handler.h:
Add 'value' parameter to reset_auto_increment.
sql/mysql_priv.h:
Add 'reset_auto_increment' parameter to mysql_delete.
sql/sql_delete.cc:
Add 'reset_auto_increment' parameter to mysql_delete, and use it instead
of checking for SQLCOM_TRUNCATE.
mysql_truncate: Adapt to changes in mysql_delete.
sql/sql_parse.cc:
mysql_execute_command: Adapt to changes in mysql_delete.
into mysql.com:/home/mydev/mysql-5.0-5000
myisam/mi_search.c:
Auto merged
mysql-test/r/alter_table.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/innodb.result:
Hand merged.
mysql-test/r/key.result:
Hand merged.
mysql-test/r/myisam.result:
Hand merged.
mysql-test/t/key.test:
Hand merged.
mysql-test/t/myisam.test:
Hand merged.
sql/sql_delete.cc:
Hand merged.
sql/sql_parse.cc:
Hand merged.
Handle temporary tables like permanent tables: If the storage engine
cannot truncate, delete instead.
mysql-test/r/innodb.result:
Bug#11816 - Truncate table doesn't work with temporary innodb tables
The test result.
mysql-test/t/innodb.test:
Bug#11816 - Truncate table doesn't work with temporary innodb tables
The test case.
sql/sql_delete.cc:
Bug#11816 - Truncate table doesn't work with temporary innodb tables
Handle temporary tables like permanent tables: If the storage engine
cannot truncate, delete instead.
Replaced a numeric literal by its symbolic name.
sql/item.cc:
Code cleanup
sql/item.h:
Code cleanup
sql/log.cc:
Added comments
sql/sp_head.cc:
Code cleanup patch from Monty:
in subst_spvars()
- Move local variables first in block
- Use res|= instead of res |=
- Use strmake() instead of alloc + memcpy
Added:
- Fail the query if we don't have enough memory to produce a binlog-suitable query string:
if we're so low on memory we're likely to fail the query anyway, and failing now removes
the need for hack with THD::query_str_binlog_suitable.
sql/sql_class.cc:
Remove THD::query_str_binlog_unsuitable
sql/sql_class.h:
Remove THD::query_str_binlog_unsuitable
sql/sql_delete.cc:
Remove THD::query_str_binlog_unsuitable
sql/sql_insert.cc:
Remove THD::query_str_binlog_unsuitable
sql/sql_parse.cc:
Code cleanup
sql/sql_update.cc:
Remove THD::query_str_binlog_unsuitable
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.
mysql-test/r/rpl_sp.result:
Fix for BUG#12335: updated test cases/results
mysql-test/t/rpl_sp.test:
Fix for BUG#12335: updated test cases/results
sql/item.cc:
Fix for BUG#12335 (SP replication):
- Added Item_name_const 'function'
- Addede 'delete reuse' to call dtor on item reuse
sql/item.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
sql/item_create.cc:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_create.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_func.cc:
Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
sql/lex.h:
Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/log.cc:
Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
one to temporary disable binlogging but collect a 'union' information about binlog write
calls.
sql/mysql_priv.h:
Fix for BUG#12335 (SP replication)
sql/sp_head.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sp_head.h:
Comments added
sql/sp_pcontext.h:
Comments added
sql/sp_rcontext.h:
Comments added
sql/sql_class.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sql_class.h:
Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
one to temporary disable binlogging but collect a 'union' information about binlog write
calls.
sql/sql_delete.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_insert.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_lex.cc:
Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
the tokenizer.
sql/sql_lex.h:
Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
the tokenizer.
sql/sql_parse.cc:
Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for
StoredRoutinesBinlogging for details
sql/sql_update.cc:
Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_yacc.yy:
Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
in the query.
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
BitKeeper/etc/config:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/view.result:
merge
mysql-test/t/view.test:
merge
sql/share/errmsg.txt:
merge
sql/sql_insert.cc:
merge
sql/table.h:
merge
into mysql.com:/home/my/mysql-5.0
sql/ha_berkeley.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_derived.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_class.cc:
Manual merge
into mysql.com:/home/timka/mysql/src/5.0-2486-merge
mysql-test/r/errors.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/fulltext_order_by.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/errors.test:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/fulltext_order_by.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/join_nested.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/sql_insert.cc:
merge WL#2486
sql/sql_show.cc:
merge WL#2486
"Process NATURAL and USING joins according to SQL:2003".
* Some of the main problems fixed by the patch:
- in "select *" queries the * expanded correctly according to
ANSI for arbitrary natural/using joins
- natural/using joins are correctly transformed into JOIN ... ON
for any number/nesting of the joins.
- column references are correctly resolved against natural joins
of any nesting and combined with arbitrary other joins.
* This patch also contains a fix for name resolution of items
inside the ON condition of JOIN ... ON - in this case items must
be resolved only against the JOIN operands. To support such
'local' name resolution, the patch introduces a stack of
name resolution contexts used at parse time.
NOTICE:
- This patch is not complete in the sense that
- there are 2 test cases that still do not pass -
one in join.test, one in select.test. Both are marked
with a comment "TODO: WL#2486".
- it does not include a new test specific for the task
mysql-test/include/ps_query.inc:
Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
Adjusted according to standard JOIN ... ON semantics =>
the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
More detailed error message.
mysql-test/r/innodb.result:
Adjusted according to standard NATURAL/USING join semantics.
This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
More detailed error message.
mysql-test/r/join.result:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one failing test case which is commented with
WL#2486 in the test file.
mysql-test/r/subselect.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
More detailed error message.
mysql-test/t/bdb.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
Adjusted according to standard JOIN ... ON semantics =>
the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
More detailed error message.
mysql-test/t/innodb.test:
Adjusted according to standard NATURAL/USING join semantics.
This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
More detailed error message.
mysql-test/t/join.test:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
Adjusted according to standard NATURAL/USING join semantics.
NOTICE: there is one test case that still fails, and it is
commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
More detailed error message.
sql/item.cc:
- extra parameter to find_field_in_tables
- find_field_in_real_table renamed to find_field_in_table
- fixed comments/typos
sql/item.h:
- added [first | last]_name_resolution_table to class
Name_resolution_context
- commented old code
- standardized formatting
sql/mysql_priv.h:
- refactored the find_field_in_XXX procedures,
- added a new procedure for natural join table references,
- renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
- pass the top-most list of the FROM clause to setup_tables
- extra parameter to find_field_in_tables
sql/sql_acl.cc:
- renamed find_field_in_table => find_field_in_table_ref
- extra parameter to find_field_in_table_ref
- commented old code
sql/sql_base.cc:
This file contains the core of the implementation of the processing
of NATURAL/USING joins (WL#2486).
- added many comments to old code
- refactored the group of find_field_in_XXX procedures, and added a
new procedure for natural joins. There is one find_field_in_XXX procedure
per each type of table reference (stored table, merge view, or natural
join); one meta-procedure that selects the correct one depeneding on the
table reference; and one procedure that goes over a list of table
referenes.
- NATURAL/USING joins are processed through the procedures:
mark_common_columns, store_natural_using_join_columns,
store_top_level_join_columns, setup_natural_join_row_types.
The entry point to processing NATURAL/USING joins is the
procedure 'setup_natural_join_row_types'.
- Replaced the specialized Field_iterator_XXX iterators with one
generic iterator over the fields of a table reference.
- Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
- Commented old code.
sql/sql_delete.cc:
- Pass the FROM clause to setup_tables.
sql/sql_help.cc:
- pass the end name resolution table to find_field_in_tables
- adjust the list of tables for name resolution
sql/sql_insert.cc:
- Changed the code that saves and restores the current context to
support the list of tables for name resolution -
context->first_name_resolution_table, and
table_list->next_name_resolution_table.
Needed to support an ugly trick to resolve inserted columns only in
the first table.
- Added Name_resolution_context::[first | last]_name_resolution_table.
- Commented old code
sql/sql_lex.cc:
- set select_lex.parent_lex correctly
- set correct state of the current name resolution context
sql/sql_lex.h:
- Added a stack of name resolution contexts to support local
contexts for JOIN ... ON conditions.
- Commented old code.
sql/sql_load.cc:
- Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
- Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
- correctly set SELECT_LEX::parent_lex
- set the first table of the current name resoltion context
- added support for NATURAL/USING joins
- commented old code
sql/sql_select.cc:
- Pass the FROM clause to setup_tables.
- Pass the end table to find_field_in_tables
- Improved comments
sql/sql_show.cc:
- Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
- Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
- Added support for a stack of name resolution contexts needed to
implement name resolution for JOIN ... ON. A context is pushed
for each new JOIN ... ON, and popped afterwards.
- Added support for NATURAL/USING joins.
sql/table.cc:
- Added new class Natural_join_column to hide the heterogeneous
representation of column references for stored tables and for
views.
- Added a new list TABLE_LIST::next_name_resolution_table to
support name resolution with NATURAL/USING joins. Also added
other members to TABLE_LIST to support NATURAL/USING joins.
- Added a generic iterator over the fields of table references
of various types - class Field_iterator_table_ref
sql/table.h:
- Added new class Natural_join_column to hide the heterogeneous
representation of column references for stored tables and for
views.
- Added a new list TABLE_LIST::next_name_resolution_table to
support name resolution with NATURAL/USING joins. Also added
other members to TABLE_LIST to support NATURAL/USING joins.
- Added a generic iterator over the fields of table references
of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
Adjusted according to standard NATURAL JOIN syntax.
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/ha_berkeley.cc:
Removed not used variable (and options)
sql/ha_berkeley.h:
Removed not used argument
sql/ha_ndbcluster.cc:
Remove compiler warning
sql/init.cc:
Simplify code
sql/item_sum.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysql_priv.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/mysqld.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_class.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_delete.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_derived.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_lex.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_parse.cc:
Indentation fixes
sql/sql_select.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_select.h:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_show.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_union.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_update.cc:
Removed duplicate usage of TMP_TABLE_FORCE_MYISAM by making 'options' longlong
sql/sql_yacc.yy:
Changed variable name i to more descriptive name
Removed compiler warning
cause crash on update".
Let us update "thd" pointer in LEX, all its units and in LEX::result before
executing statement in trigger body, since triggers are associated with TABLE
object and because of this can be used in different threads.
mysql-test/r/trigger.result:
Added test case for bug #11973 "SELECT .. INTO var_name; in trigger cause
crash on update".
mysql-test/t/trigger.test:
Added test case for bug #11973 "SELECT .. INTO var_name; in trigger cause
crash on update".
sql/item_subselect.cc:
subselect_engine:
Moved implementation of set_thd() method to item_subselect.cc,
since now it also sets "thd" for subselect_engine::result.
sql/item_subselect.h:
subselect_engine:
Moved implementation of set_thd() method to item_subselect.cc,
since now it also sets "thd" for subselect_engine::result.
sql/sql_class.h:
select_result:
Added set_thd() method for updating select_result::thd value (we need this
in cases when statement to which this select_result belongs will be used
in different threads, as it happens for statements in trigger body).
multi_delete/multi_update:
Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_delete.cc:
multi_delete:
Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_lex.h:
st_select_lex_unit:
Added set_thd() method for updating st_select_lex_unit::thd value
(we need this in cases when statement to which this unit belongs will
be used in different threads, as it happens for statements in trigger body).
We don't update thd of select_result pointed by st_select_lex_unit::result
in this method, since it is either have too short lifetime (i.e. created for
each execution) or is accessible via Item_subquery or LEX::result and thus
already taken care of.
sql/sql_parse.cc:
multi_delete:
Got rid of redundant "thd" member (we already have it in select_result).
sql/sql_prepare.cc:
reinit_stmt_before_use():
We have to update "thd" pointer in LEX, all its units and in LEX::result,
since statements which belong to trigger body are associated with TABLE
object and because of this can be used in different threads.
sql/sql_update.cc:
multi_update:
Got rid of redundant "thd" member (we already have it in select_result).
frequently used command sequence replaced with inline function
BitKeeper/etc/config:
logging switching off
mysql-test/r/lowercase_view.result:
hided view underlying tables from error message
mysql-test/r/view.result:
hided view underlying tables from error message
mysql-test/t/lowercase_view.test:
hided view underlying tables from error message
mysql-test/t/view.test:
hided view underlying tables from error message
sql/mysql_priv.h:
subroutine which return correct error message
sql/share/errmsg.txt:
new error message
sql/sql_base.cc:
subroutine which issue correct error message in case of view presence for duplicated table on update
sql/sql_delete.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_insert.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_parse.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_update.cc:
issue correct error message in case of view presence for duplicated table on update
sql/sql_view.cc:
frequently used command sequence replaced with inline function
sql/table.cc:
frequently used command sequence replaced with inline function
sql/table.h:
frequently used command sequence replaced with inline function
include/my_bitmap.h:
new bitmap operation
mysql-test/r/view.result:
added warnings
Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
new bitmap operation
sql/field.h:
index of field in table added
sql/item.cc:
Name resolution context added
table list removed from fix_fields() arguments
sql/item.h:
Name resolution context added
table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
table list removed from fix_fields() arguments
sql/item_func.cc:
table list removed from fix_fields() arguments
sql/item_func.h:
table list removed from fix_fields() arguments
sql/item_row.cc:
table list removed from fix_fields() arguments
sql/item_row.h:
table list removed from fix_fields() arguments
sql/item_strfunc.cc:
fixed server crash on NULL argument
sql/item_strfunc.h:
table list removed from fix_fields() arguments
sql/item_subselect.cc:
table list removed from fix_fields() arguments
sql/item_subselect.h:
table list removed from fix_fields() arguments
sql/item_sum.cc:
table list removed from fix_fields() arguments
sql/item_sum.h:
table list removed from fix_fields() arguments
sql/item_timefunc.cc:
table list removed from fix_fields() arguments
sql/item_timefunc.h:
table list removed from fix_fields() arguments
sql/item_uniq.h:
table list removed from fix_fields() arguments
sql/log_event.cc:
Name resolution context added
sql/log_event.h:
Name resolution context added
sql/mysql_priv.h:
Name resolution context added
sql/set_var.cc:
table list removed from fix_fields() arguments
sql/share/errmsg.txt:
new error message
sql/sp.cc:
Name resolution context added
sql/sp_head.cc:
table list removed from fix_fields() arguments
sql/sp_head.h:
Name resolution context added
sql/sql_base.cc:
table list removed from fix_fields() arguments
Name resolution context added
sql/sql_class.cc:
renamed variable
sql/sql_delete.cc:
Name resolution context added
sql/sql_derived.cc:
Name resolution context added
sql/sql_do.cc:
table list removed from fix_fields() arguments
sql/sql_handler.cc:
Name resolution context added
sql/sql_help.cc:
Name resolution context added
sql/sql_insert.cc:
Name resolution context added
table list removed from fix_fields() arguments
sql/sql_lex.cc:
Name resolution context added
sql/sql_lex.h:
removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
table list removed from fix_fields() arguments
sql/sql_olap.cc:
Name resolution context added
sql/sql_parse.cc:
Name resolution context added
sql/sql_prepare.cc:
table list removed from fix_fields() arguments
sql/sql_select.cc:
table list removed from fix_fields() arguments
sql/sql_show.cc:
Name resolution context added
sql/sql_trigger.cc:
table list removed from fix_fields() arguments
sql/sql_udf.h:
table list removed from fix_fields() arguments
sql/sql_union.cc:
Name resolution context added
sql/sql_update.cc:
Name resolution context added
sql/sql_view.cc:
Name resolution context added
sql/sql_view.h:
table list removed from fix_fields() arguments
sql/sql_yacc.yy:
Name resolution context added
sql/table.cc:
Name resolution context added
merged view processing moved
sql/table.h:
merged view processing moved
Implement new SQL mode - NO_ENGINE_SUBSTITUTION
mysql-test/r/sql_mode.result:
Test for bug 6877
mysql-test/t/sql_mode.test:
Test for bug 6877
sql/handler.cc:
change to ha_checktype()
sql/handler.h:
change to ha_checktype()
sql/mysql_priv.h:
new sql mode NO_ENGINE_SUBSTITUTION
change to args for get_table_type() and create_frm()
sql/mysqld.cc:
new sql mode NO_ENGINE_SUBSTITUTION
sql/set_var.cc:
change to ha_checktype() args
sql/sql_delete.cc:
change to get_table_type() args
sql/sql_rename.cc:
change to get_table_type() args
sql/sql_table.cc:
move common code to check_engine()
change to ha_checktype(), get_table_type() args
sql/table.cc:
change to ha_checktype(), create_frm(), get_table_type() args
sql/unireg.cc:
change to create_frm() args
mysql-test/r/delete.result:
Test case for bug in multiple-table-delete where some rows was not deleted
mysql-test/t/delete.test:
Test case for bug in multiple-table-delete where some rows was not deleted
sql/item_subselect.cc:
Code cleanup
sql/opt_range.cc:
Code cleanup
sql/sql_delete.cc:
Fixed bug in multiple-table-delete where some rows was not deleted
This happend when the first table-to-delete-from was not the the table that was scanned.
Fixed this by only doing 'delete-on-the-fly' for the first table.
Fixed also some wrong error handling in multi-table-delete
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.
mysql-test/r/group_min_max.result:
Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
sql/item_subselect.cc:
Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS
subqueries to one place: Item_exists_subselect::fix_length_and_dec().
This implies that unit->select_limit_cnt is not set until the item is
fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
sql/mysql_priv.h:
setup_tables no longer needs a special flag for the case when
it's called from JOIN::reinit() (we don't need to call setup_tables
between two executions of a correlated subquery).
sql/opt_range.cc:
Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
not field data, to evaluate max_used_key_length, which is then
used for explain.
sql/sp.cc:
- setup_tables signature changed.
sql/sql_base.cc:
- setup_tables no longer needs a special mode for subqueries.
Unused checks were removed.
sql/sql_delete.cc:
- setup_tables signature changed
sql/sql_help.cc:
- setup_tables signature changed
sql/sql_insert.cc:
- setup_tables signature changed
sql/sql_lex.cc:
Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
in one place, and hence remove it from st_select_lex::test_limit().
sql/sql_lex.h:
Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
sql/sql_load.cc:
- setup_tables signature changed
sql/sql_olap.cc:
- setup_tables signature changed
sql/sql_parse.cc:
- st_select_lex_unit::set_limit() signature changed
sql/sql_select.cc:
Move setting of JOIN::select_limit from JOIN::prepare
to JOIN::optimize. At prepare, limit is unknown yet.
Remove excessive cleanups from JOIN::reinit which were overwriting
join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
by the change in item_subselect.cc.
sql/sql_union.cc:
Class st_select_lex_unit was changed to avoid calls to
st_select_lex_unit::set_limit from places where it may be unknown.
Now unit->select_limit_cnt is set at ::exec().
st_select_lex_unit::init_prepare_fake_select_lex():
- move out set_limit functionality
- remove a few lines of dead code.
st_select_lex_unit::prepare():
- now we don't call set_limit at the time of prepare, so the value
of unit->select_limit_cnt may be unknown here. Use sl->select_limit
instead.
st_select_lex_unit::exec():
- cleanup
- call set_limit explicitly as it has been moved out of
init_prepare_fake_select_lex.
sql/sql_update.cc:
- setup_tables signature changed
databases" and basic handling of errors which happen in triggers.
(The bug itself was fixed by several previous patches).
Fixed bug in multi-delete which were exposed by these tests.
mysql-test/r/trigger.result:
Added test for bug #5894 "Triggers with altered tables cause corrupt
databases" and basic handling of errors which happen in triggers.
mysql-test/t/trigger.test:
Added test for bug #5894 "Triggers with altered tables cause corrupt
databases" and basic handling of errors which happen in triggers.
sql/sql_delete.cc:
multi_delete::send_eof():
Fixed bug which were exposed by testing of basic handling of errors
in triggers. Error which happened in multi_delete::do_deletes()
was wiped out by thd->clear_error() and thus never sent to client
(and this stalled client connection).
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Manual merge
sql/sql_update.cc:
Manual merge
#5860 "Multi-table UPDATE does not activate update triggers"
#6812 "Triggers are not activated for INSERT ... SELECT"
#8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE.
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.
I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.
mysql-test/r/trigger.result:
Added tests for triggers behavior for various non-standard forms of
INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
Also added tests for bugs #5860 "Multi-table UPDATE does not activate
update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
and #8755 "Trigger is not activated by LOAD DATA".
mysql-test/t/trigger.test:
Added tests for triggers behavior for various non-standard forms of
INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
Also added tests for bugs #5860 "Multi-table UPDATE does not activate
update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
and #8755 "Trigger is not activated by LOAD DATA".
sql/item.cc:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Item_trigger_field::setup_field()/fix_fields() were changed to implement
this approach.
sql/item.h:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Item_trigger_field:
- Added field_idx member to store index of Field object corresponding to
this Item in TABLE::field array.
- Added triggers member to be able to access to parent Table_trigger_list
object from fix_fields() method.
- setup_field() no longer needs to know for which type of event this
trigger is, since it does not make decision Field for which buffer
(record[0] or record[1] is appropriate for this Item_trigger_field)
sql/mysql_priv.h:
Added fill_record_n_invoke_before_triggers() methods. They are simple
wrappers around fill_record() which invoke proper before trigger right
after filling record with values.
sql/sql_base.cc:
Added fill_record_n_invoke_before_triggers() methods. They are simple
wrappers around fill_record() which invoke proper before trigger right
after filling record with values.
sql/sql_delete.cc:
mysql_delete():
Now we stop statement execution if one of triggers failed, we also
don't execute after delete trigger if we failed to delete row from
the table (We also pass information about which buffer contains old
version of row to process_triggers()).
multi_delete::send_data()/do_deletes():
Now we also invoke triggers in case of multi-delete.
sql/sql_insert.cc:
mysql_insert():
Moved invocation of before triggers to fill_record_n_invoke_before_triggers()
method. After triggers are now executed as part of write_record().
(as nice side effect now we also stop statement execution if one of
triggers fail).
write_record():
Invoke after insert trigger after performing insert. Also invoke proper
triggers if insert is converted to update or conflicting row is deleted.
Cleaned up error handling a bit - no sense to report error via
handler::print_error if it was not generated by handler method and
was reported before.
Also now we will execute after trigger only if we really have written
row to the table.
select_insert::send_data()/store_values():
We should also execute INSERT triggers for INSERT ... SELECT statement.
sql/sql_load.cc:
read_fixed_length()/read_sep_field():
We should execute INSERT triggers when processing LOAD DATA statement.
Small cleanup in auto-increment related code. Also moved check for
thd->killed which is used to abort LOAD DATA in case of problems
in 'traditional' mode to better place..
sql/sql_trigger.cc:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Table_triggers_list methods were changed to implement this approach
(see also comments for sql_trigger.h).
sql/sql_trigger.h:
Since it turned out that at trigger loading time we can't say in which
buffer TABLE::record[0] or record[1] old version of row will be stored
we have to change our approach to binding of Item_trigger_field to
Field instances.
Now after trigger parsing (in Item_trigger_field::setup_table()) we only
find index of proper Field in the TABLE::field array. Then before trigger
is invoked we set Table_triggers_list::old_field/new_field so they point
to arrays holding Field instances bound to buffers with proper row
versions. And as last step in Item_trigger_field::fix_fields() we get
pointer to Field from those arrays using saved field index.
Changed Table_triggers_list to implement this new approach:
- Added record1_field member to store array of Field objects bound
to TABLE::record[1] buffer (instead of existing old_field member)
- Added new_field member and changed meaning of old_field member.
During trigger execution they should point to arrays of Field objects
bound to buffers holding new and old versions of row respectively.
- Added 'table' member to be able to get access to TABLE instance
(for which this trigger list object was created) from process_triggers()
method.
- Now process_triggers() method sets old_field and new_field members
properly before executing triggers body (basing on new
old_row_is_record1 parameter value).
- Renamed prepare_old_row_accessors_method() to prepare_record1_accessors()
Also added has_before_update_triggers() method which allows to check
whenever any before update triggers exist for table.
sql/sql_update.cc:
mysql_update():
Now we invoke before triggers in fill_record_n_invoke_before_triggers()
method. Also now we abort statement execution when one of triggers fail.
safe_update_on_fly():
When we are trying to understand if we can update first table in multi
update on the fly we should take into account that BEFORE UPDATE
trigger can change field values.
multi_update::send_data()/do_updates()
We should execute proper triggers when doing multi-update
(in both cases when we do it on the fly and using temporary tables).
Fixed errors reported by valgrind (some errors in NDB remains)
myisam/rt_split.c:
Added missing cast that caused problem on novell
(minor code cleanup)
ndb/src/ndbapi/Ndb.cpp:
Moved DBUG_ENTER to remove warning from DBUG library
sql/field_conv.cc:
Added test for valgrind/purify to avoid warning
sql/item_sum.cc:
Removed comment and added ASSERT as setup can't be called twice anymore
sql/sql_delete.cc:
Fixed wrong return value
sql/sql_parse.cc:
More debugging
sql/sql_select.cc:
Removed duplicate call to setup() which caused a memory leak
strings/my_vsnprintf.c:
Added support for '%c' (used when printing my_getopt errors)
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
view.test:
Added test case for bug #8528.
view.result:
Added test case for bug #8528. Fixed other test cases.
mysql-test/r/view.result:
Added test case for bug #8528. Fixed other test cases.
mysql-test/t/view.test:
Added test case for bug #8528.
sql/sql_base.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_delete.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_insert.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_parse.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_prepare.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_select.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_update.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/sql_view.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/table.cc:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
sql/table.h:
Fixed bug #8528.
Representation for single-table views was made similar to
representation for multi-table views.
myisam/mi_search.c:
Auto merged
myisam/mi_write.c:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/myisam.result:
SCCS merged
mysql-test/t/myisam.test:
SCCS merged
(BUG##9398, BUG#8703)
fixed wrong join view detection in multi-delete which lead to server crash
mysql-test/r/lowercase_view.result:
added new tests of updation and selection from the same table
mysql-test/r/view.result:
added new tests of updation and selection from the same table
added test of multidelete command over join view which lead to server crash
test suite from bugs #9398 and #8703
mysql-test/t/lowercase_view.test:
added new tests of updation and selection from the same table
mysql-test/t/view.test:
added new tests of updation and selection from the same table
added test of multidelete command over join view which lead to server crash
test suite from bugs #9398 and #8703
sql/sql_base.cc:
changed procedure of finding tables
sql/sql_class.cc:
added derived table procession detection
sql/sql_class.h:
added derived table procession detection
sql/sql_delete.cc:
fixed detection of selection from table which update for multidelete
sql/sql_derived.cc:
added derived table procession detection
sql/sql_lex.cc:
added detection os SELECTs processed inside derived tables
removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
sql/sql_lex.h:
added detection os SELECTs processed inside derived tables
removed old mechanism of multidelete/multiupdate table duplication detection (which can't work with views)
sql/sql_parse.cc:
removed wrong test of join view (for multidelete in can be not only first table)
sql/sql_prepare.cc:
added detection os SELECTs processed inside derived tables (reset it for reusing in PS/SP)
sql/sql_select.cc:
added detection os SELECTs processed inside derived tables
sql/sql_update.cc:
fixed detection of selection from table which update for multiupdate
stored procedure, it is converted to DELETE.
mysql-test/r/sp.result:
A result for the test case for bug #8850
mysql-test/t/sp.test:
A test case for the bug #8850
sql/sql_delete.cc:
A fix for bug #8850, plus adding a missing call to mysql_init_select(),
which caused mem_root corruption.
sql/sql_parse.cc:
A fix for the bug #8850
BitKeeper/etc/ignore:
Added acinclude.m4 to the ignore list
into serg.mylan:/usr/home/serg/Abk/mysql-5.0-xa
configure.in:
Auto merged
mysql-test/r/drop_temp_table.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Added a test case for bug #8392.
sql_delete.cc:
Fixed bug #8392.
The bug caused a crash for a delete statement with ORDER BY
that explicitly referred to the modified table.
sql/sql_delete.cc:
Fixed bug #8392.
The bug caused a crash for a delete statement with ORDER BY
that explicitly referred to the modified table.
mysql-test/t/delete.test:
Added a test case for bug #8392.
mysql-test/r/delete.result:
Added a test case for bug #8392.
client/mysqlbinlog.cc:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
mysql-test/include/varchar.inc:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/mysqlbinlog2.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/user_var.test:
Auto merged
mysys/hash.c:
Auto merged
sql/item_func.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_repl.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
mysql-test/r/ctype_ucs.result:
ul
mysql-test/r/drop_temp_table.result:
ul
mysql-test/r/innodb.result:
ul
mysql-test/r/insert_select.result:
ul
mysql-test/r/mix_innodb_myisam_binlog.result:
ul
mysql-test/r/rpl_change_master.result:
ul
mysql-test/r/rpl_charset.result:
ul
mysql-test/r/rpl_error_ignored_table.result:
ul
mysql-test/r/rpl_flush_log_loop.result:
ul
mysql-test/r/rpl_flush_tables.result:
ul
mysql-test/r/rpl_loaddata.result:
ul
mysql-test/r/rpl_loaddata_rule_m.result:
ul
mysql-test/r/rpl_log.result:
ul
mysql-test/r/rpl_max_relay_size.result:
ul
mysql-test/r/rpl_relayrotate.result:
ul
mysql-test/r/rpl_replicate_do.result:
ul
mysql-test/r/rpl_rotate_logs.result:
ul
mysql-test/r/rpl_temporary.result:
ul
mysql-test/r/rpl_timezone.result:
ul
mysql-test/r/rpl_until.result:
ul
mysql-test/r/rpl_user_variables.result:
ul
mysql-test/r/user_var.result:
ul
fix for binlog+autocommit+tclog
comments, style fixes
libmysqld/libmysqld.rc:
Change mode to -rw-rw-r--
libmysqld/resource.h:
Change mode to -rw-rw-r--
configure.in:
check for getpagesize
include/my_global.h:
typo ?
include/my_pthread.h:
bug in thread_safe_decrement_and_test()
mysql-test/r/bdb.result:
results updated
mysql-test/r/innodb.result:
results updated
mysql-test/r/mix_innodb_myisam_binlog.result:
results updated
mysql-test/r/rpl_relayrotate.result:
results updated
sql/ha_berkeley.cc:
style fixes
sql/ha_innodb.cc:
fixes to follow innodb coding style
sql/handler.cc:
more comments. XA COMMIT ONE PHASE fix.
sql/handler.h:
my_xid -> ulonglong. comments
sql/item_func.cc:
DO RELEASE_LOCK("...") is no cache_stmt
sql/log.cc:
comments, better error messages
sql/log_event.cc:
even in autocommit mode we may need to cache_stmt
xid is ulonglong
sql/log_event.h:
more comments.
sql/mysql_priv.h:
query_id is ulonglong
sql/mysqld.cc:
default value for --log-tc changed
sql/share/errmsg.txt:
better error messages
sql/sql_class.h:
cleanup, comments
sql/sql_delete.cc:
deleting from temporary tables is not always transactional
sql/sql_insert.cc:
insert into temporary table is not always transactional
sql/sql_load.cc:
load data into temp table is not always transactional
sql/sql_parse.cc:
comments. bad merge fixed. xa_state_names[]
sql/sql_table.cc:
create/drop temp table is not always transactional
sql/sql_update.cc:
update temp table is not always transactional
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
include/myisam.h:
Added const before names
mysql-test/r/group_min_max.result:
Make results repeatable
mysql-test/t/group_min_max.test:
Make results repeatable
sql/field.cc:
Created Field::make_field() and made Field_num::make_field() to call this
Use TABLE_SHARE
Use sql_strmake() instead of sql_memdup() to simplify code
sql/field.h:
Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
Use TABLE_SHARE
sql/field_conv.cc:
Use TABLE_SHARE
sql/filesort.cc:
Use TABLE_SHARE
sql/ha_berkeley.cc:
Use TABLE_SHARE
sql/ha_heap.cc:
Use TABLE_SHARE
sql/ha_innodb.cc:
Use TABLE_SHARE
sql/ha_myisam.cc:
Use TABLE_SHARE
sql/ha_myisammrg.cc:
Use TABLE_SHARE
Change some pointer handling to use const char*
sql/ha_ndbcluster.cc:
Use TABLE_SHARE
sql/handler.cc:
Use TABLE_SHARE
sql/item.cc:
Use TABLE_SHARE
sql/item_func.cc:
Use TABLE_SHARE
sql/item_subselect.cc:
Use TABLE_SHARE
sql/item_sum.cc:
Use TABLE_SHARE
sql/key.cc:
Use TABLE_SHARE
sql/lock.cc:
Use TABLE_SHARE
sql/log_event.cc:
real_name -> table_name
sql/mysql_priv.h:
Use TABLE_SHARE
sql/opt_range.cc:
Use TABLE_SHARE
sql/opt_sum.cc:
Use TABLE_SHARE
sql/records.cc:
Use TABLE_SHARE
sql/repl_failsafe.cc:
real_name -> table_name
sql/slave.cc:
Use TABLE_SHARE
sql/sp.cc:
Use TABLE_SHARE
sql/sp_head.cc:
real_name -> table_name
sql/sql_acl.cc:
Use TABLE_SHARE
removed unnecessary assert
fixed indentation
changed some char * -> const char*
sql/sql_acl.h:
changed some char* -> const char*
sql/sql_base.cc:
Use TABLE_SHARE
sql/sql_cache.cc:
Use TABLE_SHARE
sql/sql_class.cc:
Use TABLE_SHARE
sql/sql_db.cc:
real_name -> table_name
sql/sql_delete.cc:
Use TABLE_SHARE
sql/sql_derived.cc:
Use TABLE_SHARE
sql/sql_handler.cc:
Use TABLE_SHARE
sql/sql_help.cc:
Use TABLE_SHARE
sql/sql_insert.cc:
Use TABLE_SHARE
sql/sql_load.cc:
Use TABLE_SHARE
sql/sql_parse.cc:
Use TABLE_SHARE
sql/sql_rename.cc:
real_name -> table_name
sql/sql_select.cc:
Use TABLE_SHARE
table->blob_fields now points to field offsets, not fields
tmp_table->table_name now points to alias name
sql/sql_show.cc:
Use TABLE_SHARE
sql/sql_table.cc:
Use TABLE_SHARE
sql/sql_test.cc:
Use TABLE_SHARE
sql/sql_trigger.cc:
Use TABLE_SHARE
sql/sql_udf.cc:
Use TABLE_SHARE
sql/sql_union.cc:
real_name -> table_name
sql/sql_update.cc:
Use TABLE_SHARE
sql/sql_view.cc:
Use TABLE_SHARE
sql/table.cc:
Split TABLE to TABLE and TABLE_SHARE
Changed blob_field to be field offsets instead of pointer to fields
Only initialize table->s->default_values with default record (not all table->record[#])
Some indentation changes
sql/table.h:
Split TABLE to TABLE and TABLE_SHARE
sql/tztime.cc:
real_name -> table_name
sql/unireg.cc:
Use TABLE_SHARE
sql/unireg.h:
Use TABLE_SHARE
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
Makefile.am:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
innobase/log/log0recv.c:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/drop.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/ps_2myisam.result:
Auto merged
mysql-test/r/ps_3innodb.result:
Auto merged
mysql-test/r/ps_4heap.result:
Auto merged
mysql-test/r/ps_5merge.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/drop.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
ndb/include/ndb_global.h.in:
Auto merged
ndb/src/kernel/blocks/suma/Suma.cpp:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_repl.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/time.cc:
Auto merged
innobase/row/row0upd.c:
Trivial merge
mysql-test/t/func_concat.test:
Keep local code
mysql-test/t/multi_update.test:
auto merge
sql/ha_ndbcluster.cc:
manual merge
sql/item_timefunc.cc:
manual merge
sql/mysql_priv.h:
manual merge
sql/sql_class.h:
manual merge
sql/sql_delete.cc:
manual merge
sql/sql_insert.cc:
manual merge
sql/sql_lex.cc:
manual merge
sql/sql_lex.h:
manual merge
sql/sql_load.cc:
manual merge
sql/sql_parse.cc:
manual merge
sql/sql_table.cc:
manual merge
sql/sql_update.cc:
manual merge
This allows use to use INSERT IGNORE ... ON DUPLICATE ...
mysql-test/r/drop.result:
safety fix
mysql-test/t/drop.test:
safety fix
mysql-test/t/multi_update.test:
ensure we cover all possible errors
sql/log_event.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/log_event.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/mysql_priv.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_class.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_delete.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_insert.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_lex.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_load.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_parse.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_repl.h:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_select.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_table.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_union.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_update.cc:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
sql/sql_yacc.yy:
Remove DUP_IGNORE from enum_duplicates and instead use a separate ignore flag
BitKeeper/etc/ignore:
auto-union
BitKeeper/etc/logging_ok:
auto-union
BUILD/SETUP.sh:
Auto merged
Build-tools/Do-compile:
Auto merged
client/mysqladmin.cc:
Auto merged
configure.in:
Auto merged
innobase/include/lock0lock.h:
Auto merged
innobase/os/os0file.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/heap.result:
Auto merged
mysql-test/r/insert_select.result:
Auto merged
mysql-test/r/lowercase_table3.result:
Auto merged
mysql-test/r/rpl_start_stop_slave.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/rpl_until.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_myisam.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_rename.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/log_event.cc:
Merge with 4.1
Trivial cleanup
CREATE DATABASE statement used the current database instead of the
database created when checking conditions for replication.
CREATE/DROP/ALTER DATABASE statements are now replicated based on
the manipulated database.
mysql-test/t/rpl_until.test:
Longer sleep to allow slave to stop.
mysql-test/t/rpl_charset.test:
Position change in binary file.
mysql-test/r/drop_temp_table.result:
Position change in binlog.
mysql-test/r/rpl_loaddata_rule_m.result:
Position change in binlog.
mysql-test/r/rpl_charset.result:
Position change in binlog.
sql/log_event.h:
Added new flag and parameter to suppress generation of
USE statements.
sql/log_event.cc:
Added parameter and code to suppress generation of
USE statements.
sql/sql_db.cc:
Suppress generation of USE before CREATE/ALTER/DROP DATABASE
statements.
sql/log.cc:
Query_log_event have new extra parameter.
sql/sql_table.cc:
Query_log_event have new extra parameter.
sql/sql_base.cc:
Query_log_event have new extra parameter.
sql/sql_update.cc:
Query_log_event have new extra parameter.
sql/sql_insert.cc:
Query_log_event have new extra parameter.
sql/sql_rename.cc:
Query_log_event have new extra parameter.
sql/sql_delete.cc:
Query_log_event have new extra parameter.
sql/sql_acl.cc:
Query_log_event have new extra parameter.
sql/handler.cc:
Query_log_event have new extra parameter.
sql/item_func.cc:
Query_log_event have new extra parameter.
sql/sql_parse.cc:
Query_log_event have new extra parameter.