Bug #77941 HA_CREATE_USED_COMPRESS is defined but not used
Submitted: 5 Aug 2015 3:28 Modified: 5 Aug 2015 7:21
Reporter: zhai weixiang (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.7.8 OS:Any
Assigned to: CPU Architecture:Any

[5 Aug 2015 3:28] zhai weixiang
Description:
HA_CREATE_USED_COMPRESS is defined and set on create_info in sql_yacc.yy, but never used by other logic.

yinfengzwx@yinfengzwx-Lenovo:~/mysql-server$ cat VERSION
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=7
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

yinfengzwx@yinfengzwx-Lenovo:~/mysql-server$ grep 'HA_CREATE_USED_COMPRESS' -R *
sql/sql_yacc.yy:            Lex->create_info.used_fields|= HA_CREATE_USED_COMPRESS;
sql/handler.h:#define HA_CREATE_USED_COMPRESS         (1L << 26)

How to repeat:
read the code

Suggested fix:
remove it , or use this flag to check if compression attribute is defined ....
[5 Aug 2015 7:21] MySQL Verification Team
Hello Zhai,

Thank you for the report.

-- Source pulled from http://downloads.mysql.com/

Search "HA_CREATE_USED_COMPRESS" (3 hits in 3 files)
  F:\ushastry\Downloads\mysql-5.7.8-rc\mysql-5.7.8-rc\sql\handler.h (1 hits)
	Line 496: #define HA_CREATE_USED_COMPRESS         (1L << 26)
  F:\ushastry\Downloads\mysql-5.7.8-rc\mysql-5.7.8-rc\sql\sql_yacc.cc (1 hits)
	Line 25384:             Lex->create_info.used_fields|= HA_CREATE_USED_COMPRESS;
  F:\ushastry\Downloads\mysql-5.7.8-rc\mysql-5.7.8-rc\sql\sql_yacc.yy (1 hits)
	Line 5903:             Lex->create_info.used_fields|= HA_CREATE_USED_COMPRESS;

Thanks,
Umesh