summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-09-13 23:45:02 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-09-13 23:45:02 +0400
commit5ebff8ab788923cfcc25862d6c9e11ea20801fa0 (patch)
treee519537d6843ffb5807de5a5e16f1b5760ab2a46 /sql/item.cc
parent3769841d9e706ee018d5273d2901954b9a281c3e (diff)
downloadmariadb-git-5ebff8ab788923cfcc25862d6c9e11ea20801fa0.tar.gz
BUG#730133: Wrong result with jkl = 7, BKA, ICP in maria-5.3 + compound index
- Mrr_ordered_index_reader::interrupt_read() and resume_read() should save/restore not just index lookup tuple, but entire index tuple. Key parts that are not used for index lookup can be still used in pushed index condition. Failure to save/restore will cause the index condition to be evaluated over the wrong values.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index d0992a379e0..02263106fe8 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -9124,7 +9124,22 @@ table_map Item_ref_null_helper::used_tables() const
}
+/* Debugger help function */
+static char dbug_item_print_buf[256];
+const char *dbug_print_item(Item *item)
+{
+ char *buf= dbug_item_print_buf;
+ String str(buf, sizeof(dbug_item_print_buf), &my_charset_bin);
+ str.length(0);
+ if (!item)
+ return "(Item*)NULL";
+ item->print(&str ,QT_ORDINARY);
+ if (str.c_ptr() == buf)
+ return buf;
+ else
+ return "Couldn't fit into buffer";
+}
/*****************************************************************************
** Instantiate templates
*****************************************************************************/