diff options
author | Igor Babaev <igor@askmonty.org> | 2011-10-30 06:17:07 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-10-30 06:17:07 -0700 |
commit | 7dd42686fea5620c11865f57a955aabc08375e5a (patch) | |
tree | 59a5b098d2089a737254c42f692428b7b80a752c /storage | |
parent | e5627c9802460c745814961e721191ff4b6c91b3 (diff) | |
download | mariadb-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.cc | 11 |
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; + } } /*****************************************************************//** |