From: Michael Widenius Date: June 5 2009 7:42pm Subject: Re: A call to rnd_pos() without a call to position()? List-Archive: http://lists.mysql.com/internals/36849 Message-Id: <18985.30012.477318.941902@narttu.askmonty.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! >>>>> "Vyacheslav" == Vyacheslav Akhmechet writes: Vyacheslav> After a bit more digging I discovered that this happens because I Vyacheslav> didn't return HA_REC_NOT_IN_SEQ as one of the table flags. Once I Vyacheslav> return the flag, position() gets called prior to rnd_pos(). I suppose Vyacheslav> without the flag, the server expects rnd_pos() to figure out the Vyacheslav> position of the row without storing it first (since the rows would be Vyacheslav> stored in sequence, so it would be a question of a simple Vyacheslav> multiplication). Correct. Regards, Monty