Blog | Admin | Archives

Safety Agains Reopen

What does this comment in the MySQL source mean? (log.cc, currently line 2295 in 5.1)

{ // Safety agains reopen

I think I understand what it’s supposed to mean — the writer is pointing out that the code is checking again, to be double sure that the log is still open (although, if it can close between this call and the last call to is_open(), I’d be worried about it closing after this call too… note that both checks are after LOCK_log has been acquired).

What I’m more interested in is what the comment, as written, actually means? The grammar is very odd. I’m open to suggestions.

2 Responses to “Safety Agains Reopen”

  1. Jim McElroy Says:

    Is there a “reopen()” function anywhere? (With that name, or that does that function.)

    – or –

    Can the comment be read as:
    Safety against reopen

    Regards,
    Jim

  2. Stickman Says:

    I’m fluent in typoeese. I read it as “Safety against reopening.” It’s intended to prevent something from being opened twice.

    Based on your description, it sounds redundant.

Leave a Reply