[mythtv-users] mysqlcheck buffers output?
Michael T. Dean
mtdean at thirdcontact.com
Thu Oct 22 11:24:07 UTC 2015
On 10/21/2015 08:16 PM, Tom Dexter wrote:
> I apologize because this a bit off topic...more related to mysql
> itself as apposed to my MythTV system, but I figured there might be
> someone here that's run into this or knows something about it:
>
> 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.
>
> For example, I've seen cases were one of the first tables in alpha
> order was a massive table that takes a long time to check, where it
> will output *nothing* at all, until it's several tables past that
> table. It appears to be buffering the output, possibly in 1K blocks
> or the like. If you were sending the output to a file for example,
> and the server happened to go down, you might not even have *any* way
> to know how far it got.
>
> This is an *insane* manner for something that important to behave, and
> searching the web I see no mention of this. I can't possibly be the
> only one whose ever noticed this.
>
> Does anyone know if there's any way to prevent that buffering? I sure
> can't find one.
I haven't tried to see what mysqlcheck is doing, but (as would be
important even if running optimize_mythdb.pl), what is the exact command
line you're using to run the program--including all pipelines and
redirects? Most programs tend to identify when they're connected
directly to a terminal and disable buffering output to stdout/stderr (or
set it to line buffering), but when you use pipelines or redirects,
buffering occurs unless you explicitly disable it.
Mike
More information about the mythtv-users
mailing list