List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:September 2 2001 2:30pm
Subject:understanding the source
View as plain text  
hi!

>>>>> "Benjamin" == Benjamin Pflugmann <philemon@stripped> writes:

Benjamin> Hi.
Benjamin> While studying the source, I found some part I am not sure of
Benjamin> understanding. Please have a look at my change and tell whether it
Benjamin> would change the meaning. I think it doesn't. If it does, would you
Benjamin> please explain why.

Benjamin> If it doesn't, is there any reason it is written as it is?

Yes ;)

When I added the simple checking of record lenghts I did accidently
add it outside the brace when it should be inside the brace.

(I never said it was a good reason :)

Benjamin> As IMHO
Benjamin> some stuff is executed needlessy, and "luckily" points to the valid
Benjamin> data of the last loop. Concretely, if the first line is empty or a
Benjamin> comment, I believe that "info.reclength=isam->s->base.reclength;"
Benjamin> tries to access undefined data? No harm intended, just being curious.

Yes.

Benjamin> Even without changing the brace, I think the first "last_isam=isam;"
Benjamin> is not needed (btw, last_isam is undefined before). Correct? If not,
Benjamin> why?

You are right;  This line can be removed.

We don't need to initialize last_isam as we will never access it when
it's not initialized (at least after your change).

Benjamin> Thank you in advance for any hints.

Regards,
Monty

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius <monty@stripped>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
       <___/   www.mysql.com
Thread
understanding the sourceBenjamin Pflugmann30 Aug
  • bug confirmed (was: Re: understanding the source)Benjamin Pflugmann30 Aug
  • Re: understanding the sourceBenjamin Pflugmann30 Aug
    • Re: understanding the sourceMichael Widenius30 Aug
    • Re: understanding the sourceTimothy Smith30 Aug
      • Re: understanding the sourceMichael Widenius2 Sep
  • understanding the sourceMichael Widenius2 Sep