Bug #98834 mysql_upgrade: [ERROR] 1136: Column count doesn't match value count at row 1
Submitted: 4 Mar 2020 15:29 Modified: 5 Apr 2020 6:29
Reporter: Dmitriy Kovalkov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.29 MySQL Community Server (GPL) OS:Debian (Debian 9)
Assigned to: CPU Architecture:Any

[4 Mar 2020 15:29] Dmitriy Kovalkov
Description:
root@s052d72fa:~# mysql_upgrade --verbose --force
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1136: Column count doesn't match value count at row 1
Checking system database.
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.engine_cost                                  OK
mysql.event                                        OK
mysql.func                                         OK

and etc...

In strace I see before this error SQL like this:

sendto(3, "0\1\0\0\3INSERT IGNORE INTO mysql.user VALUES ('localhost','mysql.session','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE','N',CURRENT_TIMESTAMP,NULL,'Y');\n", 308, 0, NULL, 0) = 308
recvfrom(3, "8\0\0\1\377p\4#21S01Column count doesn't match value count at row 1", 16384, 0, NULL, NULL) = 60

Query INSERT IGNORE INTO mysql.user VALUES ('localhost','mysql.session','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','*THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE','N',CURRENT_TIMESTAMP,NULL,'Y'); have 45 column count

in table 48

root@s052d72fa:~# mysql --batch --skip-column-names --execute='DESCRIBE mysql.user;' | wc -l
48

root@s052d72fa:~# apt-cache policy mysql-community-server
mysql-community-server:
  Installed: 5.7.29-1debian9
  Candidate: 5.7.29-1debian9
  Version table:
 *** 5.7.29-1debian9 500
        500 http://repo.mysql.com/apt/debian stretch/mysql-5.7 amd64 Packages
        100 /var/lib/dpkg/status
root@s052d72fa:~# 

How to repeat:
Just mysql_upgrade after update package mysql-community-server
[5 Mar 2020 6:29] MySQL Verification Team
Hello Dmitriy,

Thank you for the report and feedback.
Could you please confirm from which exact MySQL version(considering the column count I assume its 5.6.x) you have migrated/upgraded to 5.7.29? Thank you.

Also, I would suggest you to take a look at relevant sections of
(General)
https://dev.mysql.com/doc/refman/5.7/en/upgrading.html
(for apt)
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/#repo-qg-apt-upgrading
(for In-place)
https://dev.mysql.com/doc/refman/5.7/en/upgrade-binary-package.html#upgrade-procedure-inpl...

regards,
Umesh
[6 Apr 2020 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".