Hi!

On Nov 19, Ian Collins wrote:
> If you open a table using HANDLER,
>  
> e.g, HANDLER MYTABLE OPEN;
>  
> then during the course of your application truncate that table, 
>  
> e.g, TRUNCATE TABLE MYTABLE;
>  
> then you get some really wierd behaviour (my wierd behaviour was the
> application rolling on a free in a completely different part of the
> program).
>  
> I hadn't even used a HANDLER READ when it had crashed - just the OPEN.
>  
> I guess it's kind of understandable, and not something that happens a lot,
> but it may be worth adding this caveat to the documentation (to save some
> other lost soul hours of screen kicking).
>  
> Regards,
> Ian Collins.

Actually, it is documented:

  `HANDLER' is somewhat low-level statement, for example it does not
  provide consistency. That is `HANDLER ... OPEN' does *NOT* takes a
  snapshot of the table, and does *NOT* locks the table. The above means,
  that after `HANDLER ... OPEN' table data can be modified (by this or
  other thread) and these modifications may appear only partially in
  `HANDLER ... NEXT' or `HANDLER ... PREV' scans.

That is, the only thing that is guaranteed that it won't crush mysqld :-)
Low-level commands should be used with caution - as usual.

Still, we could, probably, make it clearer it the manual.
Thanks for the note.

Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to