memstat reports same value for bytes, bytes_read and bytes_written

Bug #421108 reported by rhesa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
Fix Released
Undecided
Trond Norbye

Bug Description

Unlinke set_data(), memcached_stat_get_value() uses memcmp to compare fieldnames, rather than strcmp. As a result, it matches on prefixes. This means the if() for the "bytes" field pre-empts the ifs for bytes_read and bytes_written. The attached patch fixes this by moving the if() for "bytes" after the other two fields.

Related branches

Revision history for this message
rhesa (o-launchpad-rhesa-com) wrote :
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Applied fix and added a test case to verify it

Changed in libmemcached:
status: New → Fix Committed
assignee: nobody → Trond Norbye (trond-norbye)
Revision history for this message
Trond Norbye (trond-norbye) wrote :

Released in revno: 591 [merge]

Changed in libmemcached:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.