Bug #36278 Data_free in SHOW TABLE STATUS for InnoDB is in kilobytes
Submitted: 23 Apr 2008 9:19 Modified: 25 Aug 2008 19:40
Reporter: Domas Mituzas Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.1-bk OS:Any
Assigned to: Timothy Smith CPU Architecture:Any

[23 Apr 2008 9:19] Domas Mituzas
Description:
After Bug#32440 was fixed, information about free table space was placed to Data_free column, but unlike other engines (and unlike other fields) the data there is in kilobytes, what may cause lots of confusion. 

Keeping consistent behavior would be nice. 

How to repeat:
SHOW TABLE STATUS;

Suggested fix:
Be consistent, use bytes.
[23 Apr 2008 9:35] Domas Mituzas
--- storage/innobase/fsp/fsp0fsp.c.orig 2008-04-23 12:33:50.000000000 +0300
+++ storage/innobase/fsp/fsp0fsp.c      2008-04-23 12:34:21.000000000 +0300
@@ -2832,7 +2832,7 @@
 ullint
 fsp_get_available_space_in_free_extents(
 /*====================================*/
-                       /* out: available space in kB */
+                       /* out: available space in B */
        ulint   space)  /* in: space id */
 {
        fsp_header_t*   space_header;
@@ -2897,7 +2897,7 @@
 
        return((ullint)(n_free - reserve)
               * FSP_EXTENT_SIZE
-              * (UNIV_PAGE_SIZE / 1024));
+              * (UNIV_PAGE_SIZE));
 }
 
 /************************************************************************
[28 Apr 2008 14:39] Heikki Tuuri
Vasil has a patch for this. We change the value to bytes in an upcoming 5.1.2x. It is not nice to change the behavior in an almost GA release, but better late than never.
[28 Apr 2008 14:43] Heikki Tuuri
Looks like this is a duplicate of http://bugs.mysql.com/bug.php?id=32440.
[28 Apr 2008 14:44] Heikki Tuuri
Sorry, not a duplicate.
[15 May 2008 2:05] Paul DuBois
Noted in 5.1.25 changelog.

For InnoDB tables, the DATA_FREE column of the 
INFORMATION_SCHEMA.TABLES displayed free space in kilobytes rather
than bytes. Now it displays bytes. 

Setting report to Patch queued pending push into 6.0.x.
[15 May 2008 15:57] Paul DuBois
Setting report to Need Doc Info pending push into 6.0.x.
[19 May 2008 20:19] Paul DuBois
Setting report to Patch queued pending re-push of this patch.
[27 May 2008 18:34] Paul DuBois
The push into 5.1 was reverted, so there is no 5.1.x changelog entry.
[27 May 2008 18:39] Paul DuBois
The push into 6.0.x was a null merge that changed nothing. Resetting report to Patch Approved pending further push of patch into 6.0.x.

The "parent" report for this set of bugs is Bug#32440.
[24 Jun 2008 21:31] Calvin Sun
Merged into 6.0.6-alpha, according to Tim. But the patch has not been pushed into 5.1 yet.
[25 Jun 2008 1:51] Paul DuBois
Noted in 6.0.6 changelog.

Setting report to Need Doc Info pending push into 5.1.x.
[24 Jul 2008 7:31] Vasil Dimov
Paul, are you sure this is correct:

"Setting report to Need Doc Info pending push into 5.1.x."

shouldn't it read "patch pending" instead of "need doc info"?
[24 Jul 2008 7:37] Vasil Dimov
Hmm, this is not yet committed into 5.1. I think it should go before 5.1 becomes GA, so such a change from kilobytes to bytes is not made in a GA release. Does this make sense?
[22 Aug 2008 15:38] Timothy Smith
Queued to 5.1-bugteam; this is fixed in both 5.1 and 6.0.
[25 Aug 2008 13:50] Georgi Kodinov
Pushed in 5.1.28
[25 Aug 2008 19:40] Paul DuBois
Noted in 5.1.28 changelog.