Jump to content
  • World update 21_1_16 broken...

    • Status: Completed
      Main Category: Database
      Sub-Category: sqlupdate
      Version: 2.0.11 Milestone: 20 Priority: Normal
      Implemented Version: 0.20

    World update 21_1_16 broken...

    Update 21_1_16 will not work It fails with error 1175, 'You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column' every time. All updates prior to this appear to work correctly.

    User Feedback

    Recommended Comments

    Until a PR will be made, edit the sql file and @line 53 add the following:

    AND `entry`>0

    The line in cause shall read

    UPDATE `gameobject_template` SET `data2`=3 WHERE `type`=6 AND `data9`>0 AND `data2`=1 AND `entry`>0;.

    Link to comment
    Share on other sites

    [quote=Xenithar]I will PR that if that is the ONLY entry being updated. Is that confirmed?[/quote]
    What do u mean by "if that is the only entry"? If it's about the records affected, the addition is an always-true, harmless expression involving a key, as to suppress the MySQL error.

    Link to comment
    Share on other sites

    As it is currently written, it can affect multiple records which match the criteria. If we put in an entry clause, it can only affect one entry. What I am asking, and will find out shortly, is how many entries match that criteria. I'll just do a SELECT statement with the search criteria to see how many results we get.

    Link to comment
    Share on other sites

    OK, I am an idiot. I just looked at your code and I see ">0". I was exhausted the last time I viewed this and thought that you had specified an entry number. My bad. I'll PR this fix today.


    21_1_22 is also broken. There are two spaces in front of the first line. I will fix this also.


    21_1_23 also has a space in front of line 1...


    As do 24 and 25. Also, 25 always fails without a reason. I will try to figure out why.

    Link to comment
    Share on other sites

    I have made a [url=https://github.com/mangoszero/database/pull/30]pull request[/url] which fixes the initial issue. The files 22-25 do not appear to have the spaces when edited in nano. I will look into them more and do a PR if the issue is the file being edited in Windows or something. I still have not figured out why 25 will not work.

    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