Sign in to follow this  
Sklo:D

Items get deleted after bugged unfreezing

Recommended Posts

Items which are unfrozen are deleted due to a syntax error in the returnFromFreezer methode, because this statement which is returning the frozen items to a normal item (new item is created) doesn't work, but the statement which deletes the old frozen items works, which means data loss as no new normal item is created but the old one is removed!!

 

After some research I have found this gem.... You can't add brackets where you like!

INSERT INTO ITEMS (SELECT * FROM FROZENITEMS WHERE WURMID=123456)

Fixed: INSERT INTO ITEMS SELECT * FROM FROZENITEMS WHERE WURMID=123456


Aug 24, 2016 8:14:53 PM com.wurmonline.server.items.DbItem returnFromFreezer
WARNING: Failed to unfreeze item 132332174041090
java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "SELECT": syntax error)
        at org.sqlite.core.DB.newSQLException(DB.java:890)
        at org.sqlite.core.DB.newSQLException(DB.java:901)
        at org.sqlite.core.DB.throwex(DB.java:868)
        at org.sqlite.core.NativeDB.prepare(Native Method)
        at org.sqlite.core.DB.prepare(DB.java:211)
        at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:40)
        at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:29)
        at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:18)
        at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:47)
        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:254)
        at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:226)
        at com.wurmonline.server.items.DbItem.returnFromFreezer(DbItem.java:3292)
        at com.wurmonline.server.items.Item.setThisAsParentFor(Item.java:4866)
        at com.wurmonline.server.items.Item.insertItem(Item.java:4288)
        at com.wurmonline.server.items.Item.insertItem(Item.java:3991)
        at com.wurmonline.server.behaviours.AutoEquipMethods.tryEquipInSlot(AutoEquipMethods.java:681)
        at com.wurmonline.server.behaviours.AutoEquipMethods.autoEquip(AutoEquipMethods.java:317)
        at com.wurmonline.server.behaviours.AutoEquipMethods.autoEquip(AutoEquipMethods.java:208)
        at com.wurmonline.server.behaviours.Action.poll(Action.java:2661)
        at com.wurmonline.server.behaviours.BehaviourDispatcher.action(BehaviourDispatcher.java:964)
        at com.wurmonline.server.creatures.Communicator.reallyHandle_CMD_ACTION(Communicator.java:6852)
        at com.wurmonline.server.creatures.Communicator.reallyHandle(Communicator.java:2384)
        at com.wurmonline.communication.SocketConnection.tick(SocketConnection.java:615)
        at com.wurmonline.communication.SocketServer.tick(SocketServer.java:172)
        at com.wurmonline.server.Server.run(Server.java:2411)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
.

Edited by Sklo:D
  • Like 1

Share this post


Link to post
Share on other sites

I noticed this this morning when i started up my test server, which i had not had running for months.

Share this post


Link to post
Share on other sites

How did it turn out? Anything on the account gone? I am in need of more details

Edited by Sklo:D

Share this post


Link to post
Share on other sites

Could not really tell, as its a test server, I had all sorts of crap on the two chatacters.

If it helps and the logs have not been deleted i could post them here?

Share this post


Link to post
Share on other sites

For the record, the query does work in MySQL dialect (tested), though the parenthesis-less version also works (and is proper ANSI SQL). Obviously the log shows that it does not work on Sqlite.

 

Thanks for the report.

  • Like 1

Share this post


Link to post
Share on other sites

Especially with different SQL versions I really recommend the usage of standard SQL syntax. INSERT INTO (field1, field2,....) VALUES (......); or like this: http://stackoverflow.com/questions/25969/sql-insert-into-values-select-from

 

But using SELECT * FROM with INSERT statements needs an SQL type which is smart enough to determine which field is which and of course be careful with brackets at INSERT statements as we can see they are different. I was suprised that SQLite can handle the SELECT * FROM clause in the INSERT.

 

The not so funny thing is that my players lost a lot of items...

Edited by Sklo:D
  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, Keenan said:

For the record, the query does work in MySQL dialect (tested), though the parenthesis-less version also works (and is proper ANSI SQL). Obviously the log shows that it does not work on Sqlite.

 

Thanks for the report.

 

And when do we expect to get MySQL packed with WU   *wink* 

Share this post


Link to post
Share on other sites

Yeah customer support... It's like they want to kill WU off because WO is suffering due to excellent WU servers, when private servers offer better support than the original company. :rolleyes:

Edited by Sklo:D

Share this post


Link to post
Share on other sites

Its not Keenan's fault :)    Waiting on the BIG man Rolf to sign off....     

Share this post


Link to post
Share on other sites
On 8/25/2016 at 7:29 AM, Sklo:D said:

Yeah customer support... It's like they want to kill WU off because WO is suffering due to excellent WU servers, when private servers offer better support than the original company. :rolleyes:

 

And it's this attitude which completely kills my drive and enthusiasm to go the extra mile for private WU server owners, Sklo. Respect flows both ways. For the record, I don't tolerate nor accept the cop-out of "Oh, it's not you - it's the other people you work with". We are a team, so respect the whole.

 

Let me clarify a few points.

 

1) Wurm Unlimited was never marketed for professionally run private servers. The intention was always to allow a home user to run their own personal Wurm experience. Your mileage may vary if you choose to exceed that expectation.

2) Part of the reason we never marketed it that way is due to the sheer amount of manpower supporting servers on that level would require.

3) In spite of all that, we have done our best to work in the best interests of server owners. None of us sit here playing with patches and commits to try and weight which ones would help or hinder WU or WO.

 

Criticism is one thing, but do keep in mind that we are actual people on the other end?

 

And now for an up tick... I do plan on working towards a beta for next week. This fix will be in that beta. There isn't a whole lot to merge up at this point as our primary focus has been PvP changes (which are not committed into our main branch), so this should be a smooth update that server admins can roll out themselves without much worry. There are no breaking changes with client/server communication, so there will be no compatibility issues.

 

I have a ton of coffee, some snacks, and I decided against the alcohol. Let's sprint.

Share this post


Link to post
Share on other sites
3 minutes ago, Keenan said:

 

And it's this attitude which completely kills my drive and enthusiasm to go the extra mile for private WU server owners, Sklo. Respect flows both ways. For the record, I don't tolerate nor accept the cop-out of "Oh, it's not you - it's the other people you work with". We are a team, so respect the whole.

 

Let me clarify a few points.

 

1) Wurm Unlimited was never marketed for professionally run private servers. The intention was always to allow a home user to run their own personal Wurm experience. Your mileage may vary if you choose to exceed that expectation.

2) Part of the reason we never marketed it that way is due to the sheer amount of manpower supporting servers on that level would require.

3) In spite of all that, we have done our best to work in the best interests of server owners. None of us sit here playing with patches and commits to try and weight which ones would help or hinder WU or WO.

 

Criticism is one thing, but do keep in mind that we are actual people on the other end?

 

And now for an up tick... I do plan on working towards a beta for next week. This fix will be in that beta. There isn't a whole lot to merge up at this point as our primary focus has been PvP changes (which are not committed into our main branch), so this should be a smooth update that server admins can roll out themselves without much worry. There are no breaking changes with client/server communication, so there will be no compatibility issues.

 

I have a ton of coffee, some snacks, and I decided against the alcohol. Let's sprint.

 

Sorry I probably didn't help this in the Bug report thread, nor the OP on this thread...but I do appreciate your efforts in doing something with WU it was never intended to do.   Hopefully you don't get to offended about my frustrations in that thread this morning. 

Most important when I say "CC" I'm not talking to you or the developers because I know who's doing the work and the limited staffing.   My fault is my own mostly.   I have had a clear vision which definitely exceeded that of which WU was marketed for.   I wanted that ultimate sandbox world for more than just friends but a whole community.   Some of my best friends have been made from opening up public servers to strangers and meeting new people.   I never intended to compete with Wurm because my development path isn't even focused on the same gameplay (but its success does sell more copies of WU).  I wont bore anyone with the details of my vision because this is by no means an advertisement....  

 

That said..

We burned out a coder, and most of my staff because of limitations with the WU engine as it stands.   My frustrations got the best of me this morning and I pulled a pretty drastic move by closing down my server to the public to try and salvage the great GM's and CA staff we have,  and a super community of old and new friends over the last year.    

 

 

Share this post


Link to post
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
Sign in to follow this