Comments (3)
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.
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.
Moved to Jira as https://tokutek.atlassian.net/browse/DB-534
from mariadb-5.5.
Related Issues (20)
- sys_vars.innodb_thread_sleep_delay_basic 'xtradb' fails
- MDEV-6168 MTR's internal check of the test case 'rpl.rpl_heartbeat_basic' failed HOT 1
- MDEV-6169 MTR's internal check of the test case 'main.myisam-metadata' failed HOT 1
- tokudb.bugs.5733_tokudb failed
- tokudb.information-schema-global-status failed HOT 1
- Rebase onto MariaDB 5.5.38 HOT 1
- main.mysqld--help fails
- tokudb.ctype_cp1250_ch fails
- engines/iuds.insert_time fails
- tokudb.i_s_tokudb_lock_waits_released fails
- MDEV-6378 mtr engines iuds time tests fail
- build on ubuntu 13.10 and 14.04
- tokudb.bugs.part_index_scan fails
- rebase onto mariadb 5.5.39
- part_index_scan fails on mariadb
- main.innodb_load_xa fails HOT 2
- tokudb.type_decimal and tokudb.type_newdecimal fails
- Tombstone - All issues are now tracked in Jira
- Checksum failure while reading node partition in file HOT 1
- Tokudb fails with --init-file option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mariadb-5.5.