#24628 [Opn-Bgs]: missing space

2003-07-13 Thread sniper
 ID:   24628
 Updated by:   [EMAIL PROTECTED]
 Reported By:  prof_moriarty at veryfast dot biz
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: win98
 PHP Version:  4.3.2
 New Comment:

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




Previous Comments:


[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=24628edit=1



#24628 [Opn-Bgs]: missing space

2003-07-12 Thread sniper
 ID:   24628
 Updated by:   [EMAIL PROTECTED]
 Reported By:  prof_moriarty at veryfast dot biz
-Status:   Open
+Status:   Bogus
 Bug Type: MySQL related
 Operating System: win98
 PHP Version:  4.3.2
 New Comment:

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



Previous Comments:


[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=24628edit=1