Reputation: 2061
I just installed MySQL 5.6 development release build to check some improvement in performance_schema and information_schema. And, I found this-
In sakila.actor table there are 4 columns. Checking from information_schema.INNODB_SYS_TABLES column-N_COLS shows 7 for actor instead of 4. I can see that for each table N_COLS shows 3+columns.
sakila.actor-
CREATE TABLE `actor` (
`actor_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`first_name` varchar(256) NOT NULL,
`last_name` varchar(45) NOT NULL,
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`actor_id`),
KEY `last_name` (`last_name`,`actor_id`)
) ENGINE=InnoDB
SELECT * FROM information_schema
.INNODB_SYS_TABLES
;
TABLE_ID NAME FLAG N_COLS SPACE
-------- ------------------------ ------ ------ --------
11 SYS_FOREIGN 0 7 0
12 SYS_FOREIGN_COLS 0 7 0
38 sakila/actor 1 7 0
39 sakila/actor_info 1 7 0
From the docs it says N_COLS= The number of columns in the table.
So why does it show 3+columns for every table? Any idea?
Upvotes: 2
Views: 336