Bug #38964 Data_free shown as true free amount * partition count
Submitted: 22 Aug 2008 17:31 Modified: 27 Aug 2008 10:15
Reporter: Timothy Smith
Status: Duplicate
Category:Server: Partition Severity:S3 (Non-critical)
Version:5.1.28, 6.0.7 OS:Any
Assigned to: Target Version:
Tags: information_schema, data_free, innodb, partition
Triage: D2 (Serious)

[22 Aug 2008 17:31] Timothy Smith
Description:
The INFORMATION_SCHEMA.TABLES.DATA_FREE column shows <true free amount> * <number of
partitions> for partitioned InnoDB tables.

Shows 0 for MyISAM tables, so this may or may not affect MyISAM as well.  :-)

Thanks to Robin Cui for reporting this problem on Bug#32440 ([28 Jul 13:36] Robin Cui).

How to repeat:
--source include/have_innodb.inc

--disable_warnings
drop table if exists t1, t2;
--enable_warnings

let $engine_type = innodb;

eval create table t1 (id int) engine = $engine_type partition by hash(id) partitions 1;
eval create table t2 (id int) engine = $engine_type partition by hash(id) partitions 2;

select table_name, data_free, create_options
from information_schema.tables
where table_schema = 'test' and table_name in ('t1', 't2');

drop table t1, t2;

Results look like:

+drop table if exists t1, t2;
+create table t1 (id int) engine = innodb partition by hash(id) partitions 1;
+create table t2 (id int) engine = innodb partition by hash(id) partitions 2;
+select table_name, data_free, create_options
+from information_schema.tables
+where table_schema = 'test' and table_name in ('t1', 't2');
+table_name     data_free       create_options
+t1     4194304 partitioned
+t2     8388608 partitioned
+drop table t1, t2;

Note that data_free for t1 and t2 *should* be the same.
[27 Aug 2008 10:15] Mattias Jonsson
Duplicate of bug#36312