During execution, when attempting to determine if the database type is MySQL or MariaDB, the version line is partitioned on the separator "-MariaDB". When running this on a cluster utilizing MySQL, this command does not return the expected output as "-MariaDB" does not exist in the MySQL output of 'mysql -V'.
head, sep, tail = temp.partition('-MariaDB')
The output from this command needs to be checked before proceeding to the population of the db_version variable. If empty split using a value from the MySQL output before populating db_version.
MySQL 'mysql -V' Output:
mysql Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using EditLine wrapper
Line where error occurs:
db_version = x[0] + '.' + x[1]
Error Message:
python3 version_check_base.py
Traceback (most recent call last):
File "version_check_base.py", line 277, in
main()
File "version_check_base.py", line 273, in main
version_check()
File "version_check_base.py", line 111, in version_check
db_version = x[0] + '.' + x[1]
IndexError: list index out of range
During execution, when attempting to determine if the database type is MySQL or MariaDB, the version line is partitioned on the separator "-MariaDB". When running this on a cluster utilizing MySQL, this command does not return the expected output as "-MariaDB" does not exist in the MySQL output of 'mysql -V'.
head, sep, tail = temp.partition('-MariaDB')
The output from this command needs to be checked before proceeding to the population of the db_version variable. If empty split using a value from the MySQL output before populating db_version.
MySQL 'mysql -V' Output:
mysql Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using EditLine wrapper
Line where error occurs:
db_version = x[0] + '.' + x[1]
Error Message: python3 version_check_base.py Traceback (most recent call last): File "version_check_base.py", line 277, in
main()
File "version_check_base.py", line 273, in main
version_check()
File "version_check_base.py", line 111, in version_check
db_version = x[0] + '.' + x[1]
IndexError: list index out of range