An error occurred fetching the project authors.
  1. 18 Nov, 2005 1 commit
    • unknown's avatar
      Post-review fixes, mainly fixing all print() methods for sp_instr* classes. · 6726a6b8
      unknown authored
      Also added mysql-test files:
       include/is_debug_build.inc
       r/is_debug_build.require
       r/sp-code.result
       t/sp-code.test
      
      
      sql/sp_head.cc:
        Review fixes:
        - Some minor editorial changes
        - Fixed all print() methods for instructions:
          - reserve() enough space
          - check return value from reserve()
          - use qs_append, with length arg, whenever possible
      sql/sp_pcontext.cc:
        Review fixes.
        Also fixed bug in find_cursor().
      sql/sp_pcontext.h:
        Changed parameter names (review fix).
      sql/sql_parse.cc:
        Moved comment. (Review fix)
      mysql-test/include/is_debug_build.inc:
        New BitKeeper file ``mysql-test/include/is_debug_build.inc''
      mysql-test/r/is_debug_build.require:
        New BitKeeper file ``mysql-test/r/is_debug_build.require''
      mysql-test/r/sp-code.result:
        New BitKeeper file ``mysql-test/r/sp-code.result''
      mysql-test/t/sp-code.test:
        New BitKeeper file ``mysql-test/t/sp-code.test''
      6726a6b8
  2. 17 Nov, 2005 1 commit
    • unknown's avatar
      Background: · 91ab7076
      unknown authored
      Since long, the compiled code of stored routines has been printed in the trace file
      when starting mysqld with the "--debug" flag. (At creation time only, and only in
      debug builds of course.) This has been helpful when debugging stored procedure
      execution, but it's a bit awkward to use. Also, the printing of some of the
      instructions is a bit terse, in particular for sp_instr_stmt where only the command
      code was printed.
      
      This improves the printout of several of the instructions, and adds the debugging-
      only commands "show procedure code <name>" and "show function code <name>".
      (In non-debug builds they are not available.)
      
      
      sql/lex.h:
        New symbol for debug-only command (e.g. show procedure code).
      sql/sp_head.cc:
        Fixed some minor debug-mode bugs in show_create_*().
        New method for debugging: sp_head::show_routine_code() - returns the "assembly code"
        for a stored routine as a result set.
        Improved the print() methods for many sp_instr* classes, particularly for
        sp_instr_stmt where the query string is printed as well (up to a max length, just
        to give a hint of which statement it is). Also print the names of variables and
        cursors in some instruction.
      sql/sp_head.h:
        New debugging-only method in sp_head: show_routine_code().
        Added offset member to sp_instr_cpush for improved debug printing.
      sql/sp_pcontext.cc:
        Moved find_pvar(uint i) method from sp_pcontext.h, and made it work for all
        frames, not just the first one. (For debugging purposes)
        Added a similar find_cursor(uint i, ...) method, for debugging.
      sql/sp_pcontext.h:
        Moved find_pvar(uint i) method to sp_pcontext.cc.
        Added a similar find_cursor(uint i, ...) method, for debugging.
      sql/sql_lex.h:
        Added new sql_command codes for debugging.
      sql/sql_parse.cc:
        Added new commands for debugging, e.g. "show procedure code".
      sql/sql_yacc.yy:
        Added new commands for debugging purposes:
        "show procedure code ..." and "show function code ...".
        These are only enabled in debug builds, otherwise they result in a syntax error.
        (I.e. they don't exist)
      91ab7076
  3. 13 Sep, 2005 1 commit
    • unknown's avatar
      Fixed BUG#13133: Local variables in stored procedures are not initialized correctly. · 902932a1
      unknown authored
        Have to init. all local variables in their frames, not just once at the beginning
        of invocation.
      
      
      mysql-test/r/sp.result:
        New test case for BUG#13133.
      mysql-test/t/sp.test:
        New test case for BUG#13133.
      sql/sp_head.cc:
        Just init. local variable slots in the fram to NULL. (Real init. will be done
        in each block.)
      sql/sp_pcontext.cc:
        Removed isset flag, since it's not used.
      sql/sp_pcontext.h:
        Removed isset flag, since it's not used.
      sql/sql_yacc.yy:
        Initialize local variables in the block to null, or the default value, given.
        (Untabifed block too.)
      902932a1
  4. 05 Jun, 2005 1 commit
    • unknown's avatar
      sp_rcontext.cc, sp_pcontext.cc, sp_head.cc, sp_cache.cc, ha_federated.cc: · 9a3bb0c7
      unknown authored
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      
      
      sql/ha_federated.cc:
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      sql/sp_cache.cc:
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      sql/sp_head.cc:
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      sql/sp_pcontext.cc:
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      sql/sp_rcontext.cc:
        Include "mysql_priv.h" before testing USE_PRAGMA_IMPLEMENTATION
      9a3bb0c7
  5. 27 May, 2005 1 commit
    • unknown's avatar
      Add USE_PRAGMA_INTERFACE and USE_PRAGMA_IMPLEMENTATION to files not existsing in 4.1 · 73b4415c
      unknown authored
      sql/hash_filo.h:
        USE_PRAGMA_INTERFACE
      sql/sp_cache.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_cache.h:
        USE_PRAGMA_INTERFACE
      sql/sp_head.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_head.h:
        USE_PRAGMA_INTERFACE
      sql/sp_pcontext.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_pcontext.h:
        USE_PRAGMA_INTERFACE
      sql/sp_rcontext.cc:
        USE_PRAGMA_IMPLEMENTATION
      sql/sp_rcontext.h:
        USE_PRAGMA_INTERFACE
      73b4415c
  6. 08 Apr, 2005 1 commit
    • unknown's avatar
      Fixed BUG#9073: Able to declare two handlers for same condition in same scope · fc5db935
      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.
      fc5db935
  7. 28 Feb, 2005 1 commit
    • unknown's avatar
      Fixed BUG#8760: Stored Procedures: Invalid SQLSTATE is allowed in · 110f6abd
      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.
      110f6abd
  8. 25 Feb, 2005 2 commits
    • unknown's avatar
      Fixed BUG#8757: Stored Procedures: Scope of Begin and End Statements do not work properly. · 3d8aed6d
      unknown authored
      mysql-test/r/sp.result:
        New test case for BUG#8757.
      mysql-test/t/sp.test:
        New test case for BUG#8757.
      sql/sp_pcontext.cc:
        Return the correct scope offset to cursors during parsing.
      3d8aed6d
    • unknown's avatar
      Remove compiler warnings and remove not used variables · 248e4494
      unknown authored
      (Found during build process)
      
      
      extra/comp_err.c:
        Remove compiler warnings
      extra/perror.c:
        Remove compiler warnings
      innobase/dict/dict0dict.c:
        Remove compiler warnings
      innobase/dict/dict0load.c:
        Remove compiler warnings
      innobase/pars/pars0sym.c:
        Remove compiler warnings
      innobase/row/row0row.c:
        Remove compiler warnings
      innobase/row/row0sel.c:
        Remove compiler warnings
      libmysqld/lib_sql.cc:
        Remove not used variables
      myisam/mi_key.c:
        Remove compiler warnings
      regex/engine.c:
        Added comment
      sql/derror.cc:
        Remove not used variables
      sql/examples/ha_archive.cc:
        Fixed bug in blob handling
        Removed not used variable
      sql/field.cc:
        Remove compiler warnings
        Remove not used variables
      sql/filesort.cc:
        Remove compiler warnings
      sql/ha_heap.cc:
        Remove not used variable
      sql/ha_innodb.cc:
        Remove not used variables
        Remove compiler warnings
      sql/handler.cc:
        Remove compiler warnings and remove not used variables
      sql/item.cc:
        Remove compiler warnings and remove not used variables
      sql/item_subselect.cc:
        Remove compiler warnings
      sql/item_sum.cc:
        Remove compiler warnings
      sql/item_sum.h:
        Remove compiler warnings and remove not used variables
      sql/log.cc:
        Remove compiler warnings and remove not used variables
      sql/log_event.cc:
        Remove compiler warnings
      sql/mysqld.cc:
        Remove compiler warnings and remove not used variables
      sql/opt_range.cc:
        Remove compiler warnings and remove not used variables
      sql/slave.cc:
        Remove compiler warnings and remove not used variables
      sql/sp_pcontext.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_acl.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_analyse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_base.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_db.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_help.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_insert.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_load.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_parse.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_prepare.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_select.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_show.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_table.cc:
        Remove compiler warnings
      sql/sql_union.cc:
        Remove compiler warnings
      sql/sql_update.cc:
        Remove compiler warnings and remove not used variables
      sql/sql_yacc.yy:
        Remove compiler warnings and remove not used variables
      sql/strfunc.cc:
        Remove compiler warnings and remove not used variables
      strings/ctype-ucs2.c:
        Remove compiler warnings
      tests/mysql_client_test.c:
        Remove compiler warnings and remove not used variables
      tools/mysqlmanager.c:
        Remove compiler warnings and remove not used variables
      248e4494
  9. 02 Sep, 2004 1 commit
    • unknown's avatar
      Fixed BUG#5287: Stored procedure crash if leave outside loop. · 339859d2
      unknown authored
      Bug in diff_handlers and diff_cursors made it attempt to pop
      the wrong number at jumps sometimes.
      
      
      mysql-test/r/sp.result:
        New testcase for BUG#5287.
      mysql-test/t/sp.test:
        New testcase for BUG#5287.
      sql/sp_pcontext.cc:
        Fixed diff_handlers and diff_cursors methods, they miscounted.
      sql/sp_pcontext.h:
        Made m_handlers available for diff_handlers.
      339859d2
  10. 26 Aug, 2004 1 commit
    • unknown's avatar
      Major rehacking and cleanup of sp_pcontext. · 071651ef
      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.
      071651ef
  11. 17 Aug, 2004 1 commit
    • unknown's avatar
      WL#2002: Implement stored procedure GOTO. · 9b5a6f72
      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.
      9b5a6f72
  12. 06 Apr, 2004 1 commit
    • unknown's avatar
      Fixed BUG#2776: Stored procedure crash if variable assigned to default. · c22ccc13
      unknown authored
      Keep track on the default value and use it. (Or NULL, if not declared.)
      
      
      mysql-test/r/sp.result:
        New testcases for BUG#2776.
      mysql-test/t/sp.test:
        New testcases for BUG#2776.
      sql/sp_pcontext.cc:
        Initialize local variable default value.
      sql/sp_pcontext.h:
        New method for saving default value.
      sql/sql_yacc.yy:
        If DEFAULT is use as a value in SET variable = ... in an SP, actually use the default.
      c22ccc13
  13. 13 Nov, 2003 1 commit
    • unknown's avatar
      Various bug fixes: · c9232c60
      unknown authored
        - Duplicate parameters/variables, conditions and cursors (not allowed).
        - ITERATE in labelled BEGIN-END (not allowed).
        - Missing SQLSTATE [VALUE] keywords in CONDITION/HANDLER declaration (added).
        - Empty BEGIN-END (now allowed).
        - End label (now optional).
      
      
      include/mysqld_error.h:
        New error code for duplicate things (vars et al) in SPs.
      mysql-test/r/sp-error.result:
        New error tests for ITERATE in begin-end block and duplicate variables,
        conditions and cursors.
      mysql-test/r/sp.result:
        New tests for empty begin-end blocks, overriding local variables outside scope
        only, leave a begin-end block, and SQLSTATE [VALUE] words for CONDITION/HANDLER
        declarations.
      mysql-test/t/sp-error.test:
        New error tests for ITERATE in begin-end block and duplicate variables,
        conditions and cursors.
      mysql-test/t/sp.test:
        New tests for empty begin-end blocks, overriding local variables outside scope
        only, leave a begin-end block, and SQLSTATE [VALUE] words for CONDITION/HANDLER
        declarations.
      sql/lex.h:
        New SQLSTATE keyword.
      sql/share/czech/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/danish/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/dutch/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/english/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/estonian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/french/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/german/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/greek/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/hungarian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/italian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/japanese/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/korean/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/norwegian-ny/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/norwegian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/polish/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/portuguese/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/romanian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/russian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/serbian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/slovak/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/spanish/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/swedish/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/share/ukrainian/errmsg.txt:
        New error message for duplicate things (vars et al) in SPs.
      sql/sp_pcontext.cc:
        Keep track on scope limits for error checking of duplicate variables,
        conditions and cursors.
      sql/sp_pcontext.h:
        Keep track on scope limits for error checking of duplicate variables,
        conditions and cursors.
        Also need to flag BEGIN labels to check for illegal ITERATEs.
      sql/sql_yacc.yy:
        End-labels in SPs loop and begin-end blocks are now optional.
        SQLSTATE [VALUE] added to syntax for sqlstates.
        Check for duplicate variable, condition and cursor declarations, but
        only in the same scope.
        Empty BEGIN-END statements now allowed.
        Check if ITERATE is referring to a BEGIN label.
      c9232c60
  14. 10 Oct, 2003 1 commit
    • unknown's avatar
      WL#962: Added simple, read-only, non-scrolling, asensitive cursors in SPs, using the · 04c6b9b8
      unknown authored
      (updated) Protocol_cursor class.
      Also did some bug fixes.
      
      
      Docs/sp-imp-spec.txt:
        Added CURSOR docs (and fixed typos)
      Docs/sp-implemented.txt:
        Updated for CURSORs
      include/mysqld_error.h:
        New error codes/messages for CURSORs
      libmysqld/Makefile.am:
        SP cursors now needs this.
      mysql-test/r/sp-error.result:
        New tests for cursors.
      mysql-test/r/sp.result:
        New tests for cursors.
      mysql-test/t/sp-error.test:
        New tests for cursors.
      mysql-test/t/sp.test:
        New tests for cursors.
      sql/protocol.cc:
        We now always have Protocol_cursor (SPs use it)
      sql/protocol.h:
        Fixed bugs in Protocol_cursor (for SPs)
      sql/protocol_cursor.cc:
        Fixed bugs in Protocol_cursor (for SPs)
      sql/share/czech/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/danish/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/dutch/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/english/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/estonian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/french/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/german/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/greek/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/hungarian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/italian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/japanese/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/korean/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/norwegian-ny/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/norwegian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/polish/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/portuguese/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/romanian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/russian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/serbian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/slovak/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/spanish/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/swedish/errmsg.txt:
        New error codes/messages for CURSORs
      sql/share/ukrainian/errmsg.txt:
        New error codes/messages for CURSORs
      sql/sp_head.cc:
        Added cursor support.
        Also fixed problems with item_lists, where pointers and ref_pointer_arrays.
      sql/sp_head.h:
        Added cursor support
      sql/sp_pcontext.cc:
        Added cursor support
      sql/sp_pcontext.h:
        Added cursor support
      sql/sp_rcontext.cc:
        Added cursor support, in particular the new sp_cursor class.
      sql/sp_rcontext.h:
        Added cursor support, in particular the new sp_cursor class.
      sql/sql_lex.h:
        We sometimes need to copy item_lists in LEX when executing substatements in SPs
      sql/sql_yacc.yy:
        Added minimal cursor support (not the full syntax yet).
      04c6b9b8
  15. 16 Sep, 2003 1 commit
    • unknown's avatar
      Implemented SP CONDITIONs and HANDLERs, with the extension of handling · 4deedf62
      unknown authored
      MySQL error codes as well.
      (No UNDO HANDLERs yet, and no SIGNAL or RESIGNAL.)
      WL#850
      
      
      Docs/sp-imp-spec.txt:
        Spec of CONDITIONs and HANDLERs (and updated some old stuff too).
      Docs/sp-implemented.txt:
        Updated info about caching, CONDITIONs and HANDLERs.
      include/mysqld_error.h:
        New error for undeclared CONDITION.
      libmysqld/Makefile.am:
        New file: sp_rcontext.cc.
      mysql-test/r/sp-error.result:
        New tests for CONDITIONs and HANDLERs.
      mysql-test/r/sp.result:
        New tests for CONDITIONs and HANDLERs.
      mysql-test/t/sp-error.test:
        New tests for CONDITIONs and HANDLERs.
      mysql-test/t/sp.test:
        New tests for CONDITIONs and HANDLERs.
      sql/Makefile.am:
        New file: sp_rcontext.cc.
      sql/lex.h:
        New symbols for CONDITIONs, HANDLERs and CURSORs.
      sql/mysqld.cc:
        Catch error if we have a handler for it.
      sql/protocol.cc:
        Catch error if we have a handler for it.
      sql/share/czech/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/danish/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/dutch/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/english/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/estonian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/french/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/german/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/greek/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/hungarian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/italian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/japanese/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/korean/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/norwegian-ny/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/norwegian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/polish/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/portuguese/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/romanian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/russian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/serbian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/slovak/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/spanish/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/swedish/errmsg.txt:
        New error for undeclared CONDITION.
      sql/share/ukrainian/errmsg.txt:
        New error for undeclared CONDITION.
      sql/sp_head.cc:
        New HANDLER code.
      sql/sp_head.h:
        New HANDLER code.
      sql/sp_pcontext.cc:
        New CONDITION and HANDLER code.
      sql/sp_pcontext.h:
        New CONDITION and HANDLER code.
      sql/sp_rcontext.h:
        New CONDITION and HANDLER code.
      sql/sql_yacc.yy:
        New CONDITION and HANDLER code.
      4deedf62
  16. 04 Apr, 2003 1 commit
    • unknown's avatar
      Post merge fixes. · cfd69393
      unknown authored
      mysql-test/r/sp.result:
        Enabled the cs test as it works now.
      mysql-test/t/sp.test:
        Enabled the cs test as it works now.
      cfd69393
  17. 02 Apr, 2003 1 commit
  18. 27 Mar, 2003 1 commit
  19. 26 Mar, 2003 1 commit
    • unknown's avatar
      Added IF EXISTS to DROP PROCEDURE|FUNCTION. · 3946b823
      unknown authored
      Changed another unecessary use of Item_string into LEX_STRING (in sp_pcontext).
      
      
      Docs/sp-implemented.txt:
        Added IF EXISTS to DROP PROCEDURE|FUNCTION
      mysql-test/r/sp-error.result:
        Added IF EXISTS to DROP PROCEDURE|FUNCTION
      mysql-test/t/sp-error.test:
        Added IF EXISTS to DROP PROCEDURE|FUNCTION
      sql/sp_pcontext.cc:
        Changed another unecessary use of Item_string into LEX_STRING.
      sql/sp_pcontext.h:
        Changed another unecessary use of Item_string into LEX_STRING.
      sql/sql_parse.cc:
        Added IF EXISTS to DROP PROCEDURE|FUNCTION
      sql/sql_yacc.yy:
        Added IF EXISTS to DROP PROCEDURE|FUNCTION
      3946b823
  20. 20 Mar, 2003 1 commit
  21. 19 Mar, 2003 1 commit
    • unknown's avatar
      Post-merge fixes. · addf8ea0
      unknown authored
      mysql-test/r/sp.result:
        Post-merge fixes.
        (And disabled the ip test, since some change in 4.1 broke it.)
      mysql-test/t/sp.test:
        Post-merge fixes.
        (And disabled the ip test, since some change in 4.1 broke it.)
      addf8ea0
  22. 17 Dec, 2002 1 commit
    • unknown's avatar
      Added parsing of CASE (both generic and "simple"). · b12330b3
      unknown authored
      sql/sp_head.cc:
        Init. the simple_case flag.
      sql/sp_head.h:
        New flag for (simple)case parsing.
      sql/sp_pcontext.cc:
        Removed push_gen_label method (not needed any more).
      sql/sp_pcontext.h:
        Removed push_gen_label method (not needed any more).
        Fixed bug in pop().
      sql/sql_yacc.yy:
        Added CASE parsing.
      b12330b3
  23. 16 Dec, 2002 1 commit
    • unknown's avatar
      Fixed the broken backpatching implementation. · f6611aa0
      unknown authored
      Implemented IF-THEN-ELSE.
      
      
      sql/sp_head.cc:
        Reimplemented the broken backpatching, so it works for nested constructions and
        IF-THEN-ELSE too.
      sql/sp_head.h:
        Reimplemented the broken backpatching, so it works for nested constructions and
        IF-THEN-ELSE too.
      sql/sp_pcontext.cc:
        Return the value from push-methods, for convenience.
      sql/sp_pcontext.h:
        Return the value from push-methods, for convenience.
      sql/sql_yacc.yy:
        Implemented IF-THEN-ELSE.
        Corrected for the new backpatch method.
      f6611aa0
  24. 11 Dec, 2002 1 commit
    • unknown's avatar
      Fixed bugs in the parameter evaluation and modified the execution engine · 37ce17e2
      unknown authored
      for better jump support. Some flow control support added too (but not
      complete).
      
      
      sql/lex.h:
        Added more keywords for embedded SQL.
      sql/sp_head.cc:
        Fixed bugs in the parameter evaluation.
        Modified execute() for better jump support.
        Added jump instruction and backpatch support.
      sql/sp_head.h:
        Fixed bugs in the parameter evaluation.
        Modified execute() for better jump support.
        Added jump instruction and backpatch support.
      sql/sp_pcontext.cc:
        Added label support.
      sql/sp_pcontext.h:
        Added label support.
      sql/sql_yacc.yy:
        Outlined flow control constructs (parses, but nothing generated yet).
      37ce17e2
  25. 08 Dec, 2002 1 commit
    • unknown's avatar
      Simplistic, experimental framework for Stored Procedures (SPs). · 27de9ece
      unknown authored
      Implements creation and dropping of PROCEDUREs, IN, OUT, and INOUT parameters,
      single-statement procedures, rudimentary multi-statement (begin-end) prodedures
      (when the client can handle it), and local variables.
      Missing most of the embedded SQL language, all attributes, FUNCTIONs, error handling,
      reparses procedures at each call (no caching), etc, etc.
      Certainly buggy too, but procedures can actually be created and called....
      
      
      sql/Makefile.am:
        Added SP files.
      sql/item.cc:
        Added this*_item() methods for Item_splocal. (SP local variable)
      sql/item.h:
        Added this*_item() methods for SPs in Item, and the new Item_splocal
        class (SP local variable).
      sql/lex.h:
        Added new symbols for SPs. (Note: SPSET is temporary and will go away later.)
      sql/sql_class.cc:
        Initialize SP runtime context in THD.
      sql/sql_class.h:
        Add SP runtime context to THD.
      sql/sql_lex.cc:
        Init. buf pointer to beginning of command (needed by SPs).
        Also initialize SP head and parse time context.
      sql/sql_lex.h:
        New SQLCOM_ tags for SPs, and added pointer to beginning of command pointer and
        SP head and parse-time context to LEX.
      sql/sql_parse.cc:
        Added SQLCOM_CREATE_PROCEDURE, _CALL, _ALTER_PROCEDURE and _DROP_PROCEDURE cases.
        (Still rudimentary and lacking proper error handling...)
      sql/sql_yacc.yy:
        Lots and lots of additions for SPs...
        (Still even more missing, and no error messages...)
      27de9ece