Bug #33141 Misnamed column in INFORMATION_SCHEMA.FALCON_SERIAL_LOG_INFO
Submitted: 11 Dec 2007 15:00 Modified: 30 Jul 2008 13:53
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:6.0.3 OS:Any
Assigned to: Kevin Lewis CPU Architecture:Any

[11 Dec 2007 15:00] Philip Stoev
Description:
The INFORMATION_SCHEMA.FALCON_SERIAL_LOG_INFO contains a column named "DATABASE". However, this column does not contain database name, it contains tablespace names - such as FALCON_MASTER which is the system tablespace.

How to repeat:
mysql> select * from FALCON_SERIAL_LOG_INFO;
+---------------+--------------+--------+---------+---------+
| DATABASE      | TRANSACTIONS | BLOCKS | WINDOWS | BUFFERS |
+---------------+--------------+--------+---------+---------+
| FALCON_MASTER |            0 |      0 |       1 |       1 |
+---------------+--------------+--------+---------+---------+
1 row in set (0.00 sec)

Suggested fix:
Change column name to be TABLESPACE, the way it is named in the rest of Falcon's I_S tables.
[11 Dec 2007 18:42] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[12 Dec 2007 1:29] Hakan Küçükyılmaz
Actually INFORMATION_SCHEMA.FALCON_SERIAL_LOG_INFO does not contain any tablespace related information.

For instance:
[02:23] root@(none)>CREATE TABLESPACE ts1 ADD DATAFILE  'ts1.fts' ENGINE=falcon;
Query OK, 0 rows affected (0.15 sec)

[02:24] root@(none)>SELECT * FROM INFORMATION_SCHEMA.FALCON_SERIAL_LOG_INFO;
+---------------+--------------+--------+---------+---------+
| DATABASE      | TRANSACTIONS | BLOCKS | WINDOWS | BUFFERS |
+---------------+--------------+--------+---------+---------+
| FALCON_MASTER |            3 |      6 |       1 |       1 |
+---------------+--------------+--------+---------+---------+
1 row in set (0.00 sec)

We can find tablespace related information in FALCON_DATABASE_IO:
[02:28] root@(none)>SELECT * FROM INFORMATION_SCHEMA.FALCON_DATABASE_IO;
+------------------+-----------+---------+----------------+--------+---------------+-------+
| TABLESPACE       | PAGE_SIZE | BUFFERS | PHYSICAL_READS | WRITES | LOGICAL_READS | FAKES |
+------------------+-----------+---------+----------------+--------+---------------+-------+
| FALCON_MASTER    |      4096 |    1024 |              0 |      0 |          4882 |   109 |
| ts1              |      4096 |    1024 |              0 |      4 |             0 |     4 |
| FALCON_TEMPORARY |      4096 |    1024 |              0 |      4 |             0 |     4 |
| FALCON_USER      |      4096 |    1024 |              0 |      4 |             0 |     4 |
+------------------+-----------+---------+----------------+--------+---------------+-------+
4 rows in set (0.00 sec)
[12 Dec 2007 12:43] Philip Stoev
FALCON_MASTER is mentioned in the Manual as being a tablespace. That is why I thought it would be better to name the entire column TABLESPACE, since DATABASE has another meaning within the server, e.g. it is possible to drop a database, set access rights on it, etc.
[12 Dec 2007 16:49] Philip Stoev
FALCON_TRANSACTIONS is also has FALCON_MASTER in a column named DATABASE.
[12 Dec 2007 17:51] Kevin Lewis
The real information in this column does not identify a database or a tablespace.  This is an identifier for the instance of Falcon that is running on the computer.  So the best approach for now is probably to drop the column since it does not convey any useful information.  The information_schema entries are designed so that there is only one line or row per Falcon instance. This identifier is not needed for either INFORMATION_SCHEMA.FALCON_SERIAL_LOG_INFO or INFORMATION_SCHEMA.FALCON_TRANSACTIONS
[15 Dec 2007 6:11] Kevin Lewis
Pushed these changes;
Get rid of DATABASE column in INFORMATION_SCHEMA talbes;
FALCON_TRANSACTIONS, FALCON_TRANSACTION_SUMMARY & FALCON_SERIAL_LOG_INFO.

In FALCON_TRANSACTIONS, add a 'State' column and don't show the
transaction objects that are empty and available for reuse.

The following are examples of hwo the tables look now;

mysql> select * from FALCON_TRANSACTIONS;
+-----------+-----------+----+-----------+---------+---------+-----+--------+---------+-------------+-------------------------------------------+
| STATE     | THREAD_ID | ID | STATE     | UPDATES | PENDING | DEP | OLDEST | RECORDS | WAITING_FOR | STATEMENT                                 |
+-----------+-----------+----+-----------+---------+---------+-----+--------+---------+-------------+-------------------------------------------+
| Active    |         1 |  5 | Active    |       1 |       1 |   1 |      5 |       1 |           0 |                                           |
| Active    |         3 | 11 | Active    |       0 |       1 |   0 |      5 |       0 |           5 | INSERT INTO t1 VALUES(492, 6, 'inserted') |
| Committed |         0 | 10 | Committed |       1 |       0 |   0 |      5 |       0 |           0 |                                           |
+-----------+-----------+----+-----------+---------+---------+-----+--------+---------+-------------+-------------------------------------------+
3 rows in set (14.70 sec)

mysql> select * from FALCON_TRANSACTION_SUMMARY;
+-----------+-------------+--------+----------------+--------------------+
| COMMITTED | ROLLED_BACK | ACTIVE | PENDING_COMMIT | PENDING_COMPLETION |
+-----------+-------------+--------+----------------+--------------------+
|         5 |           1 |      1 |              0 |                  0 |
+-----------+-------------+--------+----------------+--------------------+
1 row in set (0.06 sec)

mysql> select * from FALCON_SERIAL_LOG_INFO;
+--------------+--------+---------+---------+
| TRANSACTIONS | BLOCKS | WINDOWS | BUFFERS |
+--------------+--------+---------+---------+
|            2 |      3 |       1 |       1 |
+--------------+--------+---------+---------+
1 row in set (0.00 sec)
[11 Feb 2008 20:02] Kevin Lewis
Patch is in mysql-6.0-falcon-team and mysql-6.0-release version 6.0.4
See also, Bug#34241, which complains that there are now 2 'State' fields in INFORMATION_SCHEMA.FALCON_TRANSACTIONS.
[12 Mar 2008 23:02] Bugs System
Pushed into 6.0.4-alpha
[30 Jul 2008 13:53] MC Brown
A note has been added to the 6.0.4 changelog: 

The columns in the INFORMATION_SCHEMA table for FALCON_SERIAL_LOG_INFO, FALCON_TRANSACTIONS, and FALCON_TRANSACTION_SUMMARY contained a reference to the databae of tablespace, but the column information was actually showing instances of the Falcon engine. The tables have been updated to a different structure.