summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorKrunal Bauskar krunal.bauskar@oracle.com <>2012-10-15 09:24:33 +0530
committerKrunal Bauskar krunal.bauskar@oracle.com <>2012-10-15 09:24:33 +0530
commitc8cebffdbdd0ba2dadff59d05d8f462a95eb46ce (patch)
treeea32153f7c39382e3572783adcd466a770574d62 /storage
parentc8f6ab29168e4f9a79b1141e36348a21e7e9bc08 (diff)
downloadmariadb-git-c8cebffdbdd0ba2dadff59d05d8f462a95eb46ce.tar.gz
bug#14704286
SECONDARY INDEX UPDATES MAKE CONSISTENT READS DO O(N^2) UNDO PAGE LOOKUPS (honoring kill query while accessing sec_index) If secondary index is being used for select query evaluation and this query is operating with consistent read snapshot it might take good time for secondary index to return back control to mysql as MVCC would kick in. If user issues "kill query <id>" while query is actively accessing secondary index it will not be honored as there is no hook to check for this condition. Added hook for this check. ----- Parallely secondary index taking too long to evaluate for consistent read snapshot case is being examined for performance improvement. WL#6540.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/row/row0sel.c6
-rw-r--r--storage/innodb_plugin/row/row0sel.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
index 915cc8339d4..c600fa62151 100644
--- a/storage/innobase/row/row0sel.c
+++ b/storage/innobase/row/row0sel.c
@@ -3758,9 +3758,13 @@ wait_table_again:
}
rec_loop:
+ if (trx_is_interrupted(trx)) {
+ err = DB_INTERRUPTED;
+ goto normal_return;
+ }
+
/*-------------------------------------------------------------*/
/* PHASE 4: Look for matching records in a loop */
-
rec = btr_pcur_get_rec(pcur);
ut_ad(!!page_rec_is_comp(rec) == comp);
#ifdef UNIV_SEARCH_DEBUG
diff --git a/storage/innodb_plugin/row/row0sel.c b/storage/innodb_plugin/row/row0sel.c
index 54172e71a47..c70a477db1d 100644
--- a/storage/innodb_plugin/row/row0sel.c
+++ b/storage/innodb_plugin/row/row0sel.c
@@ -3908,6 +3908,11 @@ wait_table_again:
}
rec_loop:
+ if (trx_is_interrupted(trx)) {
+ err = DB_INTERRUPTED;
+ goto normal_return;
+ }
+
/*-------------------------------------------------------------*/
/* PHASE 4: Look for matching records in a loop */