Jump to content
  • Remove "SET GLOBAL" from .sql scripts and find alternative


    madmax
    • Status: Awaiting Dev Review
      Main Category: Database
      Sub-Category: Show Stopper
      Version: 21.11 Milestone: 21 (Current) Priority: Normal
      Related to:
      Implemented Version: Unset
      Assigned: antz

    The "SET GLOBAL" variables used in the .sql update scripts were working prior to 5.5 but MySQL has made a change that they now need to be set in My.cnf

    This has been tested and verified by both myself and @H0zen. Making this entry so we can get a push at getting this changed or whatever changes are needed.

    It should be noted that only one .sql file in all of the updates actually need these lines added and I feel they are being overused.

    SET GLOBAL Statements

    SET GLOBAL net_read_timeout=30;
    SET GLOBAL net_write_timeout=60;
    SET GLOBAL net_buffer_length=1000000; 
    SET GLOBAL max_allowed_packet=1000000000;
    SET GLOBAL connect_timeout=10000000;

    MariaDB

    This issue is very obvious on MariaDB since it actually rejects the SET GLOBAL (i can only hope MySQL implement this). MariaDB sends back an error and fails the script from running any further. MySQL silently fails and continues to run the script.

    Currently to get updates to apply to MairaDB based server you have to remove the lines entirely from the top of the .sql files.

    My Recommendation:

    For updates that need the variables added we should add a special update step that forces the user to either make the change in My.cnf or enter the changes in the server console which would stay in effect until the server is restarted.

    A simple step in the scripts that need these settings to check what the server value is, is what we really need.

    Now awaiting feedback of other developers and @antz


    User Feedback

    Recommended Comments

    since mariaDB is not currently supported, this is actually a low priority.

    It will get reviewed in time and when the build system fully supports mariaDB all the existing updates beyond the base db will need to be adjusted at well,

    • Like 1
    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use