Commit graph

8 commits

Author SHA1 Message Date
unknown
7fc2604cd7 Fixed BUG#15866: Thread stack limit insufficient for recursive call "fib(20)"
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.)
2006-01-19 17:55:54 +01:00
unknown
b118282377 Fixed BUG#13729 Stored procedures: packet error after exception handled
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.
2005-11-23 11:56:53 +01:00
unknown
11d4d7e6ff Fix for bug #13825 "Triggers: crash if release savepoint" and for general
handling of savepoints in stored routines.

Fixed ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint()
functions to properly handle savepoints inside of stored functions and
triggers.
Also now when we invoke stored function or trigger we create new savepoint
level. We destroy it at the end of function/trigger execution and return back
to old savepoint level.


mysql-test/r/sp_trans.result:
  Added test for bug #13825 "Triggers: crash if release savepoint" and for
  general handling of savepoints in stored routines.
mysql-test/t/sp_trans.test:
  Added test for bug #13825 "Triggers: crash if release savepoint" and for
  general handling of savepoints in stored routines.
sql/ha_innodb.cc:
  innobase_savepoint():
    Replaced check which always failed due to similar check in caller
    with assertion.
sql/handler.cc:
  ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint():
    Changed functions to properly support handling of savepoints
    inside of stored functions and triggers.
sql/sql_class.cc:
  THD::reset_sub_statement_state()/restore_sub_statement_state():
    When we invoke stored function or trigger we should create new savepoint
    level. We should destroy it at the end of function/trigger execution and
    return back to old savepoint level. To support this behavior we should
    save and reset list of current savepoints on entering function and restore
    old list when we leave it.
sql/sql_class.h:
  Sub_statement_state:
    When we invoke stored function or trigger we should create new savepoint
    level. We should destroy it at the end of function/trigger execution and
    return back to old savepoint level. To support this behavior added "savepoint"
    member which is used to save/restore list of current savepoints on
    entering/leaving function.
sql/sql_parse.cc:
  mysql_execute_command():
    Changed processing of SQLCOM_SAVEPOINT so now it is not ignored when
    we are in autocommit mode and savepoint is set inside of stored
    function or trigger.
2005-11-19 15:09:23 +03:00
unknown
ed5b5420dc Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0
mysql-test/r/sp_trans.result:
  Auto merged
mysql-test/t/sp_trans.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-07 16:48:38 +02:00
unknown
887172a466 BUG#6883: Merge fixes
mysql-test/r/innodb.result:
  Minor fixes
mysql-test/r/rpl_ddl.result:
  Merge fixes
mysql-test/r/sp_trans.result:
  TRUNCATE now makes implicit commit
mysql-test/t/sp_trans.test:
  No error since we have inplicit commit
2005-06-07 16:43:43 +02:00
unknown
49357ae8f0 Fix for bug #10015 "Crash in InnoDB if stored routines are used".
We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.


mysql-test/r/sp_trans.result:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
mysql-test/t/sp_trans.test:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
sql/handler.cc:
  ha_trans_commit()/ha_trans_rollback():
    Since we don't support nested statement transactions in 5.0,
    we can't commit or rollback stmt transactions while we are inside
    stored functions or triggers. So we simply do nothing now.
    This should be fixed in later ( >= 5.1) releases.
sql/item_func.cc:
  Item_func_sp::execute():
    Set THD::transaction.in_sub_stmt flag to TRUE during stored function
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which calls this function.
sql/share/errmsg.txt:
  Added error message which says that statements doing explicit or implicit
  commits are disallowed in triggers and stored functions.
sql/sql_base.cc:
  close_thread_tables():
    Clarified comment about committing of statement transactions in
    prelocked mode.
sql/sql_class.h:
  THD::transaction:
    Added in_sub_stmt method which indicates that we are executing
    statements from trigger or stored function now, and thus
    statement transaction belongs to statement which invoked this
    routine and we should not commit or rollback it while executing
    these sub-statements.
sql/sql_parse.cc:
  end_active_trans()/begin_trans()/end_trans():
    We should not commit or rollback global (non-stmt) transaction
    if we are executing stored function or trigger. These checks will
    catch situation when we are trying to do commit or rollback in stored
    procedure which is called from function or trigger.
sql/sql_trigger.h:
  Table_triggers_list::process_triggers():
    Set THD::transaction.in_sub_stmt flag to TRUE during trigger
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which invokes this trigger.
sql/sql_yacc.yy:
  Prohibited usage of statements which do explicit or implicit commit or
  rollback inside of stored functions and triggers.
2005-06-07 14:53:08 +04:00
unknown
7e79e70515 Did some SP test style changes and added explanatory comments,
and removed a have_innodb.inc inclusion which was left by mistake
in an earlier change.


mysql-test/r/sp_trans.result:
  Changed procedure name and delimiter setting to follow the style of the other SP test files.
mysql-test/t/sp-error.test:
  Added comment with hint for bug test case style.
mysql-test/t/sp-threads.test:
  Added comments, with hint for bug test case style.
mysql-test/t/sp.test:
  Removed have_innodb.inc inclusion.
  Added comments about different SP test files, table usage and
  hint for bug test case style.
mysql-test/t/sp_trans.test:
  Changed procedure name and delimiter setting to follow the style of the other SP test files.
2005-03-18 14:33:46 +01:00
unknown
cc9e66f565 sp.test, sp.result:
transactional test removed
sp_trans.test, sp_trans.result:
  new file


mysql-test/r/sp.result:
  transactional test removed
mysql-test/t/sp.test:
  transactional test removed
2005-03-17 22:15:23 +01:00