Bug #22887 information_schema.FILES.TABLESPACE_NAME not null for UNDOFILEs
Submitted: 2 Oct 2006 11:55 Modified: 7 Dec 2006 12:57
Reporter: Roland Bouman Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.1.11 OS:Linux (ubuntu dapper drake linux)
Assigned to: CPU Architecture:Any
Tags: information_schema.FILES, LOGFILE GROUp, MySQL Cluster, TABLESPACE_NAME, UNDOFILE

[2 Oct 2006 11:55] Roland Bouman
Description:
The UDOFILE entries from a logfile group show up in the information_schema.FILES with a not null value for TABLESPACE_NAME, even when there are multiple tablespaces that use the logfile group 

How to repeat:
 create logfile group logfilegroup1 add undofile '/opt/mysql/cluster/logfilegroup1_undofile1.dat' initial_size 10M undo_buffer_size 5M engine ndb;

mysql> create tablespace tablespace1 add datafile '/opt/mysql/cluster/tablespace1_datafile1.dat' use logfile group logfilegroup1 extent_size 1024 initial_size 10M engine = ndb;
Query OK, 0 rows affected (1.05 sec)

mysql> select file_name, tablespace_name, table_name, logfile_group_name, extent_size, initial_size, maximum_size, data_free, extra from information_schema.files;
+------------------------------------------------+-----------------+------------+--------------------+-------------+--------------+--------------+-----------+----------------+
| file_name                                      | tablespace_name | table_name | logfile_group_name | extent_size | initial_size | maximum_size | data_free | extra          |
+------------------------------------------------+-----------------+------------+--------------------+-------------+--------------+--------------+-----------+----------------+
| /opt/mysql/cluster/tablespace1_datafile1.dat   | tablespace1     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=2 |
| /opt/mysql/cluster/tablespace1_datafile1.dat   | tablespace1     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=3 |
| /opt/mysql/cluster/logfilegroup1_undofile1.dat | tablespace1     |            | logfilegroup1      |           4 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=2 |
| /opt/mysql/cluster/logfilegroup1_undofile1.dat | tablespace1     |            | logfilegroup1      |           4 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=3 |
+------------------------------------------------+-----------------+------------+--------------------+-------------+--------------+--------------+-----------+----------------+
4 rows in set (0.00 sec)

create tablespace tablespace2 add datafile '/opt/mysql/cluster/tablespace2_datafile1.dat' use logfile group logfilegroup1 extent_size 1024 initial_size 10M engine = ndb;

mysql> select file_name, tablespace_name, table_name, logfile_group_name, extent_size, initial_size, maximum_size, data_free, extra from information_schema.files;
+------------------------------------------------+-----------------+------------+--------------------+-------------+--------------+--------------+-----------+----------------+
| file_name                                      | tablespace_name | table_name | logfile_group_name | extent_size | initial_size | maximum_size | data_free | extra          |
+------------------------------------------------+-----------------+------------+--------------------+-------------+--------------+--------------+-----------+----------------+
| /opt/mysql/cluster/tablespace1_datafile1.dat   | tablespace1     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=2 |
| /opt/mysql/cluster/tablespace1_datafile1.dat   | tablespace1     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=3 |
| /opt/mysql/cluster/tablespace2_datafile1.dat   | tablespace2     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=2 |
| /opt/mysql/cluster/tablespace2_datafile1.dat   | tablespace2     |            | logfilegroup1      |        1024 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=3 |
| /opt/mysql/cluster/logfilegroup1_undofile1.dat | tablespace2     |            | logfilegroup1      |           4 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=2 |
| /opt/mysql/cluster/logfilegroup1_undofile1.dat | tablespace2     |            | logfilegroup1      |           4 | 10485760     | 10485760     |      NULL | CLUSTER_NODE=3 |

Suggested fix:
I think the TABLESPACE_NAME should always be NULL for UNDOFILE entries - UNDOFILE's are not related directly to tablespaces.
[7 Nov 2006 12:57] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.1.12, and inform about the results. Several possibly related fixes are included  in that version (http://dev.mysql.com/doc/refman/5.1/en/news-5-1-12.html). I mean http://bugs.mysql.com/21676, for example.
[8 Dec 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".