Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
include/hash.h:
Introduced auxillary hash_init_opt() macro which simplifies
lazy initialization of HASH objects.
sql/sp.cc:
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
sql/sql_lex.cc:
Use lazy initialization for Query_tables_list::sroutines hash.
This step should significantly decrease amount of memory consumed
by stored routines as we no longer will allocate chunk of memory
required for this HASH for each statement in routine.
sql/sql_lex.h:
Updated comment describing Query_tables_list::sroutines to
reflect that now we are use lazy initialization for this hash.
Added constant for initial size of this hash.
Evaluate "NULL IN (SELECT ...)" in a special way: Disable pushed-down
conditions and their "consequences":
= Do full table scans instead of unique_[index_subquery] lookups.
= Change appropriate "ref_or_null" accesses to full table scans in
subquery's joins.
Also cache value of NULL IN (SELECT ...) if the SELECT is not correlated
wrt any upper select.
mysql-test/r/subselect.result:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Updated test results
sql/item.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added comments
sql/item_cmpfunc.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
Made Item_in_optimizer to:
- cache the value of "NULL IN (uncorrelated select)"
- Turn off pushed-down predicates when evaluating "NULL IN (SELECT ...)"
sql/item_cmpfunc.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Made Item_in_optimizer cache the value of "NULL IN (uncorrelated select)"
- Added comments
sql/item_subselect.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- When needed, wrap the predicates we push into subquery into an
Item_func_trig_cond so we're able to turn them off when evaluating
NULL IN (SELECT ...).
- Added code to evaluate NULL IN (SELECT ...) in a special way:
= In [unique_]index_subquery, do full table scan to see if there
are any rows.
= For other subqueries, change ref[_or_null] to ALL if the
ref[_or_null] was created from pushed-down predicate.
sql/item_subselect.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added Item_subselect::is_correlated
- Added comments
sql/records.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Make rr_sequential() non-static
sql/sql_lex.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added st_select_lex::is_correlated and Item_subselect::is_correlated.
sql/sql_lex.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added st_select_lex::is_correlated
sql/sql_select.cc:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added KEY_FIELD::outer_ref to keep track of which ref accesses are
created from predicates that were pushed down into the subquery.
sql/sql_select.h:
BUG#8804: wrong results for NULL IN (SELECT ...):
- Added KEYUSE::outer_ref
mysql-test/r/subselect3.result:
New BitKeeper file ``mysql-test/r/subselect3.result''
mysql-test/t/subselect3.test:
New BitKeeper file ``mysql-test/t/subselect3.test''
into rakia.gmz:/home/kgeorge/mysql/autopush/B21809-5.0-opt
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
select OK.
The SQL parser was using Item::name to transfer user defined function attributes
to the user defined function (udf). It was not distinguishing between user defined
function call arguments and stored procedure call arguments. Setting Item::name
was causing Item_ref::print() method to print the argument as quoted identifiers
and caused views that reference aggregate functions as udf call arguments (and
rely on Item::print() for the text of the view to store) to throw an undefined
identifier error.
Overloaded Item_ref::print to print aggregate functions as such when printing
the references to aggregate functions taken out of context by split_sum_func2()
Fixed the parser to properly detect using AS clause in stored procedure arguments
as an error.
Fixed printing the arguments of udf call to print properly the udf attribute.
mysql-test/r/udf.result:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
mysql-test/t/udf.test:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
sql/item.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- Don't print the refs to SUM functions as refs.
sql/item_func.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/item_func.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/sql_lex.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_lex.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_yacc.yy:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
- fix bison duplicate symbol warnings
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
mysql-test/r/ps.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
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_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
mysql-test/t/func_gconcat.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/view.result:
Manual merge.
mysql-test/t/view.test:
Manual merge.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt
BitKeeper/deleted/.del-bdb.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/myisam.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/type_decimal.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/select.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
include/my_base.h:
SCCS merged
mysql-test/include/mix1.inc:
SCCS merged
mysql-test/r/group_by.result:
SCCS merged
mysql-test/r/innodb_mysql.result:
SCCS merged
mysql-test/t/group_by.test:
SCCS merged
sql/sql_select.cc:
SCCS merged
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-lex-string
BUILD/SETUP.sh:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_parse.cc:
remove_escape() function removed. Manual merge.
sql/table.cc:
Manually merged. Old line removed.
tests/mysql_client_test.c:
Manually merged. test_status position now last.
sql/sql_parse.cc.rej:
undefined
sql/table.cc.rej:
undefined
tests/mysql_client_test.c.rej:
undefined
account predicates that become sargable after reading const tables.
In some cases this resulted in choosing non-optimal execution plans.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
mysql-test/r/select.result:
Added a test case for bug #19579.
mysql-test/t/select.test:
Added a test case for bug #19579.
sql/item_cmpfunc.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_base.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_lex.h:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Added a counter of between predicates.
sql/sql_select.cc:
Fixed bug #19579: at range analysis optimizer did not take into
account predicates that become sargable after reading const tables.
Now info of such potentially saragable predicates is saved in
an array and after reading const tables we check whether this
predicates has become saragable.
BUILD/SETUP.sh:
Added check for CCACHE_DISABLE. If set, do not
use ccache at all.
BUILD/compile-pentium-gcov:
Moved CCACHE_DISABLE up before going into SETUP.sh.
Added debug_extra_flags to extra_flags.
mysql-test/r/create.result:
Added tests for incorrect database names.
mysql-test/r/ctype_create.result:
Added tests for incorrect alter database names.
mysql-test/r/events.result:
Added tests for incorrect database names.
mysql-test/r/grant.result:
Output changed to capital letters.
mysql-test/t/alter_table.test:
Removed extra empty line
mysql-test/t/create.test:
Added tests for incorrect database names.
mysql-test/t/ctype_create.test:
Added tests for incorrect name handling
mysql-test/t/events.test:
Added tests for incorrect database names.
sql/item_timefunc.cc:
Added dummy case to avoid compiler warning.
sql/mysql_priv.h:
Changed argument from char pointer to LEX_STRING pointer.
sql/mysqld.cc:
Added a missing component from struct.
sql/sql_class.h:
Added function LEX_STRING_make that sets the string and length.
sql/sql_db.cc:
Changed several char pointers to lex_strings.
sql/sql_lex.cc:
name is now LEX_STRING
sql/sql_lex.h:
Changed name to LEX_STRING.
sql/sql_parse.cc:
Changed several char pointers to lex_strings.
db_length needed a trick, because in old client protocol there
was an extra char zero added to the string.
check_db_name() now takes LEX_STRING pointer as an argument.
Changed remove_escape() to take LEX_STRING pointer as an argument.
Removed COM_CREATE_DB and COM_DROP_DB. These are obsolete.
sql/sql_table.cc:
char* -> LEX_STRING*
sql/sql_yacc.yy:
Changed char* -> LEX_STRING*
sql/table.cc:
check_db_name() now takes LEX_STRING* as argument instead of char*.
Optimized code a bit.
tests/mysql_client_test.c:
Added test for (short) status.
After defining out (ifdef) COM_DROP_DB and COM_CREATE_DB
in mysqld.cc mysql_client_test needed to be informed that
failing in recognizing these commands is not fatal error
anymore.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp-error.result:
Manual merge.
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20953
mysql-test/r/view.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp-error.result:
Manual merge.
should fail to create
The problem was that this type of errors was checked during view
creation, which doesn't happen when CREATE VIEW is a statement of
a created stored routine.
The solution is to perform the checks at parse time. The idea of the
fix is that the parser checks if a construction just parsed is allowed
in current circumstances by testing certain flags, and this flags are
reset for VIEWs.
The side effect of this change is that if the user already have
such bogus routines, it will now get a error when trying to do
SHOW CREATE PROCEDURE proc;
(and some other) and when trying to execute such routine he will get
ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
However there should be very few such users (if any), and they may
(and should) drop these bogus routines.
mysql-test/r/sp-error.result:
Add result for bug#20953: create proc with a create view that uses
local vars/params should fail to create.
mysql-test/r/view.result:
Update results.
mysql-test/t/sp-error.test:
Add test case for bug#20953: create proc with a create view that uses
local vars/params should fail to create.
mysql-test/t/view.test:
Add second test for variable in a view.
Remove SP variable in a view test, as it tests wrong behaviour.
Add test for derived table in a view.
sql/sql_lex.cc:
Remove LEX::variables_used.
sql/sql_lex.h:
Remove LEX::variables_used and add st_parsing_options structure and
LEX::parsing_options member.
sql/sql_view.cc:
Move some error checking to sql/sql_yacc.yy.
sql/sql_yacc.yy:
Check for disallowed syntax in a CREATE VIEW at parse time to rise a
error when it is used inside CREATE PROCEDURE and CREATE FUNCTION, as
well as by itself.
into macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.1-opt
mysql-test/r/ctype_ucs.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/ctype_ucs.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/mi_check.c:
Auto merged
mysql-test/r/ps.result:
merge 5.0-opt -> 5.1-opt
sql/unireg.cc:
merge 5.0-opt -> 5.1-opt
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
Before this patch the such views were converted into
into temporary table views.
mysql-test/r/view.result:
Added a test case for bug #21646.
mysql-test/t/view.test:
Added a test case for bug #21646.
sql/mysql_priv.h:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
sql/sql_lex.cc:
Fixed bug #21646.
Presence of a subquery in the ON expression of a join
should not block merging the view that contains this join.
sql/sql_yacc.yy:
Fixed bug #21646.
Added a new parsing state 'IN_ON', true when
the parser is in an ON expression of a join.
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/group_by.result:
Auto merged
mysql-test/r/heap_hash.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/olap.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/row.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_date.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_delete.cc:
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_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/sp.test:
SCCS merged
sql/item_cmpfunc.cc:
SCCS merged
sql/sql_select.cc:
SCCS merged
into dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
Saved andor structure of the having conditions at the proper moment
before any calls of split_sum_func2 that could modify the having structure
adding new Item_ref objects. (These additions, are produced not with
the statement mem_root, but rather with the execution mem_root.)
mysql-test/r/sp.result:
Added a test case for bug #21493.
mysql-test/t/sp.test:
Added a test case for bug #21493.
sql/sql_delete.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_insert.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_lex.h:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
sql/sql_update.cc:
Fixed bug #21493: crash for the second execution of a function
containing a select statement that uses an aggregating IN subquery.
Added a parameter to the function fix_prepare_information
to restore correctly the having clause for the second execution.
into mysql.com:/usr/home/ram/work/mysql-5.1-maint
BitKeeper/etc/ignore:
auto-union
mysql-test/mysql-test-run.pl:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
into mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge
BitKeeper/etc/ignore:
auto-union
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
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/share/errmsg.txt:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into bk-internal.mysql.com:/data0/bk/mysql-5.1-wl3337
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/events.result:
Auto merged
mysql-test/r/not_embedded_server.result:
Auto merged
mysql-test/t/events.test:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/ctype_recoding.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/ctype_recoding.test:
manual merge.
sql/sql_lex.h:
manual merge.
sql/sql_table.cc:
manual merge.
make st_select_lex::setup_ref_array() take into account that
Item_sum-descendant objects located within descendant SELECTs
may be added into ref_pointer_array.
sql/item_sum.cc:
BUG#21477 "memory overruns for certain kinds of subqueries":
Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
that exist within this SELECT.
sql/sql_lex.h:
BUG#21477 "memory overruns for certain kinds of subqueries":
Add SELECT_LEX::n_sum_items and SELECT_LEXT::n_child_sum_items.
sql/sql_yacc.yy:
BUG#21477 "memory overruns for certain kinds of subqueries":
Make SELECT_LEX::n_sum_items contain # of Item_sum-derived objects
that exist within this SELECT.
into maint2.mysql.com:/data/localhome/tsmith/bk/50
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/net_serv.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
vio/viosocket.c:
Auto merged
client/mysql.cc:
Manual merge.
mysql-test/t/ctype_recoding.test:
Manual merge.
sql/sql_lex.h:
SCCS merged
sql/sql_table.cc:
Manual merge.
mysql-test/r/ctype_recoding.result:
Manual merge
handle them.
Problem:
CREATE|ALTER EVENT, HANDLER READ, KILL, Partitioning uses `expr` from the
parser. This rule comes with all the rings and bells including subqueries.
However, these commands are not subquery safe. For this reason there are two
fuse checks in the parser. They were checking by command id. CREATE EVENT
should forbid subquery is the fix for
bug#16394 Events: Crash if schedule contains SELECT
The fix has been incorporated as part of the patch for WL#3337 (Event scheduler
new architecture).
Solution:
A new flag was added to LEX command_forbids_subselect. The fuse checks were
changed. The commands are responsible to set the value to true whenever
they can't handle subselects.
sql/sql_lex.cc:
initialize the variable
sql/sql_lex.h:
Add a new flag whether the parser should allow a subselect when
parsing. This is temporarily turned off by commands like CREATE|ALTER EVENT,
HA_READ, KILL. Could be used by other parts which reuse `expr` rule of the
grammar and should not allow subqueries as part of it.
sql/sql_yacc.yy:
Forbid subselects in some commands in a better way.
CREATE|ALTER EVENT, HANDLER READ, KILL, are not subselect
safe for parameters and therefore they should be forbidden already in
the parser.
This patch makes it easier for the developer to add new commands in that
sense similar to the mentioned above.
into bk-internal.mysql.com:/data0/bk/mysql-5.1
client/mysql.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/r/type_newdecimal.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
mysql-test/t/gis.test:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/type_newdecimal.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
server-tools/instance-manager/messages.cc:
Auto merged
sql/item_geofunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/share/errmsg.txt:
Auto merged
tests/mysql_client_test.c:
Auto merged
into maint1.mysql.com:/data/localhome/cmiller/bug20908/my51-bug20908
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/sql_lex.cc:
Auto merged
Zero-length variables caused failures when using the length to look
up the name in a hash. Instead, signal that no zero-length name can
ever be found and that to encounter one is a syntax error.
mysql-test/r/variables.result:
Results for test.
mysql-test/t/variables.test:
Insert tests to prove that zero-length variable names do not cause
faults.
sql/gen_lex_hash.cc:
If the length is zero, then there is nothing to look-up in the
hash.
sql/sql_lex.cc:
Names of variables must not be empty. Signal an error of that
happens.
- if there are two character set definitions in the column declaration,
we replace the first one with the second one as we store both in the LEX->charset
slot. Add a separate slot to the LEX structure to store underscore charset.
- convert default values to the column charset of STRING, VARSTRING fields
if necessary as well.
mysql-test/r/ctype_recoding.result:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- test result.
mysql-test/t/ctype_recoding.test:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- test case.
sql/sql_lex.cc:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_lex.h:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
sql/sql_table.cc:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- convert default values to the column charset of VARSTRING, STRING, ENUM,
SET fields if necessary.
sql/sql_yacc.yy:
Fix for bug #20695: Charset introducer overrides charset definition for column.
- LEX->underscore_charset introduced to store UNDERSCORE_CHARSET
into example.com:/work/mysql-5.1-runtime-wl3337
BitKeeper/etc/ignore:
auto-union
client/mysqltest.c:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp_notembedded.result:
Auto merged
sql/CMakeLists.txt:
Auto merged
sql/Makefile.am:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/share/errmsg.txt:
C
mysql-test/r/events_bugs.result:
update result
manual merge
mysql-test/r/ps_1general.result:
update result
manual merge
sql/sql_yacc.yy:
manual merge
client/mysqldump.c:
A post-merge fix - 'sock' was renamed to 'mysql'
mysql-test/r/events_bugs.result:
A post merge fix: now we strip rear comments from the query before
it gets into the log.
mysql-test/r/func_group.result:
A post merge fix: default clause is now printed uppercase.
mysql-test/r/im_life_cycle.result:
Fix my mistake in manual resolve.
mysql-test/r/mysqlcheck.result:
use test; - after we drop client_test_db there is no current database.
This cleanup is present in 5.1 only, but the test that was added in
5.0 assumes there is a current database, test.
mysql-test/r/mysqldump.result:
Ignore results of execution of mysqldump: we can't rely on
MASTER_LOG_POS in test results, it's different for statement
and row level logging.
mysql-test/r/mysqlshow.result:
A post-merge fix: information schema contains a few more tables
in 5.1
mysql-test/r/mysqltest.result:
A post merge fix: add 5.1 test end separator.
mysql-test/r/ndb_basic.result:
A post-merge fix: add test end separators.
mysql-test/r/rpl_switch_stm_row_mixed.result:
A post merge fix: length of varbinary column is now 3 times less.
Assuming a side effect of some other change. Length of any
field is not relevant in this test.
mysql-test/r/rpl_view.result:
Add an end of test marker.
mysql-test/r/show_check.result:
Remove duplicate results. Add results from a merged test case.
mysql-test/r/sp-error.result:
Add test end separators.
mysql-test/r/sp-security.result:
Post-merge fix: use test after the current database is dropped.
mysql-test/r/sp.result:
Remove a duplicate result (bad merge that left a copy of
the test case for Bug#19862 in the test suite).
mysql-test/r/strict.result:
An after-merge fix for a new test case: in 5.1 we issue a more accurate
error message: "Incorrect value" instead of "Truncated value". I reason
it so that in case of an error nothing is truncated, really.
Also found similar changes in other test cases.
mysql-test/r/type_datetime.result:
Fix the text of an error.
mysql-test/r/union.result:
A post-merge fix: CHARACTER SET is now uppercase.
mysql-test/t/mysqlcheck.test:
A post-merge fix: use test, after current database is dropped, there
is no current database.
mysql-test/t/mysqldump.test:
Disable result log: it's dependent on binlog position.
mysql-test/t/sp-security.test:
use test
sql/item_sum.cc:
Adjust the call to the constructor after the merge.
sql/sp_head.cc:
Add a missing DBUG_VOID_RETURN, move security checks out of
execute_trigger to Table_triggers_list: in 5.1 we check for
TRIGGER privilege, not SUPER privilege to execute triggers, so these
checks lack table context inside execute_trigger and have to be
performed when we have table object on hand.
sql/sql_db.cc:
A post-merge fix: adjust load_db_opt_by_name and check_db_dir_existence
(new functions added in 5.0) to be tablename-to-filename encoding
friendly.
sql/sql_lex.cc:
A post-merge fix: make skip_rear_comments operate on const uchar *s.
sql/sql_lex.h:
A post-merge fix.
sql/sql_show.cc:
A post-merge fix: fix a bad merge, rename orig_sql_command -> sql_command.
sql/sql_trigger.cc:
A post-merge fix: move security checks to process_triggers
from execute_trigger.
sql/sql_view.cc:
Adjust to the new signature of skip_rear_comments.
sql/sql_yacc.yy:
Adjust to the new signature of init_strings.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
dbug/dbug.c:
Auto merged
extra/perror.c:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqlcheck.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.h:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
mysql-test/r/im_life_cycle.result:
e
use local
mysql-test/r/ps.result:
use local
client/Makefile.am:
Manual merge.
client/mysqlimport.c:
Manual merge.
configure.in:
Manual merge.
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/r/mysqldump.result:
Manual merge.
mysql-test/r/mysqltest.result:
Manual merge.
mysql-test/r/ndb_basic.result:
Manual merge.
mysql-test/r/rpl_view.result:
Manual merge.
mysql-test/r/show_check.result:
Manual merge.
mysql-test/r/sp-error.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/union.result:
Manual merge.
mysql-test/t/mysqldump.test:
Manual merge.
mysql-test/t/mysqltest.test:
Manual merge.
mysql-test/t/ndb_basic.test:
Manual merge.
mysql-test/t/rpl_sp.test:
Manual merge.
mysql-test/t/rpl_view.test:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/item_sum.cc:
Manual merge.
sql/mysql_priv.h:
Manual merge.
sql/sp_head.cc:
Manual merge.
sql/sql_db.cc:
Manual merge.
sql/sql_delete.cc:
Manual merge.
sql/sql_lex.h:
Manual merge.
sql/sql_show.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
client/mysql.cc:
Auto merged
mysql-test/r/im_life_cycle.result:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
Problem: Unescaping of '\' characters didn't work when processing N'xxx'.
Fix: using get_text() instead of get_token() when scanning nationa strings.
mysql-test/r/ctype_utf8.result:
Adding test case
mysql-test/t/ctype_utf8.test:
Adding test case
sql/sql_lex.cc:
Fixing to process national strings using get_tex(),
i.e. the same way with usual strings, to make
unescaping work.
can be not replicable.
Now CREATE statements for writing in the binlog are created as follows:
- the beginning of the statement is re-created;
- the rest of the statement is copied from the original query.
The problem appears when there is a version-specific comment (produced by
mysqldump), started in the re-created part of the statement and closed in the
copied part -- there is closing comment-parenthesis, but there is no opening
one.
The proper fix could be to re-create original statement, but we can not
implement it in 5.0. So, for 5.0 the fix is just to cut closing
comment-parenthesis. This technique is also used for SHOW CREATE PROCEDURE
statement (so we are able to reuse existing code).
mysql-test/r/rpl_sp.result:
Updated result file.
mysql-test/r/rpl_trigger.result:
Updated result file.
mysql-test/r/rpl_view.result:
Updated result file.
mysql-test/t/rpl_sp.test:
Added test case for BUG#20438.
mysql-test/t/rpl_trigger.test:
Added test case for BUG#20438.
mysql-test/t/rpl_view.test:
Added test case for BUG#20438.
sql/sp.cc:
Trim comments at the end.
sql/sp_head.cc:
Moved this code to the separate function to be re-used.
sql/sql_lex.cc:
Added a new function.
sql/sql_lex.h:
Added a new function.
sql/sql_trigger.cc:
Trim comments at the end.
sql/sql_view.cc:
Trim comments at the end.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
mysql-test/r/func_sapdb.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/sp-vars.result:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
sql/field_conv.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
mysql-test/r/information_schema.result:
Use local
mysql-test/t/information_schema.test:
Manual merge.
sql/sql_lex.h:
Manual merge.
Final stroke, events should be loaded from disk on server startup.
Also check the validity of their bodies if possible during loading.
sql/event_data_objects.cc:
Remove Event_job_data::free_sp(), move the code to the destructor
Change the way we change the security context
Steal some code from sql_parse.cc
sql/event_data_objects.h:
Remove free_sp()
Make compile() public, to be used when booting for verifying the integrity of mysql.event
sql/event_queue.cc:
Make the queue load events from disk on server boot.
Compile and thus check for integrity the events.
sql/event_queue.h:
shift methods around. add queue_loaded boolean.
sql/event_scheduler.cc:
Rename init_event_thread() to pre_init_event_thread()
and make it more generic.
Add post_init_event_thread()
Export these two as well as deinit_event_thread().
Now it is quite easy to write code to spawn a new event thread
whenever needed.
sql/event_scheduler.h:
export pre_init_event_thread(), post_init_event_thread() and deinit_event_thread()
to simplify writing of thread functions.
sql/events.cc:
Events::init() returns only one error code, then make it bool
sql/events.h:
Events::init() returns only one error code, then make it bool
sql/mysqld.cc:
Check the return code of Events::init()
sql/sp_head.cc:
Add trace info
sql/sql_class.cc:
Reorganize thd::change_security_context() to load main_security_ctx
sql/sql_class.h:
Reorganize thd::change_security_context() to load main_security_ctx
sql/sql_lex.cc:
Initialize lex->spname
sql/sql_yacc.yy:
Add a comment
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
include/my_sys.h:
Auto merged
mysql-test/r/auto_increment.result:
Auto merged
mysql-test/r/func_math.result:
Auto merged
mysql-test/r/func_system.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
sql/slave.h:
SCCS merged
mysql-test/r/show_check.result:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
sql/log_event.cc:
Manual merge.
sql/share/errmsg.txt:
Manual merge.
sql/sql_class.h:
Manual merge.
sql/sql_db.cc:
Manual merge.
when dropping/creating tables"
mysql-test/r/ps.result:
A post-merge fix.
mysql-test/t/ps.test:
A post-merge fix: all 5.0 tests should go after 4.1 tests.
sql/sql_lex.cc:
auxilliary -> auxiliary
sql/sql_prepare.cc:
auxilliary -> auxiliary
sql/table.cc:
Update st_table_list::reinit_before_use in 5.0 to include 5.0-specific
cleanups.
sql/table.h:
st_table_list::reinit_before_use is public.
1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog":
a stored function inserting into two such tables may fail to replicate
(inserting wrong data in the slave's copy of the second table) if the slave's
second table had an internal auto_increment counter different from master's.
Because the auto_increment value autogenerated by master for the 2nd table
does not go into binlog, only the first does, so the slave lacks information.
To fix this, if running in mixed binlogging mode, if the stored function or
trigger plans to update two different tables both having auto_increment
columns, we switch to row-based for the whole function.
We don't have a simple solution for statement-based binlogging mode, there
the bug remains and will be documented as a known problem.
Re-enabling rpl_switch_stm_row_mixed.
2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored
functions, triggers, views", which was a documented limitation (in mixed
mode, we didn't detect that a stored function's execution needed row-based
binlogging (due to some UUID() call for example); same for
triggers, same for views (a view created from a SELECT UUID(), and doing
INSERT INTO sometable SELECT theview; would not replicate row-based).
This is implemented by, after parsing a routine's body, remembering in sp_head
that this routine needs row-based binlogging. Then when this routine is used,
the caller is marked to require row-based binlogging too.
Same for views: when we parse a view and detect that its SELECT needs
row-based binary logging, we mark the calling LEX as such.
3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog":
a temporary table containing e.g. UUID has its changes not binlogged,
so any query updating a permanent table with data from the temporary table
will run wrongly on slave. Solution: in mixed mode we don't switch back
from row-based to statement-based when there exists temporary tables.
4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog;
impossible due to BUG#11312 and BUG#20329, but test is in place for when
they are fixed.
mysql-test/r/rpl_switch_stm_row_mixed.result:
testing BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog",
testing BUG#20930 "Mixed binlogging mode does not work with stored functions,
triggers, views.
testing BUG#20499 "mixed mode with temporary table breaks binlog".
I have carefully checked this big result file, it is correct.
mysql-test/t/disabled.def:
re-enabling test
mysql-test/t/rpl_switch_stm_row_mixed.test:
Test for BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog":
we test that it goes row-based, but only when needed;
without the bugfix, master and slave's data differed.
Test for BUG#20499 "mixed mode with temporary table breaks binlog":
without the bugfix, slave had 2 rows, not 3.
Test for BUG#20930 "Mixed binlogging mode does not work with stored
functions, triggers, views".
Making strings used more different, for easier tracking of "by which routine
was this binlog line generated".
Towards the end, an attempt to test mysqlbinlog on a binlog generated by
the mixed mode; attempt failed because of BUG#11312 and BUG#20929.
sql/item_create.cc:
fix for build without row-based replication
sql/set_var.cc:
cosmetic: in_sub_stmt is exactly meant to say if we are in stored
function/trigger, so better use it.
sql/sp.cc:
When a routine adds its tables to the top statement's tables, if this routine
needs row-based binlogging, mark the entire top statement as well.
Same for triggers.
Needed for making the mixed replication mode work with stored functions
and triggers.
sql/sp_head.cc:
new enum value for sp_head::m_flags, remembers if, when parsing the
routine, we found at least one element (UUID(), UDF) requiring row-based
binlogging.
sql/sp_head.h:
new enum value for sp_head::m_flags (see sp_head.cc).
An utility method, intended for attributes of a routine which need
to propagate upwards to the caller; so far only used for binlogging
information, but open to any other attribute.
sql/sql_base.cc:
For BUG#19630 "stored function inserting into two auto_increment
breaks statement-based binlog":
When we come to locking tables, we have collected all tables used by
functions, views and triggers, we detect if we're going to update two tables
having auto_increment columns. If yes, statement-based binlogging won't work
(Intvar_log_event records only one insert_id) so, if in mixed binlogging
mode, switch to row-based.
For making mixed mode work with stored functions using UUID/UDF:
when we come to locking tables, we have parsed the whole body so know if
some elements need row-based. Generation of row-based binlog events
depends on locked tables, so this is the good place to decide of the binlog
format.
sql/sql_class.h:
Fix for BUG#20499 "mixed mode with temporary table breaks binlog".
Making mixed mode work with stored functions/triggers: don't reset
back to statement-based if in executing a stored function/trigger.
sql/sql_lex.cc:
fix for build without row-based replication.
binlog_row_based_if_mixed moves from st_lex to Query_tables_list, because
that boolean should not be affected when a SELECT reads the INFORMATION_SCHEMA
and thus implicitely parses a view or routine's body: this body may
contain needing-row-based components like UUID() but the SELECT on
INFORMATION_SCHEMA should not be affected by that and should not use
row-based; as Query_tables_list is backed-up/reset/restored when parsing
the view/routine's body, so does binlog_row_based_if_mixed and the
top SELECT is not affected.
sql/sql_lex.h:
fix for build without row-based replication.
binlog_row_based_if_mixed moves from st_lex to Query_tables_list
(see sql_lex.cc)
sql/sql_parse.cc:
For the mixed mode to work with stored functions using UUID and UDF, we need
to move the switch-back-from-row-to-statement out of
mysql_execute_command() (which is executed for each statement, causing
the binlogging mode to change in the middle of the function, which would
not work)
The switch to row-based is now done in lock_tables(), no need to keep it
in mysql_execute_command(); in lock_tables() we also switch back from
row-based to statement-based (so in a stored procedure, all statements
have their binlogging mode). We must however keep a resetting in
mysql_reset_thd_for_next_command() as e.g. CREATE PROCEDURE does not call
lock_tables().
sql/sql_view.cc:
When a view's body needs row-based binlogging (e.g. the view is created
from SELECT UUID()), propagate this fact to the top st_lex.
sql/sql_yacc.yy:
use TRUE instead of 1, for binlog_row_based_if_mixed.
dropping/creating tables".
The bug could lead to a crash when multi-delete statements were
prepared and used with temporary tables.
The bug was caused by lack of clean-up of multi-delete tables before
re-execution of a prepared statement. In a statement like
DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is
moved to lex->auxilliary_table_list and excluded from lex->query_tables
or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use
and not cleaned up before re-execution of a prepared statement.
mysql-test/r/ps.result:
Updated test results (Bug#19399)
mysql-test/t/ps.test:
A test case for Bug#19399 "Stored Procedures 'Lost Connection' when
dropping/creating tables": test that multi-delete
tables are cleaned up properly before re-execution.
sql/sql_lex.cc:
Always initialize auxilliary_table_list when we initialize the lex:
this way we don't have to check that lex->sql_command equals to
SQLCOM_DELETE_MULTI whenever we need to access auxilliary_table_list.
In particular, in reinit_stmt_before_use we can simply check that
auxilliary_table_list is not NULL and clean it up if the check returns
a true value.
sql/sql_prepare.cc:
Move the one table clean-up functionality to a method of st_table_list.
Clean up auxiliary_table_list if it's not empty.
sql/table.cc:
Implement st_table_list::reinit_before_use().
sql/table.h:
Declare st_table_list::reinit_before_use().
This cut No 7 should finish the part of fixing the parsing of the events :
- Event_timed is no more used during parsing. Less problems because it has
a mutex. Event_parse_data class is used during parsing. It is suited only
for this purpose. It's pretty lightweight
- Late checking of data from parsing is being performed. This should solve
the problems of nested events in SP or other events (for the situation
of no nested bodies). Before if an ALTER EVENT was in a SP, then when the
SP was compiled, and not executed, the actual init_xxx methods of Event_timed
were called, which is wrong.
- It could be a side effect of using a specialized class, but test events_stress is
now 25% quicker.
Cut No8 will start splitting Event_scheduler into 2 parts, the QUEUE will be moved
to Event_queue.
mysql-test/r/events.result:
update result
mysql-test/t/events.test:
disabled is actually wrong, should be disable, but because of the early
checking it was never parsed.
sql/event_data_objects.cc:
move add init_xxx methods from Event_timed to Event_parse_data
Event_parse data does not need definer_user and definer_host
in Event_timed::compile() do not use lex.et, well there is no more lex.et :)
sql/event_data_objects.h:
move parsing responsibilities from Event_timed to Event_parse_data
sql/event_db_repository.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_db_repository.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_scheduler.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/event_scheduler.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/events.cc:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/events.h:
No more Event_timed comes from parsing but Event_parse_data
The initialization of Item*-s from parsing is done late, and not
during the actual parsing. This is the right way to go because
if an ALTER EVENT is inside a SP or CREATE EVENT it should not be
executed (initialized) during parsing, as it was done.
sql/sql_lex.cc:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
sql/sql_lex.h:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
sql/sql_parse.cc:
lex->et_compile_phase and lex->et are no more.
Use lex->event_parse_data
ACL checks were moved inside the Events subsystem.
Also ending of the transaction is performed only just
before doing disk operation. Therefore only when needed.
sql/sql_yacc.yy:
lex->et and lex->et_parse_phase are no more
Use the specialized for parsing Event_parse_data
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.
The solution is to remember that original value.
mysql-test/r/auto_increment.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
Add result for bug#17203.
mysql-test/r/subselect.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
Add test case for bug#17203.
sql/sql_lex.cc:
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore
SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user.
Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
into mysql.com:/home/my/mysql-5.1
mysql-test/extra/rpl_tests/rpl_log.test:
Auto merged
mysql-test/r/rpl_ndb_log.result:
Auto merged
mysql-test/r/rpl_row_log.result:
Auto merged
mysql-test/r/rpl_row_log_innodb.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/mysql_priv.h:
SCCS merged
SHOW STATUS are not anymore put in slow query log because of no index usage.
Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command()
This simplifies code and allows us to remove some if statements all over the code.
Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands.
This allowed some overall simplifaction when testing sql_command.
Fixes bugs:
Bug#10210: running SHOW STATUS increments counters it shouldn't
Bug#19764: SHOW commands end up in the slow log as table scans
mysql-test/r/grant_cache.result:
Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/information_schema.result:
Added extra test to cover more code
mysql-test/r/query_cache.result:
Remove resuts from previous tests
mysql-test/r/status.result:
Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
(Bug#10210)
mysql-test/r/temp_table.result:
Fixed results after SHOW STATUS doesn't anymore affect status variables
mysql-test/r/union.result:
Fixed results after SHOW STATUS is not logged to slow query log
(Bug#19764)
mysql-test/t/events_microsec.test:
Disable warnings at init
mysql-test/t/information_schema.test:
Added extra test to cover more code
mysql-test/t/query_cache.test:
Remove resuts from previous tests
mysql-test/t/status.test:
Added more tests for testing of last_query_cost and how SHOW STATUS affects status variables.
(Bug #10210)
sql/mysql_priv.h:
Added 'sql_command_flags'
sql/sql_class.cc:
New function add_diff_to_status(), used to update global status variables when using SHOW STATUS
sql/sql_class.h:
New function 'fill_information_schema_tables()'
(One could not anymore use fill_derived_tables() for this as only_view_structures() is not relevant for information schema tables)
Added defines for bit flags in sql_command_flags[]
sql/sql_lex.cc:
Remove orig_sql_command
sql/sql_lex.h:
Remove orig_sql_command
sql/sql_parse.cc:
Rename uc_update_queries -> sql_command_flags.
Enhanced 'sql_command_flags' to better classify SQL commands
uc_update_queries[] != 0 is changed to (sql_command_flags[] & CF_CHANGES_DATA)
lex->orig_sql_command == SQLCOM_END is changed to (sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0)
Simplify incrementing of thd->status_var.com_stat[] as we don't have to do special handling for SHOW commands.
Split SQLCOM_SELECT handling in mysql_execute_command() to a separate function.
Added special handling of SHOW STATUS commands in mysql_execute_command() and call common SQLCOM_SELECT handling.
These changes allows us to easily fix that we save and restore status variables during execution of a SHOW STATUS command.
Don't log SHOW STATUS commands to slow query log.
This fixes Bug#10210 and Bug#19764 without adding additional 'if' code.
(The new code is faster than the original as we now have fewer if's than before)
sql/sql_prepare.cc:
Clean up prepare-check handling of SQLCOM commands by using sql_command_flags[]
This simplifes code and ensures that code works even if someone forgets to put a new status commands into the switch statement.
sql/sql_select.cc:
Remove special handling of SHOW STATUS.
(This is now done in SQLCOM_SHOW_STATUS part in mysql_execute_command())
sql/sql_show.cc:
Remove orig_sql_command
Only change sql_command during 'open_normal_and_derived_tables()' (for views) and not for the full duration of generating data.
Changed 'show status' to use thd->initial_status_var to ensure that the current statement is not affecting the to-be-used values.
Use thd->fill_information_schema_tables() instead of 'thd->fill_derived_tables()' as the later wrongly checks the value of sql_command.
sql/sql_yacc.yy:
Remove usage of orig_sql_command.
One side effect of this is that we need to test for cursors if the current command is a SELECT or a SHOW command.
sql/structs.h:
Updated comment
Old FRM files didn't allow byte 255 as a column name part.
Since now we store column names in UTF8, this restriction
is not required anymore: 255 is not a valid byte in UTF8.
Fix: removing checking against 255.
mysql-test/r/ctype_latin1.result:
Adding test case
mysql-test/t/ctype_latin1.test:
Adding test case
sql/sql_lex.cc:
Removing old code, unnecessary anymore.
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/r/lock_multi.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/lock_multi.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/default.c:
Auto merged
server-tools/instance-manager/guardian.cc:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/table.cc:
Auto merged
storage/heap/hp_write.c:
Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
Auto merged
client/mysqlbinlog.cc:
Manual merge from 5.0
client/mysqldump.c:
Manual merge from 5.0
configure.in:
Manual merge from 5.0
mysql-test/r/mysqldump.result:
Manual merge from 5.0
mysql-test/t/mysqldump.test:
Manual merge from 5.0
mysql-test/t/rpl_insert_id.test:
Manual merge from 5.0
server-tools/instance-manager/manager.cc:
Manual merge from 5.0
sql/field.cc:
Manual merge from 5.0
sql/ha_ndbcluster.cc:
Manual merge from 5.0
sql/mysqld.cc:
Manual merge from 5.0
sql/sql_base.cc:
Manual merge from 5.0
sql/sql_lex.cc:
Manual merge from 5.0
sql/sql_select.cc:
Manual merge from 5.0
sql/sql_table.cc:
Manual merge from 5.0
Bug#18282 "INFORMATION_SCHEMA.TABLES provides inconsistent info about invalid views"
This bug caused crashes or resulted in wrong data being returned
when one tried to obtain information from I_S tables about views
using stored functions.
It was caused by the fact that we were using LEX representing
statement which were doing select from I_S tables as active LEX
when contents of I_S table were built. So state of this LEX both
affected and was affected by open_tables() calls which happened
during this process. This resulted in wrong behavior and in
violations of some of invariants which caused crashes.
This fix tries to solve this problem by properly saving/resetting
and restoring part of LEX which affects and is affected by the
process of opening tables and views in get_all_tables() routine.
To simplify things we separated this part of LEX in a new class
and made LEX its descendant.
mysql-test/r/information_schema_db.result:
test case
mysql-test/t/information_schema_db.test:
test case
sql/sql_lex.cc:
To simplify saving/resetting and restoring part of LEX which
affects and is affected by the process of opening tables and
views we moved it to new class Query_tables_list and made LEX
descendant of this class. Also introduced two LEX methods
which can be used to save and reset or to restore this state.
sql/sql_lex.h:
To simplify saving/resetting and restoring part of LEX which
affects and is affected by the process of opening tables and
views we moved it to new class Query_tables_list and made LEX
descendant of this class. Also introduced two LEX methods
which can be used to save and reset or to restore this state.
sql/sql_show.cc:
Now in get_all_tables() routine we properly save/reset and
restore part of LEX (statement table list and information
about routines used) which affects and is affected by the
process of opening tables and views.
sql/sql_table.cc:
Now we clean-up LEX after opening table (view) in two stages.
In the first stage we call LEX::cleanup_after_one_table_open()
to clean-up selects lists and derived tables state. In the
second stage which happens after close_thread_tables() is
invoked we call Query_tables_list::reset_query_tables_list(FALSE)
to rollback changes in Query_tables_list.
into mysql.com:/data0/mysqldev/my/mysql-5.1-release
extra/comp_err.c:
Auto merged
mysql-test/r/ctype_sjis.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
configure.in:
merged
into mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
scripts/mysqld_multi.sh:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
configure.in:
merged
extra/comp_err.c:
merged
revert the fix for bug#8303
correct the test for bug#8378
mysql-test/r/ctype_sjis.result:
updated
mysql-test/t/ctype_sjis.test:
updated
sql/sql_lex.cc:
revert the fix for bug#8303
tests/mysql_client_test.c:
correct the test for bug#8378
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.
mysql-test/r/having.result:
Added a test case for bug #14927.
mysql-test/t/having.test:
Added a test case for bug #14927.
sql/sql_lex.cc:
Fixed bug #14927.
Initialized fields for having conditions in st_select_lex::init_query().
sql/sql_lex.h:
Fixed bug #14927.
Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
Fixed bug #14927.
Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
Fixed bug #14927.
Performed evaluation of constant expressions in having clauses.
If the having condition contains a constant conjunct that is always false
an empty result set is returned after the optimization phase.
In this case the corresponding EXPLAIN command now returns
"Impossible HAVING" in the last column.
into mysql.com:/home/my/mysql-5.1
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/subselect.result:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_lex.cc:
manual merge
mysql-test-run now fails in case of warnings
mysql-test/lib/mtr_report.pl:
Fail if find warnings
mysql-test/mysql-test-run.sh:
Fail if find warnings
sql/sql_lex.cc:
Initalize st_lex properly
sql/sql_view.cc:
Fixed problem with unaligned memory (wrong free)
Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
Fixed some memory leaks
configure.in:
Move plugin declarations after system functions have been checked
(Fixes problem with ndb_config failing becasue SHM is not declared)
mysql-test/t/disabled.def:
Disabled ndb_load, as it is in 5.0
(Fails randomly in binlog_close_connection())
mysql-test/t/log_tables.test:
Update error numbers
mysql-test/t/ndb_config.test:
Moved test depending on SHM to ndb_config2.test
mysql-test/t/ndb_partition_error.test:
Update error numbers
sql/event_timed.cc:
Removed not needed line
sql/ha_berkeley.cc:
Fixed compiler warning
sql/ha_heap.cc:
Fixed compiler warning
sql/ha_innodb.cc:
Fixed compiler warning
sql/ha_myisam.cc:
Fixed compiler warning
sql/ha_myisammrg.cc:
Fixed compiler warning
sql/ha_ndbcluster.cc:
Fixed compiler warning
sql/ha_partition.cc:
Fixed compiler warning
sql/mysql_priv.h:
After merge fix
sql/mysqld.cc:
Fixed memory leak in skip_grant.test
sql/share/errmsg.txt:
Removed wrong error messages
sql/sql_lex.cc:
More debugging
Faster lex_end()
sql/sql_partition.cc:
Fixed memory leak
sql/sql_view.cc:
Fixed memory leak
mysql-test/r/ndb_config2.result:
New BitKeeper file ``mysql-test/r/ndb_config2.result''
mysql-test/t/ndb_config2.test:
New BitKeeper file ``mysql-test/t/ndb_config2.test''
- detect the need for row-based binlogging not at execution stage but earlier at parsing stage; needed for example for CREATE TABLE SELECT UUID().
- more tests of this mixed mode.
mysql-test/r/rpl_switch_stm_row_mixed.result:
result update
mysql-test/t/rpl_switch_stm_row_mixed.test:
testing more scenarios for the mixed replication mode.
Added support for manual testing of UDFs vs the mixed mode (behind a variable in the test).
Changing old file names to better ones.
sql/item_create.cc:
at parse time, when we see a UUID(), put up a flag in LEX to say this binlogs properly only with row-based binlogging.
sql/item_func.cc:
it's not perfect to put up the flag at this execution stage, better do it at parse stage.
sql/item_strfunc.cc:
it's not perfect to put up the flag at this execution stage, better do it at parse stage
sql/set_var.cc:
this assertion is wrong, this piece of code can happen in RBR mode too.
sql/sql_lex.cc:
when we reinitialize the LEX members before every query, we have to reinitialize the new flag
sql/sql_lex.h:
A new flag, set at parsing stage, which tells if some items seen during parsing stage require row-based replication to binlog/replicate correctly
when this statement is later executed.
It has to be in LEX and not directly in THD, for this to work in prepared statements.
sql/sql_parse.cc:
Parsing stage happened at some time in the past and set up the flag in LEX, now that we execute the statement we actually turn on row-based binlogging
if the thread's binlog format is "mixed". We then turn it off when leaving mysql_execute_command().
Some cleanup code was not executed if leaving mysql_execute_command() at the "error" label, fixing this. A better fix than the "goto end" would be
to modify each "goto error" to "res=1; goto end" but it required changing many lines which I don't want to do now ("make smallest possible patch").
sql/sql_yacc.yy:
When at parsing stage we see a UDF we put up a flag to say that row-based binlogging is preferred.
into zim.(none):/home/brian/mysql/mysql-5.1-new
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
into zim.(none):/home/brian/mysql/mysql-5.1-new
configure.in:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
Makes you wonder what I am up to, doesn't?
configure.in:
Adjusts bison to not create symbols that clash.
sql/sql_analyse.cc:
Adding define to make sure sql_yacc.h gets included.
sql/sql_lex.cc:
Fixing it so that sql_yacc.h is included
sql/sql_lex.h:
Fixing include rules
sql/sql_parse.cc:
Adding flag to compile sql_yacc.yy
into mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.1-merged
client/mysqldump.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/rpl_ddl.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/sql_mode.result:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/skip_grants.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
mysql-test/lib/mtr_cases.pl:
Manually merged.
sql/sp.cc:
Manually merged.
sql/sql_yacc.yy:
Manually merged.
into mysql.com:/home/kostja/mysql/mysql-5.1-merge
BitKeeper/deleted/.del-ndb_load.result:
Delete: mysql-test/r/ndb_load.result
BitKeeper/deleted/.del-ndb_load.test:
Delete: mysql-test/t/ndb_load.test
extra/perror.c:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/ndb_blob.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/sp-destruct.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
Auto merged
storage/ndb/src/kernel/main.cpp:
Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp:
Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
Auto merged
storage/ndb/tools/delete_all.cpp:
Auto merged
mysql-test/t/disabled.def:
Manual merge.
A query with a group by and having clauses could return a wrong
result set if the having condition contained a constant conjunct
evaluated to FALSE.
It happened because the pushdown condition for table with
grouping columns lost its constant conjuncts.
Pushdown conditions are always built by the function make_cond_for_table
that ignores constant conjuncts. This is apparently not correct when
constant false conjuncts are present.
mysql-test/r/having.result:
Added A test case for bug #14927.
mysql-test/t/having.test:
Added A test case for bug #14927.
sql/sql_lex.cc:
Fixed bug #14927.
Initialized fields for having conditions in st_select_lex::init_query().
sql/sql_lex.h:
Fixed bug #14927.
Added a field to restore having condititions for execution in SP and PS.
sql/sql_prepare.cc:
Fixed bug #14927.
Added code to restore havinf conditions for execution in SP and PS.
sql/sql_select.cc:
Fixed bug #14927.
Performed evaluation of constant expressions in having clauses.
If the having condition contains a constant conjunct that is always false
an empty result set is returned after the optimization phase.
In this case the corresponding EXPLAIN command now returns
"Impossible HAVING" in the last column.
merge before push
BUILD/SETUP.sh:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
sql/Makefile.am:
Auto merged
sql/lex.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp.h:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.cc:
Auto merged
sql/tztime.cc:
Auto merged
libmysqld/Makefile.am:
manual merge
mysql-test/r/information_schema.result:
manual merge
sql/share/errmsg.txt:
manual merge
sql/sp_head.cc:
manual merge
sql/sql_lex.h:
manual merge
sql/sql_yacc.yy:
manual merge
into mysql.com:/home/jimw/my/mysql-5.1-clean
mysql-test/r/sp.result:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_base.cc:
Resolve conflict
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
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_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
into mysql.com:/home/timka/mysql/src/5.1-dbg
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
sql/sql_base.cc:
SCCS merged
sql/table.cc:
SCCS merged
Post-review fixes according to Monty's review.
sql/item.h:
Unite all code that stores and restores the state of a name resolution context
into a class to represent the state, and methods to save/restore that
state.
sql/mysql_priv.h:
Reorder parameters so that length is after the name of a field,
and database is before table name.
sql/sql_acl.cc:
Reorder parameters so that length is after the name of a field,
and database is before table name.
sql/sql_base.cc:
* Reorder parameters so that length is after the name of a field,
and database is before table name.
* Added new method - Field_iterator_table_ref::get_natural_column_ref
to avoid unnecessary code when it is knwon that no new columns will
be created when accessing natural join columns.
sql/sql_insert.cc:
Unite all code that stores and restores the state of a name resolution context
into a class to represent the state, and methods to save/restore that
state.
sql/sql_lex.cc:
Removed obsolete comment.
sql/sql_lex.h:
Return error from push_contex() if there is no memory.
sql/sql_list.h:
Extended base_list_iterator, List_iterator, and List_iterator_fast with an
empty constructor, and init() methods, so that one doesn't have to construct
a new iterator object every time one needs to iterate over a new list.
sql/sql_parse.cc:
Moved common functionality from the parser into one function, and renamed
the function to better reflect what it does.
sql/sql_yacc.yy:
Moved common functionality from the parser into one function, and renamed
the function to better reflect what it does.
sql/table.cc:
* Extended base_list_iterator, List_iterator, and List_iterator_fast with an
empty constructor, and init() methods, so that one doesn't have to construct
a new iterator object every time one needs to iterate over a new list.
* Added new method Field_iterator_table_ref::get_natural_column_ref to be
used in cases when it is known for sure that no new columns should be
created.
sql/table.h:
- column_ref_it no longer allocated for each new list of columns
- new method get_natural_join_column for faster/simpler access
to natural join columns.
into mysql.com:/home/my/mysql-5.1-TDC
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_federated.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/key.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/parse_file.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_acl.cc:
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_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/structs.h:
Auto merged
sql/field.cc:
Merge with global tree
sql/sql_base.cc:
Merge with global tree
sql/table.cc:
Merge with global tree
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
object and open a handler to the table object
Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it
- For a busy system this change will give you:
- Less memory usage for table object
- Faster opening of tables (if it's has been in use or is in table definition cache)
- Allow you to cache many table definitions objects
- Faster drop of table
mysql-test/mysql-test-run.sh:
Fixed some problems with --gdb option
Test both with socket and tcp/ip port that all old servers are killed
mysql-test/r/flush_table.result:
More tests with lock table with 2 threads + flush table
mysql-test/r/information_schema.result:
Removed old (now wrong) result
mysql-test/r/innodb.result:
Better error messages (thanks to TDC patch)
mysql-test/r/merge.result:
Extra flush table test
mysql-test/r/ndb_bitfield.result:
Better error messages (thanks to TDC patch)
mysql-test/r/ndb_partition_error.result:
Better error messages (thanks to TDC patch)
mysql-test/r/query_cache.result:
Remove tables left from old tests
mysql-test/r/temp_table.result:
Test truncate with temporary tables
mysql-test/r/variables.result:
Table_cache -> Table_open_cache
mysql-test/t/flush_table.test:
More tests with lock table with 2 threads + flush table
mysql-test/t/merge.test:
Extra flush table test
mysql-test/t/multi_update.test:
Added 'sleep' to make test predictable
mysql-test/t/query_cache.test:
Remove tables left from old tests
mysql-test/t/temp_table.test:
Test truncate with temporary tables
mysql-test/t/variables.test:
Table_cache -> Table_open_cache
mysql-test/valgrind.supp:
Remove warning that may happens becasue threads dies in different order
mysys/hash.c:
Fixed wrong DBUG_PRINT
mysys/mf_dirname.c:
More DBUG
mysys/mf_pack.c:
Better comment
mysys/mf_tempdir.c:
More DBUG
Ensure that we call cleanup_dirname() on all temporary directory paths.
If we don't do this, we will get a failure when comparing temporary table
names as in some cases the temporary table name is run through convert_dirname())
mysys/my_alloc.c:
Indentation fix
sql/examples/ha_example.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_example.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/field.cc:
Update for table definition cache:
- Field creation now takes TABLE_SHARE instead of TABLE as argument
(This is becasue field definitions are now cached in TABLE_SHARE)
When a field is created, one now must call field->init(TABLE) before using it
- Use s->db instead of s->table_cache_key
- Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
- make_field() takes TABLE_SHARE as argument instead of TABLE
- move_field() -> move_field_offset()
sql/field.h:
Update for table definition cache:
- Field creation now takes TABLE_SHARE instead of TABLE as argument
(This is becasue field definitions are now cached in TABLE_SHARE)
When a field is created, one now must call field->init(TABLE) before using it
- Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
- make_field() takes TABLE_SHARE as argument instead of TABLE
- move_field() -> move_field_offset()
sql/ha_archive.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_archive.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_berkeley.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Changed name of argument create() to not hide internal 'table' variable.
table->s -> table_share
sql/ha_berkeley.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_federated.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Fixed comments
Remove index variable and replace with pointers (simple optimization)
move_field() -> move_field_offset()
Removed some strlen() calls
sql/ha_federated.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_heap.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Simplify delete_table() and create() as the given file names are now without extension
sql/ha_heap.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisam.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Remove not needed fn_format()
Fixed for new table->s structure
sql/ha_myisam.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisammrg.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Don't set 'is_view' for MERGE tables
Use new interface to find_temporary_table()
sql/ha_myisammrg.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Added flag HA_NO_COPY_ON_ALTER
sql/ha_ndbcluster.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Fixed wrong calls to strxnmov()
Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
drop_table -> intern_drop_table()
table->s -> table_share
Move part_info to TABLE
Fixed comments & DBUG print's
New arguments to print_error()
sql/ha_ndbcluster.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_partition.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
We can't set up or use part_info when creating handler as there is not yet any table object
New ha_intialise() to work with TDC (Done by Mikael)
sql/ha_partition.h:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
Got set_part_info() from Mikael
sql/handler.cc:
We new use TABLE_SHARE instead of TABLE when creating engine handlers
ha_delete_table() now also takes database as an argument
handler::ha_open() now takes TABLE as argument
ha_open() now calls ha_allocate_read_write_set()
Simplify ha_allocate_read_write_set()
Remove ha_deallocate_read_write_set()
Use table_share (Cached by table definition cache)
sql/handler.h:
New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
Remove ha_deallocate_read_write_set()
get_new_handler() now takes TABLE_SHARE as argument
ha_delete_table() now gets database as argument
sql/item.cc:
table_name and db are now LEX_STRING objects
When creating fields, we have now have to call field->init(table)
move_field -> move_field_offset()
sql/item.h:
tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
instead of BLOB
sql/item_cmpfunc.cc:
Fixed call to tmp_table_field_from_field_type()
sql/item_create.cc:
Assert if new not handled cast type
sql/item_func.cc:
When creating fields, we have now have to call field->init(table)
dummy_table used by 'sp' now needs a TABLE_SHARE object
sql/item_subselect.cc:
Trivial code cleanups
sql/item_sum.cc:
When creating fields, we have now have to call field->init(table)
sql/item_timefunc.cc:
Item_func_str_to_date::tmp_table_field() now replaced by call to
tmp_table_field_from_field_type() (see item_timefunc.h)
sql/item_timefunc.h:
Simply tmp_table_field()
sql/item_uniq.cc:
When creating fields, we have now have to call field->init(table)
sql/key.cc:
Added 'KEY' argument to 'find_ref_key' to simplify code
sql/lock.cc:
More debugging
Use create_table_def_key() to create key for table cache
Allocate TABLE_SHARE properly when creating name lock
Fix that locked_table_name doesn't test same table twice
sql/mysql_priv.h:
New functions for table definition cache
New interfaces to a lot of functions.
New faster interface to find_temporary_table() and close_temporary_table()
sql/mysqld.cc:
Added support for table definition cache of size 'table_def_size'
Fixed som calls to strnmov()
Changed name of 'table_cache' to 'table_open_cache'
sql/opt_range.cc:
Use new interfaces
Fixed warnings from valgrind
sql/parse_file.cc:
Safer calls to strxnmov()
Fixed typo
sql/set_var.cc:
Added variable 'table_definition_cache'
Variable table_cache renamed to 'table_open_cache'
sql/slave.cc:
Use new interface
sql/sp.cc:
Proper use of TABLE_SHARE
sql/sp_head.cc:
Remove compiler warnings
We have now to call field->init(table)
sql/sp_head.h:
Pointers to parsed strings are now const
sql/sql_acl.cc:
table_name is now a LEX_STRING
sql/sql_base.cc:
Main implementation of table definition cache
(The #ifdef's are there for the future when table definition cache will replace open table cache)
Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
Views are not yet cached; For the moment we only cache if a table is a view or not.
Faster implementation of find_temorary_table()
Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
Drop table is slightly faster as we can use the table definition cache to know the type of the table
sql/sql_cache.cc:
table_cache_key and table_name are now LEX_STRING
'sDBUG print fixes
sql/sql_class.cc:
table_cache_key is now a LEX_STRING
safer strxnmov()
sql/sql_class.h:
Added number of open table shares (table definitions)
sql/sql_db.cc:
safer strxnmov()
sql/sql_delete.cc:
Use new interface to find_temporary_table()
sql/sql_derived.cc:
table_name is now a LEX_STRING
sql/sql_handler.cc:
TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_insert.cc:
TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_lex.cc:
Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_lex.h:
Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_load.cc:
Safer strxnmov()
sql/sql_parse.cc:
Better error if wrong DB name
sql/sql_partition.cc:
part_info moved to TABLE from TABLE_SHARE
Indentation changes
sql/sql_select.cc:
Indentation fixes
Call field->init(TABLE) for new created fields
Update create_tmp_table() to use TABLE_SHARE properly
sql/sql_select.h:
Call field->init(TABLE) for new created fields
sql/sql_show.cc:
table_name is now a LEX_STRING
part_info moved to TABLE
sql/sql_table.cc:
Use table definition cache to speed up delete of tables
Fixed calls to functions with new interfaces
Don't use 'share_not_to_be_used'
Instead of doing openfrm() when doing repair, we now have to call
get_table_share() followed by open_table_from_share().
Replace some fn_format() with faster unpack_filename().
Safer strxnmov()
part_info is now in TABLE
Added Mikaels patch for partition and ALTER TABLE
Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
sql/sql_test.cc:
table_name and table_cache_key are now LEX_STRING's
sql/sql_trigger.cc:
TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
safer strxnmov()
Removed compiler warnings
sql/sql_update.cc:
Call field->init(TABLE) after field is created
sql/sql_view.cc:
safer strxnmov()
Create common TABLE_SHARE object for views to allow us to cache if table is a view
sql/structs.h:
Added SHOW_TABLE_DEFINITIONS
sql/table.cc:
Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
object and open a handler to the table object
open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
sql/table.h:
TABLE objects for the same database table now share a common TABLE_SHARE object
In TABLE_SHARE the most common strings are now LEX_STRING's
sql/unireg.cc:
Changed arguments to rea_create_table() to have same order as other functions
Call field->init(table) for new created fields
sql/unireg.h:
Added OPEN_VIEW
strings/strxnmov.c:
Change strxnmov() to always add end \0
This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
into a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new
Makefile.am:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
extra/Makefile.am:
Auto merged
include/Makefile.am:
Auto merged
include/my_global.h:
Auto merged
libmysqld/examples/Makefile.am:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/ndb_alter_table.result:
Auto merged
mysql-test/t/ndb_alter_table.test:
Auto merged
scripts/Makefile.am:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_federated.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisammrg.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/key.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/structs.h:
Auto merged
sql/table.cc:
Auto merged
sql/tztime.cc:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/ndb/docs/Makefile.am:
Auto merged
support-files/mysql.spec.sh:
Auto merged
libmysqld/Makefile.am:
Merged from 5.0 to 5.1.
sql/ha_berkeley.cc:
Merged from 5.0 to 5.1.
sql/lex.h:
Merged from 5.0 to 5.1.
sql/set_var.cc:
Merged from 5.0 to 5.1.
sql/share/errmsg.txt:
Merged from 5.0 to 5.1.
sql/sql_lex.h:
Merged from 5.0 to 5.1.
sql/sql_show.cc:
Merged from 5.0 to 5.1.
sql/sql_yacc.yy:
Merged from 5.0 to 5.1.
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_base.cc:
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_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.
sql/field.cc:
Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
Bad examples of usage of a string with its length fixed.
sql/handler.cc:
Inefficient usage of String::append() fixed.
sql/item.cc:
Bad examples of usage of a string with its length fixed.
sql/item.h:
A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
Inefficient using of String::append() fixed.
Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
Bad examples of usage of a string with its length fixed.
sql/key.cc:
Bad examples of usage of a string with its length fixed.
sql/log.cc:
Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
The dummy parser hook allocated.
sql/opt_range.cc:
Inefficient usage of String::append() fixed.
sql/parse_file.cc:
Bad examples of usage of a string with its length fixed.
A hook for unknown keys added to the parser.
sql/parse_file.h:
A hook for unknown keys added to the parser.
sql/protocol.cc:
A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
A warning for old format config file.
sql/slave.cc:
Bad examples of usage of a string with its length fixed.
sql/sp.cc:
Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
Bad examples of usage of a string with its length fixed.
Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
The macro definition moved to sql_string.h to
be accessible in all parts of server.
sql/sql_table.cc:
Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
fixed (BUG#14090).
The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
A dummy hook used for parsing views.
sql/structs.h:
The macro definition moved to sql_string.h to be
accessible in all parts of server.
sql/table.cc:
A bad example of usage of a string with its length fixed.
sql/tztime.cc:
A bad example of usage of a string with its length fixed.
into mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)
BitKeeper/etc/ignore:
auto-union
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/view.test:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.h:
Auto merged
storage/myisam/mi_key.c:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
Auto merged
support-files/mysql.spec.sh:
Auto merged
configure.in:
merge
mysql-test/r/ps_1general.result:
merge ("ul", will fix)
sql/examples/ha_tina.cc:
merge
sql/ha_innodb.cc:
merge
sql/handler.h:
merge
sql/log.cc:
merge
sql/set_var.cc:
merge
sql/share/errmsg.txt:
merge (bad, will fix)
sql/sql_show.cc:
merge (bad, will fix)
sql/sql_yacc.yy:
merge
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
merge
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysql_priv.h:
Manual merge
2. All have_xxx variables are now selectable.
sql/set_var.cc:
1. sys_have_xxx variables added.
2. Removed sys_var *sys_variables[] array as we don't need it any more.
3. void set_var_init() changed to use sys_var_xxx chain insted of sys_variables[] array.
sql/set_var.h:
1. add_sys_var() method added to the sys_var class. It's called from constructors
to chain all successor objects. The first one is stored in the 'static sys_var *first'.
The total number of variables is in the 'static uint sys_vars'. Each sys_var successor object
has the 'sys_var *next' pointer to the next one in the chain.
2. sys_var_have_variable class introduced to make all have_xxx variables selectable.
sql/sql_lex.cc:
trg_new_row_fake_var(0, 0) replaced with '(sys_var*) 0x01' as we don't want to have such fake variables in the sys_var_xxx chain.
sql/sql_lex.h:
Proper use of the changed trg_new_row_fake_var.
sql/sql_yacc.yy:
Proper use of the changed trg_new_row_fake_var.
into mysql.com:/home/my/mysql-5.1
BUILD/FINISH.sh:
Auto merged
BitKeeper/deleted/.del-makefilewin.i~5c8479dcb8a455b2:
Auto merged
BitKeeper/deleted/.del-makefilewin~13888739357b3025:
Auto merged
BitKeeper/deleted/.del-makefilewin~14f24a4a173e2fcd:
Auto merged
BitKeeper/deleted/.del-makefilewin~15e9e5c9e8fa870b:
Auto merged
BitKeeper/deleted/.del-makefilewin~1c53f31b88dd36e:
Auto merged
BitKeeper/deleted/.del-makefilewin~1dbc058d76ebf1db:
Auto merged
BitKeeper/deleted/.del-makefilewin~2e0407fe123f8365:
Auto merged
BitKeeper/deleted/.del-makefilewin~2fc379bd4065c995:
Auto merged
BitKeeper/deleted/.del-makefilewin~389ee2dcf79afb79:
Auto merged
BitKeeper/deleted/.del-makefilewin~4d139e182457e553:
Auto merged
BitKeeper/deleted/.del-makefilewin~5104767c73775697:
Auto merged
BitKeeper/deleted/.del-makefilewin~608ed49dcd88e0f7:
Auto merged
BitKeeper/deleted/.del-makefilewin~63acd666293282a:
Auto merged
BitKeeper/deleted/.del-makefilewin~6ba64863bce3d0b8:
Auto merged
BitKeeper/deleted/.del-makefilewin~72a64128bacce71b:
Auto merged
BitKeeper/deleted/.del-makefilewin~78000390c783b1c5:
Auto merged
BitKeeper/deleted/.del-makefilewin~7a9d7d5a42bbfaf5:
Auto merged
Makefile.am:
Auto merged
BitKeeper/deleted/.del-makefilewin~a40ea12eebdd6ef0:
Auto merged
BitKeeper/deleted/.del-makefilewin~aeea7c82f21f7cf5:
Auto merged
BitKeeper/deleted/.del-makefilewin~b643e38d8da389ac:
Auto merged
BitKeeper/deleted/.del-makefilewin~c7b621c745e5de95:
Auto merged
BitKeeper/deleted/.del-makefilewin~c8273a47b90f52bb:
Auto merged
BitKeeper/deleted/.del-makefilewin~d1a9d1f7d33fcb73:
Auto merged
BitKeeper/deleted/.del-makefilewin~d37b6b303348c871:
Auto merged
BitKeeper/deleted/.del-makefilewin~d90f35fdc3f2ee5f:
Auto merged
BitKeeper/deleted/.del-makefilewin~dc4b8ad5ea53bd:
Auto merged
BitKeeper/deleted/.del-makefilewin~dea10ec1c94f7be:
Auto merged
BitKeeper/deleted/.del-makefilewin~ef3a208fa0e9b0db:
Auto merged
BitKeeper/deleted/.del-makefilewin~f1e3b890aa1c9ea3:
Auto merged
BitKeeper/deleted/.del-makefilewin~f4b7b99a887b7de:
Auto merged
BitKeeper/deleted/.del-makefilewin~fdda94ad32fa9e34:
Auto merged
BitKeeper/deleted/.del-my_cnf~977f69858affc57b:
Auto merged
BitKeeper/etc/config:
Auto merged
VC++Files/libmysqld/libmysqld.dsp:
Auto merged
VC++Files/sql/mysqld.dsp:
Auto merged
client/mysqltest.c:
Auto merged
include/Makefile.am:
Auto merged
include/base64.h:
Auto merged
include/my_base.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/r/ndb_basic.result:
Auto merged
mysql-test/r/ndb_condition_pushdown.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysys/Makefile.am:
Auto merged
mysys/base64.c:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/Makefile.am:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_repl.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
storage/heap/_check.c:
Auto merged
storage/heap/hp_create.c:
Auto merged
storage/innobase/include/Makefile.am:
Auto merged
storage/innobase/include/rem0rec.h:
Auto merged
storage/innobase/include/rem0rec.ic:
Auto merged
storage/innobase/row/row0ins.c:
Auto merged
storage/innobase/row/row0upd.c:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_delete.c:
Auto merged
storage/myisam/mi_rkey.c:
Auto merged
storage/myisam/mi_rnext_same.c:
Auto merged
storage/myisam/mi_search.c:
Auto merged
storage/myisam/mi_write.c:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisam/myisamdef.h:
Auto merged
storage/myisam/sort.c:
Auto merged
storage/myisammrg/myrg_queue.c:
Auto merged
storage/ndb/config/type_util.mk.am:
Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
Auto merged
storage/ndb/include/mgmapi/ndbd_exit_codes.h:
Auto merged
storage/ndb/include/transporter/TransporterCallback.hpp:
Auto merged
storage/ndb/src/common/mgmcommon/IPCConfig.cpp:
Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.cpp:
Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.hpp:
Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp:
Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp:
Auto merged
storage/ndb/src/common/transporter/Transporter.hpp:
Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
Auto merged
storage/ndb/src/common/util/Makefile.am:
Auto merged
storage/ndb/src/common/util/Parser.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/kernel/vm/FastScheduler.cpp:
Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
Auto merged
storage/ndb/src/kernel/vm/VMSignal.hpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
Auto merged
storage/ndb/test/ndbapi/testBackup.cpp:
Auto merged
storage/ndb/test/ndbapi/testOperations.cpp:
Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
Auto merged
storage/ndb/tools/ndb_condig.cpp:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
support-files/mysql.spec.sh:
Auto merged
BUILD/SETUP.sh:
manual merge
configure.in:
manual merge
mysql-test/r/alter_table.result:
manual merge
sql/handler.cc:
manual merge
sql/mysql_priv.h:
manual merge
sql/records.cc:
manual merge
sql/share/errmsg.txt:
manual merge
sql/sql_table.cc:
manual merge
Fix labels
sql/sql_update.cc:
manual merge
sql/table.cc:
manual merge
sql/unireg.cc:
manual merge
storage/ndb/config/type_ndbapi.mk.am:
manual merge
into rurik.mysql.com:/home/igor/dev/mysql-5.0-2
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_class.cc:
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_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
ESCAPE has length of 1 if specified and sql_mode is NO_BACKSLASH_ESCAPES
or has length of 0 or 1 in every other situation.
(approved patch applied on a up-to-date tree re-commit)
mysql-test/r/select.result:
results of test for bug 12595
mysql-test/t/select.test:
test for bug #12595 (ESCAPE must be exactly one character long)
sql/item_cmpfunc.cc:
if ESCAPE was in the statement check whether its length is
different than 1. In NO_BACKSLASH_ESCAPES mode only length of 1 is
allowed, otherwise the length could be 0 or 1 character (code point
in the sense of Unicode).
sql/item_cmpfunc.h:
pass variable from the parsing stage - whether
ESCAPE clause was found in the statement
sql/sql_help.cc:
pass FALSE for escape_used_in_parsing because we
want the default mode of no error checking - our internal code.
sql/sql_lex.cc:
initialized variable used to transfer information during
parsing up in the stack when reducing in the grammar
sql/sql_lex.h:
new variable used for transfering information when
reducing in the grammar.
sql/sql_yacc.yy:
initialize Lex->escape_used and then use it when reducing.
This is needed as fix for bug #12595 to distinguish between
situation where ESCAPE was found and when not because internally
we may pass a string an empty string and there is no other way
to find out whether this is correct or not in case of
NO_BACKSLASH_ESCAPES mode, which allows only length of 1 if
ESCAPE is part of the SQL statement.
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.
When fixing Item_func_plus in ORDER BY clause field c is searched in all
opened tables, but because c is an alias it wasn't found there.
This patch adds a flag to select_lex which allows Item_field::fix_fields()
to look up in select's item_list to find aliased fields.
sql/item.cc:
Fix bug#7672 Unknown column error in order clause
When fixing fields in ORDER BY clause allow Item_field::fix_fields() to look up items in select's item list to find aliased fields.
sql/sql_lex.cc:
Fix bug#7672 Unknown column error in order clause
sql/sql_lex.h:
Fix bug#7672 Unknown column error in order clause
Added flag to select_lex allowing Item_field::fix_fields to look up items in select's item list.
sql/sql_select.cc:
Fix bug#7672 Unknown column error in order clause
mysql-test/t/select.test:
Test case for bug#7672 Unknown column error in order clause
mysql-test/r/select.result:
Test case for bug#7672 Unknown column error in order clause
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
thd->allow_sum_func was left 'true' after previous statement thus allowing
sum funcs to be present in conditions.
thd->allow_sum_func should be set to 0 for each query and each prepared
statement reinitialization. This is done in lex_start() and
reset_stmt_for_execute().
sql/sql_lex.cc:
Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
thd->allow_sum_func is set to 0 in lex_start().
sql/sql_prepare.cc:
Fix bug#13180 thd->allow_sum_func wasn't reset obefore query processing.
thd->allow_sum_func is set to 0 in reset_stmt_for_execute().
mysql-test/t/update.test:
Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
processing.
mysql-test/r/update.result:
Test case for bug#13180 thd->allow_sum_funcs wasn't reset before query
processing.
sql/ha_federated.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
This bug occurs when some trigger for table used by DML statement is created
or changed while statement was waiting in lock_tables(). In this situation
prelocking set which we have calculated becames invalid which can easily lead
to errors and even in some cases to crashes.
With proposed patch we no longer silently reopen tables in lock_tables(),
instead caller of lock_tables() becomes responsible for reopening tables and
recalculation of prelocking set.
mysql-test/t/trigger.test:
Added tests for bug #12704 "Server crashes during trigger execution".
Unfortunately these tests rely on the order in which tables are locked
by statement so they are non-determenistic and therefore should be disabled.
sql/lock.cc:
mysql_lock_tables():
Now instead of always reopening altered or dropped tables by itself
mysql_lock_tables() can notify upper level and rely on caller doing this.
sql/mysql_priv.h:
Now mysql_lock_tables() can either reopen deleted or altered tables by itself
or notify caller about such situation through 'need_reopen' argument and rely
on it in this.
Also lock_tables() has new 'need_reopen' out parameter through which it
notifies caller that some tables were altered or dropped so he needs to reopen
them (and rebuild prelocking set some triggers may change or simply appear).
sql/sp.cc:
sp_add_used_routine():
To be able to restore LEX::sroutines_list to its state right after parsing
we now adjust LEX::sroutines_list_own_last/sroutines_list_own_elements when
we add directly used routine.
sp_remove_not_own_routines():
Added procedure for restoring LEX::sroutines/sroutines_list to their state
right after parsing (by throwing out non-directly used routines).
sp_cache_routines_and_add_tables_for_view()/sp_update_stmt_used_routines():
We should use LEX::sroutines_list instead of LEX::sroutines as source of
routines used by view, since LEX::sroutines is not availiable for view
on second attempt to open it (see comment in open_tables() about it).
sql/sp.h:
sp_remove_not_own_routines():
Added procedure for restoring LEX::sroutines/sroutines_list to their state
right after parsing (by throwing out non-directly used routines).
sql/sp_head.cc:
Removed assert which is no longer always true.
sql/sql_base.cc:
reopen_table():
When we re-open table and do shallow copy of TABLE object we should adjust
pointers to it in associated Table_triggers_list object. Removed nil
operation.
open_tables():
Now this function is able to rebuild prelocking set for statement if it is
needed. It also correctly handles FLUSH TABLES which may occur during its
execution.
lock_tables():
Instead of allowing mysql_lock_tables() to silently reopen altered or dropped
tables let us notify caller and rely on that it will do reopen itself.
This solves the problem when trigger suddenly appears or changed during
mysq_lock_tables().
close_tables_for_reopen():
Added routine for properly preparing for reopening of tables and recalculation
of set of prelocked tables.
sql/sql_handler.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_insert.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_lex.cc:
LEX:
Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
which are used for keeping state in which 'sroutines_list' was right after
statement parsing (and for restoring of this list to this state).
sql/sql_lex.h:
LEX:
Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members
which are used for keeping state in which 'sroutines_list' was right after
statement parsing (and for restoring of this list to this state).
Added chop_off_not_own_tables() method to simplify throwing away list
of implicitly used (prelocked) tables.
sql/sql_prepare.cc:
Now instead of silently reopening altered or dropped tables in
lock_tables() we notify caller and rely on that the caller will
reopen tables.
sql/sql_table.cc:
Here we let mysql_lock_tables() to reopen dropped or altered tables by itself.
sql/sql_trigger.cc:
Added Table_triggers_list::set_table() method to adjust Table_triggers_list
to new pointer to TABLE instance.
sql/sql_trigger.h:
Added Table_triggers_list::set_table() method to adjust Table_triggers_list
to new pointer to TABLE instance.
sql/sql_update.cc:
Now instead of silently reopening altered or dropped tables in
lock_tables() we notify caller and rely on that the caller will
reopen tables.
Makefile.am:
Auto merged
BitKeeper/etc/config:
Auto merged
scripts/Makefile.am:
Auto merged
sql/ha_federated.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
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_insert.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_show.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/innobase/include/page0page.ic:
Auto merged
storage/innobase/include/univ.i:
Auto merged
storage/innobase/row/row0mysql.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_packrec.c:
Auto merged
storage/myisam/mi_static.c:
Auto merged
storage/myisam/myisamdef.h:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/ndb/include/kernel/signaldata/SignalData.hpp:
Auto merged
storage/ndb/include/kernel/signaldata/StartFragReq.hpp:
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
Auto merged
storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp:
Auto merged
storage/ndb/src/common/debugger/signaldata/StartRec.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
Auto merged
storage/ndb/src/kernel/main.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/kernel/vm/Emulator.cpp:
Auto merged
sql/log_event.cc:
SCCS merged
sql/sql_prepare.cc:
SCCS merged
sql/share/errmsg.txt:
merge
The idea of the patch is to separate statement processing logic,
such as parsing, validation of the parsed tree, execution and cleanup,
from global query processing logic, such as logging, resetting
priorities of a thread, resetting stored procedure cache, resetting
thread count of errors and warnings.
This makes PREPARE and EXECUTE behave similarly to the rest of SQL
statements and allows their use in stored procedures.
This patch contains a change in behaviour:
until recently for each SQL prepared statement command, 2 queries
were written to the general log, e.g.
[Query] prepare stmt from @stmt_text;
[Prepare] select * from t1 <-- contents of @stmt_text
The chagne was necessary to prevent [Prepare] commands from being written
to the general log when executing a stored procedure with Dynamic SQL.
We should consider whether the old behavior is preferrable and probably
restore it.
This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs
in Dynamic SQL reported before it was disabled).
mysql-test/r/not_embedded_server.result:
Since we don't want to log Dynamic SQL in stored procedures,
now the general log gets only one log entry per SQL statement.
mysql-test/r/sp-error.result:
- remove obsolete tests
- a better error message for the case when a stored procedure that
returns a result set is called from a function
mysql-test/r/trigger.result:
- a better error message for the case when a stored procedure that
returns a result set is called from a trigger
mysql-test/t/sp-error.test:
- a better error message for the case when a stored procedure that
returns a result set is called from a function.
- move the comment to its place (end of file).
mysql-test/t/trigger.test:
- a better error message for the case when a stored procedure that
returns a result set is called from a trigger
sql/item_func.cc:
- we need to pass sql_command explicitly to get_var_with_binlog, because
when creating a query for SQL prepared statement thd->lex->sql_command
points at SQLCOM_EXECUTE, which is not listed in the list of update
queries.
sql/log_event.h:
- remove an extra copy of the previous sentence
sql/mysql_priv.h:
- fix declarations of sql_prepare.cc API
sql/share/errmsg.txt:
- a new error message, when one attempts to execute a prepared statement
which is currently being executed (this can happen only in Dynamic SQL
at the moment).
sql/sp_head.cc:
- extend sp_multi_results_command to return different flags for a
command (and rename it)
- add support for SQLCOM_PREPARE,SQLCOM_EXECUTE, SQLCOM_DEALLOCATE
to sp_get_flags_for_command
- replace multiple boolean sp_head members with uint m_flags
- a fix for a crash when user variables are used in a stored procedure
and binlog is on. A temporary fix for Bug#12637 "SP crashes the server
if it has update query with user var & binlog is enabled", which actually
stands for stored functions: now instead of a crash we break
replication if a user variable is used in a stored function which
is executed in prelocked mode.
sql/sp_head.h:
- replace multiple boolean flags of sp_head with uint m_flags;
- add flag CONTAINS_DYNAMIC_SQL
- use this flag to error if a stored procedure with Dynamic SQL is
called from a function or trigger.
sql/sql_class.cc:
- Statement_map::insert should not delete a statement if it exists,
now it's done externally to be able to handle the case when the
statement being deleted is in use.
- remove extra code (free_list is already reset in free_items)
sql/sql_lex.cc:
- add lex->stmt_prepare_mode; we can't rely on thd->command any more,
because we don't reset it any more (Dynamic SQL requirement is that
PS are as little intrusive as possible).
sql/sql_lex.h:
- declare bool LEX::stmt_prepare_mode
sql/sql_parse.cc:
- move prepared statement code to sql_prepare.cc
- change declarations (refactored code)
- better error message when one attempts to use Dynamic SQL or a
stored procedure that returns a result set in a function or trigger.
sql/sql_prepare.cc:
- major refactoring to ensure PREPARE/EXECUTE commands do not reset global THD
state and allow their use in stored procedures.
- add Prepared_statement::flags and use it to ensure no recursive execution
of a prepared statement is possible
- better comments
sql/sql_yacc.yy:
- enable PREPARE/EXECUTE/DEALLOCATE in stored procedures
- produce an error message on attempt to use PREPARE/EXECUTE/DEALLOCATE
in a stored function or trigger
mysql-test/r/sp-dynamic.result:
- sp-dynamic.test results
mysql-test/t/sp-dynamic.test:
- a new test for PREPARE/EXECUTE/DEALLOCATE in stored procedures.
- current_arena to stmt_arena: the thread may have more than one
'current' arenas: one for runtime data, and one for the parsed
tree of a statement. Only one of them is active at any moment.
- set_item_arena -> set_query_arena, because Item_arena was renamed to
Query_arena a while ago
- set_n_backup_item_arena -> set_n_backup_active_arena;
the active arena is the arena thd->mem_root and thd->free_list
are currently pointing at.
- restore_backup_item_arena -> restore_active_arena (with the same
rationale)
- change_arena_if_needed -> activate_stmt_arena_if_needed; this
method sets thd->stmt_arena active if it's not done yet.
sql/item.cc:
Rename.
sql/item_cmpfunc.cc:
Rename.
sql/item_func.cc:
Rename.
sql/item_subselect.cc:
Rename.
sql/item_subselect.h:
Remove an unused forward declaration.
sql/item_sum.h:
Remove an unused forward declaration.
sql/mysql_priv.h:
Remove an unused forward declaration.
sql/sp.cc:
Rename.
sql/sp_head.cc:
Rename.
sql/sql_base.cc:
Rename.
sql/sql_class.cc:
Rename.
sql/sql_class.h:
Rename.
sql/sql_lex.cc:
Rename.
sql/sql_parse.cc:
Rename.
sql/sql_prepare.cc:
Rename.
sql/sql_select.cc:
Rename.
sql/sql_show.cc:
Rename.
sql/sql_union.cc:
Rename.
sql/sql_view.cc:
Rename.
sql/table.cc:
Rename.
into zim.(none):/home/brian/mysql/mysql-5.1
Resolved to minor issues.
BitKeeper/etc/config:
Auto merged
Makefile.am:
Auto merged
VC++Files/sql/mysqld.vcproj:
Auto merged
extra/perror.c:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/Makefile.am:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/lex.h:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.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_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/examples/ha_tina.cc:
Auto merged
sql/table.h:
Auto merged
sql/unireg.h:
Auto merged
storage/innobase/lock/lock0lock.c:
Auto merged
storage/myisam/mi_check.c:
Auto merged
storage/myisam/mi_search.c:
Auto merged
storage/myisam/myisamchk.c:
Auto merged
storage/myisam/myisamlog.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
configure.in:
Fixed the resolve of versions.
mysql-test/r/alter_table.result:
Fixed results.
into c-4a09e253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667:
Auto merged
BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387:
Auto merged
BitKeeper/deleted/.del-GrepInit.cpp~df28ab3a892455fd:
Auto merged
BitKeeper/deleted/.del-Makefile.am~f73be89578d3b6cc:
Auto merged
BitKeeper/deleted/.del-Makefile~b293ae88e4394490:
Auto merged
BitKeeper/deleted/.del-Makefile~e0b7d67078f0fae0:
Auto merged
BitKeeper/deleted/.del-grep_systab_test.cpp~c7305578bec8cb62:
Auto merged
BitKeeper/etc/config:
Auto merged
config/ac-macros/ha_ndbcluster.m4:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
BitKeeper/deleted/.del-testGrep.cpp~2106eb0a6bf2a1b5:
Auto merged
mysql-test/r/alter_table.result:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/ps_6bdb.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/make_win_src_distribution.sh:
Auto merged
sql/field.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_berkeley.h:
Auto merged
sql/ha_heap.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/lex.h:
Auto merged
sql/lock.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
storage/heap/hp_delete.c:
Auto merged
storage/innobase/btr/btr0pcur.c:
Auto merged
storage/innobase/btr/btr0sea.c:
Auto merged
storage/innobase/include/read0read.h:
Auto merged
storage/innobase/include/srv0srv.h:
Auto merged
storage/innobase/include/trx0trx.h:
Auto merged
storage/innobase/include/univ.i:
Auto merged
storage/innobase/lock/lock0lock.c:
Auto merged
storage/innobase/read/read0read.c:
Auto merged
storage/innobase/row/row0ins.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/innobase/row/row0umod.c:
Auto merged
storage/innobase/row/row0upd.c:
Auto merged
storage/innobase/srv/srv0srv.c:
Auto merged
storage/innobase/srv/srv0start.c:
Auto merged
storage/innobase/trx/trx0trx.c:
Auto merged
storage/myisam/ft_boolean_search.c:
Auto merged
storage/myisam/myisampack.c:
Auto merged
storage/myisammrg/myrg_static.c:
Auto merged
storage/ndb/include/kernel/AttributeDescriptor.hpp:
Auto merged
storage/ndb/include/kernel/BlockNumbers.h:
Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
Auto merged
storage/ndb/include/kernel/kernel_types.h:
Auto merged
storage/ndb/include/kernel/signaldata/AlterTable.hpp:
Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
Auto merged
storage/ndb/include/portlib/NdbTCP.h:
Auto merged
storage/ndb/src/common/debugger/BlockNames.cpp:
Auto merged
storage/ndb/src/common/logger/LogHandler.cpp:
Auto merged
storage/ndb/src/common/portlib/NdbTCP.cpp:
Auto merged
storage/ndb/src/common/portlib/win32/NdbTCP.c:
Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
Auto merged
storage/ndb/src/kernel/Makefile.am:
Auto merged
storage/ndb/src/kernel/SimBlockList.cpp:
Auto merged
storage/ndb/src/kernel/blocks/Makefile.am:
Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/suma/Suma.cpp:
Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.cpp:
Auto merged
storage/ndb/src/kernel/vm/SimulatedBlock.hpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
Auto merged
storage/ndb/tools/Makefile.am:
Auto merged
storage/ndb/tools/ndb_condig.cpp:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
support-files/mysql.spec.sh:
Auto merged
VC++Files/sql/mysqld.dsp:
Manual 5.0 - 5.1 merge
configure.in:
Manual 5.0 - 5.1 merge
sql/mysql_priv.h:
Manual 5.0 - 5.1 merge
sql/share/errmsg.txt:
Manual 5.0 - 5.1 merge
sql/sql_base.cc:
Manual 5.0 - 5.1 merge
sql/sql_prepare.cc:
Manual 5.0 - 5.1 merge
storage/ndb/src/common/util/version.c:
Manual 5.0 - 5.1 merge
storage/ndb/src/kernel/blocks/dblqh/Makefile.am:
Manual 5.0 - 5.1 merge
"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.
include/my_global.h:
Safer macros to avoid possible overflows
sql/item_cmpfunc.cc:
Simple optimization
sql/sp_head.cc:
Indentation fixes
Remove not needed "else" levels
Added error checking for 'new'
Simpler reseting of thd->spcont in execute_procedure
sql/sql_base.cc:
Faster new
sql/sql_lex.cc:
Use 'TRUE' instead of 'true'
sql/sql_parse.cc:
Faster new
sql/sql_view.cc:
No need to set 'tables' as it's not used
sql/table.cc:
Simpler DBUG_ASSERT()
mysql-test/t/kill.test:
Moved --disable_reconnect earlier to avoid race condition
sql/sql_help.cc:
Cleanup during review of new code
(Moved variable definitions first in function
sql/sql_insert.cc:
Cleanup during review of new code
sql/sql_lex.cc:
Cleanup during review of new code
sql/sql_parse.cc:
Cleanup during review of new code
Changed potential problem with previous_table_ref where it dependent that TABLE_LIST first element would be next_local
Rearanged code in add_table_to_list() to remove extra if
Combined 2 calls to calloc() to one
sql/sql_view.cc:
Remove extra indentation level
Combined common 'on error' exit
sql/sql_yacc.yy:
Fixed comment style
sql/table.cc:
Cleanup during review of new code
- Changed while() loops to for() loop (to make code more readable)
- Removed not needed initialization of variables
- Removed not needed 'else' cases
- Removed trivial ASSERT's that was checked by previous code
- Moved comment setting last in Natural_join_column::check_grants()
results.
st_select_lex_unit::print() was losing UNION ALL if in statement were present
UNION DISTINCT.
mysql-test/r/view.result:
Test case for bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
mysql-test/t/view.test:
Test case for bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
sql/sql_lex.cc:
Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
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.
into c-8b0ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.1
BitKeeper/etc/config:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/information_schema_db.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysys/default.c:
Auto merged
scripts/Makefile.am:
Auto merged
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/tztime.cc:
Auto merged
sql/unireg.cc:
Auto merged
storage/innobase/buf/buf0buf.c:
Auto merged
storage/innobase/include/os0file.h:
Auto merged
storage/innobase/include/read0read.h:
Auto merged
storage/innobase/include/read0types.h:
Auto merged
storage/innobase/include/trx0trx.h:
Auto merged
storage/innobase/os/os0file.c:
Auto merged
storage/innobase/read/read0read.c:
Auto merged
storage/innobase/row/row0sel.c:
Auto merged
storage/innobase/srv/srv0srv.c:
Auto merged
storage/innobase/srv/srv0start.c:
Auto merged
storage/innobase/trx/trx0sys.c:
Auto merged
storage/innobase/trx/trx0trx.c:
Auto merged
storage/myisam/mi_create.c:
Auto merged
storage/myisam/sort.c:
Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.hpp:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
support-files/mysql.spec.sh:
Auto merged
configure.in:
Manual merge 5.0 -> 5.1
mysql-test/t/alter_table.test:
Manual merge 5.0 -> 5.1
sql/share/errmsg.txt:
Manual merge 5.0 -> 5.1
storage/ndb/tools/Makefile.am:
Manual merge 5.0 -> 5.1
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126
mysql-test/r/sp-security.result:
Drop tables this test attempts to create
mysql-test/r/sp-threads.result:
Update test results
mysql-test/r/sp.result:
Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/r/view.result:
Enabled a test case that now works with prelocking-free SPs
mysql-test/t/sp-security.test:
Drop tables this test attempts to create
mysql-test/t/sp.test:
Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/t/view.test:
Enabled a test case that now works with prelocking-free SPs
sql/handler.cc:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/item_func.cc:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sp.cc:
Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
"CALL proc(...)" statements.
sql/sp.h:
Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
"CALL proc(...)" statements.
sql/sp_cache.h:
Added comments
sql/sp_head.cc:
Non-prelocked SP execution:
* Try to unlock tables after PROCEDURE arguments have been evaluated.
* Make sp_lex_keeper be able to execute in 2 modes: A) when already in prelocked mode
B) when its statement enters/leaves prelocked mode itself.
sql/sp_head.h:
Non-prelocked SP execution: Make sp_lex_keeper to additionally keep list of tables it
needs to prelock when its statement enters/leaves prelocked mode on its own.
sql/sql_base.cc:
Non-prelocked SP execution: Make open_tables() to
* detect 'CALL proc(...)' and not to do prelocking for procedure body statements.
* Make lex->query_tables_last to point precisely to a boundary in lex->query_tables
list where 'own' tables and views' tables end and added-for-prelocking tables begin.
(it was not true before - view's tables could end up after query_tables_own_last)
sql/sql_class.cc:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_class.h:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_lex.cc:
Non-prelocked SP execution: More rigourous cleanup in st_lex::cleanup_after_one_table_open()
sql/sql_parse.cc:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt, remove outdated comments
sql/sql_trigger.h:
Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
into mysql.com:/home/my/mysql-5.0
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-ctype_cp932.test:
Auto merged
BitKeeper/deleted/.del-isam.test~834fb0ee8196c445:
Auto merged
include/thr_lock.h:
Auto merged
mysql-test/t/alias.test:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/archive.test:
Auto merged
mysql-test/t/backup.test:
Auto merged
mysql-test/t/bool.test:
Auto merged
mysql-test/t/connect.test:
Auto merged
mysql-test/t/count_distinct2.test:
Auto merged
mysql-test/t/create.test:
Auto merged
mysql-test/t/ctype_many.test:
Auto merged
mysql-test/t/ctype_ucs_binlog.test:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/delayed.test:
Auto merged
mysql-test/t/derived.test:
Auto merged
mysql-test/t/distinct.test:
Auto merged
mysql-test/t/drop.test:
Auto merged
mysql-test/t/endspace.test:
Auto merged
mysql-test/t/flush.test:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/fulltext_order_by.test:
Auto merged
mysql-test/t/func_compress.test:
Auto merged
mysql-test/t/func_concat.test:
Auto merged
mysql-test/t/func_date_add.test:
Auto merged
mysql-test/t/func_equal.test:
Auto merged
mysql-test/t/func_if.test:
Auto merged
mysql-test/t/func_sapdb.test:
Auto merged
mysql-test/t/func_set.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/gis.test:
Auto merged
mysql-test/t/grant.test:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/grant_cache.test:
Auto merged
mysql-test/t/heap.test:
Auto merged
mysql-test/t/heap_btree.test:
Auto merged
mysql-test/t/heap_hash.test:
Auto merged
mysql-test/t/init_connect.test:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
mysql-test/t/insert_update.test:
Auto merged
mysql-test/t/key.test:
Auto merged
mysql-test/t/keywords.test:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/lock.test:
Auto merged
mysql-test/t/lowercase_table.test:
Auto merged
mysql-test/t/lowercase_table3.test:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/mysqlbinlog2.test:
Auto merged
mysql-test/t/ndb_alter_table.test:
Auto merged
mysql-test/t/ndb_autodiscover.test:
Auto merged
mysql-test/t/ndb_charset.test:
Auto merged
mysql-test/t/ndb_grant.later:
Auto merged
mysql-test/t/ndb_index_ordered.test:
Auto merged
mysql-test/t/ndb_index_unique.test:
Auto merged
mysql-test/t/ndb_restore.test:
Auto merged
mysql-test/t/ndb_types.test:
Auto merged
mysql-test/t/ndb_update.test:
Auto merged
mysql-test/t/null.test:
Auto merged
mysql-test/t/null_key.test:
Auto merged
mysql-test/t/olap.test:
Auto merged
mysql-test/t/openssl_1.test:
Auto merged
mysql-test/t/order_by.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/ps_4heap.test:
Auto merged
mysql-test/t/ps_5merge.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/replace.test:
Auto merged
mysql-test/t/row.test:
Auto merged
mysql-test/t/rpl000001.test:
Auto merged
mysql-test/t/rpl000015.test:
Auto merged
mysql-test/t/rpl000017.test:
Auto merged
mysql-test/t/rpl000018.test:
Auto merged
mysql-test/t/rpl_EE_error.test:
Auto merged
mysql-test/t/rpl_change_master.test:
Auto merged
mysql-test/t/rpl_charset.test:
Auto merged
mysql-test/t/rpl_create_database.test:
Auto merged
mysql-test/t/rpl_ddl.test:
Auto merged
mysql-test/t/rpl_deadlock.test:
Auto merged
mysql-test/t/rpl_empty_master_crash.test:
Auto merged
mysql-test/t/rpl_error_ignored_table.test:
Auto merged
mysql-test/t/rpl_flush_log_loop.test:
Auto merged
mysql-test/t/rpl_flush_tables.test:
Auto merged
mysql-test/t/rpl_get_lock.test:
Auto merged
mysql-test/t/rpl_heap.test:
Auto merged
mysql-test/t/rpl_loaddata.test:
Auto merged
mysql-test/t/rpl_loaddata_rule_m.test:
Auto merged
mysql-test/t/rpl_log.test:
Auto merged
mysql-test/t/rpl_log_pos.test:
Auto merged
mysql-test/t/rpl_max_relay_size.test:
Auto merged
mysql-test/t/rpl_multi_query.test:
Auto merged
mysql-test/t/rpl_openssl.test:
Auto merged
mysql-test/t/rpl_redirect.test:
Auto merged
mysql-test/t/rpl_relayrotate.test:
Auto merged
mysql-test/t/rpl_replicate_do.test:
Auto merged
mysql-test/t/rpl_reset_slave.test:
Auto merged
mysql-test/t/rpl_server_id2.test:
Auto merged
mysql-test/t/rpl_temporary.test:
Auto merged
mysql-test/t/rpl_timezone.test:
Auto merged
mysql-test/t/rpl_user_variables.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/symlink.test:
Auto merged
mysql-test/t/synchronization.test:
Auto merged
mysql-test/t/system_mysql_db.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
mysql-test/t/temp_table.test:
Auto merged
mysql-test/t/timezone2.test:
Auto merged
mysql-test/t/timezone_grant.test:
Auto merged
mysql-test/t/type_float.test:
Auto merged
mysql-test/t/type_ranges.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
mysql-test/t/union.test:
Auto merged
mysql-test/t/update.test:
Auto merged
mysql-test/t/user_var-binlog.test:
Auto merged
mysql-test/t/warnings.test:
Auto merged
mysys/thr_lock.c:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
support-files/mysql.spec.sh:
Auto merged
BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8:
Simple merge
mysql-test/r/ps_grant.result:
Simple merge
mysql-test/t/analyse.test:
Simple merge
mysql-test/t/auto_increment.test:
Simple merge
mysql-test/t/bdb.test:
Simple merge
mysql-test/t/bigint.test:
Simple merge
mysql-test/t/case.test:
Simple merge
mysql-test/t/cast.test:
Simple merge
mysql-test/t/check.test:
Simple merge
mysql-test/t/count_distinct.test:
Simple merge
mysql-test/t/ctype_latin1_de.test:
Simple merge
mysql-test/t/ctype_uca.test:
Simple merge
mysql-test/t/ctype_ucs.test:
Simple merge
mysql-test/t/ctype_utf8.test:
Simple merge
mysql-test/t/delete.test:
Simple merge
mysql-test/t/flush_block_commit.test:
Simple merge
mysql-test/t/func_default.test:
Simple merge
mysql-test/t/func_gconcat.test:
Simple merge
mysql-test/t/func_group.test:
Aligned code with 4.1
mysql-test/t/func_in.test:
Simple merge
mysql-test/t/func_math.test:
Simple merge
mysql-test/t/func_misc.test:
Simple merge
mysql-test/t/func_test.test:
Simple merge
mysql-test/t/func_time.test:
Simple merge
mysql-test/t/group_by.test:
Simple merge
mysql-test/t/having.test:
Simple merge
mysql-test/t/innodb.test:
Simple merge
mysql-test/t/insert.test:
Simple merge
mysql-test/t/join_outer.test:
Simple merge
mysql-test/t/kill.test:
Simple merge
mysql-test/t/loaddata.test:
Simple merge
mysql-test/t/lock_multi.test:
Simple merge
mysql-test/t/multi_update.test:
Simple merge
mysql-test/t/mysqlbinlog.test:
Simple merge
mysql-test/t/mysqldump.test:
Aligned code with 4.1
mysql-test/t/mysqltest.test:
Simple merge
mysql-test/t/ndb_basic.test:
Simple merge
mysql-test/t/ndb_cache.test:
Simple merge
mysql-test/t/ndb_subquery.test:
Simple merge
mysql-test/t/ps_grant.test:
Simple merge
mysql-test/t/range.test:
Simple merge
mysql-test/t/rpl_drop_temp.test:
Simple merge
mysql-test/t/rpl_loaddata_rule_s.test:
Simple merge
mysql-test/t/rpl_loaddatalocal.test:
Simple merge
mysql-test/t/rpl_rotate_logs.test:
Simple merge
mysql-test/t/rpl_until.test:
Simple merge
mysql-test/t/rpl_variables.test:
Simple merge
mysql-test/t/select.test:
Simple merge
mysql-test/t/sql_mode.test:
Simple merge
mysql-test/t/type_blob.test:
Simple merge
mysql-test/t/type_decimal.test:
Simple merge
mysql-test/t/user_var.test:
Simple merge
mysql-test/t/variables.test:
Simple merge
sql/lock.cc:
Simple optimization
sql/mysql_priv.h:
Simple merge
sql/sql_table.cc:
Simple merge
sql/table.cc:
Simple merge
sql/unireg.cc:
Simple merge
mysql-test/r/ps_grant.result:
Deallocate prepare statements
Moved test for 'show full processlist' to not_embedded_server.test becasue it's shouldn't be here and it could fail on a slow computer where previous connections has not yet disconnected
mysql-test/t/ps_grant.test:
Deallocate prepare statements
Moved test for 'show full processlist' to not_embedded_server.test becasue it's shouldn't be here and it could fail on a slow computer where previous connections has not yet disconnected
sql/sql_lex.cc:
Fixed typo
mysql-test/r/not_embedded_server.result:
New BitKeeper file ``mysql-test/r/not_embedded_server.result''
mysql-test/t/not_embedded_server.test:
New BitKeeper file ``mysql-test/t/not_embedded_server.test''
BitKeeper/etc/ignore:
added ndb/tools/ndb_config
syntax in binlog which stops replication":
disallow the use of parameter markers which can lead to generation
of malformed binlog queries.
mysql-test/r/ps.result:
Test results fixed: a test case for Bug#11299
mysql-test/t/ps.test:
A test case for Bug#11299
sql/sql_lex.cc:
Introduce a new parser token for a parameter marker. Make sure
that a parameter marker can not be used in a query which, when
transformed to a binlog query, becomes grammatically incorrect.
sql/sql_yacc.yy:
The check for COM_PREPARE has been moved into the lexer.
mysql-test/var:
New BitKeeper file ``mysql-test/var''
into mysql.com:/home/dlenev/src/mysql-5.0-mysqlproc
mysql-test/r/sp-error.result:
Auto merged
mysql-test/t/sp-error.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/share/errmsg.txt:
Manual merge.
sql/sp.cc:
Manual merge.
of stored routines definitions even if we already have some tables open and
locked. To avoid deadlocks in this case we have to put certain restrictions
on locking of mysql.proc table.
This allows to use stored routines safely under LOCK TABLES without explicitly
mentioning mysql.proc in the list of locked tables. It also fixes bug #11554
"Server crashes on statement indirectly using non-cached function".
mysql-test/r/sp-error.result:
Added test which checks that now we can read stored routines definitions
under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
added check for restrictions which this ability puts on mysql.proc locking.
Updated test for bug #9566 to correspond this new situation.
mysql-test/r/sp-threads.result:
Added test for bug #11554 "Server crashes on statement indirectly using
non-cached function".
mysql-test/t/sp-error.test:
Added test which checks that now we can read stored routines definitions
under LOCK TABLES even if we have not locked mysql.proc explicitly. Also
added check for restrictions which this ability puts on mysql.proc locking.
Updated test for bug #9566 to correspond this new situation.
mysql-test/t/sp-threads.test:
Added test for bug #11554 "Server crashes on statement indirectly using
non-cached function".
sql/lock.cc:
get_lock_data():
To be able to open and lock for reading system tables like 'mysql.proc',
when we already have some tables opened and locked, and avoid deadlocks
we have to disallow write-locking of these tables with any other tables.
sql/mysql_priv.h:
open_table() has new parameter which allows to open table even if some-one
has done a flush or holding namelock on it.
sql/share/errmsg.txt:
Added error message saying that one cannot write-lock some of system tables
with any other tables.
sql/sp.cc:
open_proc_table_for_read()/close_proc_table():
Added functions to be able open and close mysql.proc table when we already
have some tables open and locked.
open_proc_table_for_update():
Added function to simplify opening of mysql.proc for updates.
db_find_routine_aux()/db_find_routine()/db_update_routine()/...
Moved responsibility for opening mysql.proc table from db_find_routine_aux()
one level up, since this level knows better which type of table access for
reading of for update it needs.
sp_function_exists():
Removed unused function.
sql/sp.h:
sp_function_exists():
Removed unused function.
sql/sql_base.cc:
open_table():
Added new parameter which allows to open table even if some-one has done a
flush or holding namelock on it.
open_unireg_entry():
Mark 'mysql.proc' as a system table which has special restrictions on its
locking, but thanks to them can be open and locked even if we already have
some open and locked.
sql/sql_class.cc:
Moved THD members holding information about open and locked tables to separate
Open_tables_state class to be able to save/restore this state easier.
Added THD::push_open_tables_state()/pop_open_tables_state() methods for
saving/restoring this state.
sql/sql_class.h:
Moved THD members holding information about open and locked tables to separate
Open_tables_state class to be able to save/restore this state easier.
Added THD::push_open_tables_state()/pop_open_tables_state() methods for
saving/restoring this state.
sql/sql_lex.cc:
Removed LEX::proc_table member which was not really used.
sql/sql_lex.h:
Removed LEX::proc_table member which was not really used.
sql/sql_table.cc:
open_table() has new parameter which allows to open table even if some-one
has done a flush or holding namelock on it.
sql/table.h:
Added TABLE_SHARE::system_table indicating that this table is system table
like 'mysql.proc' and we want to be able to open and read-lock it even when
we already have some tables open and locked (and because of this we have
to put some restrictions on write locking it).
a table" with main tree.
mysql-test/r/trigger.result:
Temporalily disable part of test which exposes bug #11554 (work on which is in
progress).
mysql-test/t/sp-error.test:
After merge fix.
Fixed wrong delimiter command.
mysql-test/t/trigger.test:
Temporalily disable part of test which exposes bug #11554 (work on which is in
progress).
sql/sp.cc:
After merge fix.
Item_arena was renamed to Query_arena.
sql/sp.h:
After merge fix.
Item_arena was renamed to Query_arena.
sql/sql_lex.cc:
After merge fix.
LEX::spfuns/spprocs hashes were replaces with one LEX::sroutines hash.
into mysql.com:/home/dlenev/src/mysql-5.0-bg8406
mysql-test/r/sp.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
mysql-test/r/sp-error.result:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
sql/sp_head.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
crash if referencing a table" and several other related bugs.
Fix for bug #11834 "Re-execution of prepared statement with dropped function
crashes server." which was spotted during work on previous bugs.
Also couple of nice cleanups:
- Replaced two separate hashes for stored routines used by statement with one.
- Now instead of doing one pass through all routines used in statement for
caching them and then doing another pass for adding their tables to table
list, we do only one pass during which do both things.
mysql-test/r/sp-error.result:
Added test for bug #11834 "Re-execution of prepared statement with dropped
function crashes server" also covering handling of prepared statements
which use stored functions but does not require prelocking.
mysql-test/r/sp.result:
Updated test for LOCK TABLES with views in table list.
(Old version of statement used in this test will work ok now, since prelocking
algorithm was tuned and will lock only one multi-set of tables for each routine
even if this routine is used in several different views).
mysql-test/r/trigger.result:
Added several tests for triggers using tables.
mysql-test/t/sp-error.test:
Added test for bug #11834 "Re-execution of prepared statement with dropped
function crashes server" also covering handling of prepared statements
which use stored functions but does not require prelocking.
mysql-test/t/sp.test:
Updated comment about recursive views to reflect current situation.
Updated test for LOCK TABLES with views in table list.
(Old version of statement used in this test will work ok now, since prelocking
algorithm was tuned and will lock only one multi-set of tables for each routine
even if this routine is used in several different views).
mysql-test/t/trigger.test:
Added several tests for triggers using tables.
sql/item_func.cc:
Item_func_sp::cleanup():
By next statement execution stored function can be dropped or altered so
we can't assume that sp_head object for it will be still valid.
sql/sp.cc:
- Added Sroutine_hash_entry structure that represents element in the set of
stored routines used by statement or routine. We can't as before use
LEX_STRING for this purprose because we want link all elements of this set
in list.
- Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account
that now we use one hash for stored routines used by statement instead of two
and which mantains list linking all elelemnts in this hash.
- Renamed sp_merge_hash() to sp_update_sp_used_routines().
- Introduced sp_update_stmt_used_routines() for adding elements to the set of
routines used by statement from another similar set for statement or routine.
This function will also mantain list linking elements of destination set.
- Now instead of one sp_cache_routines() function we have family of
sp_cache_routines_and_add_tables() functions which are also responsible for
adding tables used by routines being cached to statement table list. Nice
optimization - thanks to list linking all elements in the hash of routines
used by statement we don't need to perform several iterations over this hash
(as it was before in cases when we have added new elements to it).
sql/sp.h:
Added declarations of functions used for manipulations with set (hash) of stored
routines used by statement.
sql/sp_head.cc:
sp_name::init_qname():
Now sp_name also holds key identifying routine in the set (hash) of
stored routines used by statement.
sp_head:
Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
routines used by this routine we use one hash - m_sroutines.
sp_instr_set_trigger_field:
Added support for subqueries in assignments to row accessors in triggers.
Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions
since now we don't have separate stage on which we add tables used by routines
used by statement to table list for prelocking. We do it on the same stage as
we load those routines in SP cache. So all this functionality moved to
sp_cache_routines_and_add_tables() family of functions.
sql/sp_head.h:
sp_name:
Now this class also holds key identifying routine in the set (hash) of stored
routines used by statement.
sp_head:
Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
routines used by this routine we use one hash - m_sroutines.
sp_instr_set_trigger_field:
Added support for subqueries in assignments to row accessors in triggers.
Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have
separate stage on which we add tables used by routines used by statement to
table list for prelocking. We do it on the same stage as we load those routines
in SP cache.
sql/sql_base.cc:
open_tables():
- LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash.
- Now instead of doing one pass through all routines used in statement for
caching them and then doing another pass for adding their tables to table
list, we do only one pass during which do both things. It is easy to do
since all routines in the set of routines used by statement are linked in
the list. This also allows us to calculate table list for prelocking more
precisely.
- Now triggers properly inform prelocking algorithm about tables they use.
sql/sql_lex.cc:
lex_start():
Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash.
Added LEX::sroutines_list list linking all elements in this hash.
st_lex::st_lex():
Moved definition of LEX constructor to sql_lex.cc file to be able
use sp_sroutine_key declaration from sp.h in it.
sql/sql_lex.h:
LEX:
Replaced two separate hashes for stored routines used by statement with one.
Added list linking all elements in this hash to be able to iterate through all
elements and add new elements to this hash at the same time.
Moved constructor definition to sql_lex.cc.
sql/sql_parse.cc:
mysql_execute_command():
Replaced LEX::spfuns/spprocs with one LEX::sroutines hash.
sql/sql_trigger.cc:
Added missing GNU GPL notice.
Table_triggers_list::check_n_load()
Added initialization of sroutines_key which stores key representing
triggers of this table in the set (hash) of routines used by this statement.
sql/sql_trigger.h:
Added missing GNU GPL notice.
Table_triggers_list:
Added sroutines_key member to store key representing triggers of this
table in the set (hash) of routines used by this statement.
Declared sp_cache_routines_and_add_tables_for_triggers() as friend since
it needs access to sroutines_key and trigger bodies.
sql/sql_yacc.yy:
- Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding
elements to the set of stored routines used in statement.
- Enabled support of subqueries as right sides in assignments to triggers' row
accessors.
into mysql.com:/home/jimw/my/mysql-5.0-clean
VC++Files/sql/mysqld.dsp:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/item_strfunc.cc:
SCCS merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/view.result:
SCCS merged
mysql-test/t/view.test:
SCCS merged
mysql-test/r/view.result:
checking views after some view with error (BUG#11337)
mysql-test/t/view.test:
checking views after some view with error (BUG#11337)
sql/sql_lex.cc:
environment cleaning up for processing view one by one
sql/sql_lex.h:
methods for lex cleunup during view processing one by one
sql/sql_table.cc:
fixed environment creation and cleaning up for processing view one by one (BUG#11337)
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
VC++Files/sql/mysqld.dsp:
Link debug server against debug yassl
sql/examples/ha_archive.cc:
Fix type for variables used to store number of rows
Add cast when reading current position
sql/examples/ha_archive.h:
Fix variables used to store rows to ha_rows
sql/ha_federated.cc:
Remove unused variables, fix type of variable used to store query id
sql/item_strfunc.cc:
Remove unused variables
sql/sql_acl.cc:
Remove unused variables
sql/sql_lex.cc:
Add casts to fix type used for counting number of rows
sql/sql_lex.h:
Fix size of options to be ulong again
sql/sql_insert.cc:
Fix type of query id value
sql/sql_union.cc:
Cast value for number of rows to ha_rows
sql/sql_yacc.yy:
Remove unused variable
sql/table.cc:
Add casts for handling key_part lengths
into mysql.com:/opt/local/work/mysql-5.0-10736
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
don't evaluate subqueries during statement prepare, even if they
are not correlated.
With post-review fixes.
sql/mysql_priv.h:
Add UNCACHEABLE_PREPARE to mark subqueries as non-constant in
mysql_stmt_prepare
sql/sql_lex.cc:
Add a missing assert: noone can call unit::set_limit from
mysql_stmt_prepare.
sql/sql_lex.h:
Comment fixed.
sql/sql_parse.cc:
Mark new SELECT_LEXes as uncacheable if they created during
statement prepare.
sql/sql_prepare.cc:
Switch off the uncacheable flag when prepare is done.
error for LIMIT placeholder".
The patch adds grammar support for LIMIT ?, ? and changes the
type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
so that it can point to Item_param.
mysql-test/include/ps_modify.inc:
Fix existing tests: now LIMIT can contain placeholders.
mysql-test/include/ps_query.inc:
Fix existing tests: now LIMIT can contain placeholders.
mysql-test/r/ps.result:
Add basic test coverage for LIMIT ?, ? and fix test results.
mysql-test/r/ps_2myisam.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_3innodb.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_4heap.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_5merge.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_6bdb.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_7ndb.result:
Fix test results: now LIMIT can contain placeholders.
mysql-test/t/ps.test:
Add basic test coverage for LIMIT ?, ?.
sql/item.h:
Add a short-cut for (ulonglong) val_int() to Item.
Add a constructor to Item_int() that accepts ulonglong.
Simplify Item_uint constructor by using the c-tor above.
sql/item_subselect.cc:
Now select_limit has type Item *.
We can safely create an Item in Item_exists_subselect::fix_length_and_dec():
it will be allocated in runtime memory root and freed in the end of
execution.
sql/sp_head.cc:
Add a special initalization state for stored procedures to
be able to easily distinguish the first execution of a stored procedure
from prepared statement prepare.
sql/sql_class.h:
Introduce new state 'INITIALIZED_FOR_SP' to be able to easily distinguish
the first execution of a stored procedure from prepared statement prepare.
sql/sql_derived.cc:
- use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
evreryplace. Add a warning about use of set_limit in
mysql_derived_filling.
sql/sql_error.cc:
- use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
evreryplace.
- this change is also aware of bug#11095 "show warnings limit 0 returns
all rows instead of zero rows", so the one who merges the bugfix from
4.1 can use local version of sql_error.cc.
sql/sql_handler.cc:
- use unit->set_limit() to initalize
unit->select_limit_cnt,offset_limit_cnt everyplace.
sql/sql_lex.cc:
Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_lex.h:
Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_parse.cc:
- use unit->set_limit() to initalize
unit->select_limit_cnt,offset_limit_cnt everyplace.
- we can create an Item_int to set global limit of a statement:
it will be created in the runtime mem root and freed in the end of
execution.
sql/sql_repl.cc:
Use unit->set_limit to initialize limits.
sql/sql_select.cc:
- select_limit is now Item* so the proper way to check for default value
is to compare it with NULL.
sql/sql_union.cc:
Evaluate offset_limit_cnt using the new type of ST_SELECT_LEX::offset_limit
sql/sql_view.cc:
Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_yacc.yy:
Add grammar support for LIMIT ?, ? clause.