summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-10-30 06:17:07 -0700
committerIgor Babaev <igor@askmonty.org>2011-10-30 06:17:07 -0700
commit7dd42686fea5620c11865f57a955aabc08375e5a (patch)
tree59a5b098d2089a737254c42f692428b7b80a752c /storage
parente5627c9802460c745814961e721191ff4b6c91b3 (diff)
downloadmariadb-git-7dd42686fea5620c11865f57a955aabc08375e5a.tar.gz
Backported the fix and the test case for bug 59483 from the mysql-5.6 code line.
Diffstat (limited to 'storage')
-rw-r--r--storage/xtradb/handler/ha_innodb.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 031c7f6e1c0..f09f1bf4310 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -2013,9 +2013,14 @@ ha_innobase::reset_template(void)
prebuilt->keep_other_fields_on_keyread = 0;
prebuilt->read_just_key = 0;
- /* Reset index condition pushdown state */
- prebuilt->idx_cond = NULL;
- prebuilt->idx_cond_n_cols = 0;
+ /* Reset index condition pushdown state. */
+ if (prebuilt->idx_cond) {
+ prebuilt->idx_cond = NULL;
+ prebuilt->idx_cond_n_cols = 0;
+ /* Invalidate prebuilt->mysql_template
+ in ha_innobase::write_row(). */
+ prebuilt->template_type = ROW_MYSQL_NO_TEMPLATE;
+ }
}
/*****************************************************************//**