Bug #80057 View for InnoDB Flags

Submitted: 19 Jan 2016 21:29 Modified: 29 Jun 2016 11:58
Reporter: Daniël van Eeden Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: SYS Schema Severity:S4 (Feature request)
Version:1.5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: flags, innodb

[19 Jan 2016 21:29] Daniël van Eeden
Description:
Please make it easier to view the flags of innodb tables.

Related:
- Bug #79889
- Bug #79469

How to repeat:
Try to find out which flags are set for a table and what their purpose is.

Suggested fix:
CREATE SQL SECURITY INVOKER
VIEW v_innodb_flags AS
SELECT 
    NAME,
    FLAG,
    IF(FLAG & 1 = 1, 'No', 'Yes') AS 'is_redundant',
    IF(((FLAG & 2 = 2) && (FLAG & 4 = 0) && (FLAG & 8 = 0) && (FLAG & 16 = 0)), 'Yes', 'No') AS 'is_compressed_1k',
    IF(((FLAG & 2 = 0) && (FLAG & 4 = 4) && (FLAG & 8 = 0) && (FLAG & 16 = 0)), 'Yes', 'No') AS 'is_compressed_2k',
    IF(((FLAG & 2 = 2) && (FLAG & 4 = 4) && (FLAG & 8 = 0) && (FLAG & 16 = 0)), 'Yes', 'No') AS 'is_compressed_4k',
    IF(((FLAG & 2 = 0) && (FLAG & 4 = 0) && (FLAG & 8 = 8) && (FLAG & 16 = 0)), 'Yes', 'No') AS 'is_compressed_8k',
    IF(((FLAG & 2 = 2) && (FLAG & 4 = 0) && (FLAG & 8 = 8) && (FLAG & 16 = 0)), 'Yes', 'No') AS 'is_compressed_16k',
    IF(FLAG & 32 = 32, 'Yes', 'No') AS 'is_dynamic_or_compressed',
    IF(FLAG & 64 = 64, 'Yes', 'No') AS 'is_remote',
    IF(FLAG & 128 = 128, 'Yes', 'No') AS 'is_shared'
FROM
    information_schema.innodb_sys_tables
[19 Jan 2016 21:32] Daniël van Eeden
Maybe create this as a function instead. Then it can be used to decode flags from error messages.
[29 Jun 2016 11:58] MySQL Verification Team
Hello Daniël,

Thank you for the feature request!

Thanks,
Umesh

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

Page generated in 0.052 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.