summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-05 09:51:17 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-05 09:51:17 +0200
commit9a3b975da677e77d63f72f0e6bf0450161b4672d (patch)
tree2cdec174526a799e6e294365befc82533500f64b /storage
parentae0c576d461d751703bf86315740226aaa54c62a (diff)
parenta2bb9d263993783923ba8fc83d5b9ddd36dbe09d (diff)
downloadmariadb-git-9a3b975da677e77d63f72f0e6bf0450161b4672d.tar.gz
Merge branch '5.5' into bb-5.5-serg
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc6
-rw-r--r--storage/xtradb/handler/ha_innodb.cc6
2 files changed, 10 insertions, 2 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 211caa05ad8..7c17f20ce40 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -93,7 +93,6 @@ extern "C" {
#include "ibuf0ibuf.h"
enum_tx_isolation thd_get_trx_isolation(const THD* thd);
-
}
#include "ha_innodb.h"
@@ -6299,6 +6298,11 @@ ha_innobase::general_fetch(
DBUG_ENTER("general_fetch");
+ /* If transaction is not startted do not continue, instead return a error code. */
+ if(!(prebuilt->sql_stat_start || (prebuilt->trx && prebuilt->trx->conc_state == 1))) {
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+ }
+
ut_a(prebuilt->trx == thd_to_trx(user_thd));
innodb_srv_conc_enter_innodb(prebuilt->trx);
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index ac883e9ee6b..5034e7e70e1 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -102,7 +102,6 @@ extern "C" {
#include "ibuf0ibuf.h"
enum_tx_isolation thd_get_trx_isolation(const THD* thd);
-
}
#include "ha_innodb.h"
@@ -7327,6 +7326,11 @@ ha_innobase::general_fetch(
DBUG_ENTER("general_fetch");
+ /* If transaction is not startted do not continue, instead return a error code. */
+ if(!(prebuilt->sql_stat_start || (prebuilt->trx && prebuilt->trx->state == 1))) {
+ DBUG_RETURN(HA_ERR_END_OF_FILE);
+ }
+
if (UNIV_UNLIKELY(share->ib_table->is_corrupt &&
srv_pass_corrupt_table <= 1)) {
DBUG_RETURN(HA_ERR_CRASHED);