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