[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-internals
Subject: Re: [***SPAM*** Score/Req: 5.0/5.0] Re: index_read_idx vs. find_flag
From: Paul Whittington <pwhittington () nitrosecurity ! com>
Date: 2006-06-26 17:17:52
Message-ID: 44A016C0.7040807 () nitrosecurity ! com
[Download RAW message or body]
Thanks for the response ];-)
Sorry, of course y'all need to know what version I'm working with. I'm
working with 5.1.11-beta.
So, if I understand you, HA_READ_KEY_EXACT means to find the first index
entry that exactly matches the given value, in whole or in part (i.e.
the give key value may be a prefix).
Is there a difference between this and HA_READ_PREFIX?
Sergei Golubchik wrote:
> Hi!
>
> On Jun 23, Paul Whittington wrote:
>> I'm getting, what is to me, an unexpected find_flag value when
>> index_read_idx is called.
>
> Could you next time specify what MySQL version you're using ?
> Often I (or somebody else who will reply) may need to look at the code
> to find the answer, and it helps to know that we're looking at the same
> code that you do :)
>
> This time I'll use 5.0.
>
>> Given the table
>>
>> create table t1 (
>> a int, b varchar(10), c varchar(10), primary key (b,c)
>> ) engine=nitro;
>>
>> the statement
>>
>> insert into t1 values (1,'1-is','1-it'), (2,'2-is','2-it');
>>
>> and the query
>>
>> select * ftom t1 where b = '2-is';
>>
>> index_read_indx is called with a find_flag value of HA_READ_KEY_EXACT.
>>
>> Having studied the code of other storage engines it appeared to me that
>> HA_READ_KEY_EXACT meant that the key value was a complete value, not a
>> prefix, and that the desired action was to find the key that exactly
>> matched the given value.
>
> It is also used when the key value is a prefix.
> But still a storage engine is supposed to return an error if a key with
> the given prefix was not found.
>
> Regards,
> Sergei
>
--
Don't believe everything you think!
Paul Whittington
NitroSecurity, Inc.
www.nitrosecurity.com
--
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe: http://lists.mysql.com/internals?unsub=mysql-internals@progressive-comp.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic