Bug #50599 ndb_desc does not show total/free extents for BLOB/TEXT columns

Submitted: 25 Jan 2010 18:41 Modified: 23 Feb 2010 11:26
Reporter: Matthew Montgomery Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S4 (Feature request)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Andrew Hutchings CPU Architecture:Any
Tags: 7.0.9, Contribution

[25 Jan 2010 18:41] Matthew Montgomery
Description:
Bug 47131 introduces a fix to ndb_desc which allows it to display 	Extent_space and Free extent_space values.  However these are always reported as "0" even when information_schema.FILES reports otherwise.

How to repeat:
CREATE LOGFILE GROUP LOGFILEGROUP ADD UNDOFILE './UNDOFILE1' INITIAL_SIZE 512M UNDO_BUFFER_SIZE=12M ENGINE=NDBCLUSTER; 
CREATE TABLESPACE ts1 ADD DATAFILE 'DATAFILE1.dat' USE LOGFILE GROUP LOGFILEGROUP EXTENT_SIZE 1m INITIAL_SIZE 64m ENGINE=NDBCLUSTER;
CREATE TABLE t1 (a INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, IMAGE_FILE MEDIUMBLOB STORAGE DISK) TABLESPACE ts1 ENGIN=NDBCLUSTER; 

INSERT INTO t1 (image_file) VALUES(LOAD_FILE('/home/matt/Desktop/Screenshot.png'));
<REPEAT 10 TIMES>

mysql> select FILE_NAME, FREE_EXTENTS, TOTAL_EXTENTS, TABLESPACE_NAME from information_schema.FILES where tablespace_name='ts1';
+---------------+--------------+---------------+-----------------+
| FILE_NAME     | FREE_EXTENTS | TOTAL_EXTENTS | TABLESPACE_NAME |
+---------------+--------------+---------------+-----------------+
| DATAFILE1.dat |           60 |            64 | ts1             |
| DATAFILE1.dat |           60 |            64 | ts1             |
+---------------+--------------+---------------+-----------------+

$ ndb_desc -d test t1 -p

-- Per partition info -- 
Partition	Row count	Commit count	Frag fixed memory	Frag varsized memory	Extent_space	Free extent_space	
1        	5        	10          	32768            	32768               	0            	0                 	
0         	5        	10          	32768            	32768               	0            	0
[26 Jan 2010 18:50] MySQL Verification Team
ndb_desc does not show the Extent_space and Free extent_space for subordinate BLOB/TEXT columns. 

A new option --blob, -B should be added to ndb_desc to make it generate a report for each of the subordinate blob tables.

At the very least it should show the table id of the base table and the subordinate blob table ids/names.
[17 Feb 2010 10:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100589

3408 Andrew Hutchings	2010-02-17
      Bug #50599  	ndb_desc does not show total/free extents for BLOB/TEXT columns
      
      Added BT= to Attributes output to reflect the blob table for a column
      Added --blob-info (-b) to show partition information for blob tables too
[17 Feb 2010 10:46] Magnus Blåudd
Looks ok, only minor thing I would comment on is that there is really no need to declare the "NdbDictionary::Column column" outside scoop of the for loop - it just gives the opportunity for someone to use the variable outside it's intended scope.

+      for (int i = 0; i < noOfAttributes; i++)
+      {
+         const NdbDictionary::Column* column = pTab->getColumn(i);

Approved anyway, but fix if you like.
[17 Feb 2010 11:00] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100591

3408 Andrew Hutchings	2010-02-17
      Bug #50599  	ndb_desc does not show total/free extents for BLOB/TEXT columns
      
      Added BT= to Attributes output to reflect the blob table for a column
      Added --blob-info (-b) to show partition information for blob tables too
[18 Feb 2010 11:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100735

3408 Andrew Hutchings	2010-02-18
      Bug #50599  	ndb_desc does not show total/free extents for BLOB/TEXT columns
      
      Added BT= to Attributes output to reflect the blob table for a column
      Added --blob-info (-b) to show partition information for blob tables too
[18 Feb 2010 12:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100741

3408 Andrew Hutchings	2010-02-18
      Bug #50599  	ndb_desc does not show total/free extents for BLOB/TEXT columns
      
      Added BT= to Attributes output to reflect the blob table for a column
      Added --blob-info (-b) to show partition information for blob tables too
      
      Hopefully fixed mtr problems too
[18 Feb 2010 16:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100787
[18 Feb 2010 18:51] Bugs System
Pushed into 5.1.41-ndb-7.0.13 (revid:magnus.blaudd@sun.com-20100218182454-m3kckfdyopdfxcnr) (version source revid:magnus.blaudd@sun.com-20100218182454-m3kckfdyopdfxcnr) (merge vers: 5.1.41-ndb-7.0.13) (pib:16)
[18 Feb 2010 18:54] Magnus Blåudd
Pushed to 7.0 and 7.1
[19 Feb 2010 8:31] Jon Stephens
Documented feature addition in the NDB-7.0.13 and 7.1.2 changelogs as follows:

      The ndb_desc utility can now show the extent space and free extent 
      space for subordinate BLOB and TEXT columns (stored in hidden BLOB 
      tables by NDB). A --blob option has been added for this program that 
      causes ndb_desc to generate a report for each subordinate BLOB table. 
      For more information, see "ndb_desc — Describe NDB Tables".

Also noted addition in the indicated section of the Manual, and that -b requires use of -p to work.

Closed.
[19 Feb 2010 8:39] Jon Stephens
NB. Changelog entry as committed actually refers to --blob-info, not '--blob'.
[20 Feb 2010 8:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/100938

3093 Andrew Hutchings	2010-02-20
      Bug #50599  	ndb_desc does not show total/free extents for BLOB/TEXT columns
            
      Added BT= to Attributes output to reflect the blob table for a column
      Added --blob-info (-b) to show partition information for blob tables too
      
      6.3 version of fix
[23 Feb 2010 10:46] Magnus Blåudd
Now also pushed to 6.3
[23 Feb 2010 11:26] Jon Stephens
Fix also now documented in the NDB-6.3.32 changelog.

Closed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.075 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.