• 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
errmsg.txt 16.5 KB