From 10be9160c14f3bd488578ed64304a10d27b7b122 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 15 Jun 2013 16:02:43 +0200 Subject: MDEV-4466 Partitioned Aria table created by a previous version is recognized as TEST_SQL_DISCOVERY Partitioning didn't store the name of default storage engine for partitions in the frm file - it only store the typecode. Typecodes aren't stable, and might vary depending on the order in which storage engines are loaded (can be changed even from my.cnf without recompilation). As a temporary workaround for 5.5, we hard-code Aria's typecode, to make sure it never changes. --- sql/handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/handler.h') diff --git a/sql/handler.h b/sql/handler.h index ac9905a0dc1..2d13293a7cd 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -356,7 +356,8 @@ enum legacy_db_type DB_TYPE_MARIA, /** Performance schema engine. */ DB_TYPE_PERFORMANCE_SCHEMA, - DB_TYPE_FIRST_DYNAMIC=42, + DB_TYPE_ARIA=42, + DB_TYPE_FIRST_DYNAMIC=43, DB_TYPE_DEFAULT=127 // Must be last }; /* -- cgit v1.2.1 From 47c1b0407971408eefaabee79a1097fd5c6ea90f Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 16 Jul 2013 10:56:42 +0400 Subject: MDEV-4778: Incorrect results from Aria/MyISAM SELECT using index with prefix length on TEXT column Backport the fix olav.sandstaa@sun.com-20101102184747-qfuntqwj021imy9r: "Fix for Bug#52660 Perf. regr. using ICP for MyISAM on range queries on an index containing TEXT" (together with further fixes in that code) into MyISAM and Aria. --- sql/handler.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'sql/handler.h') diff --git a/sql/handler.h b/sql/handler.h index 2d13293a7cd..bc7a17bb27c 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2637,7 +2637,33 @@ public: Pops the top if condition stack, if stack is not empty. */ virtual void cond_pop() { return; }; + + /** + Push down an index condition to the handler. + + The server will use this method to push down a condition it wants + the handler to evaluate when retrieving records using a specified + index. The pushed index condition will only refer to fields from + this handler that is contained in the index (but it may also refer + to fields in other handlers). Before the handler evaluates the + condition it must read the content of the index entry into the + record buffer. + + The handler is free to decide if and how much of the condition it + will take responsibility for evaluating. Based on this evaluation + it should return the part of the condition it will not evaluate. + If it decides to evaluate the entire condition it should return + NULL. If it decides not to evaluate any part of the condition it + should return a pointer to the same condition as given as argument. + + @param keyno the index number to evaluate the condition on + @param idx_cond the condition to be evaluated by the handler + + @return The part of the pushed condition that the handler decides + not to evaluate + */ virtual Item *idx_cond_push(uint keyno, Item* idx_cond) { return idx_cond; } + /** Reset information about pushed index conditions */ virtual void cancel_pushed_idx_cond() { -- cgit v1.2.1