ID:               24628
 User updated by:  prof_moriarty at veryfast dot biz
 Reported By:      prof_moriarty at veryfast dot biz
 Status:           Bogus
 Bug Type:         MySQL related
 Operating System: win98
 PHP Version:      4.3.2
 New Comment:

call me finicky if you want, but i've reported 2 bugs in the past two
days.
1 reply included "RTFM" (http://bugs.php.net/bug.php?id=24633&edit=2),
and now you're using RTFS

Having had to google them both, i'm rather disturbed that so many peeps
contributing to the source have to use acronyms that include
expletives!!!

Come to think of it, of the last 3 bugs i've reported, all the replies
were less than savory... Why the hell do people bother reporting them?
I know in the future i won't bother wasting my time trying to help.

As to RTFSing: I would, but i don't have a copy of it, nor would i be
able to understand a copy of it if i aquired one. (C(++) isn't on my
skill list).


Previous Comments:
------------------------------------------------------------------------

[2003-07-13 10:32:21] [EMAIL PROTECTED]

To be precise: I KNOW it's mysql "bug".


------------------------------------------------------------------------

[2003-07-13 10:31:54] [EMAIL PROTECTED]

But I am sure it's a mysql bug. RTFS if you don't believe me.



------------------------------------------------------------------------

[2003-07-13 06:03:31] prof_moriarty at veryfast dot biz

I'm not so sure it is.
So far as i can tell, mysql_stat simply shows a few of what "SHOW
STATUS" does in mysql.

However "show status" doesn't show a "Queries per second avg:", only
mysql_stat does.

So i'd hazard a guess that it's php that works out the query counter,
and then adds it to the list, but with only 1 space after the last
entry.

------------------------------------------------------------------------

[2003-07-12 21:07:49] [EMAIL PROTECTED]

Mysql problem. (we just print out whatever mysql returns)


------------------------------------------------------------------------

[2003-07-12 19:41:20] prof_moriarty at veryfast dot biz

Description:
------------
Exeptionally minor bug, but a bug nonetheless.
mysql_stat, documentation says that the resulting string should be
explodable into 7 elements

However in reality it can only be broken up into 6 elements.

It's broken up using double space. I've used preg_replace, and explode,
and either way i only get 6 results when splitting via double space " 
".

Basically, there's a missing space in the output, between the end of
'open tables', and the start of 'queries per sec'.

Shouldn't take a fraction of a sec to fix. :)

Reproduce code:
---------------
var_dump(explode('  ', mysql_stat()));

Expected result:
----------------
Array
(
    [0] => Uptime: 5380
    [1] => Threads: 2
    [2] => Questions: 1321299
    [3] => Slow queries: 0
    [4] => Opens: 26
    [5] => Flush tables: 1
    [6] => Open tables: 17
    [7] => Queries per second avg: 245.595
)

Actual result:
--------------
array(7) {
  [0]=>
  string(12) "Uptime: 6910"
  [1]=>
  string(10) "Threads: 2"
  [2]=>
  string(15) "Questions: 2229"
  [3]=>
  string(15) "Slow queries: 0"
  [4]=>
  string(9) "Opens: 77"
  [5]=>
  string(15) "Flush tables: 1"
  [6]=>
  string(45) "Open tables: 13 Queries per second avg: 0.323"
}


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24628&edit=1

Reply via email to