[mythtv-users] mysqlcheck buffers output?

Tom Dexter digitalaudiorock at gmail.com
Thu Oct 22 12:46:47 UTC 2015


On Thu, Oct 22, 2015 at 7:24 AM, Mike Thomas <mt3 at pfw.demon.co.uk> wrote:
> On Wed, 21 Oct 2015 20:16:39 -0400
> Tom Dexter <digitalaudiorock at gmail.com> wrote:
>> I've noticed for years now that the mysqlcheck program inexplicably
>> buffers it's output in a way where you can *never* truly know what
>> table it's on without going into mysql separately and doing a show
>> processlist.
>
> Dear Mr. Dexter,
>
> As far as I know mysqlcheck uses ordinary printf-style (or C++
> equivalent) buffering. When it sees a \n it flushes the buffer. That is
> certainly how my mysqlcheck behaves for me. This is normal for UNIX
> programmes unless they go out of their way to change things.
>
> I run
>
> mysqlcheck [ options ] --analyze --all-databases
>
> and other things from time to time. mysqlcheck's output pauses
> immediately after
>
> mythconverg.recordedrating                   Table is already up to date
>
> before printing
>
> mythconverg.recordedseek                     OK
>
> My recordedseek table is very large indeed so I expect this behaviour.
> Were mysqlcheck to crash during a table operation I would know which
> table it was working on because the tables are processed in
> alphabetical order.
>
> If you are experiencing additional buffering this could be because you
> are either sending the output through a pipe or file or have an
> inconvenient line discipline.
>
> Yours,
>
> Mike.

That's not the behavior I've seen, and this is with the output going
directly to the console.  Yes, I would expect it to pause before a
large table until it's done, obviously because it's printing the
resulting status on that line, but in my experience it does in fact
buffer more than that where, for example, several tables prior to a
large table may not display at all until the large one is done.

This actually wasn't related to my mythconverg database at all, as
none of my tables are very large at all and I'd never even notice.
I'll do some tests on some databases I have with large tables.

Tom


More information about the mythtv-users mailing list