Git Product home page Git Product logo

Comments (3)

prohaska avatar prohaska commented on August 10, 2024

To: Zardosht Kasheff zardosht@xxxxxxxxx
From: Sergei Petrunia psergey@xxxxxxxxxxxx
Date: Tue, 12 Mar 2013 00:56:40 +0400
Cc: maria-developers@xxxxxxxxxxxxxxxxxxx
In-reply-to: CABFd+SFYNezSsmKJbCh3wMdP+u1cB_vgfW66h9FWER-aHzd2cQ@mail.gmail.com
User-agent: Mutt/1.5.18 (2008-05-17)
Hi Zardosht,

On Thu, Mar 07, 2013 at 11:08:01PM -0500, Zardosht Kasheff wrote:

I have found an interesting issue with index condition pushdown. I do
not know if it is a bug, or if I am misusing the feature.

I have found that in one scenario, when performing a join, an index
condition is pushed down, but because handler->end_range is not set,
handler_index_cond_check never returns ICP_OUT_OF_RANGE, even though
we are out of range.

Confirm. I have looked how it works in MyISAM and InnoDB. Indeed, they consider
scan over equality to be a special case. They remember the lookup key and
check it themselves.

That is, if one does

h->index_read(key='foo')=0
h->index_next_same()

then index_next_same() will check whether the next index tuple has key='foo'.
If the key is different, it will return HA_ERR_END_OF_FILE without checking
the index condition.

I'm hesitant to say that this is "by design", I'd say that the available
storage engines happened to work this way, and then ICP used that.

Maybe, this means that implementation of handler::index_next_same() should
set handler::end_range. If it did, a storage engine will be able to support
ICP without implementing index_next_same() call.

The question for MariaDB is, does it make sense for us to make this change in
MariaDB, when Oracle doesn't support it?

(As far as I understand, TokuDB will still need to support MySQL, and so will
have to work around the problem by supporting index_next_same() and comparing
the keys like MyISAM/InnoDB do. When you have to do that anyway, there is no
benefit from having this problem fixed in MariaDB...)

Here is the relevant stack trace, I cannot yet send the entire trace
as it may include customer information, and I need to double check it
is ok to send:

In this stack, we are performing an index_next_same, and a condition
has been pushed down. When we call handler_index_cond_check. we always
get ICP_NO_MATCH and never get ICP_OUT_OF_RANGE, even though we go
past the key that we should be retrieving.

Is this by design? Is this a bug?

BR

Sergei

Sergei Petrunia, Software Developer
Monty Program AB, http://askmonty.org
Blog: http://s.petrunia.net/blog

from mariadb-5.5.

willt avatar willt commented on August 10, 2024

I just ran into this bug when converting over to TokuDB.
Is there any ETA on a fix for this yet?

from mariadb-5.5.

tmcallaghan avatar tmcallaghan commented on August 10, 2024

Moved to Jira as https://tokutek.atlassian.net/browse/DB-534

from mariadb-5.5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.