Re: Stray nulls when reading from AF_UNIX sockets

2007-09-07 Thread Jan Engelhardt
On Sep 6 2007 12:23, David Miller wrote: >> return copied ? : err; >> } >> >> Shouldn't this read: >> >> return copied ? copied : err; >> >> Or am I missing something? > >These two statements are equivalent, the first version is >a shorthand allowed by gcc. Not only that. With x?x:z,

Re: Stray nulls when reading from AF_UNIX sockets

2007-09-06 Thread David Miller
From: Anders Blomdell <[EMAIL PROTECTED]> Date: Thu, 06 Sep 2007 17:48:07 +0200 > return copied ? : err; > } > > Shouldn't this read: > > return copied ? copied : err; > > Or am I missing something? These two statements are equivalent, the first version is a shorthand allowed by gcc.

Re: Stray nulls when reading from AF_UNIX sockets

2007-09-06 Thread Randy Dunlap
On Thu, 06 Sep 2007 17:48:07 +0200 Anders Blomdell wrote: > Hi, > > With recent kernels (2.6.22.x), we are experiencing that random null > characters > are read by our mySQL server (i.e. the number of bytes read by the server is > larger than the number of bytes written). I'm currently investig

Stray nulls when reading from AF_UNIX sockets

2007-09-06 Thread Anders Blomdell
Hi, With recent kernels (2.6.22.x), we are experiencing that random null characters are read by our mySQL server (i.e. the number of bytes read by the server is larger than the number of bytes written). I'm currently investigating the problem (that occurs every 1-35 hours on a loaded system). A c