Description:
Running these commands in mysqlsh 8.0.41 succeeds; attempting to run them in mysqlsh 8.4.5 fails. I thought it was due to carriage-return parsing but running "\status" works in both. Interactive results below will be trimmed (...) for brevity; command line tests also included
How to repeat:
#
# working interactive test
#
$ mysql-8.0/shell/bin/mysqlsh --host=localhost --user=sa --port=3306
MySQL Shell 8.0.41
...
Your MySQL connection id is 2321
Server version: 8.0.41-commercial MySQL Enterprise Server - Commercial
...
MySQL localhost:3307 ssl JS > \status
MySQL Shell version 8.0.41
Connection Id: 2321
Current schema:
Current user: sa@localhost
...
MySQL localhost:3307 ssl JS > util.help("checkForServerUpgrade")
NAME checkForServerUpgrade - Performs series of tests on specified MySQL server to check if the upgrade process will succeed.
...
MySQL localhost:3307 ssl JS > util.checkForServerUpgrade()
The MySQL server at localhost:3307, version 8.0.41-commercial - MySQL
Enterprise Server - Commercial, will now be checked for compatibility issues
for upgrade to MySQL 8.0.41...
Util.checkForServerUpgrade: Detected MySQL Server version is 8.0.41. MySQL Shell cannot check MySQL server instances for upgrade if they are at a version the same as or higher than the MySQL Shell version. (ArgumentError)
#
# breaking interactive test
#
$ mysql-8.4/shell/bin/mysqlsh --host=localhost --user=sa --port=3306
MySQL Shell 8.4.5
...
Your MySQL connection id is 2316
Server version: 8.0.41-commercial MySQL Enterprise Server - Commercial
...
MySQL localhost:3307 ssl SQL > \status
MySQL Shell version 8.4.5
Connection Id: 2316
Current schema:
Current user: sa@localhost
...
# normally, entering a new line executes the statement (like the above)
# but the parser isn't happy with either command and expects more:
MySQL localhost:3307 ssl SQL > util.help("checkForServerUpgrade")
->
-> util.checkForServerUpgrade()
-> ;
ERROR: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'util.help("checkForServerUpgrade")
#
# checking the previous command (up arrow) shows this:
#
MySQL localhost:3307 ssl SQL > util.help("checkForServerUpgrade") util.checkForServerUpgrade() ;
#
# working command line test
#
$ mysql-8.0/shell/bin/mysqlsh --socket=/var/lib/mysql/mysql.sock --user=sa --host=localhost --port=3306 -e "util.checkForServerUpgrade()"
The MySQL server at localhost:3306, version 8.0.41-commercial - MySQL
Enterprise Server - Commercial, will now be checked for compatibility issues
for upgrade to MySQL 8.0.41...
Util.checkForServerUpgrade: Detected MySQL Server version is 8.0.41. MySQL Shell cannot check MySQL server instances for upgrade if they are at a version the same as or higher than the MySQL Shell version. (ArgumentError)
at (command line):1
#
# broken command line test
#
$ mysql-8.4/shell/bin/mysqlsh --socket=/var/lib/mysql/mysql.sock --user=sa --host=localhost --port=3306 -e "util.checkForServerUpgrade()"
ERROR: 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'util.checkForServerUpgrade()' at line 1
Description: Running these commands in mysqlsh 8.0.41 succeeds; attempting to run them in mysqlsh 8.4.5 fails. I thought it was due to carriage-return parsing but running "\status" works in both. Interactive results below will be trimmed (...) for brevity; command line tests also included How to repeat: # # working interactive test # $ mysql-8.0/shell/bin/mysqlsh --host=localhost --user=sa --port=3306 MySQL Shell 8.0.41 ... Your MySQL connection id is 2321 Server version: 8.0.41-commercial MySQL Enterprise Server - Commercial ... MySQL localhost:3307 ssl JS > \status MySQL Shell version 8.0.41 Connection Id: 2321 Current schema: Current user: sa@localhost ... MySQL localhost:3307 ssl JS > util.help("checkForServerUpgrade") NAME checkForServerUpgrade - Performs series of tests on specified MySQL server to check if the upgrade process will succeed. ... MySQL localhost:3307 ssl JS > util.checkForServerUpgrade() The MySQL server at localhost:3307, version 8.0.41-commercial - MySQL Enterprise Server - Commercial, will now be checked for compatibility issues for upgrade to MySQL 8.0.41... Util.checkForServerUpgrade: Detected MySQL Server version is 8.0.41. MySQL Shell cannot check MySQL server instances for upgrade if they are at a version the same as or higher than the MySQL Shell version. (ArgumentError) # # breaking interactive test # $ mysql-8.4/shell/bin/mysqlsh --host=localhost --user=sa --port=3306 MySQL Shell 8.4.5 ... Your MySQL connection id is 2316 Server version: 8.0.41-commercial MySQL Enterprise Server - Commercial ... MySQL localhost:3307 ssl SQL > \status MySQL Shell version 8.4.5 Connection Id: 2316 Current schema: Current user: sa@localhost ... # normally, entering a new line executes the statement (like the above) # but the parser isn't happy with either command and expects more: MySQL localhost:3307 ssl SQL > util.help("checkForServerUpgrade") -> -> util.checkForServerUpgrade() -> ; ERROR: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'util.help("checkForServerUpgrade") # # checking the previous command (up arrow) shows this: # MySQL localhost:3307 ssl SQL > util.help("checkForServerUpgrade") util.checkForServerUpgrade() ; # # working command line test # $ mysql-8.0/shell/bin/mysqlsh --socket=/var/lib/mysql/mysql.sock --user=sa --host=localhost --port=3306 -e "util.checkForServerUpgrade()" The MySQL server at localhost:3306, version 8.0.41-commercial - MySQL Enterprise Server - Commercial, will now be checked for compatibility issues for upgrade to MySQL 8.0.41... Util.checkForServerUpgrade: Detected MySQL Server version is 8.0.41. MySQL Shell cannot check MySQL server instances for upgrade if they are at a version the same as or higher than the MySQL Shell version. (ArgumentError) at (command line):1 # # broken command line test # $ mysql-8.4/shell/bin/mysqlsh --socket=/var/lib/mysql/mysql.sock --user=sa --host=localhost --port=3306 -e "util.checkForServerUpgrade()" ERROR: 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'util.checkForServerUpgrade()' at line 1