Bug #90634 MySQL 8 upgrade checker: remove check for zerofill columns
Submitted: 25 Apr 2018 21:44 Modified: 11 Jun 2018 13:31
Reporter: Susan Koerner Email Updates:
Status: Closed Impact on me:
None 
Category:Shell General / Core Client Severity:S3 (Non-critical)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[25 Apr 2018 21:44] Susan Koerner
Description:
There was a check added to the upgrade checker functionality in shell to identify "Usage of use ZEROFILL/display length type attributes". This check was added in error.  Please remove this check from checkForServerUpgrade in shell.

  3) Usage of use ZEROFILL/display length type attributes
  Notice: The following table columns specify a ZEROFILL/display length attributes. 
  Please be aware that they will be ignored in MySQL 8.0

How to repeat:
- initialize/start mysql server at 5.7.22 with no-defaults
  $ cd <mysql-5.7.22>
  $ ./bin/mysqld --no-defaults --initialize-insecure --datadir=<data> 
    --basedir=<base>
  $ ./bin/mysqld_safe --no-defaults --datadir=<data> --basedir=<base> --port=<port> 
    --socket=<socket>
- create a schema/table with a zerofill column;
  create database test;
  use test;
  create table tab1 (col1 int,col2 varchar(20),col3 tinyint zerofill not null default 0);
  insert into tab1 (col1,col2) values (1,'one');
  insert into tab1 (col1,col2,col3) values (2,'two',2);
  insert into tab1 (col1,col2,col3) values (3,'three',3);
  select * from tab1;
  +------+-------+------+
  | col1 | col2  | col3 |
  +------+-------+------+
  |    1 | one   |  000 |
  |    2 | two   |  002 |
  |    3 | three |  003 |
  +------+-------+------+

- run upgrade checker:
  <shell>/bin/mysqlsh root:@localhost:<port> -e 'util.checkForServerUpgrade()'
  The MySQL server at localhost:<port> will now be checked for compatibility issues 
  for upgrade to MySQL 8.0...
  MySQL version: 5.7.22-enterprise-commercial-advanced - MySQL Enterprise Server 
  - Advanced Edition (Commercial)
 
  <snip>
  
  3) Usage of use ZEROFILL/display length type attributes
  Notice: The following table columns specify a ZEROFILL/display length attributes. 
  Please be aware that they will be ignored in MySQL 8.0

  test.tab1.col3 - tinyint(3) unsigned zerofill

  <snip>

- shutdown
- startup using 8.0.12 build (defining xport/xsocket to avoid conflicts
on the host)
  $ cd <mysql-8.0.12>
  $ ./bin/mysqld_safe --no-defaults --datadir=<data> --basedir=<base>
--port=<port> --socket=<socket> --mysqlx_port=<xport>
--mysqlx_socket=<xsocket>
- run mysql_upgrade
- shutdown
- startup using 8.0.12
- validate zerofill columns
  select * from tab1;
  +------+-------+------+
  | col1 | col2  | col3 |
  +------+-------+------+
  |    1 | one   |  000 |
  |    2 | two   |  002 |
  |    3 | three |  003 |
  +------+-------+------+

Suggested fix:
remove check from checkForServerUpgrade in shell
[7 Jun 2018 12:58] Konrad Olesinski
Posted by developer:
 
Bug fixed as part of the patch for WL#11892. The Zerofill check has been removed.
[11 Jun 2018 13:31] Margaret Fisher
Posted by developer:
 
Changelog entry added for MySQL 8.0.13:
The checkForServerUpgrade() operation to verify upgrade prerequisites included an unnecessary check relating to ZEROFILL and display length attributes in columns. The check has now been removed.
[2 Jul 2018 4:45] MySQL Verification Team
Bug #91483 marked as duplicate of this one