during creation.
Although it returns an error, consistent with the behaviour for other objects.
(Unclear why we would allow the creation of SPs with truncated names.)
mysql-test/r/sp-error.result:
New test case for BUG#9529.
mysql-test/t/sp-error.test:
New test case for BUG#9529.
sql/sp.cc:
Check SP name length on creation (and drop).
sql/sp.h:
New status code for bad (too long) name.
sql/sql_parse.cc:
New status code for bad (too long) name.
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.
mysql-test/r/group_min_max.result:
Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
sql/item_subselect.cc:
Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS
subqueries to one place: Item_exists_subselect::fix_length_and_dec().
This implies that unit->select_limit_cnt is not set until the item is
fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
sql/mysql_priv.h:
setup_tables no longer needs a special flag for the case when
it's called from JOIN::reinit() (we don't need to call setup_tables
between two executions of a correlated subquery).
sql/opt_range.cc:
Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
not field data, to evaluate max_used_key_length, which is then
used for explain.
sql/sp.cc:
- setup_tables signature changed.
sql/sql_base.cc:
- setup_tables no longer needs a special mode for subqueries.
Unused checks were removed.
sql/sql_delete.cc:
- setup_tables signature changed
sql/sql_help.cc:
- setup_tables signature changed
sql/sql_insert.cc:
- setup_tables signature changed
sql/sql_lex.cc:
Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
in one place, and hence remove it from st_select_lex::test_limit().
sql/sql_lex.h:
Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
sql/sql_load.cc:
- setup_tables signature changed
sql/sql_olap.cc:
- setup_tables signature changed
sql/sql_parse.cc:
- st_select_lex_unit::set_limit() signature changed
sql/sql_select.cc:
Move setting of JOIN::select_limit from JOIN::prepare
to JOIN::optimize. At prepare, limit is unknown yet.
Remove excessive cleanups from JOIN::reinit which were overwriting
join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
by the change in item_subselect.cc.
sql/sql_union.cc:
Class st_select_lex_unit was changed to avoid calls to
st_select_lex_unit::set_limit from places where it may be unknown.
Now unit->select_limit_cnt is set at ::exec().
st_select_lex_unit::init_prepare_fake_select_lex():
- move out set_limit functionality
- remove a few lines of dead code.
st_select_lex_unit::prepare():
- now we don't call set_limit at the time of prepare, so the value
of unit->select_limit_cnt may be unknown here. Use sl->select_limit
instead.
st_select_lex_unit::exec():
- cleanup
- call set_limit explicitly as it has been moved out of
init_prepare_fake_select_lex.
sql/sql_update.cc:
- setup_tables signature changed
Approximative, because it's using our binlogging way (what we call "query"-level) and this is not as good as record-level binlog (5.1) would be. It imposes several
limitations to routines, and has caveats (which I'll document, and for which the server will try to issue errors but that is not always possible).
Reason I don't propagate caller info to the binlog as planned is that on master and slave
users may be different; even with that some caveats would remain.
mysql-test/mysql-test-run.sh:
In the testsuite we know what we do, we are not creating nasty routines, and breaking binlog is ok except in rpl_sp.
mysql-test/r/blackhole.result:
Updating results now that 4.1 has been merged
mysql-test/valgrind.supp:
Some suppressions for Valgrind (useful on my machine Suse 9.1);
this is just adding to the already existing suppressions of pthread and dl.
sql/item_func.cc:
Don't binlog the substatements when executing a function. If the function
is declared to modify data and does not complete, warning "broken binlog".
Note that SELECT myfunc() will not be binlogged even if myfunc() updates data (will be documented);
but INSERT INTO t VALUES(myfunc()) will be binlogged (what decides is if the caller
gets binlogged; the function changes nothing to binlogging).
sql/log_event.cc:
Just making functions which can be re-used when we binlog more strings
in status_vars in Query_log_event (e.g. one day "user", "host").
sql/log_event.h:
comment
sql/mysql_priv.h:
--log-bin-trust-routine-creators
sql/mysqld.cc:
--log-bin-trust-routine-creators
sql/set_var.cc:
--log-bin-trust-routine-creators
sql/share/errmsg.txt:
error messages to warn about problems with routines and binlog
sql/slave.cc:
If in a routine, replication table inclusion/exclusion rules always answer "replicate!" (see comment in code).
sql/sp.cc:
If binlog is on: errors if one wants to create a non-deterministic update routine
(repeatability problem - note that the test is not perfect for functions) or does not have SUPER (because routines can easily
be made to destroy slave's data with just CREATE ROUTINE and EXECUTE priv on master).
--log-bin-trust-routine-creators removes these errors.
Binlogging of CREATE PROCEDURE|FUNCTION.
sql/sql_acl.cc:
No thd==0 in tables_ok().
sql/sql_parse.cc:
Binlogging of CALL (and not of the substatements of the SP).
If SP returns error, we don't binlog it (see comment); we push warning in this case.
Binlogging of ALTER|DROP PROCEDURE|FUNCTION with safety messages.
illegal state".
We should not assume that mysql.proc table does not exist if we are
unable to open it under LOCK TABLES or in prelocked mode (and
remember this fact by setting mysql_proc_table_exists to zero).
mysql-test/r/sp.result:
Added test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal
state"
mysql-test/t/sp.test:
Added test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal
state"
sql/sp.cc:
db_find_routine_aux():
We should not assume that mysql.proc table does not exist if we are
unable to open it under LOCK TABLES or in prelocked mode since this
condition may be transient.
Fix that mysql.proc works with new VARCHAR fields
Give warnings for wrong zero dates
configure.in:
Don't use -lsupc++ with gcc 3.3 and below as this gives linking problems when linking staticly
mysql-test/r/func_time.result:
New warnings
mysql-test/r/row.result:
Moved code around to get things to work with --ps-protocol
Note that one on warning disappered, but it should appear again when bug #9600 is fixed
mysql-test/r/strict.result:
enabled more tests
Added more tests
mysql-test/r/union.result:
Test that UNION generates correct row format
mysql-test/t/row.test:
Moved test to get things to work with --ps-protocol
mysql-test/t/strict.test:
enabled more tests
Added more tests
mysql-test/t/union.test:
Test that UNION generates correct row format
sql/item.cc:
Removed compiler warning
Simple cleanup
sql/sp.cc:
Fix that mysql.proc works with new VARCHAR fields
sql/time.cc:
Give warnings for wrong zero dates
tests/mysql_client_test.c:
More startup information
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/sp.result:
Merge
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Improved handling of situations when we encounter error during
CREATE PROCEDURE (FUNCTION/TRIGGER/...) and bail out of yyparse()
without restoring proper THD::lex.
sql/sp.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sp_head.cc:
sp_head::destroy():
Fixed cleaning up of stack of auxilary LEXes.
We also restore right value of THD::lex during this process now.
sql/sql_parse.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sql_prepare.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sql_trigger.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
Crashes with stored procedure return non-string values
Also fixes Bug#2773
mysql-test/r/information_schema.result:
Bug#3788
Fix results for bugfix
mysql-test/r/sp.result:
Bug#3788
Tests for Bug
Fix results for bugfix
mysql-test/t/sp.test:
Bug#3788
New tests for bug
sql/item.cc:
Fix unrelated crash in view test with --ps-protocol.
sql/item_func.cc:
Bug#3788
Alter how SP function result types are handled.
sql/item_func.h:
Bug#3788
Alter how SP function result types are handled.
sql/mysql_priv.h:
Bug#3788
Prototypes for new global functions
sql/sp.cc:
Bug#3788
Alter how function return type is reported
sql/sp_head.cc:
Bug#3788
Change how function return types are stored for SPs
sql/sp_head.h:
Bug#3788
Change how function return types are stored for SPs
sql/sql_parse.cc:
Bug#3788
Split out field construction into its own function
sql/sql_table.cc:
Bug#3788
Split out field preparation code into its own function
sql/sql_yacc.yy:
Bug#3788
Change how function return types are stored for SPs
sql/unireg.cc:
Bug#3788
Add assertion check
mysql-test/r/mysqldump.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_rcontext.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.h:
Auto merged
sql/sp_head.cc:
Manual merge.
sql/sql_class.cc:
Manual merge.
sql/sql_parse.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
and some SP-related cleanups.
- We don't have separate stage for calculation of list of tables
to be prelocked and doing implicit LOCK/UNLOCK any more.
Instead we calculate this list at open_tables() and do implicit
LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
Also now we support cases when same table (with same alias) is
used several times in the same query in SP.
- Cleaned up execution of SP. Moved all common code which handles
LEX and does preparations before statement execution or complex
expression evaluation to auxilary sp_lex_keeper class. Now
all statements in SP (and corresponding instructions) that
evaluate expression which can contain subquery have their
own LEX.
mysql-test/r/lock.result:
Replaced wrong error code with the correct one after fixing bug in
SP-locking.
mysql-test/r/mysqldump.result:
Added dropping of view which is used in test to its beginning.
mysql-test/r/sp.result:
Added tests for improved SP-locking.
Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
(Until Monty will allow to open mysql.proc under LOCK TABLES without
mentioning it in lock list).
Replaced wrong results of test for bug #5240 with correct results after
fixing bug in handling of cursors.
mysql-test/t/lock.test:
Replaced wrong error code with the correct one after fixing bug in
SP-locking.
mysql-test/t/mysqldump.test:
Added dropping of view which is used in test to its beginning.
mysql-test/t/sp.test:
Added tests for improved SP-locking.
Temporarily disabled tests for SHOW PROCEDURE STATUS and alike
(Until Monty will allow to open mysql.proc under LOCK TABLES without
mentioning it in lock list).
Removed test for bug #1654 since we already test exactly this function
in one of SP-locking tests.
Removed comment about cursor's wrong behavior in test for bug #5240
after fixing bug which was its cause.
sql/item_func.cc:
Removed comment which is no longer true.
sql/mysql_priv.h:
Changed open_tables() signature.
Now its 2nd parameter is in/out since it can add elements to table list.
sql/sp.cc:
sp_find_procedure():
Added one more parameter which enforces cache only lookup.
sp_merge_hash():
Now uses its return value to indicate that first of two hashes changed
as result of merge.
sp_cache_routines():
This function caches all stored routines used in query now.
sql/sp.h:
- sp_find_procedure() now has one more parameter which enforces cache only
lookup.
- sp_merge_hash() now uses its return value to indicate that first of two
hashes changed as result of merge.
- sp_cache_routines() caches all stored routines now. So it does not need
third argument any more.
sql/sp_head.cc:
sp_head::sp_head():
Added initialization of new m_spfuns and m_spprocs members.
sp_head::execute():
Let us save/restore part of thread context which can be damaged by
execution of instructions.
sp_head::execute_function()/execute_procedure():
Now it is responsibility of caller to close tables used in
subqueries which are passed as routine parameters.
sp_head::restore_lex():
Let us accumulate information about routines used by this one
in new m_spfuns, m_spprocs hashes.
sp_lex_keeper::reset_lex_and_exec_core()
Main method of new auxilary sp_lex_keeper class to which instructions
delegate responsibility for handling LEX and preparations before
executing statement or calculating complex expression.
Since all instructions which calculate complex expression or execute
command now use sp_lex_keeper they have to implement
sp_instr::exec_core() method. Most of instruction specific logic
has moved from sp_instr::execute() to this new method.
Removed sp_instr_set_user_var class which is no longer used, because
nowdays we allow execution of statements in stored functions and
triggers.
sp_merge_table_list() became sp_head::merge_table_list() method. It
also treats sp_head::m_sptabs as multi-set of tables now.
sp_hash_to_table_list() became sp_head::add_used_tables_to_table_list().
It takes into account that sp_head::m_sptabs is multi-set and allocates
object into persistent arena of PS.
Removed sp_merge_table_hash(), sp_open_and_lock_tables(),
sp_unlock_tables(), sp_merge_routine_tables() methods since they are not
used by new prelocking mechanism.
Added sp_add_sp_tables_to_table_list() which serves for adding tables needed
by routines used in query to the query table list for prelocking.
sql/sp_head.h:
class sp_head:
- Added m_spfuns, m_spprocs members for storing names of routines used
by this routine.
- Added add_used_tables_to_table_list() method which allows to add
tables needed by this routine to query's table list.
- Converted sp_merge_table_list() to sp_head::merge_table_list() method.
- Changed semantics of THD::m_sptabs. Now it is multi-set which contains
only tables which are used by this routine and not routines that are
called from this one.
Removed sp_merge_routine_tables(), sp_merge_table_hash(),
sp_open_and_lock_tables(), sp_unlock_tables() calls since they are not
used for our prelocking list calculation.
Added auxilary sp_lex_keeper class to which instructions delegate
responsibility for handling LEX and preparations before executing
statement or calculating complex expression. This class uses
new sp_instr::exec_core() method which is responsible for executing
instruction's core function after all preparations were made.
All instructions which hold and calculate complex expression now have
their own LEX (by aggregating sp_lex_keeper instance). sp_instr_stmt
now uses sp_lex_keeper too.
Removed sp_instr_set_user_var class which is no longer used, because
nowdays we allow execution of statements in stored functions and
triggers.
sql/sp_rcontext.cc:
Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sp_rcontext.h:
Now sp_cursor holds pointer to sp_lex_keeper instead of LEX.
sql/sql_acl.cc:
acl_init(), grant_init():
Now we use simple_open_n_lock_tables() instead of explicit
calls to open_tables() and mysql_lock_tables().
sql/sql_base.cc:
Implemented support for execution of statements in "prelocked" mode.
When we have statement which uses stored routines explicitly or
implicitly (via views or triggers) we have to open and lock all tables
for these routines at the same time as tables for the main statement.
In fact we have to do implicit LOCK TABLES at the begining of such
statement and implict UNLOCK TABLES at its end. We call such mode
"prelocked".
When open_tables() is called for the statement tables which are needed
for execution of routines used by it are added to its tables list
(this process also caches all routines used). Implicit use of routines
is discovered when we open view or table with trigger and apropriate
tables are added to the table list at this moment. Statement which has
such extra tables in its list (well actually any that uses functions)
is marked as requiring prelocked mode for its execution.
When lock_tables() sees such statement it will issue implicit LOCK TABLES
for this extended table list instead of doing usual locking, it will also
set THD::prelocked_mode to indicate that we are in prelocked mode.
When open_tables()/lock_tables() are called for statement of stored
routine (substatement), they notice that we are running in prelocked mode
and use one of prelocked tables from those that are not used by upper
levels of execution.
close_thread_tables() for substatement won't really close tables used
but will mark them as free for reuse instead.
Finally when close_thread_tables() is called for the main statement it
really unlocks and closes all tables used.
Everything will work even if one uses such statement under real LOCK
TABLES (we are simply not doing implicit LOCK/UNLOCK in this case).
sql/sql_class.cc:
Added initialization of THD::prelocked_mode member.
sql/sql_class.h:
- Added prelocked_mode_type enum and THD::prelocked_mode member
which are used for indication whenever "prelocked mode" is on
(i.e. that statement uses stored routines and is executed under
implicit LOCK TABLES).
- Removed THD::shortcut_make_view which is no longer needed.
We use TABLE_LIST::prelocking_placeholder for the same purprose
now.
sql/sql_handler.cc:
Changed open_tables() invocation.
Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_lex.cc:
lex_start():
Added initialization of LEX::query_tables_own_last.
Unused LEX::sptabs member was removed.
st_lex::unlink_first_table()/link_first_table_back():
We should update LEX::query_tables_last properly if table list
contains(ed) only one element.
sql/sql_lex.h:
LEX:
- Removed sptabs member since it is no longer used.
- Added query_tables_own_last member, which if non-0 indicates that
statement requires prelocking (implicit LOCK TABLES) for its execution
and points to last own element in query table list. If it is zero
then this query does not need prelocking.
- Added requires_prelocking(), mark_as_requiring_prelocking(),
first_not_own_table() inline methods to incapsulate and simplify
usage of this new member.
sql/sql_parse.cc:
dispatch_command():
To properly leave prelocked mode when needed we should call
close_thread_tables() even if there are no open tables.
mysql_execute_command():
- Removed part of function which were responsible for doing implicit
LOCK TABLES before statement execution if statement used stored
routines (and doing UNLOCK TABLES at the end).
Now we do all this in open_tables()/lock_tables()/close_thread_tables()
instead.
- It is also sensible to reset errors before execution of statement
which uses routines.
- SQLCOM_DO, SQLCOM_SET_OPTION, SQLCOM_CALL
We should always try to open tables because even if statement has empty
table list, it can call routines using tables, which should be preopened
before statement execution.
- SQLCOM_CALL
We should not look up routine called in mysql.proc, since it should be
already cached by this moment by open_tables() call.
- SQLCOM_LOCK_TABLES
it is better to use simple_open_n_lock_tables() since we want to avoid
materialization of derived tables for this command.
sql/sql_prepare.cc:
mysql_test_update():
Changed open_tables() invocations. Now its 2nd parameter is in/out
since it can add elements to table list.
check_prepared_statement():
Since now we cache all routines used by statement in open_tables() we
don't need to do it explicitly.
mysql_stmt_prepare():
Now we should call close_thread_tables() when THD::lex points to the
LEX of statement which opened tables.
reset_stmt_for_execute():
Commented why we are resetting all tables in table list.
sql/sql_trigger.h:
Table_triggers_list::process_triggers():
We should surpress sending of ok packet when we are calling trigger's
routine, since now we allow statements in them.
sql/sql_update.cc:
Changed open_tables() invocations.
Now its 2nd parameter is in/out since it can add elements to table list.
sql/sql_view.cc:
mysql_make_view():
- Removed handling of routines used in view. Instead we add tables which
are needed for their execution to statement's table list in
open_tables().
- Now we use TABLE_LIST::prelocking_placeholder instead of
THD::shortcut_make_view for indicating that view is opened
only to discover which tables and routines it uses (this happens
when we build extended table list for prelocking). Also now we try
to avoid to modify main LEX in this case (except of its table list).
- Corrected small error we added tables to the table list of the main
LEX without updating its query_tables_last member properly.
sql/sql_yacc.yy:
Now each expression which is used in SP statements and can contain
subquery has its own LEX. This LEX is stored in corresponding sp_instr
object and used along with Item tree for expression calculation.
We don't need sp_instr_set_user_var() anymore since now we allow
execution of statements in stored functions and triggers.
sql/table.h:
Added TABLE_LIST::prelocking_placeholder member for distinguishing
elements of table list which does not belong to the statement itself
and added there only for prelocking (as they are to be used by routines
called by this statement).
sql/tztime.cc:
my_tz_init():
Now we use more simplier simple_open_n_lock_tables() call instead of
open_tables()/lock_tables() pair.
of DROP PROCEDURE IF EXISTS statement.
mysql-test/r/sp.result:
New test case for BUG#8757
mysql-test/t/sp.test:
New test case for BUG#8757
sql/sp.cc:
Don't zap lex->found_semicolon. (For compound statements)
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.
mysql-test/r/information_schema.result:
Updated result for WL#2130.
mysql-test/r/lock.result:
Updated result for WL#2130.
mysql-test/r/sp-error.result:
Updated result for WL#2130.
mysql-test/r/sp.result:
Updated result for WL#2130.
mysql-test/r/view.result:
Updated result for WL#2130.
mysql-test/t/information_schema.test:
Disabled one test case due to a bug involving LOCK TABLES,
which shows up with WL#2130.
mysql-test/t/lock.test:
New error message with WL#2130. This change is under debate and might change
in the future, but will do for now.
mysql-test/t/sp-error.test:
Updated for WL#2130. Some tests are voided when table access does work from
functions.
mysql-test/t/sp.test:
Updated for WL#2130.
mysql-test/t/view.test:
Updated for WL#2130.
sql/item_func.cc:
We now have to set net.no_send_ok for functions too, with WL#2130.
sql/share/errmsg.txt:
Reused an error code since the old use was voided by WL#2130, but a new
one was needed instead (similar, but more specific restriction).
sql/sp.cc:
Fixed error handling and collection of used tables for WL#2130.
sql/sp.h:
Fixed error handling and collection of used tables for WL#2130.
sql/sp_head.cc:
Added support functions for collecting and merging hash tables and lists
of used tables from SPs and substatements, for WL#2130.
sql/sp_head.h:
Added support functions for collecting and merging hash tables and lists
of used tables from SPs and substatements, for WL#2130.
sql/sql_base.cc:
Changed the way table->query_id is tested and set during with locked tables
in effect. This makes some SP test cases work with WL#2130, but has a side
effect on some error cases with explicit LOCK TABLES. It's still debated if
this is the correct way, so it might change.
sql/sql_class.h:
Added flags for circumventing some interference between WL#2130 and mysql_make_view().
sql/sql_derived.cc:
Added some missing initializations. (Potential bugs.)
sql/sql_lex.cc:
Clear the new hash tables for WL#2130.
sql/sql_lex.h:
Added hash tables for procedures and tables too (as for functions), for WL#2130.
sql/sql_parse.cc:
WL#2130: Make table accesses from stored functions work by adding an implicit
LOCK TABLES around (most) executed statements. To do this, we have to go through
a loop where we collect all SPs and tables in mysql_execute_statement.
sql/sql_prepare.cc:
Cache both functions and procedures for WL#2130.
sql/sql_show.cc:
Added some missing initializations. (Potential bugs.)
sql/sql_view.cc:
Shortcut mysql_make_view() if thd->shortcut_make_view is true during
the pre-open phase for collecting tables in WL#2130. Otherwise, the
similar mechanism here causes interference.
sql/sql_yacc.yy:
For WL#2130, added caching of procedures and disallowed LOCK/UNLOCK TABLES in SPs.
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
include/myisam.h:
Added const before names
mysql-test/r/group_min_max.result:
Make results repeatable
mysql-test/t/group_min_max.test:
Make results repeatable
sql/field.cc:
Created Field::make_field() and made Field_num::make_field() to call this
Use TABLE_SHARE
Use sql_strmake() instead of sql_memdup() to simplify code
sql/field.h:
Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
Use TABLE_SHARE
sql/field_conv.cc:
Use TABLE_SHARE
sql/filesort.cc:
Use TABLE_SHARE
sql/ha_berkeley.cc:
Use TABLE_SHARE
sql/ha_heap.cc:
Use TABLE_SHARE
sql/ha_innodb.cc:
Use TABLE_SHARE
sql/ha_myisam.cc:
Use TABLE_SHARE
sql/ha_myisammrg.cc:
Use TABLE_SHARE
Change some pointer handling to use const char*
sql/ha_ndbcluster.cc:
Use TABLE_SHARE
sql/handler.cc:
Use TABLE_SHARE
sql/item.cc:
Use TABLE_SHARE
sql/item_func.cc:
Use TABLE_SHARE
sql/item_subselect.cc:
Use TABLE_SHARE
sql/item_sum.cc:
Use TABLE_SHARE
sql/key.cc:
Use TABLE_SHARE
sql/lock.cc:
Use TABLE_SHARE
sql/log_event.cc:
real_name -> table_name
sql/mysql_priv.h:
Use TABLE_SHARE
sql/opt_range.cc:
Use TABLE_SHARE
sql/opt_sum.cc:
Use TABLE_SHARE
sql/records.cc:
Use TABLE_SHARE
sql/repl_failsafe.cc:
real_name -> table_name
sql/slave.cc:
Use TABLE_SHARE
sql/sp.cc:
Use TABLE_SHARE
sql/sp_head.cc:
real_name -> table_name
sql/sql_acl.cc:
Use TABLE_SHARE
removed unnecessary assert
fixed indentation
changed some char * -> const char*
sql/sql_acl.h:
changed some char* -> const char*
sql/sql_base.cc:
Use TABLE_SHARE
sql/sql_cache.cc:
Use TABLE_SHARE
sql/sql_class.cc:
Use TABLE_SHARE
sql/sql_db.cc:
real_name -> table_name
sql/sql_delete.cc:
Use TABLE_SHARE
sql/sql_derived.cc:
Use TABLE_SHARE
sql/sql_handler.cc:
Use TABLE_SHARE
sql/sql_help.cc:
Use TABLE_SHARE
sql/sql_insert.cc:
Use TABLE_SHARE
sql/sql_load.cc:
Use TABLE_SHARE
sql/sql_parse.cc:
Use TABLE_SHARE
sql/sql_rename.cc:
real_name -> table_name
sql/sql_select.cc:
Use TABLE_SHARE
table->blob_fields now points to field offsets, not fields
tmp_table->table_name now points to alias name
sql/sql_show.cc:
Use TABLE_SHARE
sql/sql_table.cc:
Use TABLE_SHARE
sql/sql_test.cc:
Use TABLE_SHARE
sql/sql_trigger.cc:
Use TABLE_SHARE
sql/sql_udf.cc:
Use TABLE_SHARE
sql/sql_union.cc:
real_name -> table_name
sql/sql_update.cc:
Use TABLE_SHARE
sql/sql_view.cc:
Use TABLE_SHARE
sql/table.cc:
Split TABLE to TABLE and TABLE_SHARE
Changed blob_field to be field offsets instead of pointer to fields
Only initialize table->s->default_values with default record (not all table->record[#])
Some indentation changes
sql/table.h:
Split TABLE to TABLE and TABLE_SHARE
sql/tztime.cc:
real_name -> table_name
sql/unireg.cc:
Use TABLE_SHARE
sql/unireg.h:
Use TABLE_SHARE
BitKeeper/etc/logging_ok:
auto-union
client/mysqltest.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/include/dict0dict.h:
Auto merged
libmysql/errmsg.c:
Auto merged
myisam/mi_open.c:
Auto merged
myisam/mi_write.c:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/merge.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/t/derived.test:
Auto merged
mysql-test/t/merge.test:
Auto merged
mysql-test/t/show_check.test:
Auto merged
mysql-test/t/system_mysql_db_fix.test:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.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_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/tztime.h:
Auto merged
config/ac-macros/character_sets.m4:
Added latin1_spanish_ci
dbug/dbug_analyze.c:
Remove compiler warnings
include/my_handler.h:
Reorder structure arguments to be more optimal
innobase/dict/dict0load.c:
Fixed wrong define tag (for MySQL 5.0)
innobase/fil/fil0fil.c:
Fixed compiler warning
innobase/os/os0file.c:
Fixed compiler warning
myisam/ft_boolean_search.c:
Fixed compiler warning
myisam/ft_static.c:
Update to use new HA_KEYSEG structure
myisam/mi_open.c:
Simple optimization
myisammrg/myrg_static.c:
Removed compiler warning
mysql-test/r/grant.result:
Update results after merge
mysql-test/r/index_merge.result:
Update results after merge
mysql-test/r/information_schema_inno.result:
Add missing drop table
mysql-test/r/lowercase_table.result:
safety fix
mysql-test/r/multi_update.result:
safety fix
mysql-test/r/ps_1general.result:
safety fix
mysql-test/r/ps_2myisam.result:
Update results after merge
(set is not anymore of binary type)
mysql-test/r/ps_3innodb.result:
Update results after merge
mysql-test/r/ps_4heap.result:
Update results after merge
mysql-test/r/ps_5merge.result:
Update results after merge
mysql-test/r/ps_6bdb.result:
Update results after merge
mysql-test/r/show_check.result:
Update results after merge
mysql-test/r/subselect.result:
Update results after merge
(added missing quotes)
mysql-test/r/timezone2.result:
Update results after merge
mysql-test/r/view.result:
Update results after merge
(note that INSERT IGNORE will work again after next merge from 4.1)
mysql-test/t/derived.test:
Removed empty line
mysql-test/t/grant.test:
Update results after merge
mysql-test/t/information_schema_inno.test:
added missing drop table
mysql-test/t/lowercase_table.test:
safety fix
mysql-test/t/multi_update.test:
safety fix
mysql-test/t/ps_1general.test:
safety fix
mysql-test/t/view.test:
update error codes after merge
ndb/src/mgmsrv/main.cpp:
after merge fix
ndb/tools/ndb_test_platform.cpp:
removed compiler warnings
regex/main.c:
remove compiler warnings
sql/field.cc:
Remove compiler warning
sql/gen_lex_hash.cc:
Added DBUG support
sql/ha_myisam.cc:
Removed warning from valgrind
sql/ha_ndbcluster.cc:
Remove compiler warning
sql/item_cmpfunc.cc:
Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
sql/mysqld.cc:
Remove compiler warning
sql/sql_acl.cc:
More debugging
sql/sql_lex.cc:
Remove unnecessary 'else'
sql/sql_parse.cc:
After merge fixes
Simplify reset of thd->server_status for SQLCOM_CALL
sql/sql_prepare.cc:
After merge fixes
Removed possible core dump in mysql_stmt_fetch()
sql/sql_update.cc:
After merge fixes (together with Sanja)
strings/ctype-czech.c:
Remove compiler warning
strings/ctype-ucs2.c:
Remove compiler warning
strings/ctype-win1250ch.c:
Remove compiler warning
strings/xml.c:
Remove compiler warning
tests/client_test.c:
Fix test to work with 5.0
vio/test-sslserver.c:
Portability fix
Implement fine-grained control over access to stored procedures
Privileges are cached (same way as existing table/column privs)
mysql-test/include/system_db_struct.inc:
WL#925 - Privileges for stored routines
New system table: procs_priv
mysql-test/r/connect.result:
WL#925 - Privileges for stored routines
New system table: procs_priv
mysql-test/r/grant.result:
WL#925 - Privileges for stored routines
user table has additional privilege attributes
SHOW PRIVILEGES amended
mysql-test/r/grant2.result:
Fix result
mysql-test/r/information_schema.result:
WL#925 - Privileges for stored routines
New system table procs_priv
New user privileges
mysql-test/r/show_check.result:
Fix result
mysql-test/r/sp-security.result:
WL#925 - Privileges for stored routines
Fix existing tests to work with new privileges
New tests for new privileges
mysql-test/r/sp.result:
WL#925 - Privileges for stored routines
Fix SHOW PRIVILEGES results
mysql-test/r/system_mysql_db.result:
WL#925 - Privileges for stored routines
New system table: procs_priv
user and db tables have new privilege attributes
mysql-test/t/grant2.test:
Fix test
mysql-test/t/show_check.test:
Fix test
mysql-test/t/sp-security.test:
WL#925 - Privileges for stored routines
Allow existing tests to run with new privilege checks
New tests for privileges
mysql-test/t/system_mysql_db_fix.test:
WL#925 - Privileges for stored routines
New system table: procs_priv
scripts/mysql_create_system_tables.sh:
WL#925 - Privileges for stored routines
db and user has new privilege attributes
new system table: procs_priv
scripts/mysql_fix_privilege_tables.sql:
WL#925 - Privileges for stored routines
new system table: procs_priv
scripts/mysql_install_db.sh:
WL#925 - Privileges for stored routines
Amend comment
sql/item_func.cc:
WL#925 - Privileges for stored routines
Privilege check for stored FUNCTION routine
sql/lex.h:
WL#925 - Privileges for stored routines
new token ROUTINE
sql/mysql_priv.h:
WL#925 - Privileges for stored routines
New function: check_procedure_access()
sql/mysqld.cc:
WL#925 - Privileges for stored routines
system option automatic-sp-privileges
sql/set_var.cc:
WL#925 - Privileges for stored routines
system option automatic-sp-privileges
sql/share/errmsg.txt:
WL#925 - Privileges for stored routines
rename errormessage to conform:
ER_SP_ACCESS_DENIED_ERROR -> ER_PROCACCESS_DENIED_ERROR
New error messages
ER_NONEXISTING_PROC_GRANT, ER_PROC_AUTO_GRANT_FAIL, ER_PROC_AUTO_REVOKE_FAIL
sql/sp.cc:
WL#925 - Privileges for stored routines
new function: sp_exists_routine()
sql/sp.h:
WL#925 - Privileges for stored routines
new function: sp_exists_routine()
sql/sql_acl.cc:
WL#925 - Privileges for stored routines
Implementation for SP privileges.
Privileges are cached in memory hash.
New functions:
mysql_procedure_grant()
check_grant_procedure()
sp_revoke_privileges()
sp_grant_privileges()
sql/sql_acl.h:
WL#925 - Privileges for stored routines
New privilege bits: CREATE_PROC_ACL, ALTER_PROC_ACL
Alter confusing bit-segments to be shifted
New macros: fix_rights_for_procedure() get_rights_for_procedure()
New functions:
mysql_procedure_grant()
check_grant_procedure()
sp_grant_privileges()
sp_revoke_privileges()
sql/sql_lex.h:
WL#925 - Privileges for stored routines
new all_privileges attribute in LEX
sql/sql_parse.cc:
WL#925 - Privileges for stored routines
Remove function: check_sp_definer_access()
Add handling for SP grants/revokes
Add privilege checks for stored procedure invocation
sql/sql_show.cc:
WL#925 - Privileges for stored routines
update result for SHOW PRIVILEGES
sql/sql_yacc.yy:
WL#925 - Privileges for stored routines
New token ROUTINE
rename some rules
handle CREATE ROUTINE / ALTER ROUTINE privileges
sql/sp.cc:
A fix (Bug #6843: Wrong function name crashes MySQL if mysql.proc table is missi
We test current_select (in case of error) in the my_message_sql().
into sanja.is.com.ua:/home/bell/mysql/bk/work-join-5.0
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
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_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/view.result:
changes in error number, and key in view processing
mysql-test/t/view.test:
changes in error number, and key in view processing
sql/mysql_priv.h:
changes functions
sql/sp.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
sql/sql_base.cc:
fixed finding table, taking in account join view, which can have not TABLE pointer
now we report to setup_tables(), are we setuping SELECT...INSERT and ennumerete insert table separately
sql/sql_delete.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
sql/sql_help.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
sql/sql_insert.cc:
fixed returning value of functions
sql/sql_load.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
removed second setup_tables call (merge)
sql/sql_olap.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
sql/sql_parse.cc:
UPDATE->MULTIUPDATE switching fixed
sql/sql_prepare.cc:
UPDATE->MULTIUPDATE switching fixed
sql/sql_select.cc:
now we report to setup_tables(), are we setuping SELECT...INSERT
sql/sql_update.cc:
UPDATE->MULTIUPDATE switching fixed
sql/sql_view.cc:
returning value fixed
sql/sql_view.h:
returning value fixed
Fixed bug in DROP FUNCTION for UDFs.
Note: It still doesn't work properly, but that bug is somewhere else.
sql/sp.cc:
Fix compiler warning on some systems. (Unused variable)
sql/sql_parse.cc:
Fix compiler warning on some systems. (Unused variable)
Fixed bug in DROP FUNCTION for UDFs.
Note: It still doesn't work properly, but that bug is somewhere else.
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
used only one implementation of format parser of (printf)
fixed multistatement
include/mysqld_error.h:
newerror messages
mysql-test/t/key.test:
unknown error replaced with real error
mysys/my_error.c:
my_error & my_printf_error use my_vsprintf
sql/field_conv.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/ha_innodb.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/handler.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/item.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_cmpfunc.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_func.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_strfunc.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/lock.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/log.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/parse_file.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/procedure.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/protocol.cc:
no need reset thd->lex->found_colon to break multiline sequance now, send_error called too late
sql/repl_failsafe.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/set_var.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/share/czech/errmsg.txt:
new errors converted from unknown error
sql/share/danish/errmsg.txt:
new errors converted from unknown error
sql/share/dutch/errmsg.txt:
new errors converted from unknown error
sql/share/english/errmsg.txt:
new errors converted from unknown error
sql/share/estonian/errmsg.txt:
new errors converted from unknown error
sql/share/french/errmsg.txt:
new errors converted from unknown error
sql/share/german/errmsg.txt:
new errors converted from unknown error
sql/share/greek/errmsg.txt:
new errors converted from unknown error
sql/share/hungarian/errmsg.txt:
new errors converted from unknown error
sql/share/italian/errmsg.txt:
new errors converted from unknown error
sql/share/japanese/errmsg.txt:
new errors converted from unknown error
sql/share/korean/errmsg.txt:
new errors converted from unknown error
sql/share/norwegian-ny/errmsg.txt:
new errors converted from unknown error
sql/share/norwegian/errmsg.txt:
new errors converted from unknown error
sql/share/polish/errmsg.txt:
new errors converted from unknown error
sql/share/portuguese/errmsg.txt:
new errors converted from unknown error
sql/share/romanian/errmsg.txt:
new errors converted from unknown error
sql/share/russian/errmsg.txt:
new errors converted from unknown error
sql/share/serbian/errmsg.txt:
new errors converted from unknown error
sql/share/slovak/errmsg.txt:
new errors converted from unknown error
sql/share/spanish/errmsg.txt:
new errors converted from unknown error
sql/share/swedish/errmsg.txt:
new errors converted from unknown error
sql/share/ukrainian/errmsg.txt:
new errors converted from unknown error
sql/slave.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sp.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sp_head.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_acl.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_analyse.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_base.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_class.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_db.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_delete.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_handler.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_insert.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_load.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_map.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_parse.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
multi-row command fixed
sql/sql_prepare.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
remover send_error ingected from 4.1
sql/sql_rename.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_repl.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_select.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_show.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_table.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_trigger.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_udf.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_update.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_view.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_yacc.yy:
now my_printf_error is not better then my_error, but my_error call is shorter
sql/table.cc:
now my_printf_error is not better then my_error, but my_error call is shorter
strings/my_vsnprintf.c:
* format support added to my_vsprint
include/mysqld_error.h:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/rpl_charset.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/rpl_charset.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_uniq.h:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/parse_file.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/protocol.h:
Auto merged
sql/protocol_cursor.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/repl_failsafe.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_analyse.cc:
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_error.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_repl.h:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/share/czech/errmsg.txt:
Auto merged
sql/share/danish/errmsg.txt:
Auto merged
sql/share/dutch/errmsg.txt:
Auto merged
sql/share/english/errmsg.txt:
Auto merged
sql/share/estonian/errmsg.txt:
Auto merged
sql/share/french/errmsg.txt:
Auto merged
sql/share/german/errmsg.txt:
Auto merged
sql/share/greek/errmsg.txt:
Auto merged
sql/share/hungarian/errmsg.txt:
Auto merged
sql/share/italian/errmsg.txt:
Auto merged
sql/share/japanese/errmsg.txt:
Auto merged
sql/share/korean/errmsg.txt:
Auto merged
sql/share/norwegian-ny/errmsg.txt:
Auto merged
sql/share/norwegian/errmsg.txt:
Auto merged
sql/share/polish/errmsg.txt:
Auto merged
sql/share/portuguese/errmsg.txt:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql/unireg.cc:
Auto merged
sql/share/romanian/errmsg.txt:
Auto merged
sql/share/russian/errmsg.txt:
Auto merged
sql/share/serbian/errmsg.txt:
Auto merged
sql/share/slovak/errmsg.txt:
Auto merged
sql/share/spanish/errmsg.txt:
Auto merged
sql/share/swedish/errmsg.txt:
Auto merged
sql/share/ukrainian/errmsg.txt:
Auto merged
mysql-test/r/rpl_rotate_logs.result:
removed host dependence in error messages
mysql-test/t/rpl_rotate_logs.test:
removed host dependence in error messages
mysys/my_error.c:
comment about using my_error family functions
sql/filesort.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/ha_innodb.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/handler.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_cmpfunc.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_func.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_strfunc.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_subselect.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_sum.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/lock.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/log.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/mysql_priv.h:
error check moved to fill_record
sql/mysqld.cc:
fixed error messages
sql/parse_file.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol_cursor.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/repl_failsafe.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/set_var.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/slave.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_head.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_rcontext.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_acl.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_analyse.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_base.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_class.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_class.h:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_db.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_delete.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_handler.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_help.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_insert.cc:
changing my_error on my_message and my_printf_error where if they are prefered
error check moved to fill_record
sql/sql_lex.cc:
layout fixed
sql/sql_load.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_map.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_parse.cc:
error check moved to fill_record
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_prepare.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_rename.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_repl.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_select.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_show.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_table.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_trigger.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_udf.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_union.cc:
error check moved to fill_record
sql/sql_update.cc:
error check moved to fill_record
sql/sql_view.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_yacc.yy:
changing my_error on my_message and my_printf_error where if they are prefered
sql/table.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/unireg.cc:
changing my_error on my_message and my_printf_error where if they are prefered
sql/item_cmpfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_view.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_help.cc:
Auto merged
sql/item.cc:
manual merge
sql/sql_select.cc:
manul merge
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
mysql-test/t/range.test:
After merge fixRecR
sql/item_func.cc:
After merge fix
sql/item_sum.cc:
After merge fix
sql/opt_range.cc:
After merge fix
sql/parse_file.cc:
After merge fix
sql/sp.cc:
After merge fix
sql/sp_head.cc:
After merge fix
sql/sp_head.h:
After merge fix
sql/sql_base.cc:
After merge fix
sql/sql_class.h:
After merge fix
sql/sql_list.h:
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
sql/sql_prepare.cc:
After merge fix
sql/sql_select.cc:
After merge fix
sql/sql_table.cc:
After merge fix
Fixed problem with OPTIMIZE on INNODB tables
sql/sql_trigger.cc:
After merge fix
sql/sql_union.cc:
After merge fix
sql/sql_view.cc:
After merge fix
sql/sql_yacc.yy:
After merge fix
sql/table.cc:
After merge fix
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete
BUILD/SETUP.sh:
Portability fix
client/mysqltest.c:
Portability fix
mysql-test/r/drop.result:
updated results
mysql-test/r/func_str.result:
New warnings (after merge)
mysql-test/r/insert.result:
Updated tests
mysql-test/r/join_nested.result:
Updated results (because of new column types in 5.0)
mysql-test/r/lock_multi.result:
Temporarly wrong results until Sanja fixes multi-update-lock in 5.0
mysql-test/r/multi_update.result:
Temporary fix until Sanja fixes multi-update locking
mysql-test/r/ps_1general.result:
Update of results after merge
mysql-test/r/ps_2myisam.result:
Update of results after merge
mysql-test/r/ps_3innodb.result:
Update of results after merge
mysql-test/r/ps_4heap.result:
Update of results after merge
mysql-test/r/ps_5merge.result:
Update of results after merge
mysql-test/r/ps_6bdb.result:
Update of results after merge
mysql-test/r/query_cache.result:
Update of results after merge
mysql-test/r/range.result:
New results for new tests
mysql-test/r/rpl_auto_increment.result:
Update with new 4.0 information
mysql-test/r/rpl_charset.result:
After merge fixes
mysql-test/r/subselect.result:
After merge fixes
mysql-test/r/view.result:
Temporary fix until multi-update-locking is fixed
mysql-test/t/drop.test:
Safety fix
mysql-test/t/multi_update.test:
Temporary fix until multi-update-locking is fixed
mysql-test/t/rpl_charset.test:
More comments
mysql-test/t/sp-error.test:
Updated comments
mysql-test/t/view.test:
Temporary fix until multi-update-locking is fixed
scripts/mysql_fix_privilege_tables.sh:
Better error message
sql-common/client.c:
More debugging
sql/ha_ndbcluster.cc:
After merge fixes
sql/handler.cc:
After merge fixes
sql/item.cc:
Simple optimization of creating item
After merge fixed
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
The problem is that if you compare a string field to a binary string, you can't replace the field with a string constant as the binary comparison may then fail (The original field value may be in a different case)
sql/item.h:
Added Item::set_no_const_sub() to be able to mark fields that can't be substituted
sql/item_cmpfunc.cc:
Mark fields compared as binary to not be substituted.
sql/item_func.cc:
After merge fix
sql/log_event.cc:
After merge fix
sql/mysql_priv.h:
After merge fix
sql/opt_range.cc:
After merge fix
sql/protocol.cc:
Made flags uint instead of int (as it's used as a bit mask)
sql/protocol.h:
Made flags uint instead of int (as it's used as a bit mask)
sql/protocol_cursor.cc:
Made flags uint instead of int (as it's used as a bit mask)
Indentation cleanups
sql/sp.cc:
After merge fixes
Removed compiler warnings
sql/sp_head.cc:
After merge fixes
sql/sql_base.cc:
After merge fixes
Removed 'send_error' from 'insert_fields()' as the error is sent higher up
sql/sql_class.cc:
Give assert if set_n_backup_item_arena is used twice
sql/sql_class.h:
Give assert if set_n_backup_item_arena is used twice
After merge fixes
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
sql/sql_handler.cc:
After merge fixes
sql/sql_parse.cc:
After merge fixes
sql/sql_prepare.cc:
After merge fixes
sql/sql_select.cc:
After merge fixes
Moved 'build_equal_items' to optimize_cond() (logical place)
sql/sql_table.cc:
After merge fixes
sql/sql_trigger.cc:
After merge fixes
sql/sql_update.cc:
After merge fixes
(This should be fixed by Sanja to have lower granuality locking of tables in multi-update)
sql/sql_view.cc:
After merge fixes
sql/sql_yacc.yy:
After merge fixes
Don't have FOUND as a reserved keyword
- Changed name resolution for GROUP BY so that derived columns do not shadow table columns
from the FROM clause. As a result GROUP BY now is handled as a true ANSI extentsion.
- Issue a warning when HAVING is resolved into ambiguous columns, and prefer the columns from
the GROUP BY clause over SELECT columns.
mysql-test/r/having.result:
Correct result for updated GROUP BY name resolution.
sql/item.cc:
- prefer GROUP columns, but if none is found use SELECT list
- issue a waring when a field may be resolved ambiguously
- more/fixed comments
sql/mysql_priv.h:
More flexible find_field_in_tables().
sql/sp.cc:
More flexible find_field_in_tables().
sql/sql_base.cc:
More flexible find_field_in_tables().
sql/sql_help.cc:
More flexible find_field_in_tables().
sql/sql_select.cc:
- name resolution of GROUP/ORDER BY column references is differentiated:
- GROUP BY is resolved in SELECT and FROM clauses
- ORDER BY is resolved only in SELECT (as before)
- more informative variable names
- more comments
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/log_event.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_rcontext.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Fixed the pre-caching of functions. It now gives the expected stack overrun
error for functions recursing too deep.
mysql-test/r/sp.result:
New test case for BUG#6022.
mysql-test/t/sp.test:
New test case for BUG#6022.
sql/sp.cc:
Cache function first, then recurse, or the pre-caching loops infinitely
for recursive functions.
Removed the support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
mysql-test/r/sp-error.result:
Removed test for renaming procedures with alter.
mysql-test/r/sp.result:
Removed test for renaming procedures with alter.
mysql-test/t/sp-error.test:
Removed test for renaming procedures with alter.
mysql-test/t/sp.test:
Removed test for renaming procedures with alter.
sql/sp.cc:
Removed support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
sql/sp.h:
Removed support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
sql/sql_parse.cc:
Removed support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
sql/sql_yacc.yy:
Removed support for renaming SPs. It's non-standard, conflicted with a standard
syntax, and was a bit broken anyway.
into sanja.is.com.ua:/home/bell/mysql/bk/work-error-5.0
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
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
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)
include/mysqld_error.h:
new errors added.
mysql-test/r/rpl_charset.result:
new error
mysql-test/r/rpl_timezone.result:
new error
mysql-test/r/sp-security.result:
more clean error message
mysql-test/r/sp.result:
now error state intercepted correctly
mysql-test/t/connect.test:
new error message
mysql-test/t/rpl_charset.test:
new error message
mysql-test/t/rpl_timezone.test:
new error
mysql-test/t/sp-security.test:
more correct error handling
mysql-test/t/sp.test:
now error state intercepted correctly
sql/ha_innodb.cc:
-1/1 (sent/unsent) error reporting removed
sql/ha_innodb.h:
-1/1 (sent/unsent) error reporting removed
sql/item.cc:
only boolean values should be returned by fix_fields()
sql/item_cmpfunc.cc:
only boolean values should be returned by fix_fields()
sql/item_func.cc:
only boolean values should be returned by fix_fields()
net_printf/send_error calls replaced by my_error family functions
sql/item_row.cc:
only boolean values should be returned by fix_fields()
sql/item_subselect.cc:
only boolean values should be returned by fix_fields()
-1/1 (sent/unsent) error reporting removed
sql/item_subselect.h:
-1/1 (sent/unsent) error reporting removed
sql/item_sum.cc:
only boolean values should be returned by fix_fields()
sql/item_timefunc.cc:
only boolean values should be returned by fix_fields()
sql/item_uniq.h:
only boolean values should be returned by fix_fields()
sql/mysql_priv.h:
-1/1 (sent/unsent) error reporting removed
sql/mysqld.cc:
net_printf/send_error calls replaced by my_error family functions
changes in my_message_sql to support error handling correctly
sql/protocol.cc:
net_printf/send_error calls replaced by my_error family functions
sql/protocol_cursor.cc:
net_printf/send_error calls replaced by my_error family functions
sql/repl_failsafe.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/repl_failsafe.h:
-1/1 (sent/unsent) error reporting removed
sql/set_var.cc:
net_printf/send_error calls replaced by my_error family functions
sql/share/czech/errmsg.txt:
new error messages
sql/share/danish/errmsg.txt:
new error messages
sql/share/dutch/errmsg.txt:
new error messages
sql/share/english/errmsg.txt:
new error messages
sql/share/estonian/errmsg.txt:
new error messages
sql/share/french/errmsg.txt:
new error messages
sql/share/german/errmsg.txt:
new error messages
sql/share/greek/errmsg.txt:
new error messages
sql/share/hungarian/errmsg.txt:
new error messages
sql/share/italian/errmsg.txt:
new error messages
sql/share/japanese/errmsg.txt:
new error messages
sql/share/korean/errmsg.txt:
new error messages
sql/share/norwegian-ny/errmsg.txt:
new error messages
sql/share/norwegian/errmsg.txt:
new error messages
sql/share/polish/errmsg.txt:
new error messages
sql/share/portuguese/errmsg.txt:
new error messages
sql/share/romanian/errmsg.txt:
new error messages
sql/share/russian/errmsg.txt:
new error messages
sql/share/serbian/errmsg.txt:
new error messages
sql/share/slovak/errmsg.txt:
new error messages
sql/share/spanish/errmsg.txt:
new error messages
sql/share/swedish/errmsg.txt:
new error messages
sql/share/ukrainian/errmsg.txt:
new error messages
sql/slave.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/slave.h:
-1/1 (sent/unsent) error reporting removed
sql/sp.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sp_head.cc:
new eror handling support
net_printf/send_error calls replaced by my_error family functions
sql/sp_rcontext.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_acl.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_acl.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_base.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_class.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_class.h:
my_messhage_sql now set/reset query_error flag
sql/sql_db.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_delete.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_do.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_error.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_handler.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_help.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_insert.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_lex.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_load.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_map.cc:
errors without code removed
sql/sql_parse.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed from mysql_execute_command
sql/sql_prepare.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_repl.cc:
error messages fixed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_repl.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_select.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_select.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_show.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_table.cc:
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
sql/sql_trigger.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_udf.cc:
net_printf/send_error calls replaced by my_error family functions
sql/sql_union.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_update.cc:
-1/1 (sent/unsent) error reporting removed
net_printf/send_error calls replaced by my_error family functions
sql/sql_view.cc:
-1/1 (sent/unsent) error reporting removed
sql/sql_view.h:
-1/1 (sent/unsent) error reporting removed
sql/sql_yacc.yy:
net_printf/send_error calls replaced by my_error family functions
NO SQL
CONTAINS SQL (default)
READS SQL DATA
MODIFIES SQL DATA
These are needed as hints for the replication.
(Before this, we did have the default in the mysql.proc table, but no support in the parser.)
mysql-test/r/sp.result:
Modified test cases for new data access characteristics.
mysql-test/t/sp.test:
Modified test cases for new data access characteristics.
scripts/mysql_create_system_tables.sh:
We now support all the SP data access characteristics (not just CONTAINS SQL).
scripts/mysql_fix_privilege_tables.sql:
We now support all the SP data access characteristics (not just CONTAINS SQL).
sql/lex.h:
New tokens for SP data access characteristics.
sql/sp.cc:
Store, print and support alter of data access characteristics.
sql/sp_head.cc:
Added SP_ prefix to some symbols.
sql/sql_lex.h:
Added SP_ prefix to some symbols, and added SP data access enum.
sql/sql_yacc.yy:
Parse SP data access characteristics.
(And allow "alter ... language sql", mostly as a formality, it was accidently
put in the wrong clause before.)
support of merged VIEW over several tables added (WL#1809)
mysql-test/r/view.result:
merge of VIEW with several tables
mysql-test/t/view.test:
merge of VIEW with several tables
sql/item.cc:
renaming Item and restoring item name on cleunup()
sql/item.h:
renaming Item and restoring item name on cleunup()
debug output added
sql/item_cmpfunc.h:
setup_conds() changed to support two tables lists
sql/item_subselect.cc:
list of table leaves used instead of local table list for name resolving
sql/mysql_priv.h:
setup_conds() and setup_tables() changed to support two tables lists
sql/opt_sum.cc:
list of table leaves used instead of local table list for name resolving
sql/sp.cc:
setup_tables() changed to support two tables lists
sql/sql_base.cc:
skip temporary tables in table finding
fixed merged view fields names (BUG#5147)
sql/sql_delete.cc:
setup_conds() and setup_tables() changed to support two tables lists
sql/sql_help.cc:
setup_tables() changed to support two tables lists
sql/sql_insert.cc:
setup_tables() changed to support two tables lists
name handling support
sql/sql_lex.cc:
allow view with several tables for MERGE
sql/sql_lex.h:
new table list
sql/sql_load.cc:
setup_tables() changed to support two tables lists
sql/sql_olap.cc:
setup_tables() changed to support two tables lists
sql/sql_parse.cc:
new list support
sql/sql_prepare.cc:
new list support
sql/sql_select.cc:
list of table leaves used instead of local table list for name resolving
sql/sql_update.cc:
setup_conds() and setup_tables() changed to support two tables lists
sql/sql_view.cc:
support of MERGED VIEWS with several tables
sql/sql_yacc.yy:
removed blanks in new code
sql/table.cc:
fixed setup view code
support of merged VIEW over several tables added
sql/table.h:
fixed merged view fields names (BUG#5147)
Easy to prevent crash, but the question was how to treat this case?
We ended up implementing the "global" SPs (i.e. with no associated
db), which were planned but left unresolved when SPs moved into dbs.
So now things like "call .p()" work too.
mysql-test/r/sp-error.result:
New test case for BUG#5000, and "global" SPs in general.
mysql-test/t/sp-error.test:
New test case for BUG#5000, and "global" SPs in general.
sql/sp.cc:
Prevent crash when the new db is null.
sql/sp_head.cc:
Don't set the db part of the name to thd->db, we have already set it correctly
in the provided name struct.
Also, don't attempt to change "no-db" when executing an SP.
sql/sql_yacc.yy:
Added support for the "global SP" syntax, e.g ".p()".
Althought techically not a but (as it's functioning as designed),
it was decided that the design should be changed. Some users have
a problem with dates being '0000-00-00' and the SQL standard specifies
that the modification date should be the same as the creation date
at creation.
mysql-test/r/sp.result:
New test case for BUG#5258.
mysql-test/t/sp.test:
New test case for BUG#5258.
sql/sp.cc:
Set the modification time at creation too.
mysql-test/r/view.result:
fixed test
VIEW over droped function
mysql-test/t/view.test:
VIEW over droped function
sql/item_func.cc:
after review fix
sql/sp.cc:
hint to find mysql.proc
sql/sql_lex.h:
hint to find mysql.proc
sql/sql_parse.cc:
hint to find mysql.proc
sql/sql_view.cc:
adding mysql.proc to table list if view contains stored procedures
mysql-test/r/sp.result:
New test case for BUG#5251.
mysql-test/t/sp.test:
New test case for BUG#5251.
sql/sp.cc:
Don't update the created timestamp when doing alter procedure/function.
...and added new test file, sp-threads, for multiple connection tests
(apart from the security tests that are in sp-security).
sql/sp.cc:
When removing an SP, invalidate the caches even if the
removing thread doesn't have one.
- client side part is simple and may be considered stable
- server side part now just joggles with THD state to save execution
state and has no additional locking wisdom.
Lot's of it are to be rewritten.
include/mysql.h:
Cursor patch to push into the main tree, client library part (considered
stable):
- new statement attribute STMT_ATTR_CURSOR_TYPE
- MYSQL_STMT::flags to store statement cursor type
- MYSQL_STMT::server_status to store server status (i. e. if the server
was able to open a cursor for this query).
include/mysql_com.h:
Cursor patch to push into the main tree, client library part (considered
stable):
- new COMmand, COM_FETCH, to fetch K rows from read-only cursor.
By design should support scrollable cursors as well.
- a few new server statuses:
SERVER_STATUS_CURSOR_EXISTS is sent by server in reply to COM_EXECUTE,
when cursor was successfully opened for this query
SERVER_STATUS_LAST_ROW_SENT is sent along with the last row to prevent one
more round trip just for finding out that all rows were fetched from
this cursor (this is server mem savier also).
- and finally, all possible values of STMT_ATTR_CURSOR_TYPE,
while now we support only CURSORT_TYPE_NO_CURSOR and
CURSOR_TYPE_READ_ONLY
libmysql/libmysql.c:
Cursor patch to push into the main tree, client library part (considered
stable):
- simple additions to mysql_stmt_fetch implementation to read data
from an opened cursor: we can read up to iteration count rows per
one request; read rows are buffered in the same way as rows of
mysql_stmt_store_result.
- now send stmt->flags to server to let him now if we wish to have
a cursor for this statement.
- support for setting/getting statement cursor type.
libmysqld/examples/Makefile.am:
Testing cursors was originally implemented in C++. Now when these tests
go into client_test, it's time to convert it to C++ as well.
libmysqld/lib_sql.cc:
- cleanup: send_fields flags are now named.
sql/ha_innodb.cc:
- cleanup: send_fields flags are now named.
sql/mysql_priv.h:
- cursors support: declaration for server-side handler of COM_FETCH
sql/protocol.cc:
- cleanup: send_fields flags are now named.
- we can't anymore assert that field_types[field_pos] is sensible:
if we have COM_EXCUTE(stmt1), COM_EXECUTE(stmt2), COM_FETCH(stmt1)
field_types[field_pos] will point to fields of stmt2.
sql/protocol.h:
- cleanup: send_fields flag_s_ are now named.
sql/protocol_cursor.cc:
- cleanup: send_fields flags are now named.
sql/repl_failsafe.cc:
- cleanup: send_fields flags are now named.
sql/slave.cc:
- cleanup: send_fields flags are now named.
sql/sp.cc:
- cleanup: send_fields flags are now named.
sql/sp_head.cc:
- cleanup: send_fields flags are now named.
sql/sql_acl.cc:
- cleanup: send_fields flags are now named.
sql/sql_class.cc:
- cleanup: send_fields flags are now named.
sql/sql_class.h:
- cleanup: send_fields flags are now named.
sql/sql_error.cc:
- cleanup: send_fields flags are now named.
sql/sql_handler.cc:
- cleanup: send_fields flags are now named.
sql/sql_help.cc:
- cleanup: send_fields flags are now named.
sql/sql_parse.cc:
Server side support for cursors:
- handle COM_FETCH
- enforce assumption that whenever we free thd->free_list,
we reset it to zero. This way it's much easier to handle free_list
in prepared statements implementation.
sql/sql_prepare.cc:
Server side support for cursors:
- implementation of mysql_stmt_fetch (fetch some rows from open cursor).
- management of cursors memory is quite tricky now.
- execute_stmt can't be reused anymore in mysql_stmt_execute and
mysql_sql_stmt_execute
sql/sql_repl.cc:
- cleanup: send_fields flags are now named.
sql/sql_select.cc:
Server side support for cursors:
- implementation of Cursor::open, Cursor::fetch (buggy when it comes to
non-equi joins), cursor cleanups.
- -4 -3 -0 constants indicating return value of sub_select and end_send are
to be renamed to something more readable:
it turned out to be not so simple, so it should come with the other patch.
sql/sql_select.h:
Server side support for cursors:
- declaration of Cursor class.
- JOIN::fetch_limit contains runtime value of rows fetched via cursor.
sql/sql_show.cc:
- cleanup: send_fields flags are now named.
sql/sql_table.cc:
- cleanup: send_fields flags are now named.
sql/sql_union.cc:
- if there was a cursor, don't cleanup unit: we'll need it to fetch
the rest of the rows.
tests/Makefile.am:
Now client_test is in C++.
tests/client_test.cc:
A few elementary tests for cursors.
BitKeeper/etc/ignore:
Added libmysqld/examples/client_test.cc to the ignore list
Added a simple optimizer that shortcuts jumps and skip unused instructions.
sql/sp.cc:
Optimize the code after parsing.
sql/sp_head.cc:
Added a simple optimizer that shortcuts jumps and skip unused instructions.
sql/sp_head.h:
Added a simple optimizer that shortcuts jumps and skip unused instructions.
two TABLE_LIST copy eliminated
include/mysqld_error.h:
errors of view
libmysqld/Makefile.am:
new view file
mysql-test/r/connect.result:
SHOW TABLE show type of table
mysql-test/r/ctype_recoding.result:
SHOW TABLE show type of table
mysql-test/r/drop.result:
SHOW TABLE show type of table
mysql-test/r/grant.result:
new two privileges (CRETEA|SHOW VIEW)
mysql-test/r/lowercase_table.result:
SHOW TABLE show type of table
mysql-test/r/ps_1general.result:
SHOW TABLE show type of table
mysql-test/r/rename.result:
SHOW TABLE show type of table
mysql-test/r/rpl000009.result:
SHOW TABLE show type of table
mysql-test/r/rpl_error_ignored_table.result:
SHOW TABLE show type of table
mysql-test/r/select.result:
SHOW TABLE show type of table
mysql-test/r/system_mysql_db.result:
SHOW TABLE show type of table
new two privileges (CRETEA|SHOW VIEW)
mysql-test/t/system_mysql_db_fix.test:
removing all system tables
scripts/mysql_fix_privilege_tables.sql:
new two privileges (CRETEA|SHOW VIEW)
sql/Makefile.am:
new VIEW related file
sql/ha_myisammrg.cc:
two TABLE_LIST copy eliminated
sql/item.cc:
VIEW
sql/item.h:
VIEW
sql/item_subselect.cc:
VIEW
sql/item_subselect.h:
VIEW
sql/lex.h:
VIEW
sql/lock.cc:
VIEW
sql/mysql_priv.h:
VIEW
sql/mysqld.cc:
VIEW
new parameter - sql_updatable_view_key
sql/opt_sum.cc:
two TABLE_LIST copy eliminated
sql/set_var.cc:
new parameter - sql_updatable_view_key
sql/share/czech/errmsg.txt:
errors messages of views
sql/share/danish/errmsg.txt:
errors messages of views
sql/share/dutch/errmsg.txt:
errors messages of views
sql/share/english/errmsg.txt:
errors messages of views
sql/share/estonian/errmsg.txt:
errors messages of views
sql/share/french/errmsg.txt:
errors messages of views
sql/share/german/errmsg.txt:
errors messages of views
sql/share/greek/errmsg.txt:
errors messages of views
sql/share/hungarian/errmsg.txt:
errors messages of views
sql/share/italian/errmsg.txt:
errors messages of views
sql/share/japanese/errmsg.txt:
errors messages of views
sql/share/korean/errmsg.txt:
errors messages of views
sql/share/norwegian-ny/errmsg.txt:
errors messages of views
sql/share/norwegian/errmsg.txt:
errors messages of views
sql/share/polish/errmsg.txt:
errors messages of views
sql/share/portuguese/errmsg.txt:
errors messages of views
sql/share/romanian/errmsg.txt:
errors messages of views
sql/share/russian/errmsg.txt:
errors messages of views
sql/share/serbian/errmsg.txt:
errors messages of views
sql/share/slovak/errmsg.txt:
errors messages of views
sql/share/spanish/errmsg.txt:
errors messages of views
sql/share/swedish/errmsg.txt:
errors messages of views
sql/share/ukrainian/errmsg.txt:
errors messages of views
sql/slave.cc:
two TABLE_LIST copy eliminated
sql/sp.cc:
VIEW
sql/sql_acl.cc:
VIEW
sql/sql_acl.h:
VIEW
sql/sql_base.cc:
VIEW
sql/sql_cache.cc:
two TABLE_LIST copy eliminated
sql/sql_class.h:
VIEW
sql/sql_db.cc:
two TABLE_LIST copy eliminated
sql/sql_delete.cc:
VIEW
sql/sql_derived.cc:
VIEW
sql/sql_handler.cc:
two TABLE_LIST copy eliminated
sql/sql_help.cc:
two TABLE_LIST copy eliminated
sql/sql_insert.cc:
VIEW
sql/sql_lex.cc:
VIEW
sql/sql_lex.h:
VIEW
sql/sql_load.cc:
VIEW
sql/sql_olap.cc:
VIEW
sql/sql_parse.cc:
two TABLE_LIST copy eliminated
VIEW
sql/sql_prepare.cc:
VIEW
sql/sql_rename.cc:
two TABLE_LIST copy eliminated
sql/sql_select.cc:
VIEW
sql/sql_show.cc:
VIEW
sql/sql_table.cc:
VIEW
sql/sql_union.cc:
VIEW
sql/sql_update.cc:
VIEW
sql/sql_yacc.yy:
VIEW
sql/table.cc:
VIEW
sql/table.h:
VIEW
sql/tztime.cc:
two TABLE_LIST copy eliminated
sql/unireg.h:
VIEW
tests/client_test.c:
VIEW
Note: The following tests fails
- fulltext (Sergei has promised to fix)
- rpl_charset (Guilhem should fix)
- rpl_timezone (Dimitray has promised to fix)
Sanja needs to check out the calling of close_thread_tables() in sp_head.cc
myisam/mi_check.c:
After merge fix
myisam/sort.c:
After merge fix
mysql-test/mysql-test-run.sh:
Export master socket to mysqltest
mysql-test/r/func_group.result:
Make result repeatable
mysql-test/r/mysqlbinlog.result:
After merge fix
mysql-test/r/ps_1general.result:
After merge fix
mysql-test/r/ps_2myisam.result:
After merge fix
mysql-test/r/ps_3innodb.result:
After merge fix
mysql-test/r/ps_4heap.result:
After merge fix
mysql-test/r/ps_5merge.result:
After merge fix
mysql-test/r/ps_6bdb.result:
After merge fix
mysql-test/r/rpl_flush_log_loop.result:
After merge fix
mysql-test/r/rpl_replicate_do.result:
After merge fix
mysql-test/r/rpl_temporary.result:
After merge fix
mysql-test/r/rpl_timezone.result:
After merge fix
Note that this test fails now (Dimitry has promised to fix this)
mysql-test/r/rpl_user_variables.result:
After merge fix
mysql-test/r/select.result:
After merge fix
mysql-test/r/sp-error.result:
After merge fix
mysql-test/r/sp-security.result:
After merge fix
mysql-test/r/sp.result:
After merge fix
mysql-test/r/user_var.result:
After merge fix
mysql-test/r/variables.result:
After merge fix
mysql-test/t/alter_table.test:
After merge fix
mysql-test/t/derived.test:
After merge fix
mysql-test/t/func_group.test:
Make result repeatable
mysql-test/t/grant_cache.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/multi_update.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/rpl000015.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/rpl000017.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/rpl000018.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/rpl_charset.test:
After merge fix
mysql-test/t/rpl_heap.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/rpl_rotate_logs.test:
Use MASTER_MYSOCK instead of master.sock
mysql-test/t/sp-error.test:
after merge fix
mysql-test/t/sp-security.test:
after merge fix
mysql-test/t/user_var.test:
after merge fix
scripts/mysql_fix_privilege_tables.sh:
This can now be exectued from the source distribution
sql/handler.cc:
Cleanup
sql/handler.h:
More debugging
sql/item.h:
Indentation fixes
sql/item_cmpfunc.cc:
After merge fixes
sql/opt_range.cc:
After merge fixes
sql/opt_range.h:
After merge fixes
sql/sp.cc:
After merge fixes
sql/sp_head.cc:
Remove closing of thread tables in a SP function as this caused a core dump.
(Has to be fixed better)
sql/sql_base.cc:
More debugging
sql/sql_handler.cc:
After merge fixes
(We have to call ha_index_or_rnd_end() before calling close_thread_table())
sql/sql_parse.cc:
More debugging
sql/sql_prepare.cc:
After merge fixes
sql/sql_select.cc:
After merge fixes
Also added some related security tests and corrected related error messages.
mysql-test/r/sp-error.result:
New test case for BUG#3339, and updated results for other modified error messages.
mysql-test/r/sp-security.result:
Added tests for creating procedures in another database with and wihout
access rights.
mysql-test/t/sp-error.test:
New test case for BUG#3339.
mysql-test/t/sp-security.test:
Added tests for creating procedures in another database with and wihout
access rights.
sql/sp.cc:
Check existance (and access rights) for database when creating a stored routine.
sql/sp.h:
New error return value for sp_create_* functions, for non existing database.
sql/sql_parse.cc:
Check error return for create stored routine (non existing database),
and corrected the error output for some other commands. (Use qualified
name, not just name.)
It's not possible to quote the definition according to the current sql_mode
setting, so instead we use the setting stored with the SP (that's how it's
parsed anyway), and show this setting in the SHOW CREATE output.
mysql-test/r/sp.result:
Modifed SHOW CREATE FUNCTION|PROCEDURE output. Show the sql_mode used at
creation as well.
New test case for BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
mysql-test/t/sp.test:
New test case for BUG#2564: SHOW CREATE inconsistent W.R.T ANSI_QUOTES.
sql/sp.cc:
Rewrote create_string to quote things correctly according to the sql_mode
used at creation time.
sql/sp_head.cc:
Store sql_mode in sp_head and use it for SHOW CREATE.
sql/sp_head.h:
Store sql_mode in sp_head and use it for SHOW CREATE.
This fixes part of BUG#3229: Stored procedure comment causes packets out of order.
sql/sp.cc:
Fixed proper restoring of current db on errors.
sql/sp.h:
Fixed proper restoring of current db on errors.
sql/sp_head.cc:
Fixed proper restoring of current db on errors.
into mysql.com:/home/my/mysql-5.0
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql-bench/limits/mysql-4.0.cfg:
Auto merged
Procedure names were unintentionally case-sensitive when read from the database
(but case-insensitive when fetched from the cache).
Note that the DB-part of qualified names is still case-sensitive (for consistency
with other usage in mysql).
Docs/sp-imp-spec.txt:
Removed "binary" from name and specific_name columns in mysql.proc definition.
mysql-test/r/sp.result:
Test case for BUG#3259; SP names were supposed to be case-insensitive.
mysql-test/t/sp.test:
Test case for BUG#3259; SP names were supposed to be case-insensitive.
scripts/mysql_create_system_tables.sh:
Removed "binary" from name and specific_name columns in mysql.proc definition.
scripts/mysql_fix_privilege_tables.sql:
Removed "binary" from name and specific_name columns in mysql.proc definition,
and added a corresponding ALTER TABLE to fix existing tables.
sql/sp.cc:
Added missing init of variable.
Phase 4 (final): Remove associated stored procedures when a database is dropped.
mysql-test/r/sp-security.result:
drop database now deletes associated SPs.
mysql-test/r/sp.result:
drop database now deletes associated SPs.
mysql-test/t/sp-security.test:
drop database now deletes associated SPs.
mysql-test/t/sp.test:
drop database now deletes associated SPs.
sql/sp.cc:
New function for deleting all SPs associated with a database.
sql/sp.h:
New function for deleting all SPs associated with a database.
sql/sp_cache.cc:
New function for just invalidating all SP caches (when dropping a database).
sql/sp_cache.h:
New function for just invalidating all SP caches (when dropping a database).
sql/sql_db.cc:
When dropping a database, also delete all associated SPs.
Phase 3: Made qualified names work for functions as well.
mysql-test/r/sp-security.result:
New testcases for functions with qualified names.
mysql-test/t/sp-security.test:
New testcases for functions with qualified names.
sql/item_func.cc:
Added error handling for stored function, if it doesn't exist.
sql/item_func.h:
Set null_value if execution of a stored function fails.
sql/mysql_priv.h:
Reverted previous change: No optional args for mysql_change_db().
(SPs use a specially tailored function instead.)
sql/sp.cc:
Copied mysql_change_db() from sql_db.cc and modified specially for SPs.
sql/sp_head.cc:
Fixed error handling for errors in functions during query/statement execution.
sql/sql_db.cc:
Reverted previous change: No optional args for mysql_change_db().
(SPs use a specially tailored function instead.)
sql/sql_yacc.yy:
Reworked the stored function/UDF invokation parsing and added qualified names
for stored functions. UDFs now have precedence over stored functions (whith
unqualified name). When using an unqualified name, only IDENT_sys is allowed
(i.e. no unreserved keywords), since we get unresolvable reduce/reduce conflicts
otherwise.
Had to initialize some fields in lex before parsing an SP read from
mysql.proc.
mysql-test/r/sp.result:
New test case for BUG#2674.
mysql-test/t/sp.test:
New test case for BUG#2674.
sql/sp.cc:
We need to initialize some thd->lex fields (e.g. unit master pointers) since
LEX::uncacheable() depends on this, and it's called when looking up system
variables during parsing.
Phase 2: Make SPs belong to a DB, and use qualified names.
As a side effect, using USE in an SP is no longer allowed.
(It just doesn't work otherwise.)
include/mysqld_error.h:
New error code (USE is no longer allowed in a stored procedure).
include/sql_state.h:
New error state (USE is no longer allowed in a stored procedure).
mysql-test/r/sp-error.result:
Updated result for test of USE in SP (not allowed now).
mysql-test/r/sp-security.result:
Updated test results for new db column and qualified procedured names.
mysql-test/r/sp.result:
Updated results for USE in SP (as it's no longer allowed), and
for new db column in status result.
mysql-test/t/sp-error.test:
Moved test of USE in SP from sp.test (as it's no longer allowed).
mysql-test/t/sp-security.test:
Ajusted tests for new db column and qualified procedured names.
mysql-test/t/sp.test:
Moved test of USE in SP to sp-error.test (as it's no longer allowed).
Adjusted tests for new db column in status result.
sql/mysql_priv.h:
mysql_change_db() now has optional arguments for use by SP with qualified names.
sql/share/czech/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/danish/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/dutch/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/english/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/estonian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/french/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/german/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/greek/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/hungarian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/italian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/japanese/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/korean/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/norwegian-ny/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/norwegian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/polish/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/portuguese/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/romanian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/russian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/serbian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/slovak/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/spanish/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/swedish/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/share/ukrainian/errmsg.txt:
New error message: USE is not allowed in a stored procedure.
sql/sp.cc:
SPs are now "belong" to a DB and may have qualified names.
New functions for changing DB ("use") when parsing and invoking SPs.
sql/sp.h:
New functions for changing DB ("use") when parsing and invoking SPs.
sql/sp_cache.cc:
Use the qualified name in the SP cache.
sql/sp_head.cc:
New function for allocating a qualified SP name (used in sql_yacc.yy).
Change DB when executing an SP (if needed).
Moved thd_mem_root swap functions from sp_head.h.
sql/sp_head.h:
New function for allocating a qualified SP name (used in sql_yacc.yy).
Moved thd_mem_root swap functions to sp_head.cc.
sql/sql_db.cc:
mysql_change_db() now has optional arguments for use by SP with qualified names
(for use when reading an SP from database and executing it); also allow "unusing"
a database, i.e. setting thd->thd to "".
sql/sql_yacc.yy:
Initialize qualfied SP names correctly.
USE is no longer allowed in an SP.
Phase 1: Introduced sp_name class, for qualified name support.
sql/item_func.cc:
Introduced sp_name class; moved some methods from item_func.h.
sql/item_func.h:
Introduced sp_name class; moved some methods to item_func.cc.
sql/sp.cc:
Introduced sp_name class, for qualified name support.
sql/sp.h:
Introduced sp_name class, for qualified name support.
sql/sp_cache.cc:
Introduced sp_name class, for qualified name support.
sql/sp_cache.h:
Introduced sp_name class, for qualified name support.
sql/sp_head.cc:
Introduced sp_name class, for qualified name support.
sql/sp_head.h:
Introduced sp_name class, for qualified name support.
sql/sql_lex.h:
Introduced sp_name class, for qualified name support.
sql/sql_parse.cc:
Introduced sp_name class, for qualified name support.
sql/sql_yacc.yy:
Introduced sp_name class, for qualified name support.
(This might not be enough, could be more statements that must be detected...)
mysql-test/r/sp.result:
Test case for BUG#2267
mysql-test/t/sp.test:
Test case for BUG#2267
sql/sp.cc:
Code clean-up: Get the correct order of print-outs in debug trace.
sql/sql_yacc.yy:
Detect "select-like" statements so that the multi result flag is set correctly.
Some code cleanup
mysql-test/r/sp.result:
Update results after adding quotes around function/procedure names
sql/sp.cc:
Moved DBUG_ENTER after all variable declarations
Eliminated some variables.
Added more DBUG_ENTER commands.
Added memory allocation checking in create_string()
Fixed memory leak in sp_show_create_function()
Removed usage of sprintf
sql/sql_parse.cc:
Simple cleanup
Fixed memory leaks for mailformed SP definitions
(Fixed project files, compiler warnings etc..)
BitKeeper/etc/ignore:
added mysql_priv.h
VC++Files/libmysqld/libmysqld.dsp:
Update for VC++to
VC++Files/sql/mysqld.dsp:
Update for VC++
client/mysqlbinlog.cc:
Remove not used variable
sql-common/client.c:
Fix for compilation with VC++
sql/filesort.cc:
Remove not used variable
sql/item_timefunc.cc:
Fixed compiler warnings
sql/log_event.cc:
Fixed compiler warnings
- One can't portable allocate an stack-array dynamicly
- Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings)
sql/log_event.h:
Changed sql_mode to ulong to match THD.variables.sql_mode (If they are not the same we get a lot of compiler warnings)
sql/sp.cc:
sql_mode to ulong
Don't use strcpy
Replaced sprintf() with strmov
sql/sp_cache.cc:
Fixed compiler warning
sql/sp_head.cc:
Removed not used variable
sql/sp_rcontext.cc:
Removed not used variable
sql/sp_rcontext.h:
Fixed compiler warning
sql/sql_class.cc:
Portability fix
sql/sql_delete.cc:
Fixed compiler warning
sql/sql_insert.cc:
Fixed compiler warning
sql/sql_update.cc:
Fixed compiler warning
sql/sp.cc:
Fixed memory leaks. Deletion of sps now in sp_cache.
sql/sp_cache.cc:
Fixed memory leaks. Use implicit delete of objects to make sure
they're always freed.
sql/sp_cache.h:
Fixed memory leaks. Use implicit delete of objects to make sure
they're always freed.
sql/sp_head.cc:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
sql/sp_head.h:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
sql/sql_parse.cc:
Fixed memory leaks. Don't forget to free the temporary object created at definition.
sql/sql_yacc.yy:
Fixed memory leaks. Make sure we use the right mem_root during parsing.
(Also put the hostpart back in the definer column.)
mysql-test/r/sp-error.result:
Moved error test from sp.test
mysql-test/r/sp.result:
Moved error test to sp-error.test.
Put hostpart back into definer column in mysql.proc.
mysql-test/t/sp-error.test:
Moved error test from sp.test
mysql-test/t/sp.test:
Moved error test to sp-error.test.
Put hostpart back into definer column in mysql.proc.
sql/item_func.cc:
(Maybe) switch security context before invoking a stored function.
sql/sp.cc:
Renamed creator into definer, for more consistent terminology, and put the
hostpart back.
sql/sp_head.cc:
Some fixes in the way things are allocated, and moved set_info() definition
here from sp_head.h. creator is now called definer, and is split into a
user and host part.
Added functions for (possible) change and restore of privileges, for sql security
definer calls.
sql/sp_head.h:
Moved set_info() definition here from sp_head.h.
creator is now called definer, and is split into a user and host part.
Added functions for (possible) change and restore of privileges, for sql security
definer calls.
sql/sql_acl.cc:
New function acl_getroot_no_password() for getting the privileges used when
calling an SP with sql security definer.
sql/sql_acl.h:
New function acl_getroot_no_password() for getting the privileges used when
calling an SP with sql security definer.
sql/sql_parse.cc:
(Maybe) switch security context before invoking a stored procedure.
sql/sql_yacc.yy:
Fixed typo.
make characteristics (and SHOW) work right, we had to separate the old
definition blob in the mysql.proc table into separate fields for parameters,
return type, and body, and handle the characteristics (like SQL SECURITY)
separately... and then reassemble the CREATE string for parsing, of course.
This is rather ugly, mostly the parser bit. (Hopefully that will be better
with the new parser.)
Docs/sp-imp-spec.txt:
Separated the definitions string of the procedure into different columns
in the mysql.proc schema.
mysql-test/r/sp.result:
New characteristics tests.
mysql-test/t/sp.test:
New characteristics tests.
scripts/mysql_create_system_tables.sh:
Separated the definitions string of the procedure into different columns
in the mysql.proc schema.
scripts/mysql_fix_privilege_tables.sql:
Separated the definitions string of the procedure into different columns
in the mysql.proc schema.
sql/sp.cc:
Separated the definitions string of the procedure into different columns.
Rewrote much of the code related this (have a assemble the definition
string from its different parts now) and the way characteristics are now
handled, in order to make ALTER actually work.
sql/sp.h:
Changed prototypes.
sql/sp_head.cc:
Rewrote much of the code related to the new mysql.proc schema with separate
definition fields (have to assemble the definition string from its different
parts now) and the way characteristics are now handled, in order to make ALTER
actually work.
sql/sp_head.h:
Separated the different parts of the definition strings: name, parameters,
return type (for functions) and body.
sql/sql_yacc.yy:
Separated the different parts of the definition strings: name, parameters,
return type (for functions) and body.
This is ugly and messy; hopefully there's a more elegant way to do this
when the new parser is installed.
sql_mode is stored and used with SPs.
sql_select_limit is always unlimited in SPs.
mysql-test/r/sp.result:
Test case for mode settings.
mysql-test/t/sp.test:
Test case for mode settings.
sql/sp.cc:
Store the sql_mode with the SP and reset it on retrieval.
sql_select_limit is always maximum (default) in an SP,
regardless of the setting at the time of create or call.
Also made the parsing and handling of SP characteristics
more general and extendable, and added a few ch:istics.
Docs/sp-imp-spec.txt:
Updated spec with new schema.
Docs/sp-implemented.txt:
Added info about ALTER and SHOW.
mysql-test/r/sp.result:
Minor change in SHOW FUNCTION|PROCEDURE STATUS output.
scripts/mysql_create_system_tables.sh:
New mysql.proc schema.
scripts/mysql_fix_privilege_tables.sql:
New mysql.proc schema.
sql/lex.h:
New lex words for SP characteristics.
sql/sp.cc:
New mysql.proc schema.
Also made the characteristics handling slightly more extendable.
sql/sp.h:
Made the characteristics handling slightly more extendable.
sql/sp_head.cc:
Made the characteristics handling slightly more extendable.
sql/sp_head.h:
Made the characteristics handling slightly more extendable.
sql/sql_lex.h:
Made the characteristics handling slightly more extendable.
sql/sql_parse.cc:
Made the characteristics handling slightly more extendable.
sql/sql_yacc.yy:
Made the characteristics handling slightly more extendable
and made the parsing of characteristics more general, and
added a few new dito. (LANGUAGE SQL, and [NOT] DETERMINISTIC
for starters).
- dropped routines should not show up in status
- error handling for non-existing routines
+ some cleanup.
mysql-test/r/sp-error.result:
Test SHOW CREATE PROCEDURE for non-existing procedure.
mysql-test/r/sp.result:
Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show
after being dropped).
mysql-test/t/sp-error.test:
Test SHOW CREATE PROCEDURE for non-existing procedure.
mysql-test/t/sp.test:
Additional SHOW FUNCTION/PROCEDURE STATUS calls (make sure they don't show
after being dropped).
sql/sp.cc:
Fixed bug in SHOW ... STATUS after a routine has been dropped,
and fixed the error return codes (for correct error handling).
Also some general cleanup.
sql/sp.h:
Fixed prefix for external functions (should be sp_, not db_).
sql/sql_parse.cc:
Fixed error handling in SHOW CREATE PROCEDURE/FUNCTION.
WL#1263: Support for the attributes COMMENT and SUID
in CREATE/ALTER PROCEDURE/FUNCTION
include/mysqld_error.h:
Error code for 'alter procedure'
mysql-test/r/sp-error.result:
Test for WL#1241&WL#1263
mysql-test/r/sp.result:
Test for WL#1241&WL#1263
mysql-test/t/sp-error.test:
Test for WL#1241&WL#1263
mysql-test/t/sp.test:
Test for WL#1241&WL#1263
sql/share/czech/errmsg.txt:
Error massage for 'alter procedure'
sql/share/danish/errmsg.txt:
Error massage for 'alter procedure'
sql/share/dutch/errmsg.txt:
Error massage for 'alter procedure'
sql/share/english/errmsg.txt:
Error massage for 'alter procedure'
sql/share/estonian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/french/errmsg.txt:
Error massage for 'alter procedure'
sql/share/german/errmsg.txt:
Error massage for 'alter procedure'
sql/share/greek/errmsg.txt:
Error massage for 'alter procedure'
sql/share/hungarian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/italian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/japanese/errmsg.txt:
Error massage for 'alter procedure'
sql/share/korean/errmsg.txt:
Error massage for 'alter procedure'
sql/share/norwegian-ny/errmsg.txt:
Error massage for 'alter procedure'
sql/share/norwegian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/polish/errmsg.txt:
Error massage for 'alter procedure'
sql/share/portuguese/errmsg.txt:
Error massage for 'alter procedure'
sql/share/romanian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/russian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/serbian/errmsg.txt:
Error massage for 'alter procedure'
sql/share/slovak/errmsg.txt:
Error massage for 'alter procedure'
sql/share/spanish/errmsg.txt:
Error massage for 'alter procedure'
sql/share/swedish/errmsg.txt:
Error massage for 'alter procedure'
sql/share/ukrainian/errmsg.txt:
Error massage for 'alter procedure'
sql/sp.cc:
Added more error handling for abnormal cases (like a broken mysql.proc table),
and made the field indexing clearer, using defines instead of explicit numbers.
Need a sp_cache_remove() function with implicit name lookup to make the WL task
to work. It's a cleaner and more convenient interface anyway...
sql/sp.cc:
Modified sp_cache_remove() function calls; just remove by name.
sql/sp_cache.cc:
Modified sp_cache_remove() function. Get name and lookup/remove, return the
removed entry, if any.
sql/sp_cache.h:
Modified sp_cache_remove() function. Get name and lookup/remove, return the
removed entry, if any.
New sp_cache C API. When an SP is dropped, old caches (in other threads)
become invalid and are cleared.
Also, the caches in THD are only created on demand.
Docs/sp-imp-spec.txt:
Brough the SP cache docs up-to-date.
sql/mysqld.cc:
Initialize SP cache.
sql/sp.cc:
New C API for SP cache.
sql/sp_cache.cc:
New C API for sp_cache.
The class sp_cache is still used, but not directly. The C functions makes takes
care of updating caches when SPs are dropped. (This is done in the simplest
possible way, by simply detecting drops and then clear all old caches.)
The API is also designed so that the sp_cache is created on demand.
sql/sp_cache.h:
New C API for sp_cache.
The class sp_cache is still used, but not directly. The C functions makes takes
care of updating caches when SPs are dropped.
The API is also designed so that the sp_cache is created on demand.
sql/sql_class.cc:
The new sp_cache API creates the caches on demand, to avoid allocating it
when it's not needed.
using a hash table instead (and made it work with lex pointers).
Some additional code cleanup too.
sql/sp.cc:
Fixed the old kludge for pre-loading functions and made it more efficient
using a hash table instead (and made it work with lex pointers).
Some additional cleanup of comments too.
sql/sp_head.h:
Some additional code cleanup.
sql/sql_lex.cc:
Use hash table for function pre-loading (isntead of list).
sql/sql_lex.h:
Use hash table for function pre-loading (isntead of list).
sql/sp.cc:
Bugfixes for the sp_head memroot stuff. (Do things in the correct order
at error clean-up.)
sql/sp_head.cc:
Bugfixes for the sp_head memroot stuff. Make sure everything goes to the
right memroot. Need separate post-reset-memroot init in sp_head.
sql/sp_head.h:
Need separate post-reset-memroot init method.
sql/sql_yacc.yy:
Bugfixes for the sp_head memroot stuff. Make sure everything goes to the
right memroot. Must do things in the correct order for this.
Also fixed some difficult memory leaks that became apparent
in this task.
sql/sp.cc:
sp_head now has its own mem_root.
sql/sp_head.cc:
sp_head now has its own mem_root.
Also fixed some difficult memory leaks.
sql/sp_head.h:
sp_head now has its own mem_root.
sql/sql_lex.h:
Fixed some memory leaks in sp_head. Need to keep track on used lex:es.
sql/sql_parse.cc:
sp_head now has its own mem_root.
Fixed SP memory leaks.
sql/sql_prepare.cc:
Fixed SP memory leaks.
sql/sql_yacc.yy:
sp_head now has its own mem_root.
mysql-test/r/sp.result:
New test (of more call levels).
mysql-test/t/sp.test:
New test (of more call levels).
sql/mysql_priv.h:
SPs wants to init lex only.
sql/sp.cc:
Restore lex pointer (and fixed memory leak).
sql/sp_head.cc:
lex is now a pointer, so reset things the right way.
sql/sp_head.h:
lex is now a pointer.
sql/sql_lex.h:
SPs wants to init lex only.
sql/sql_parse.cc:
SPs wants to init lex only.
sql/sql_prepare.cc:
Restore lex pointer.
into eagle.mysql.r18.ru:/home/vva/work/LEX_PTR/mysql-5.0
sql/sp.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Fixed bug #320.
Some new tests and cosmetic changes.
Another strcasecmp() replaced.
mysql-test/r/sp.result:
Moved SP tests from subselect and added some more.
mysql-test/r/subselect.result:
Moved SP tests to sp.test.
mysql-test/t/sp.test:
Moved SP tests from subselect and added some more.
mysql-test/t/subselect.test:
Moved SP tests to sp.test.
sql/sp.cc:
Don't close derived tables.
sql/sp_head.cc:
Minor layout and comment fix.
sql/sp_head.h:
Minor comment fix.
sql/sql_derived.cc:
Don't set org_table_list->derived to 1 when debugging, as this breaks certain
subselect args to SPs.
sql/sql_parse.cc:
Post-fix of bugfix (free memory on error), and added comment.
sql/sql_yacc.yy:
Another strcasecmp() replaced.
sql/sp.cc:
Fixed clear_function_cache bug that made memory freeing work for functions too.
sql/sp_head.cc:
Added more DBUG output to help finding memory leak.
sql/sql_parse.cc:
Moved sp_clear_function_cache call so it *works*.
Added missing memory freeing call.
Had to add a cahing mechanism which is in parts an ugly kludge, but it will be
reworked once the real SP caching is implemented.
mysql-test/r/sp.result:
New function tests.
mysql-test/t/sp.test:
New function tests.
sql/sp.cc:
Big rehack of mysql.proc table usage strategy and adding a function cache
mechanism, since we need to read used functions from the db before doing anything else
when executing a query. (This cache is temporary and will probably be replaced by
the real thing later.)
sql/sp.h:
New (temporary) FUNCTION caching functions.
sql/sp_head.cc:
Fixed some bugs in the function and procedure execution.
Disabled some data collections that's not used at the moment.
sql/sp_head.h:
Fixed some bugs in the function and procedure execution.
Disabled some data collections that's not used at the moment.
sql/sql_class.h:
Added SP function cache list to thd.
sql/sql_lex.cc:
Added SP function name list to lex.
sql/sql_lex.h:
Added SP function name list to lex.
sql/sql_parse.cc:
Read used FUNCTIONs from db and cache them in thd before doing anything else
in a query execution. (This is necessary since we can't open mysql.proc during
query execution.)
sql/sql_yacc.yy:
Collect used function names in lex.
mysql-test/r/show_check.result:
proc table now shows up in different places.
mysql-test/r/status.result:
proc table now shows up in different places.
sql/sp.cc:
Fixed closing of tables.
sql/sp_head.cc:
Close tables after each sub statement.
sql/sql_class.cc:
Removed closing of tables in various send_eof() methods again.
various known problems, but good enough for a checkpoint commit.
mysql-test/r/sp.result:
New tests for invoking simple FUNCTIONs.
mysql-test/t/sp.test:
New tests for invoking simple FUNCTIONs.
sql/item_func.cc:
New Item_func_sp for stored FUNCTIONs.
sql/item_func.h:
New Item_func_sp for stored FUNCTIONs.
sql/sp.cc:
Close mysql.proc table earlier so recursive find_function calls work.
Added temporary sp_function_exists() function for checking without parsing.
sql/sp.h:
Added temporary sp_function_exists() function for checking without parsing.
sql/sp_head.cc:
New code for executing a FUNCTION. (And reworked some of the old code in the process.)
sql/sp_head.h:
New code for executing a FUNCTION.
sql/sp_rcontext.h:
Added result slot for FUNCTIONs.
sql/sql_lex.cc:
Added check for stored FUNCTION, analogous to UDFs.
sql/sql_parse.cc:
sp_head::execute was renamed into execute_procedure.
sql/sql_yacc.yy:
Added parsing of stored FUNCTION invocation and code generation for RETURN statement.
Expanded the mysql.proc table, reworked the find/create/drop functions
completely, added new functions for FUNCTIONs (lotta functions here :),
got rid of some unnecessary use of Item_strings while at it. Extended
the parser correspondingly, and fiddled around a bit to make SP FUNCTIONs
coexist with UDFs.
Can now CREATE and DROP FUNCTIONs. Invoking yet to come...
Docs/sp-implemented.txt:
Updated with info about CASCADE/RESTICT and METHOD, and some answers to questions.
include/mysqld_error.h:
New error message for misuse of RETURN.
mysql-test/install_test_db.sh:
Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
mysql-test/r/sp.result:
New test for creating and dropping FUNCTIONS.
mysql-test/t/sp.test:
New test for creating and dropping FUNCTIONS.
scripts/mysql_install_db.sh:
Added enum field to mysql.proc to distinguish between FUNCTION and PROCEDURE.
sql/lex.h:
De-UDFed some symbol names, as they are now used for SPs as well.
Added RETURN_SYM.
sql/share/czech/errmsg.txt:
New error message for misuse of RETURN.
sql/share/danish/errmsg.txt:
New error message for misuse of RETURN.
sql/share/dutch/errmsg.txt:
New error message for misuse of RETURN.
sql/share/english/errmsg.txt:
New error message for misuse of RETURN.
sql/share/estonian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/french/errmsg.txt:
New error message for misuse of RETURN.
sql/share/german/errmsg.txt:
New error message for misuse of RETURN.
sql/share/greek/errmsg.txt:
New error message for misuse of RETURN.
sql/share/hungarian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/italian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/japanese/errmsg.txt:
New error message for misuse of RETURN.
sql/share/korean/errmsg.txt:
New error message for misuse of RETURN.
sql/share/norwegian-ny/errmsg.txt:
New error message for misuse of RETURN.
sql/share/norwegian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/polish/errmsg.txt:
New error message for misuse of RETURN.
sql/share/portuguese/errmsg.txt:
New error message for misuse of RETURN.
sql/share/romanian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/russian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/serbian/errmsg.txt:
New error message for misuse of RETURN.
sql/share/slovak/errmsg.txt:
New error message for misuse of RETURN.
sql/share/spanish/errmsg.txt:
New error message for misuse of RETURN.
sql/share/swedish/errmsg.txt:
New error message for misuse of RETURN.
sql/share/ukrainian/errmsg.txt:
New error message for misuse of RETURN.
sql/sp.cc:
Major rehack to accomodate FUNCTIONs, and to make it easier to add
future in-memory cache of prepared SPs.
sql/sp.h:
Major rehack to accomodate FUNCTIONs, and to make it easier to add
future in-memory cache of prepared SPs.
sql/sp_head.cc:
Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
sql/sp_head.h:
Now creates FUNCTIONs too. (And got rid of some unnecessary Item_string use.)
sql/sql_lex.h:
New stored FUNCTION commands.
sql/sql_parse.cc:
Added FUNCTION support ("drop" merged with the old UDF code), and made some
additional changes for better error handling (following the sp.cc rehacking).
sql/sql_yacc.yy:
Some former UDF specific symbols renamed.
Added CREATE FUNCTION parsing.
DROP FUNCTION had to be partly merged with the old UDF code, because of the similar
syntax.
RETURN statement added, but still a no-op.
sql/sql_class.cc:
Unlock tables after a SELECT INTO variables, or an assert() in lock_tables() fails.
Note: This might be a problem with other SELECT variants too.
sql/sql_yacc.yy:
Make all bison versions work (hopefully).
sql/sp.cc:
Added DBUG statements.
sql/sp_head.cc:
Added DBUG statements.
sql/sql_parse.cc:
Changed returns into DBUG_RETURNs in mysql_execute_command().
sql/sql_yacc.yy:
Small optimization: Don't generate sp_instr_stmt instructions for empty
SET_OPTIONs. (Which happened if there were only local variables in the SET
statement.)
for future work.
Docs/sp-imp-spec.txt:
Started on the FUNCTION parts...
Docs/sp-implemented.txt:
Added som info on SET behaviour, and added Open questions.
sql/sp.cc:
Renamed functions.
sql/sp.h:
Renamed functions.
sql/sql_parse.cc:
Renamed functions.
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, REPEAT (temporarily known as SPREPEAT).
Known bug: Expression evaluation still not quite ok (e.g. "x > 0"),
which is why IF and CASE is not yet implemented.
sql/Makefile.am:
Added new sp.h/sp.cc file.
sql/item.h:
New deferred result_type() method in Item_splocal.
sql/lex.h:
Temporary fix until REPEAT conflict is solved. Use SPREPEAT for now.
sql/sp_head.cc:
Moved create/find/drop functions to sp.cc.
Fixed the backpatch stuff.
(Also removed some dead code and updated comments.)
sql/sp_head.h:
Moved create/find/drop declarations to sp.h.
Fixed the backpatch stuff.
sql/sp_pcontext.h:
New method: last_label().
sql/sql_parse.cc:
Include sp.h.
sql/sql_yacc.yy:
Fixed backpatching of forward jumps.
Implemented LOOP, WHILE, and REPEAT. (Note: SPREPEAT for now.)