List:Internals« Previous MessageNext Message »
From:Vyacheslav Akhmechet Date:May 15 2009 2:54am
Subject:Re: A call to rnd_pos() without a call to position()?
View as plain text  
After a bit more digging I discovered that this happens because I
didn't return HA_REC_NOT_IN_SEQ as one of the table flags. Once I
return the flag, position() gets called prior to rnd_pos(). I suppose
without the flag, the server expects rnd_pos() to figure out the
position of the row without storing it first (since the rows would be
stored in sequence, so it would be a question of a simple
multiplication).

Regards,
- Slava

On Thu, May 14, 2009 at 10:16 PM, Vyacheslav Akhmechet
<coffeemug@stripped> wrote:
> Hi,
>
> I'm trying to implement random access in my custom storage engine.
> I've implemented position() and rnd_pos() as specified. I then trigger
> the call with a blob query (as suggested in the wiki). My engine
> returned gibberish values, and after looking at the trace log I
> realized that a call to position() is never made. I see the server
> call st_table::prepare_for_position, and then (after some other stuff)
> my engine's rnd_pos(). There is no mention of a call to position()
> anywhere in the trace log.
>
> I think the virtual method signature is correct and debug output is
> correct too (unless I'm missing something trivial). Is there a
> situation in which rnd_pos might be called without a prior call to
> position?
>
> Regards,
> - Slava
>
Thread
A call to rnd_pos() without a call to position()?Vyacheslav Akhmechet15 May
  • Re: A call to rnd_pos() without a call to position()?Vyacheslav Akhmechet15 May
    • Re: A call to rnd_pos() without a call to position()?Michael Widenius5 Jun