diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-01-19 19:36:14 +0300 |
commit | eacc937d48babce40829b729bb9dfe2711a43d17 (patch) | |
tree | 688c26274e23ab44604f2f276f6a5c78e49241bf /sql/sp_head.cc | |
parent | dedfdb490ba528ddf3f9155a4fb6f0b3728df149 (diff) | |
parent | 8a433bc4dcee5c6c6a59eadd0b6d4c8275e18234 (diff) | |
download | mariadb-git-eacc937d48babce40829b729bb9dfe2711a43d17.tar.gz |
Manual merge from mysql-trunk-merge.
Conflicts:
- configure.in
- include/m_string.h
- mysql-test/extra/rpl_tests/rpl_row_func003.test
- mysql-test/r/mysqlbinlog.result
- mysql-test/r/union.result
- mysql-test/suite/binlog/r/binlog_killed_simulate.result
- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
- mysql-test/suite/binlog/r/binlog_unsafe.result
- mysql-test/suite/binlog/t/binlog_unsafe.test
- mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
- mysql-test/suite/rpl/r/rpl_loaddata_map.result
- mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
- mysql-test/suite/rpl/r/rpl_stm_log.result
- mysql-test/suite/rpl/t/rpl_optimize.test
- mysql-test/t/mysqlbinlog.test
- mysql-test/t/union.test
- sql/rpl_utility.h
- sql/sql_union.cc
- strings/Makefile.am
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 9996a237cb4..8d06003e2e4 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2799,8 +2799,15 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, m_lex->mark_as_requiring_prelocking(NULL); } thd->rollback_item_tree_changes(); - /* Update the state of the active arena. */ - thd->stmt_arena->state= Query_arena::EXECUTED; + /* + Update the state of the active arena if no errors on + open_tables stage. + */ + if (!res || !thd->is_error() || + (thd->stmt_da->sql_errno() != ER_CANT_REOPEN_TABLE && + thd->stmt_da->sql_errno() != ER_NO_SUCH_TABLE && + thd->stmt_da->sql_errno() != ER_UPDATE_TABLE_USED)) + thd->stmt_arena->state= Query_arena::EXECUTED; /* Merge here with the saved parent's values |