An error occurred fetching the project authors.
  1. 02 Mar, 2006 1 commit
    • unknown's avatar
      Implementation of WL#2897: Complete definer support in the stored routines. · 9a1fed13
      unknown authored
      The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION
      statements. Almost all support of definer in stored routines had been already
      done before this patch.
      
      NOTE: this patch changes behaviour of dumping stored routines in mysqldump.
      Before this patch, mysqldump did not dump DEFINER-clause for stored routines
      and this was documented behaviour. In order to get full information about stored
      routines, one should have dumped mysql.proc table. This patch changes this
      behaviour, so that DEFINER-clause is dumped.
      
      Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements
      before this patch, the clause is covered by additional version-specific comments.
      
      
      client/mysqldump.c:
        Updated the code for dumping stored routines: cover DEFINER-clause
        into version-specific comment.
      mysql-test/r/gis.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/information_schema.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/mysqldump.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_ddl.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_sp.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/rpl_trigger.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sp-security.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sp.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/r/sql_mode.result:
        Updated result file after adding DEFINER-clause.
      mysql-test/t/sp-security.test:
        Updated result file after adding DEFINER-clause.
      sql/sp.cc:
        Added DEFINER-clause.
      sql/sp_head.cc:
        Added a new convenient variant of set_definer() operation.
      sql/sp_head.h:
        Updated result file after adding DEFINER-clause.
      sql/sql_lex.h:
        Renamed trigger_definition_begin into stmt_definition_begin to be used for
        triggers and stored routines.
      sql/sql_parse.cc:
        Check DEFINER-clause.
      sql/sql_trigger.cc:
        Renamed trigger_definition_begin into stmt_definition_begin to be used for
        triggers and stored routines.
      sql/sql_yacc.yy:
        Added DEFINER-clause.
      9a1fed13
  2. 24 Feb, 2006 1 commit
    • unknown's avatar
      Fixes to embedded server to be able to run tests with it · 0afb6ff6
      unknown authored
      (Needed for "list of pushes" web page and autopush)
      
      
      include/mysql.h:
        Fix to embedded server to be able to run tests on it
      libmysql/libmysql.c:
        Fix to embedded server to be able to run tests on it
      libmysqld/emb_qcache.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/embedded_priv.h:
        Fix to embedded server to be able to run tests on it
      libmysqld/lib_sql.cc:
        Fix to embedded server to be able to run tests on it
      libmysqld/libmysqld.c:
        Fix to embedded server to be able to run tests on it
      mysql-test/mysql-test-run.sh:
        Fix to embedded server to be able to run tests on it
      mysql-test/r/binlog.result:
        Updated test for embedded server
      mysql-test/r/ctype_cp932.result:
        Updated test for embedded server
      mysql-test/r/innodb.result:
        Updated test for embedded server
      mysql-test/r/mysqltest.result:
        Updated test for embedded server
      mysql-test/r/query_cache.result:
        Updated test for embedded server
      mysql-test/r/query_cache_notembedded.result:
        Updated test for embedded server
      mysql-test/r/sp-error.result:
        Updated test for embedded server
      mysql-test/r/sp.result:
        Updated test for embedded server
      mysql-test/r/subselect.result:
        Updated test for embedded server
      mysql-test/r/view.result:
        Updated test for embedded server
      mysql-test/r/view_grant.result:
        Updated test for embedded server
      mysql-test/t/backup.test:
        Updated test for embedded server
      mysql-test/t/binlog.test:
        Updated test for embedded server
      mysql-test/t/blackhole.test:
        Updated test for embedded server
      mysql-test/t/compress.test:
        Updated test for embedded server
      mysql-test/t/ctype_cp932.test:
        Updated test for embedded server
      mysql-test/t/delayed.test:
        Updated test for embedded server
      mysql-test/t/handler.test:
        Updated test for embedded server
      mysql-test/t/innodb.test:
        Updated test for embedded server
      mysql-test/t/mysql.test:
        Updated test for embedded server
      mysql-test/t/mysql_client_test.test:
        Updated test for embedded server
      mysql-test/t/mysqltest.test:
        Updated test for embedded server
      mysql-test/t/query_cache.test:
        Updated test for embedded server
      mysql-test/t/query_cache_notembedded.test:
        Updated test for embedded server
      mysql-test/t/read_only.test:
        Updated test for embedded server
      mysql-test/t/skip_grants.test:
        Updated test for embedded server
      mysql-test/t/sp-destruct.test:
        Updated test for embedded server
      mysql-test/t/sp-error.test:
        Updated test for embedded server
      mysql-test/t/sp-threads.test:
        Updated test for embedded server
      mysql-test/t/sp.test:
        Updated test for embedded server
      mysql-test/t/subselect.test:
        Updated test for embedded server
      mysql-test/t/temp_table.test:
        Updated test for embedded server
      mysql-test/t/view.test:
        Updated test for embedded server
      mysql-test/t/view_grant.test:
        Updated test for embedded server
      mysql-test/t/wait_timeout.test:
        Updated test for embedded server
      mysys/mf_dirname.c:
        Review fix: Don't access data outside of array
      mysys/my_bitmap.c:
        Remove compiler warnings
      scripts/mysql_fix_privilege_tables.sql:
        Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
      sql-common/client.c:
        Updated test for embedded server
      sql/item.cc:
        Remove DBUG_PRINT statement that can cause crashes when running with --debug
      sql/mysqld.cc:
        Fix to embedded server to be able to run tests on it
      sql/protocol.cc:
        Fix to embedded server to be able to run tests on it
        (Trivial reconstruction of code)
      sql/protocol.h:
        Fix to embedded server to be able to run tests on it
      sql/sql_base.cc:
        Better comment
      sql/sql_class.cc:
        Fix to embedded server to be able to run tests on it
      sql/sql_class.h:
        Fix to embedded server to be able to run tests on it
      sql/sql_cursor.cc:
        Fix to embedded server to be able to run tests on it
      sql/sql_parse.cc:
        Fix to embedded server to be able to run tests on it
        Don't crash for disabled commands when using embedded server
      sql/sql_prepare.cc:
        Fix to embedded server to be able to run tests on it
      mysql-test/r/ctype_cp932_notembedded.result:
        New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
      mysql-test/r/innodb_notembedded.result:
        New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
      mysql-test/r/sp.result.orig:
        New BitKeeper file ``mysql-test/r/sp.result.orig''
      mysql-test/r/sp_notembedded.result:
        New BitKeeper file ``mysql-test/r/sp_notembedded.result''
      mysql-test/r/subselect_notembedded.result:
        New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
      mysql-test/t/ctype_cp932_notembedded.test:
        New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
      mysql-test/t/innodb_notembedded.test:
        New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
      mysql-test/t/sp.test.orig:
        New BitKeeper file ``mysql-test/t/sp.test.orig''
      mysql-test/t/sp_notembedded.test:
        New BitKeeper file ``mysql-test/t/sp_notembedded.test''
      mysql-test/t/subselect_notembedded.test:
        New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
      0afb6ff6
  3. 16 Feb, 2006 1 commit
  4. 15 Feb, 2006 1 commit
  5. 26 Jan, 2006 1 commit
    • unknown's avatar
      Fixed on BUG#16568: Continue handler with simple CASE not working correctly · af187fa2
      unknown authored
        After trying multiple inheritance (to messy and hard make it work) and
        sublassing jump_if_not (worked, but ugly), decided to on this solution
        instead:
        Inserting an abstract sp_instr_opt_meta class as parent for all instructions
        with destinations makes it possible to handle a continuation pointer for
        sp_instr_set_case_expr too.
        Note: No special test case; the fix is captured by the changed behaviour of
        bug14643_2, and bug14498_4 (formerly disabled), in sp.test.
      
      
      mysql-test/r/sp.result:
        Updated results for BUG#16568 (affects results for bug14643_2 and bug14498_4)
      mysql-test/t/sp.test:
        Enabled test bug14498_4 for BUG#16568.
      sql/sp_head.cc:
        Changed type of some parameters and variables (sp_instr_opt_meta instead of sp_instr_jump*).
        Added consistency check of m_ip member in instructions in sp_head::show_routine_code().
        Updated print() method of, and added opt_mark() and opt_move() methods to
        sp_instr_set_case_expr, to handle the new continuation destination.
      sql/sp_head.h:
        New abstract class between sp_instr and instructions with destinations, in particular
        sp_instr_set_case_expr, for continuation destination handling.
        Changed type of some parameters and variables (sp_instr_opt_meta instead of sp_instr_jump*).
        Added opt_mark(), opt_move() and set_destination() methods to
        sp_instr_set_case_expr.
      sql/sql_parse.cc:
        Fixed small bug at show_routine_code() call (tested return value the wrong way).
      sql/sql_yacc.yy:
        sp_instr_set_case_expr is now added to backpatch list (for the new cont. destination).
      af187fa2
  6. 25 Jan, 2006 1 commit
    • unknown's avatar
      Fixed BUGS#15011: error handler for mysql errno in nested block not activated · cc037976
      unknown authored
        For nested sql errno handlers (unlike sqlexception and other), we didn't stop
        searching when the innermost handler was found - now make sure we do.
      
      
      mysql-test/r/sp.result:
        Updated result for BUG#15011.
      mysql-test/t/sp.test:
        New testcase for BUG#15011.
      sql/sp_rcontext.cc:
        Make sure we stop at the innermost sql_errno handler.
      cc037976
  7. 20 Jan, 2006 1 commit
  8. 19 Jan, 2006 1 commit
    • unknown's avatar
      Fixed BUG#15866: Thread stack limit insufficient for recursive call "fib(20)" · 7fc2604c
      unknown authored
        Lowered the parameter to 10, and also renamed non-standard table names to t3.
      
      
      mysql-test/r/sp.result:
        Updated results.
      mysql-test/r/sp_trans.result:
        Updated results.
      mysql-test/t/sp.test:
        Renamed fac, primes and fib tables to t3.
        Lowered fib() test parameter to 10 (20 hit the stack overrun check on some machines).
      mysql-test/t/sp_trans.test:
        Added drop of t3 for safety. (Might be left from sp.test after certain test failures.)
      7fc2604c
  9. 17 Jan, 2006 1 commit
    • unknown's avatar
      Bug#15206: "Misleading message "No data to FETCH": · 13f5fca9
      unknown authored
      reword the misleading message.
      
      
      mysql-test/r/sp-error.result:
        Test results fixed (Bug#15206)
      mysql-test/r/sp.result:
        Test results fixed (Bug#15206)
      mysql-test/r/type_decimal.result:
        Disable an unportable test case (Bug#7670)
      mysql-test/r/variables.result:
        Test results fixed (Bug#15206)
      mysql-test/r/view_grant.result:
        Test results fixed (Bug#15206)
      mysql-test/t/type_decimal.test:
        Remove an unportable (QNX) test case (Bug#7670). The test output
        depends on system-specific sprintf() implementation.
        The original complain was about erroneous conversion to long long,
        which was applied prior to conversion to double: but the expected
        behaviour can't be achieved until we have an own string -> double
        conversion function.
      13f5fca9
  10. 12 Jan, 2006 1 commit
    • unknown's avatar
      Fix for bug #12198 "Temporary table aliasing does not work inside stored · c12a3dfe
      unknown authored
      functions".
      
      We should ignore alias when we check if table was already marked as temporary
      when we calculate set of tables to be prelocked. Otherwise we will erroneously
      treat tables which are used in same routine and have same name but different
      alias as non-temporary.
      
      
      mysql-test/r/sp.result:
        Added test for bug #12198 "Temporary table aliasing does not work inside stored
        functions" and other tests which cover handling of temporary tables in prelocked
        mode.
      mysql-test/t/sp.test:
        Added test for bug #12198 "Temporary table aliasing does not work inside stored
        functions" and other tests which cover handling of temporary tables in prelocked
        mode.
      sql/sp_head.cc:
        sp_head::merge_table_list():
          We should ignore alias when we check if table was already marked as temporary
          when we calculate set of tables to be prelocked. Otherwise we will erroneously
          treat tables which are used in same routine and have same name but different
          alias as non-temporary.
      c12a3dfe
  11. 13 Dec, 2005 1 commit
    • unknown's avatar
      Fixed BUG#15231: Stored procedure bug with not found condition handler · 5e84bbcb
      unknown authored
        Make the distinction between "exception conditions" and "completion
        conditions" (warning and "no data") as defined by the standard. The latter
        should not terminate a routine if no handler is found in the lexical scope.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#15231.
        Moved part of the test for BUG#7049 to the new testcase (since it was actually
        an example of 15231).
      mysql-test/t/sp.test:
        New test case for BUG#15231.
        Moved part of the test for BUG#7049 to the new testcase (since it was actually
        an example of 15231).
      sql/sp_rcontext.cc:
        Only search for matching condition handlers in caller's contexts if it's
        an exception conditition.
      5e84bbcb
  12. 08 Dec, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#15441 "Running SP causes Server · 9c4985de
      unknown authored
      to Crash": the bug was that due to non-standard name
      resolution precedence in stored procedures (See Bug#5967)
      a stored procedure variable took precedence over a table column
      when the arguments for VALUES() function were resolved.
      The implementation of VALUES() function was not designed to work
      with Item_splocal and crashed.
      VALUES() function is non-standard. It can refer to, and
      is meaningful for, table columns only. The patch disables SP 
      variables as possible arguments of VALUES() function.
      
      
      mysql-test/r/sp.result:
        Test results fixed (Bug#15441).
        Also make sure that the recently added test cases follow sp.test
        internal tests standard.
      mysql-test/t/sp.test:
        Add a test case for Bug#15441 "Running SP causes Server to Crash".
      sql/item.cc:
        Cleanup Item_insert_value::fix_fields().
      sql/item.h:
        Add a comment for Item_insert_value.
      sql/sql_yacc.yy:
        Actual fix for Bug#15441 "Running SP causes Server to Crash":
        we should not allow VALUES() function to reference SP variables.
      9c4985de
  13. 07 Dec, 2005 1 commit
    • unknown's avatar
      Patch for WL#2894: Make stored routine variables work · 6b2f1309
      unknown authored
      according to the standard.
      
      The idea is to use Field-classes to implement stored routines
      variables. Also, we should provide facade to Item-hierarchy
      by Item_field class (it is necessary, since SRVs take part
      in expressions).
      
      The patch fixes the following bugs:
        - BUG#8702: Stored Procedures: No Error/Warning shown for inappropriate data 
          type matching; 
       
        - BUG#8768: Functions: For any unsigned data type, -ve values can be passed 
          and returned; 
       
        - BUG#8769: Functions: For Int datatypes, out of range values can be passed 
          and returned; 
       
        - BUG#9078: STORED PROCDURE: Decimal digits are not displayed when we use 
          DECIMAL datatype; 
       
        - BUG#9572: Stored procedures: variable type declarations ignored; 
       
        - BUG#12903: upper function does not work inside a function; 
       
        - BUG#13705: parameters to stored procedures are not verified; 
       
        - BUG#13808: ENUM type stored procedure parameter accepts non-enumerated
          data; 
       
        - BUG#13909: Varchar Stored Procedure Parameter always BINARY string (ignores 
          CHARACTER SET); 
       
        - BUG#14161: Stored procedure cannot retrieve bigint unsigned;
      
        - BUG#14188: BINARY variables have no 0x00 padding;
      
        - BUG#15148: Stored procedure variables accept non-scalar values;
      
      
      mysql-test/r/ctype_ujis.result:
        Explicitly specify correct charset.
      mysql-test/r/schema.result:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/r/show_check.result:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/r/skip_name_resolve.result:
        Ignore columns with unpredictable values.
      mysql-test/r/sp-big.result:
        Add cleanup statement.
      mysql-test/r/sp-dynamic.result:
        Add cleanup statements.
      mysql-test/r/sp.result:
        Update result file.
      mysql-test/r/sum_distinct-big.result:
        Update result file.
      mysql-test/r/type_newdecimal-big.result:
        Update result file.
      mysql-test/t/ctype_ujis.test:
        Explicitly specify correct charset.
      mysql-test/t/schema.test:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/t/show_check.test:
        Drop our test database to not affect this test if some test
        left it cause of failure.
      mysql-test/t/skip_name_resolve.test:
        Ignore columns with unpredictable values.
      mysql-test/t/sp-big.test:
        Add cleanup statement.
      mysql-test/t/sp-dynamic.test:
        Add cleanup statements.
      mysql-test/t/sp.test:
        Non-scalar values prohibited for assignment to SP-vars;
        polishing.
      mysql-test/t/type_newdecimal-big.test:
        Update type specification so that the variables
        can contain the large values used in the test.
      sql/field.cc:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/field.h:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/item.cc:
        - Introduce a new class: Item_sp_variable -- a base class
          of stored-routine-variables classes;
        - Introduce Item_case_expr -- an Item, which is used to access
          to the expression of CASE statement;
      sql/item.h:
        - Introduce a new class: Item_sp_variable -- a base class
          of stored-routine-variables classes;
        - Introduce Item_case_expr -- an Item, which is used to access
          to the expression of CASE statement;
      sql/item_func.cc:
        Pass the Field (instead of Item) for the return value of
        a function to the function execution routine.
      sql/item_func.h:
        Pass the Field (instead of Item) for the return value of
        a function to the function execution routine.
      sql/mysql_priv.h:
        Move create_virtual_tmp_table() out of sql_select.h.
      sql/sp.cc:
        Use create_result_field() instead of make_field().
      sql/sp_head.cc:
        - Add a function to map enum_field_types to Item::Type;
        - Add sp_instr_push_case_expr instruction -- an instruction
          to push CASE expression into the active running context;
        - Add sp_instr_pop_case_expr instruction -- an instruction
          to pop CASE expression from the active running context;
        - Adapt the SP-execution code to using Fields instead of Items
          for SP-vars;
        - Use create_field structure for field description instead of
          a set of members.
      sql/sp_head.h:
        - Add a function to map enum_field_types to Item::Type;
        - Add sp_instr_push_case_expr instruction -- an instruction
          to push CASE expression into the active running context;
        - Add sp_instr_pop_case_expr instruction -- an instruction
          to pop CASE expression from the active running context;
        - Adapt the SP-execution code to using Fields instead of Items
          for SP-vars;
        - Use create_field structure for field description instead of
          a set of members.
      sql/sp_pcontext.cc:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Add an operation to retrieve a list of defined SP-vars
          from the processing context recursively.
      sql/sp_pcontext.h:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Add an operation to retrieve a list of defined SP-vars
          from the processing context recursively.
      sql/sp_rcontext.cc:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Use a tmp virtual table to store SP-vars instead of Items;
        - Provide operations to work with CASE expresion.
      sql/sp_rcontext.h:
        - Change rules to assign an index of SP-variable: use
          transparent index;
        - Use a tmp virtual table to store SP-vars instead of Items;
        - Provide operations to work with CASE expresion.
      sql/sql_class.cc:
        - Reflect Item_splocal ctor changes;
        - Item_splocal::get_offset() has been renamed to get_var_idx().
      sql/sql_class.h:
        Polishing.
      sql/sql_parse.cc:
        Extract create_field::init() to initialize an existing
        instance of create_field from new_create_field().
      sql/sql_select.cc:
        Take care of BLOB columns in create_virtual_tmp_table().
      sql/sql_select.h:
        Move create_virtual_tmp_table() out of sql_select.h.
      sql/sql_trigger.cc:
        Use boolean constants for boolean type instead of numerical ones.
      sql/sql_yacc.yy:
        Provide an instance of create_field for each SP-var.
      mysql-test/include/sp-vars.inc:
        The definitions of common-procedures, which are created
        under different circumstances.
      mysql-test/r/sp-vars.result:
        Result file for the SP-vars test.
      mysql-test/sp-vars.test:
        A new test for checking SP-vars functionality.
      6b2f1309
  14. 06 Dec, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#15392 "Server crashes during · 8c2d8ac7
      unknown authored
       prepared statement execute
      
      
      mysql-test/r/sp.result:
        Test results fixed: a fix for Bug#15392
      mysql-test/t/sp.test:
        A test case for Bug#15392 "Server crashes during prepared
        statement execute". No test case for error in
        Item_func_set_user_var::update as the only possible one is OOM.
      sql/sp_head.cc:
        A fix for Bug#15392 "Server crashes during prepared statement
        execute": the bug was caused by mysql_change_db() call
        which was overwriting the error state of 'ret'.
        Later in the code, suv->fix_fields() would discover
        thd->net.report_error and return it without completing
        its work. As the return value of fix_fields() was ignored,
        the server would afterwards crash in suv->update().
        The fix makes sure that a possible internal error
        is raised in reset_lex_and_exec_core and then is
        handled in sp_head::execute_procedure.
      8c2d8ac7
  15. 05 Dec, 2005 1 commit
  16. 03 Dec, 2005 1 commit
    • unknown's avatar
      this has nothing to do with the bug#13012. · da8b9967
      unknown authored
      it's about mysql_admin_commands not being reexecution-safe
      (and CHECK still isn't)
      
      
      mysql-test/r/sp-error.result:
        optimize is now allowed in SP
      mysql-test/r/sp.result:
        test repair/optimize/analyze in SP
      mysql-test/t/backup.test:
        clean up after itself
      mysql-test/t/sp-error.test:
        optimize is now allowed in SP
      mysql-test/t/sp.test:
        test repair/optimize/analyze in SP
      sql/sp_head.cc:
        all mysql_admin commands return result set
      sql/sql_parse.cc:
        all mysql_admin commands modify table list and we should restore it for SP
      sql/sql_table.cc:
        optimization - don't execute views when no view is expected/allowed
      sql/sql_yacc.yy:
        optimize is now allowed in SP
      da8b9967
  17. 02 Dec, 2005 2 commits
  18. 01 Dec, 2005 1 commit
    • unknown's avatar
      Fix for bug #14304: auto_increment field incorrect set from within stored... · f853fbc9
      unknown authored
      Fix for bug #14304: auto_increment field incorrect set from within stored procedure (insert select).
      
      
      sql/sp_head.cc:
        Fix for bug #14304: auto_increment field incorrect set from within stored procedure (insert select).
        - call thd->cleanup_after_query() to clean next_insert_id.
      sql/sql_class.cc:
        Fix for bug #14304: auto_increment field incorrect set from within stored procedure (insert select).
        - save/restore clear_next_insert_id
      sql/sql_class.h:
        Fix for bug #14304: auto_increment field incorrect set from within stored procedure (insert select).
        - clear_next_insert_id added
      f853fbc9
  19. 26 Nov, 2005 1 commit
    • unknown's avatar
      Enabled back bunch of tests for stored routines which were disabled · 06887bc3
      unknown authored
      earlier because of various features/checks missing (these features/checks
      are now implemented).
      
      
      mysql-test/r/sp.result:
        Enabled back bunch of tests which were previously disabled because of various
        features/checks missing (since these features/checks are now implemented).
      mysql-test/t/sp.test:
        Enabled back bunch of tests which were previously disabled because of various
        features/checks missing (since these features/checks are now implemented).
      06887bc3
  20. 23 Nov, 2005 2 commits
    • unknown's avatar
      Fixed BUG#13729 Stored procedures: packet error after exception handled · b1182823
      unknown authored
        Don't set thd->is_fatal_error in sql_update for duplicate key errors.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#13729.
      mysql-test/r/sp_trans.result:
        New test case for BUG#14840.
      mysql-test/t/sp.test:
        New test case for BUG#13729.
      mysql-test/t/sp_trans.test:
        New test case for BUG#14840.
      sql/sql_update.cc:
        Don't set thd->is_fatal_error if it's a duplicate key error.
      b1182823
    • unknown's avatar
      postmerge fix · 4aea839b
      unknown authored
      4aea839b
  21. 22 Nov, 2005 2 commits
    • unknown's avatar
      Recursion support made for SP (BUG#10100). · 164ce4c5
      unknown authored
      client/mysqltest.c:
        An expected error messages hiding from the log if disable_result_log is in force.
      mysql-test/r/sp-dynamic.result:
        The test expanded for case of allowed/disalowed recursion.
      mysql-test/r/sp-error.result:
        Error messages changed.
        Test of bug11394() made with allowed recursion.
      mysql-test/r/sp.result:
        Tests for recursion.
      mysql-test/r/trigger.result:
        Check that triggers are not affected by this patch.
      mysql-test/r/variables.result:
        Test of max_sp_recursion_depth variable.
      mysql-test/t/sp-dynamic.test:
        The test expanded for case of allowed/disalowed recursion.
      mysql-test/t/sp-error.test:
        Error messages changed.
        Test of bug11394() made with allowed recursion.
      mysql-test/t/sp.test:
        Tests for recursion.
      mysql-test/t/trigger.test:
        Check that triggers are not affected by this patch.
      mysql-test/t/variables.test:
        Test of max_sp_recursion_depth variable.
      sql/item_func.cc:
        sp_find_function() and sp_find_procedure() joined to sp_find_routine()
          function as it was mentioned in TODO.
      sql/mysqld.cc:
        max_sp_recursion_depth variable added.
      sql/set_var.cc:
        max_sp_recursion_depth variable added.
      sql/share/errmsg.txt:
        An error message changed.
        An error message added.
      sql/sp.cc:
        sp_find_function() and sp_find_procedure() joined to sp_find_routine()
          function as it was mentioned in TODO.
        Temory LEX is allocated on a stack, not on a heap.
        Recursion support added for stored procedures.
      sql/sp.h:
        sp_find_function() and sp_find_procedure() joined to sp_find_routine()
          function as it was mentioned in TODO.
      sql/sp_head.cc:
        Initialization of new sp_head fields to get correct list of instances
          contained one instance only.
        Stack requirement for SP instruction is increased.
        Stack free space is checked before mem root initialisation to avoid
          memory leak.
        Pointer to the free instance management added before and after
          SP execution.
      sql/sp_head.h:
        New sp_head variables added to support inst of instances of SP
          for recursion and pointer on ths first free to use instance.
      sql/sql_base.cc:
        open_table() consume a lot of stack space so we check free stack space before it.
      sql/sql_class.h:
        max_sp_recursion_depth variable added.
      sql/sql_parse.cc:
        sp_find_function() and sp_find_procedure() joined to sp_find_routine()
          function as it was mentioned in TODO.
      164ce4c5
    • unknown's avatar
      Fix for BUG#13549 "Server crash with nested stored procedures · 6574612d
      unknown authored
      if inner routine has more local variables than outer one, and
      one of its last variables was used as argument to NOT operator".
      
      THD::spcont was non-0 when we were parsing stored routine/trigger
      definition during execution of another stored routine. This confused
      methods of Item_splocal and forced them use wrong runtime context.
      Fix ensures that we always have THD::spcont equal to zero during
      routine/trigger body parsing. This also allows to avoid problems
      with errors which occur during parsing and SQL exception handlers.
      
      
      mysql-test/r/sp.result:
        Test suite for bug#13549.
      mysql-test/r/trigger.result:
        Test suite for bug#13549.
      mysql-test/t/sp.test:
        Test suite for bug#13549.
      mysql-test/t/trigger.test:
        Test suite for bug#13549.
      sql/item.cc:
        Protection against using wrong context by SP local variable.
      sql/item.h:
        Protection against using wrong context by SP local variable.
      sql/protocol.cc:
        An incorrect macro name fixed.
      sql/protocol.h:
        An incorrect macro name fixed.
      sql/sp.cc:
        Do not allow SP which we are parsing to use other SP
        context (BUG#13549).
      sql/sp_head.cc:
        Protection against using wrong context by SP local variable.
      sql/sp_rcontext.h:
        Protection against using wrong context by SP local variable.
      sql/sql_cache.h:
        An incorrect macro name fixed.
      sql/sql_class.cc:
        Protection against using wrong context by SP local variable.
      sql/sql_class.h:
        Protection against using wrong context by SP local variable.
      sql/sql_trigger.cc:
        Do not allow Trigger which we are parsing to use
        other SP context (BUG#13549).
      sql/sql_yacc.yy:
        Protection against using wrong context by SP local variable.
      6574612d
  22. 18 Nov, 2005 1 commit
  23. 15 Nov, 2005 1 commit
    • unknown's avatar
      Fixed BUG#14723: Dumping of stored functions seems to cause corruption · 738038e7
      unknown authored
                       in the function body
        Changed the way the end of query was found from the lex state.
        The routine body was not extracted correctly when using the
        /*!version ... */ wrapper (in dump files); for some types of routines
        (e.g. with a label at the first begin), the trailing "*/" was not skipped.
        This is a recommit for the 5.0.16-release tree.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#14723.
      mysql-test/t/sp.test:
        New test case for BUG#14723.
      sql/sp_head.cc:
        Changed the way the end of the definition and body is found from the lex state.
        In the case of /*!version */ wrappers we must take the trailing " */" into account.
      738038e7
  24. 11 Nov, 2005 1 commit
    • unknown's avatar
      Fixed BUG#14723: Dumping of stored functions seems to cause corruption · 425207c9
      unknown authored
                       in the function body
        Changed the way the end of query was found from the lex state.
        The routine body was not extracted correctly when using the
        /*!version ... */ wrapper (in dump files); for some types of routines
        (e.g. with a label at the first begin), the trailing "*/" was not skipped.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#14723.
      mysql-test/t/sp.test:
        New test case for BUG#14723.
      sql/sp_head.cc:
        Changed the way the end of the definition and body is found from the lex state.
        In the case of /*!version */ wrappers we must take the trailing " */" into account.
      425207c9
  25. 08 Nov, 2005 1 commit
    • unknown's avatar
      Fixed BUG#14643: Stored Procedure: Continuing after failed var. · 850cfe78
      unknown authored
                       initialization crashes server.
        Make sure variables are initialized to something (like null) when
        the default initialization fails and a continue handler is in effect.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#14643.
      mysql-test/t/sp.test:
        New test case for BUG#14643.
      sql/sp_head.cc:
        Make sure variables are initialized to something (like null) when
        the default initialization fails and a continue handler is in effect.
        If this also fails (out of memory), we have to abort without letting
        the handler catch.
      850cfe78
  26. 04 Nov, 2005 1 commit
    • unknown's avatar
      Fixed BUG#14498: Stored procedures: hang if undefined variable and exception · 898adb8c
      unknown authored
        The problem was to continue at the right place in the code after the
        test expression in a flow control statement fails with an exception
        (internally, the test in sp_instr_jump_if_not), and the exception is
        caught by a continue handler. Execution must then be resumed after the
        the entire flow control statement (END IF, END WHILE, etc).
      
      
      mysql-test/r/sp.result:
        New test case for BUG#14498.
      mysql-test/t/sp.test:
        New test case for BUG#14498.
        (Note that one call is disabled at the moment. Depends on BUG#14643.)
      sql/sp_head.cc:
        Added a continuation destination for sp_instr_jump_if_not, for the case when
        an error in the test expression causes a continue handler to catch.
        This includes new members in sp_instr_jump_if_not, adjustment of the optmizer
        (mark and move methods), and separate backpatching code (since we can't use
        the normal one for this).
        
        Also removed the class sp_instr_jump, since it's never used.
        
        ...and added some comments to the optimizer.
      sql/sp_head.h:
        Added a continuation destination for sp_instr_jump_if_not, for the case when
        an error in the test expression causes a continue handler to catch.
        This includes new members in sp_instr_jump_if_not, adjustment of the optmizer
        (mark and move methods), and separate backpatching code (since we can't use
        the normal one for this).
        
        Also removed the class sp_instr_jump, since it's never used.
      sql/sql_yacc.yy:
        Added backpatching of the continue destination for all conditional statements
        (using sp_instr_jump_if_not).
      898adb8c
  27. 03 Nov, 2005 1 commit
    • unknown's avatar
      A fix and a test case for Bug#14210 "Simple query with > operator on · 3fa0dd23
      unknown authored
      large table gives server crash": make sure that when a MyISAM temporary
      table is created for a cursor, it's created in its memory root,
      not the memory root of the current query.
      
      
      mysql-test/r/sp.result:
        Test results fixed: a test case for Bug#14210
      mysql-test/t/sp.test:
        A test case for Bug#14210 "Simple query with > operator on large table 
        gives server crash"
      sql/handler.cc:
        - rewrite get_new_handler to accept a memory root and use it for
      sql/handler.h:
        - get_new_handler declaration changed
      sql/opt_range.cc:
        - get_new_handler declaration changed
      sql/sql_base.cc:
        - get_new_handler declaration changed
      sql/sql_select.cc:
        - the actual fix for Bug#14210. In create_myisam_from_heap we should
        create the new table handler in TABLE::mem_root, not in THD::mem_root:
        the latter is freed shortly after cursor is open.
        - adjust create_tmp_table to explicitly supply &table->mem_root
        to get_new_handler when creating a handler for a new temporary table
      sql/sql_table.cc:
        - get_new_handler declaration changed
      sql/table.cc:
        - get_new_handler declaration changed
      sql/unireg.cc:
        - get_new_handler declaration changed
      tests/mysql_client_test.c:
        A test case for Bug#14210 "Simple query with > operator on large table
         gives server crash": a C API test case is worth adding because of different
        memory allocation/freeing patterns in handling of C API and SP cursors
      3fa0dd23
  28. 01 Nov, 2005 1 commit
    • unknown's avatar
      Fixed BUG#14376: MySQL crash on scoped variable (re)initialization · 2c4c542b
      unknown authored
        Added finer scope control for default clauses of local variable
        declarations.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#14376.
      mysql-test/t/sp.test:
        New test case for BUG#14376.
      sql/sp_pcontext.cc:
        Added boundary variable for local parameters/variables,
        for better scope control of default values.
      sql/sp_pcontext.h:
        Added boundary variable for local parameters/variables,
        for better scope control of default values.
      sql/sql_yacc.yy:
        Make the variables of the current DECLARE "invisible" to its DEFAULT clause.
      2c4c542b
  29. 27 Oct, 2005 1 commit
    • unknown's avatar
      support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) · 24ac4019
      unknown authored
      mysql-test/r/information_schema.result:
        error message changed
      mysql-test/r/sp.result:
        error message changed
      mysql-test/r/sql_mode.result:
        fixed test suite
      mysql-test/r/view.result:
        error message changed
      mysql-test/r/view_grant.result:
        test of underlying view tables check
      mysql-test/t/sql_mode.test:
        fixed test suite
      mysql-test/t/view_grant.test:
        test of underlying view tables check
      sql/item.cc:
        check of underlying tables privilege added
      sql/item.h:
        Name the resolution context points to the security  context of view (if item belong to the view)
      sql/item_func.cc:
        a view error hiding for execution of prepared function belonged to a view
        fixed checking privileges if stored functions belonds to some view
      sql/mysql_priv.h:
        refult of derived table processing functions changed to bool
        Security_context added as an argument to find_field_in_table()
      sql/share/errmsg.txt:
        error message fixed
      sql/sql_acl.cc:
        Storing requested privileges of tables added
        View underlying tables privilege check added
      sql/sql_base.cc:
        View underlying tables privilege check added
      sql/sql_cache.cc:
        Code cleunup: we should not register underlying tables of view second time
      sql/sql_delete.cc:
        ancestor -> merge_underlying_list renaming
      sql/sql_derived.cc:
        refult of derived table processing functions changed to bool
        do not give SELECT_ACL for TEMPTABLE views
      sql/sql_lex.h:
        The comment added
      sql/sql_parse.cc:
        registration of requested privileges added
      sql/sql_prepare.cc:
        registration of requested privileges added
      sql/sql_update.cc:
        manipulation of requested privileges for underlying tables made the same as for table which we are updating
      sql/sql_view.cc:
        underlying tables of view security check support added
      sql/table.cc:
        renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
      sql/table.h:
        storege for reuested privileges added
      24ac4019
  30. 24 Oct, 2005 1 commit
    • unknown's avatar
      Fix for BUG#13095: Cannot create VIEWs in prepared statements · 33d5d4ad
      unknown authored
        - allow CREATE VIEW as well as DROP VIEW to use in prepared statements;
        - fix CREATE VIEW implementation to make it work in prepared statements.
      
      
      mysql-test/r/sp.result:
        Results file for the test case for BUG#13095.
      mysql-test/t/sp.test:
        Test case for BUG#13095.
      sql/sql_lex.h:
        Added a variable to remember start of whole CREATE VIEW statement
        as well as start of its SELECT part.
      sql/sql_prepare.cc:
        Allow CREATE VIEW and DROP VIEW to use in prepared statements.
      sql/sql_view.cc:
        Use stored start of whole CREATE VIEW statement instead of thd->query,
        which differs from the original when prepared statement is executing.
      sql/sql_yacc.yy:
        Remember start of whole CREATE VIEW statement as well as start of its
        SELECT part.
      33d5d4ad
  31. 19 Oct, 2005 1 commit
    • unknown's avatar
      Fixed BUG#13941: replace() string fuction behaves badly inside stored · a7f4882a
      unknown authored
                       procedure
        For some functions returning strings (like "replace" and "ifnull" - where
        val_str() is returning a pointer into one of the parameters) - we ended
        up with a dangling pointer after the new operator destroyed the reuse item
        in the eval function.
        A working, if not very elegant, solution is to simply copy the string in
        such cases.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#13941.
      mysql-test/t/sp.test:
        New test case for BUG#13941.
      sql/sp_head.cc:
        Copy the string when evaluating some string functions (e.g. "replace" and "ifnull")
        to avoid using a dangling pointer.
      a7f4882a
  32. 17 Oct, 2005 1 commit
    • unknown's avatar
      Additional fix for BUG#7049, after review. · c8a2ff6f
      unknown authored
      Make sure "select" aborts when finding a SP condition handler beyond the current scope.
      
      
      mysql-test/r/sp.result:
        Updated test results after fixing error handling in select.
      sql/mysqld.cc:
        Make sure "select" aborts when finding a SP condition handler beyond the current scope.
      sql/protocol.cc:
        Make sure "select" aborts when finding a SP condition handler beyond the current scope.
      sql/sp_rcontext.h:
        Added method for checking if the handler was found in the current context.
      sql/sql_error.cc:
        Make sure "select" aborts when finding a SP condition handler beyond the current scope.
      c8a2ff6f
  33. 16 Oct, 2005 1 commit
    • unknown's avatar
      sp-security.result, sp.result, sp-security.test, sp.test: · ccb796a9
      unknown authored
        Test for bug#12812 moved from sp.test to sp-security.test
      
      
      mysql-test/t/sp.test:
        Test for bug#12812 moved from sp.test to sp-security.test
      mysql-test/t/sp-security.test:
        Test for bug#12812 moved from sp.test to sp-security.test
      mysql-test/r/sp.result:
        Test for bug#12812 moved from sp.test to sp-security.test
      mysql-test/r/sp-security.result:
        Test for bug#12812 moved from sp.test to sp-security.test
      ccb796a9
  34. 13 Oct, 2005 1 commit
    • unknown's avatar
      type_binary.result, type_binary.test: · 60e411eb
      unknown authored
        new file
      mysql_fix_privilege_tables.sql, mysql_create_system_tables.sh:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      Many files:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
        Adding true BINARY/VARBINARY: new pad_char structure member.
      ctype-bin.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
        New strnxfrm, with two trailing length bytes.
      field.cc:
        Adding true BINARY/VARBINARY.
      
      
      sql/field.cc:
        Adding true BINARY/VARBINARY.
      strings/ctype-big5.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-bin.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
        New strnxfrm, with two trailing length bytes.
      strings/ctype-cp932.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-czech.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-euc_kr.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-eucjpms.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-extra.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-gb2312.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-gbk.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-latin1.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-simple.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-sjis.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-tis620.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-uca.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-ucs2.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-ujis.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-utf8.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      strings/ctype-win1250ch.c:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      include/m_ctype.h:
        Adding true BINARY/VARBINARY: new pad_char structure member.
      mysql-test/t/alter_table.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/binary.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/cast.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ctype_cp1251.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ctype_many.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/federated.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/func_in.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ndb_condition_pushdown.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/ndb_types.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/sp.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/t/type_blob.test:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/alter_table.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/binary.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/cast.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ctype_cp1251.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ctype_many.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/federated.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/func_in.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ndb_condition_pushdown.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/ndb_types.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/sp.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/system_mysql_db.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      mysql-test/r/type_blob.result:
        Adding true BINARY/VARBINARY: fixing tests not to output 0x00 bytes.
      scripts/mysql_create_system_tables.sh:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      scripts/mysql_fix_privilege_tables.sql:
        Adding true BINARY/VARBINARY: fixing "password" type, not to be 0x00-padding.
      60e411eb
  35. 29 Sep, 2005 1 commit
  36. 27 Sep, 2005 1 commit
    • unknown's avatar
      Fixed BUG#12589: Assert when creating temp. table from decimal stored · 06eabeee
      unknown authored
                       procedure variable
        Second version, after review.
        Keep the unsigned_flag in Item_decimal updated. Note that this also changed
        the result of several old test results - creating tables from decimal
        templates now gives unsigned columns and different sizes. (Several tests
        had Length > Max_length before.)
      
      
      mysql-test/r/case.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/metadata.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_2myisam.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_3innodb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_4heap.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_5merge.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_6bdb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/ps_7ndb.result:
        Updated result (after fixing BUG#12589).
      mysql-test/r/sp.result:
        New test case for BUG#12589.
      mysql-test/r/type_newdecimal.result:
        Updated result (after fixing BUG#12589).
      mysql-test/t/sp.test:
        New test case for BUG#12589.
      sql/item.cc:
        Keep the unsigned_flag updated in Item_splocal and Item_decimal.
      06eabeee
  37. 26 Sep, 2005 1 commit
    • unknown's avatar
      Fixed BUG#7049: Stored procedure CALL errors are ignored · a5925a90
      unknown authored
        Search the chain of sp_rcontexts recursively for handlers. If one is found,
        it will be detected in the sp_head::execute() method at the corresponding
        level.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#7049.
        Note that the spurious warnings in the BUG#12379 test now are gone (as expected).
      mysql-test/t/sp.test:
        New test case for BUG#7049.
      sql/sp_head.cc:
        Link sp_rcontexts to allow catching errors across invokation boundaries.
        (Also fixed print method for the hreturn instruction.)
      sql/sp_rcontext.cc:
        Link sp_rcontexts to allow catching errors across invokation boundaries.
        If a handler is not found in the current sp_rcontext, recurse into the previous ones (if any).
      sql/sp_rcontext.h:
        Link sp_rcontexts to allow catching errors across invokation boundaries.
      a5925a90