Menu

#206 Support MySQL 8.0

v1.0 (example)
open
None
5
2022-05-22
2022-05-07
Ahasuerus
No

Support MySQL 8.0. The version of MySQL currently used by ISFDB is 5.0, but we plan to upgrade to 8.0. There are numerous differences between the two versions, notably in regular expressions and in reserved words.

Discussion

  • Ahasuerus

    Ahasuerus - 2022-05-07
    • assigned_to: Ahasuerus
     
  • Ahasuerus

    Ahasuerus - 2022-05-07

    Part 1 installed in:

    common/SQLparsing.py
    edit/cleanup_report.py
    nightly/nightly_cleanup.py
    

    Installed in SVN 913 on 2022-05-07.

     
  • Ahasuerus

    Ahasuerus - 2022-05-08

    Part 2 - Fix a syntax error in a regular expression; set the default character set to latin-1 explicitly:

    common/SQLparsing.py
    nightly/nightly_cleanup.py
    

    Installed in SVN 914 on 2022-05-08.

     
  • Klaus Elsbernd

    Klaus Elsbernd - 2022-05-22

    I assume, that ISFDB is running on Linux. Most all distributions I know are using Mariadb instead of MySQL (Oracle). Is there any reason, why you prefer MySQL?
    Nevertheless, upgrading to the current version is a good idea. Any notes about the differences between the regex?

     
    • Al von Ruff

      Al von Ruff - 2022-05-22

      The current goal is to enable https with the least number of changes. That requires moving to the latest Linux, MySQL, Apache, and the last version of python2. Moving from MySQL to Mariadb implies moving the python connector to the Mariadb connector. The Mariadb connector is a fork of the MySQL python connector, which I have tried. While the new connector works with python3, I have been unable to get it to work with python2, and because it has a completely different API, it requires an extensive rewrite of SQLparsing.py. Additionally, if it cannot work under python2, and forces a move to python3, then every file in the ISFDB will need to be modified. So my preference would be to 1] move to a new connector, then 2] move to python3, then 3] look at database changes - if necessary. But right now I don't see a compelling reason to move to Mariadb, since it is just a non-Oracle fork of MySQL.

       
      • Ahasuerus

        Ahasuerus - 2022-05-22

        I believe at least 2 different developers have been able to get the ISFDB software to work with MariaDB without making major changes, although I am not sure which version(s) of MariaDB they were running.

         
    • Ahasuerus

      Ahasuerus - 2022-05-22

      The regex syntax change had to do with escaping square brackets like "]". I added an if-then-else condition to nightly/nightly_cleanup.py to check which version of MySQL is being run -- "select version()" in common/SQLparsing.py -- to determine how the brackets are to be escaped. Only one cleanup report was affected.

      Luckily, the ISFDB software only used one 8.0-reserved word as a column alias. It was fixed on 2022-03-02 -- see SR 202. No other changes were required.

       

Anonymous
Anonymous

Add attachments
Cancel