An error occurred fetching the project authors.
- 09 Jul, 2005 2 commits
-
-
unknown authored
a table" with main tree. mysql-test/r/trigger.result: Temporalily disable part of test which exposes bug #11554 (work on which is in progress). mysql-test/t/sp-error.test: After merge fix. Fixed wrong delimiter command. mysql-test/t/trigger.test: Temporalily disable part of test which exposes bug #11554 (work on which is in progress). sql/sp.cc: After merge fix. Item_arena was renamed to Query_arena. sql/sp.h: After merge fix. Item_arena was renamed to Query_arena. sql/sql_lex.cc: After merge fix. LEX::spfuns/spprocs hashes were replaces with one LEX::sroutines hash.
-
unknown authored
crash if referencing a table" and several other related bugs. Fix for bug #11834 "Re-execution of prepared statement with dropped function crashes server." which was spotted during work on previous bugs. Also couple of nice cleanups: - Replaced two separate hashes for stored routines used by statement with one. - Now instead of doing one pass through all routines used in statement for caching them and then doing another pass for adding their tables to table list, we do only one pass during which do both things. mysql-test/r/sp-error.result: Added test for bug #11834 "Re-execution of prepared statement with dropped function crashes server" also covering handling of prepared statements which use stored functions but does not require prelocking. mysql-test/r/sp.result: Updated test for LOCK TABLES with views in table list. (Old version of statement used in this test will work ok now, since prelocking algorithm was tuned and will lock only one multi-set of tables for each routine even if this routine is used in several different views). mysql-test/r/trigger.result: Added several tests for triggers using tables. mysql-test/t/sp-error.test: Added test for bug #11834 "Re-execution of prepared statement with dropped function crashes server" also covering handling of prepared statements which use stored functions but does not require prelocking. mysql-test/t/sp.test: Updated comment about recursive views to reflect current situation. Updated test for LOCK TABLES with views in table list. (Old version of statement used in this test will work ok now, since prelocking algorithm was tuned and will lock only one multi-set of tables for each routine even if this routine is used in several different views). mysql-test/t/trigger.test: Added several tests for triggers using tables. sql/item_func.cc: Item_func_sp::cleanup(): By next statement execution stored function can be dropped or altered so we can't assume that sp_head object for it will be still valid. sql/sp.cc: - Added Sroutine_hash_entry structure that represents element in the set of stored routines used by statement or routine. We can't as before use LEX_STRING for this purprose because we want link all elements of this set in list. - Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account that now we use one hash for stored routines used by statement instead of two and which mantains list linking all elelemnts in this hash. - Renamed sp_merge_hash() to sp_update_sp_used_routines(). - Introduced sp_update_stmt_used_routines() for adding elements to the set of routines used by statement from another similar set for statement or routine. This function will also mantain list linking elements of destination set. - Now instead of one sp_cache_routines() function we have family of sp_cache_routines_and_add_tables() functions which are also responsible for adding tables used by routines being cached to statement table list. Nice optimization - thanks to list linking all elements in the hash of routines used by statement we don't need to perform several iterations over this hash (as it was before in cases when we have added new elements to it). sql/sp.h: Added declarations of functions used for manipulations with set (hash) of stored routines used by statement. sql/sp_head.cc: sp_name::init_qname(): Now sp_name also holds key identifying routine in the set (hash) of stored routines used by statement. sp_head: Instead of two separate hashes sp_funs/m_spprocs representing sets of stored routines used by this routine we use one hash - m_sroutines. sp_instr_set_trigger_field: Added support for subqueries in assignments to row accessors in triggers. Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions since now we don't have separate stage on which we add tables used by routines used by statement to table list for prelocking. We do it on the same stage as we load those routines in SP cache. So all this functionality moved to sp_cache_routines_and_add_tables() family of functions. sql/sp_head.h: sp_name: Now this class also holds key identifying routine in the set (hash) of stored routines used by statement. sp_head: Instead of two separate hashes sp_funs/m_spprocs representing sets of stored routines used by this routine we use one hash - m_sroutines. sp_instr_set_trigger_field: Added support for subqueries in assignments to row accessors in triggers. Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have separate stage on which we add tables used by routines used by statement to table list for prelocking. We do it on the same stage as we load those routines in SP cache. sql/sql_base.cc: open_tables(): - LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash. - Now instead of doing one pass through all routines used in statement for caching them and then doing another pass for adding their tables to table list, we do only one pass during which do both things. It is easy to do since all routines in the set of routines used by statement are linked in the list. This also allows us to calculate table list for prelocking more precisely. - Now triggers properly inform prelocking algorithm about tables they use. sql/sql_lex.cc: lex_start(): Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash. Added LEX::sroutines_list list linking all elements in this hash. st_lex::st_lex(): Moved definition of LEX constructor to sql_lex.cc file to be able use sp_sroutine_key declaration from sp.h in it. sql/sql_lex.h: LEX: Replaced two separate hashes for stored routines used by statement with one. Added list linking all elements in this hash to be able to iterate through all elements and add new elements to this hash at the same time. Moved constructor definition to sql_lex.cc. sql/sql_parse.cc: mysql_execute_command(): Replaced LEX::spfuns/spprocs with one LEX::sroutines hash. sql/sql_trigger.cc: Added missing GNU GPL notice. Table_triggers_list::check_n_load() Added initialization of sroutines_key which stores key representing triggers of this table in the set (hash) of routines used by this statement. sql/sql_trigger.h: Added missing GNU GPL notice. Table_triggers_list: Added sroutines_key member to store key representing triggers of this table in the set (hash) of routines used by this statement. Declared sp_cache_routines_and_add_tables_for_triggers() as friend since it needs access to sroutines_key and trigger bodies. sql/sql_yacc.yy: - Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding elements to the set of stored routines used in statement. - Enabled support of subqueries as right sides in assignments to triggers' row accessors.
-
- 06 Jul, 2005 1 commit
-
-
unknown authored
mysql-test/t/sp-error.test: Fixed error-codes after merging changes from the main tree.
-
- 04 Jul, 2005 1 commit
-
-
unknown authored
execution. Failure to do so caused the erroneous statements to send nothing and hang the client. mysql-test/r/sp-error.result: Testcase for BUG#9814. Note that the result demonstrates that currently mysql-test-run ignores errors in multi-statement if they arrive after first resultset has been received. mysql-test/t/sp-error.test: Testcase for BUG#09814.
-
- 01 Jul, 2005 2 commits
-
-
unknown authored
We want to have the defacto standard syntax for labels ("L:" instead of "label L;"), and fix some known bugs, before we enable this again. The code is left intact (#ifdef'ed SP_GOTO) and the test cases are kept in sp-goto.test, for the future... mysql-test/r/sp-error.result: Moved all goto tests to sp-goto.test. mysql-test/r/sp.result: Moved all goto tests to sp-goto.test. mysql-test/t/disabled.def: Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed). We keep the tests in sp-goto.test for the future, but disable for now. mysql-test/t/sp-error.test: Moved all goto tests to sp-goto.test. mysql-test/t/sp.test: Moved all goto tests to sp-goto.test. sql/lex.h: Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed). sql/sql_yacc.yy: Disabled GOTO/LABEL (until the label syntax and some bugs can be fixed).
-
unknown authored
"Stored procedures: crash with function calling itself". Disallow recursive stored routines until we either make Item's and LEX reentrant safe or will use spearate sp_head instances (and thus separate LEX objects and Item trees) for each routine invocation. mysql-test/r/sp-error.result: Added tests for bug #11394 "Recursion in SP crash server" and bug #11600 "Stored procedures: crash with function calling itself". (We simply disallow recursion for stored routines). mysql-test/r/sp.result: Disabled test cases containing recursive stored routines until we will support for them. mysql-test/t/sp-error.test: Added tests for bug #11394 "Recursion in SP crash server" and bug #11600 "Stored procedures: crash with function calling itself". (We simply disallow recursion for stored routines). mysql-test/t/sp.test: Disabled test cases containing recursive stored routines until we will support for them. sql/share/errmsg.txt: Added error message saying that recursive stored routines are disallowed. sql/sp_head.cc: sp_head::execute(): Since many Item's and LEX members can't be used in reentrant fashion we have to disable recursion for stored routines. So let us track routine invocations using sp_head::m_is_invoked member and raise error when one attempts to call routine recursively. sql/sp_head.h: sp_head: Added m_is_invoked member for tracking of routine invocations and preventing recursion.
-
- 08 Jun, 2005 1 commit
-
-
unknown authored
This is to close Bug#10975, Bug#7115, Bug#10605 This feature will be implemented in a future release. mysql-test/r/sp-error.result: Test results fixed (test coverage for disabled Dynamic SQL in SP). mysql-test/t/sp-error.test: Test coverage to disable Dynamic SQL in stored routines. sql/sql_yacc.yy: Disable dynamic SQL in stored routines.
-
- 01 Jun, 2005 1 commit
-
-
unknown authored
Return an error if default() is used on a local variable. This is actaully a side-effect of BUG#5967: Stored procedure declared variable used instead of column (to be fixed later), so this is really a workaround until that is fixed. mysql-test/r/sp-error.result: New test case for BUG#10969. mysql-test/t/sp-error.test: New test case for BUG#10969. sql/item.h: Get name of local variable for error messages. sql/sql_yacc.yy: Return an error if default() is applied on a local SP variable.
-
- 31 May, 2005 1 commit
-
-
unknown authored
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.
-
- 27 May, 2005 1 commit
-
-
unknown authored
by simply disabling FLUSH for stored functions. (I can't really work.) mysql-test/r/sp-error.result: New test case for BUG#8409. mysql-test/t/sp-error.test: New test case for BUG#8409. sql/sql_yacc.yy: Disable FLUSH for stored functions.
-
- 20 May, 2005 1 commit
-
-
unknown authored
procedure. by simply disabling 'load' in stored procedures, like it's already disabled for prepared statements. (They must be made "re-execution" safe before working with either PS or SP.) mysql-test/r/sp-error.result: New test case for BUG#10537. mysql-test/t/sp-error.test: New test case for BUG#10537. sql/sql_yacc.yy: Disable LOAD in stored procedures (just as for prepared statements).
-
- 27 Apr, 2005 1 commit
-
-
unknown authored
(Review on irc by monty) mysql-test/r/sp-error.result: Renamed a procedure and function to avoid confusion mysql-test/t/sp-error.test: Renamed a procedure and function to avoid confusion sql/item_func.cc: Corrected (and better) way to set/reset the client cap. flag in Item_func_sp::execute() sql/share/errmsg.txt: Changed the ER_SP_BADSELECT error; more accurate, and includes the procedure name. sql/sql_parse.cc: Include the procedure name in the new error message.
-
- 26 Apr, 2005 1 commit
-
-
unknown authored
We simply have to disallow any kind of result set being sent back from a function. Can't see any way to make that to work. mysql-test/r/sp-error.result: New test case for BUG#8408. mysql-test/t/sp-error.test: New test case for BUG#8408. sql/item_func.cc: Disable result sets from functions but temporarily turning CLIENT_MULTI_RESULTS off. sql/share/errmsg.txt: Added error message for statements not allowed in functions (detected during parsing). sql/sql_yacc.yy: Don't allow result sets in functions.
-
- 20 Apr, 2005 1 commit
-
-
unknown authored
by simply disallowing alter procedure/function in an SP (as for drop). mysql-test/r/sp-error.result: Added test case for BUG#7047. mysql-test/t/sp-error.test: Added test case for BUG#7047. sql/share/errmsg.txt: Modified error message for "update procedure/function" too. sql/sql_yacc.yy: Don't allow alter procedure/function in an SP.
-
- 14 Apr, 2005 1 commit
-
-
unknown authored
overwrites IN variable and added error checking of variables for [IN]OUT parameters while rewriting the out parameter handling. mysql-test/r/sp-error.result: New test case for non-variable argument for [IN]OUT parameters. (And changed to qualified names in some other error messages.) mysql-test/r/sp.result: New test case for BUG#9598. mysql-test/t/sp-error.test: New test case for non-variable argument for [IN]OUT parameters. mysql-test/t/sp.test: New test case for BUG#9598. sql/item.h: Need to distinguish between SP local variable items and other items, for error checking and [IN]OUT parameter handling. sql/share/errmsg.txt: New error message for non-variable arguments for [IN]OUT parameters in stored procedures. sql/sp_head.cc: Rewrote the [IN]OUT parameter handling in procedure invokation, to make it work properly when using user variables in sub-calls. Also added error checking for non-variable arguments for such parameters (and changed to qualified names for wrong number of arg. errors). sql/sp_rcontext.cc: No need to keep track on the out index for an [IN]OUT parameter any more. sql/sp_rcontext.h: No need to keep track on the out index for an [IN]OUT parameter any more.
-
- 08 Apr, 2005 2 commits
-
-
unknown authored
mysql-test/r/sp-error.result: Added test case for BUG#9073. mysql-test/t/sp-error.test: Added test case for BUG#9073. sql/share/errmsg.txt: New error message for duplicate condition handlers in stored procedures. sql/sp_pcontext.cc: Keep track on condition handlers in the same block for error checking. sql/sp_pcontext.h: Keep track on condition handlers in the same block for error checking. sql/sql_yacc.yy: Keep track on condition handlers in the same block for error checking.
-
unknown authored
mysql-test/r/sp-error.result: Added test case for BUG#7299. mysql-test/t/sp-error.test: Added test case for BUG#7299. sql/sp_rcontext.cc: Corrected cut&paste error; make sure we only catch actual errors with sqlexception.
-
- 07 Apr, 2005 1 commit
-
-
unknown authored
state" to sp-error.test. According to Per-Erik all SP related tests which should result in error should go into sp-error.test and not in sp.test, because we want to be able to run sp.test using normal client. mysql-test/r/sp-error.result: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/r/sp.result: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/t/sp-error.test: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test. mysql-test/t/sp.test: Moved test for bug #9566 "explicit LOCK TABLE and store procedures result in illegal state" to sp-error.test.
-
- 30 Mar, 2005 1 commit
-
-
unknown authored
Sedond attempt: Simply disallow CHECK in SPs, since it can't work. mysql-test/r/sp-error.result: New test cast for BUG#6600 mysql-test/r/sp.result: Removed old test case for BUG#6600 mysql-test/t/sp-error.test: New test cast for BUG#6600 mysql-test/t/sp.test: Removed old test case for BUG#6600 sql/share/errmsg.txt: Made the SP bad statement error message more general. sql/sp_head.cc: CHECK is not possible in stored procedures. sql/sql_parse.cc: Undid attempt to fix CHECK in stored procedures, it didn't work. sql/sql_yacc.yy: CHECK is not possible in stored procedures. (And updated error messages for LOCK/UNLOCK.)
-
- 18 Mar, 2005 1 commit
-
-
unknown authored
and removed a have_innodb.inc inclusion which was left by mistake in an earlier change. mysql-test/r/sp_trans.result: Changed procedure name and delimiter setting to follow the style of the other SP test files. mysql-test/t/sp-error.test: Added comment with hint for bug test case style. mysql-test/t/sp-threads.test: Added comments, with hint for bug test case style. mysql-test/t/sp.test: Removed have_innodb.inc inclusion. Added comments about different SP test files, table usage and hint for bug test case style. mysql-test/t/sp_trans.test: Changed procedure name and delimiter setting to follow the style of the other SP test files.
-
- 28 Feb, 2005 1 commit
-
-
unknown authored
a DECLARE ? HANDLER FOR stmt. mysql-test/r/sp-error.result: New test case for BUG#8776 (check format of sqlstates in handler declarations). mysql-test/t/sp-error.test: New test case for BUG#8776 (check format of sqlstates in handler declarations). sql/share/errmsg.txt: New error message for malformed SQLSTATEs. sql/sp_pcontext.cc: Added function for checking SQLSTATE format. sql/sp_pcontext.h: Added function for checking SQLSTATE format. sql/sql_yacc.yy: Check format of SQLSTATE in handler declaration.
-
- 08 Feb, 2005 1 commit
-
-
unknown authored
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.
-
- 03 Jan, 2005 1 commit
-
-
unknown authored
sql/sql_parse.cc: Fix SP_COM_STRING() macro for 'SHOW CREATE FUNCTION' case mysql-test/r/sp-error.result: results for SHOW CREATE FUNCTION test mysql-test/t/sp-error.test: test SHOW CREATE FUNCTION
-
- 25 Nov, 2004 1 commit
-
-
unknown authored
...and for PURGE BEFORE too. (Don't fix_fields in the parser!) mysql-test/r/sp-error.result: New test case for BUG#6807 mysql-test/t/sp-error.test: New test case for BUG#6807 sql/sql_lex.h: Purge and kill query args not needed in lex. (Using value_list instead) sql/sql_parse.cc: Evaluate purge before and kill query args in mysql_execute_command instead of in the parser. (Makes it work with stored procedures) sql/sql_yacc.yy: Don't evaluate (fix_fields) args in the parser for purge before and kill query. (Doesn't work with stored procedures)
-
- 03 Nov, 2004 1 commit
-
-
unknown authored
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
-
- 22 Oct, 2004 2 commits
-
-
unknown authored
...and no ALTER privilege either. For now, only the definer and root can drop or alter an SP. include/mysqld_error.h: New access denied error code when dropping/altering stored procedures. include/sql_state.h: New access denied error code when dropping/altering stored procedures. mysql-test/r/sp-error.result: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.) mysql-test/r/sp-security.result: Added tests for access control on who's allowed to drop and alter SPs. mysql-test/r/sp.result: Updated results. (Warning removed.) mysql-test/t/sp-error.test: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.) mysql-test/t/sp-security.test: Added tests for access control on who's allowed to drop and alter SPs. sql/share/czech/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/danish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/dutch/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/english/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/estonian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/french/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/german/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/greek/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/hungarian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/italian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/japanese/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/korean/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/norwegian-ny/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/norwegian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/polish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/portuguese/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/romanian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/russian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/serbian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/slovak/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/spanish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/swedish/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/share/ukrainian/errmsg.txt: New access denied error message when dropping/altering stored procedures. sql/sql_parse.cc: Added minimal access control for DROP/ALTER PROCEDURE/FUNCTION. Only the definer and root are allowed to do this. sql/sql_yacc.yy: Removed warning for "unitialized variable", as this popped up in unexpected places after the access control for drop/alter SPs was added. (And the warning was wrong and planned to be removed anyway.)
-
unknown authored
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.
-
- 07 Oct, 2004 1 commit
-
-
unknown authored
Now simply give an error if no database. (The "global SP feature" will be done using PATH instead.) mysql-test/r/sp-error.result: Removed test cases for undone "feature". mysql-test/t/sp-error.test: Removed test cases for undone "feature". sql/sql_parse.cc: Check if created procedure/function has a database; give error if not. sql/sql_yacc.yy: Undid the "global SP feature".
-
- 10 Sep, 2004 1 commit
-
-
unknown authored
Dropping the table was not the real problem, the problem was with errors occuring within error handlers. mysql-test/r/sp-error.result: New test case for BUG#3294. mysql-test/t/sp-error.test: New test case for BUG#3294. sql/sp_head.cc: Use hreturn instruction both for continue and exit handlers (a special case of a jump). sql/sp_head.h: Use hreturn instruction both for continue and exit handlers (a special case of a jump). sql/sp_rcontext.cc: Keep track on if we're in a handler already, for error handling. sql/sp_rcontext.h: Keep track on if we're in a handler already, for error handling. sql/sql_yacc.yy: Use hreturn instruction both for continue and exit handlers (a special case of a jump).
-
- 09 Sep, 2004 2 commits
-
-
unknown authored
-
unknown authored
Fixed (together with Guilhem) bugs in mysqlbinlog regarding --offset Prefix addresses with 0x for easier comparisons of debug logs Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index This fix changed some 'index' queries to 'range' queries in the test suite Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause. This fix removed of a lot of 'Using where' notes in the test suite. Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS Give NOTE instead of WARNING for safe field-type conversions Makefile.am: Don't automaticly update files from bk client/mysqlbinlog.cc: Merge with 4.1 (+ apply bug fixes for --offset and --start-position) include/my_sys.h: Faster clear_alloc_root() mysql-test/r/bdb.result: Updated results after merge mysql-test/r/create.result: Updated results after merge mysql-test/r/func_group.result: Updated results after merge mysql-test/r/func_if.result: Updated results after merge mysql-test/r/heap_btree.result: Updated results after merge mysql-test/r/index_merge.result: Updated results after merge mysql-test/r/index_merge_ror.result: Updated results after merge mysql-test/r/innodb.result: Updated results after merge mysql-test/r/join_outer.result: Updated results after merge mysql-test/r/mysqlbinlog2.result: Updated results after merge mysql-test/r/negation_elimination.result: Updated results after merge mysql-test/r/null.result: Updated results after merge Added more tests mysql-test/r/null_key.result: Updated results after merge Added more tests mysql-test/r/order_by.result: Updated results after merge mysql-test/r/range.result: Updated results after merge Added more tests mysql-test/r/rpl_charset.result: Updated results after merge mysql-test/r/sp-error.result: Updated results after merge mysql-test/r/sp.result: Updated results after merge Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle mysql-test/r/type_blob.result: Updated results after merge (Some warnings are now notes) mysql-test/r/user_var.result: Updated results after merge Added more tests mysql-test/r/variables.result: Updated results after merge mysql-test/r/view.result: Updated results after merge mysql-test/t/mysqlbinlog2.test: Updated tests to use new positions mysql-test/t/null.test: More tests mysql-test/t/null_key.test: More tests mysql-test/t/range.test: More tests mysql-test/t/rpl_charset.test: Avoid big diffs in the future if tests changes mysql-test/t/sp-error.test: Updated error numbers mysql-test/t/sp-security.test: Updated error numbers mysql-test/t/sp.test: Updated results after merge Added delete of some stored procedures in an attempt to be able to re-run test even if it aborts in the middle mysql-test/t/user_var.test: More tests mysql-test/t/view.test: Updated error numbers mysys/my_alloc.c: Write into debug log the address of the allocated area sql/ha_isam.cc: Prefix addresses with 0x for easier comparisons of debug logs sql/ha_myisam.cc: Prefix addresses with 0x for easier comparisons of debug logs sql/ha_ndbcluster.cc: Add missing enum to switch sql/handler.cc: remove compiler warning sql/item.cc: More debugging Simple cleanup sql/item.h: Move Item::cleanup() to item.cc sql/item_cmpfunc.cc: Fix arena code sql/item_subselect.cc: After merge fixes sql/item_subselect.h: After merge fixes sql/item_sum.cc: Updated comment sql/log_event.cc: Remove wrong test sql/mysql_priv.h: Indentation fixes sql/mysqld.cc: After merge fixes Added 0x to pointers in debug log sql/opt_range.cc: Fixed problem where MySQL choosed index-read even if there would be a much better range on the same index This fix changed some 'index' queries to 'range' queries in the test suite sql/set_var.cc: Indentation fixes sql/sp_head.cc: Set state to INITIALIZED to make SP work with new arena code sql/sql_base.cc: After merge fixes sql/sql_class.cc: More debugging Use clear_alloc_root() instead of init_alloc_root() as the former is faster sql/sql_class.h: New method 'only_prepare()' sql/sql_lex.cc: After merge fixes sql/sql_lex.h: After merge fixes sql/sql_parse.cc: Fix for timezone tables. (The old way to add timezone tables to global list in 'create_total_list' doesn't work anymore) Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS sql/sql_prepare.cc: After merge fixes sql/sql_select.cc: Don't create 'dummy' WHERE clause for trivial WHERE clauses where we can remove the WHERE clause. This fix removed of a lot of 'Using where' notes in the test suite sql/sql_table.cc: Give NOTE instead of WARNING if table/function doesn't exists when using DROP IF EXISTS sql/sql_union.cc: After merge fix sql/sql_view.cc: After merge fix sql/table.cc: After merge fix sql/tztime.cc: Update timezone table handling to use new table lists structure sql/tztime.h: Update timezone table handling to use new table lists structure sql/unireg.cc: Use 0x before pointers
-
- 08 Sep, 2004 1 commit
-
-
unknown authored
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()".
-
- 26 Aug, 2004 1 commit
-
-
unknown authored
This finishes (almost) WL#2002: Implement stored procedure GOTO. Only the syntax issue for free labels remains ("label L;" vs "L:"). include/mysqld_error.h: New error code for GOTO in SP handler. mysql-test/r/sp-error.result: New error test cases for GOTO. mysql-test/r/sp.result: New test cases for GOTO. Also removed some things that made it impossible to run the test in an external (debugged) mysqld. mysql-test/t/sp-error.test: New error test cases for GOTO. mysql-test/t/sp.test: New test cases for GOTO. Also removed some things that made it impossible to run the test in an external (debugged) mysqld. sql/share/czech/errmsg.txt: New error message for GOTO in SP handler. sql/share/danish/errmsg.txt: New error message for GOTO in SP handler. sql/share/dutch/errmsg.txt: New error message for GOTO in SP handler. sql/share/english/errmsg.txt: New error message for GOTO in SP handler. sql/share/estonian/errmsg.txt: New error message for GOTO in SP handler. sql/share/french/errmsg.txt: New error message for GOTO in SP handler. sql/share/german/errmsg.txt: New error message for GOTO in SP handler. sql/share/greek/errmsg.txt: New error message for GOTO in SP handler. sql/share/hungarian/errmsg.txt: New error message for GOTO in SP handler. sql/share/italian/errmsg.txt: New error message for GOTO in SP handler. sql/share/japanese/errmsg.txt: New error message for GOTO in SP handler. sql/share/korean/errmsg.txt: New error message for GOTO in SP handler. sql/share/norwegian-ny/errmsg.txt: New error message for GOTO in SP handler. sql/share/norwegian/errmsg.txt: New error message for GOTO in SP handler. sql/share/polish/errmsg.txt: New error message for GOTO in SP handler. sql/share/portuguese/errmsg.txt: New error message for GOTO in SP handler. sql/share/romanian/errmsg.txt: New error message for GOTO in SP handler. sql/share/russian/errmsg.txt: New error message for GOTO in SP handler. sql/share/serbian/errmsg.txt: New error message for GOTO in SP handler. sql/share/slovak/errmsg.txt: New error message for GOTO in SP handler. sql/share/spanish/errmsg.txt: New error message for GOTO in SP handler. sql/share/swedish/errmsg.txt: New error message for GOTO in SP handler. sql/share/ukrainian/errmsg.txt: New error message for GOTO in SP handler. sql/sp_head.cc: Code cleanup (renaming of pcontext methods), support goto, and fixed bug in jump shortcutting in the optimizer (detect infinite loops). sql/sp_head.h: Code cleanup (renaming of pcontext methods), support goto, and fixed bug in jump shortcutting in the optimizer (detect infinite loops). sql/sp_pcontext.cc: Major rehack and cleanup: - We now push and pop a chain of contexts during parsing (instead of having a single one). - Makes error detection for GOTO easier and enables some optmizations and debugger support. - Makes it a little trickier to keep track on variable and cursor indexes instead. - Renamed things to get a more consistent naming scheme too. sql/sp_pcontext.h: Major rehack and cleanup: - We now push and pop a chain of contexts during parsing (instead of having a single one). - Makes error detection for GOTO easier and enables some optmizations and debugger support. - Makes it a little trickier to keep track on variable and cursor indexes instead. - Renamed things to get a more consistent naming scheme too. sql/sql_yacc.yy: Changes to reflect the rework and renamings in sp_pcontext, and fixed some GOTO error checking.
-
- 24 Aug, 2004 1 commit
-
-
unknown authored
and BUG#336: Subselects with tables does not work as values for local SP variables (which was closed before with a temp. fix, but not actually fixed). mysql-test/r/sp-error.result: Moved test case for BUG#336 to sp.test, as it's not generating an error any longer. mysql-test/r/sp.result: Move test case for BUG#336 from sp-error.test and added new test case for BUG#3157. mysql-test/t/sp-error.test: Moved test case for BUG#336 to sp.test, as it's not generating an error any longer. mysql-test/t/sp.test: Move test case for BUG#336 from sp-error.test and added new test case for BUG#3157. sql/sp_head.cc: Open and close tables in set, jump-if[-not] and freturn instructions if the value expression is a subselect. sql/sp_head.h: Store tables in set, jump-if[-not] and freturn instructions if the value expression is a subselect. sql/sql_yacc.yy: Store tables in set, jump-if[-not] and freturn instructions if the value expression is a subselect.
-
- 17 Aug, 2004 1 commit
-
-
unknown authored
Mostly done, it works, but the temporary LABEL syntax still to be fixed. mysql-test/r/sp-error.result: New test case for WL#2002 (GOTO). mysql-test/r/sp.result: New test case for WL#2002 (GOTO). (Also corrected another test) mysql-test/t/sp-error.test: New test case for WL#2002 (GOTO). mysql-test/t/sp.test: New test case for WL#2002 (GOTO). (Also corrected another test) sql/lex.h: New symbol GOTO. Also a temporary symbol LABEL, which hopefully will go away soon. sql/sp_head.cc: Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions. Also optimized away pointless jump instructions. sql/sp_head.h: Fixed backpatching to cope with free GOTO labels an hpop and cpop instructions. We now sometimes generate hpop/cpop 0 instructions but the optimizer removes them. sql/sp_pcontext.cc: Added free GOTO labels, and support for coping with jumps out of blocks with handlers or cursors. sql/sp_pcontext.h: Added free GOTO labels, and support for coping with jumps out of blocks with handlers or cursors. sql/sql_yacc.yy: Added GOTO and LABEL, and adjusted backpatching accordingly. Also fixed LEAVE out of blocks. The LABEL syntax will go away soon, hopefully.
-
- 29 Jul, 2004 1 commit
-
-
unknown authored
Simply disallow it, just as we disallow creation of routines from within other SPs. include/mysqld_error.h: New error code for when attempting to drop a stored routine from within another stored routine. mysql-test/r/sp-error.result: New test case for BUG#4344. mysql-test/t/sp-error.test: New test case for BUG#4344. sql/share/czech/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/danish/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/dutch/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/english/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/estonian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/french/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/german/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/greek/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/hungarian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/italian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/japanese/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/korean/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/norwegian-ny/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/norwegian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/polish/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/portuguese/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/romanian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/russian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/serbian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/slovak/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/spanish/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/swedish/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/share/ukrainian/errmsg.txt: New error message for when attempting to drop a stored routine from within another stored routine. sql/sql_yacc.yy: Don't allow drop function/procedure from within another function/procedure.
-
- 21 Jul, 2004 2 commits
-
-
unknown authored
sql/opt_range.h: compatibility fix sql/sql_lex.cc: cleanup
-
unknown authored
We now get an run-time error instead of a crash (although a slightly misleading error message, but it's an improvement). mysql-test/r/sp-error.result: New test case for BUG#2653. mysql-test/t/sp-error.test: New test case for BUG#2653. sql/sp_head.cc: Detect failed evals (fix item really), which are due to unresolved variables/fields. Typically this would be a reference to an undeclared variable. (Also got rid of some compiler warnings.) sql/sp_rcontext.cc: Detect failed evals (fix item really), which are due to unresolved variables/fields. Typically this would be a reference to an undeclared variable. sql/sp_rcontext.h: Changed return type to int, so be able to detect failed evals (fix item). sql/sql_class.cc: Changed return type to int, so be able to detect failed evals (fix item).
-
- 15 Jul, 2004 1 commit
-
-
unknown authored
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
-
- 15 Jun, 2004 1 commit
-
-
unknown authored
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.)
-