issues: 296161559
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
296161559 | MDU6SXNzdWUyOTYxNjE1NTk= | 635 | Purchasing a new skill throws Primary key violation inserting new skill row | 4855786 | closed | 0 | 3 | 2018-02-11T05:10:47Z | 2018-03-06T20:03:09Z | 2018-03-06T20:03:09Z | CONTRIBUTOR | <!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING --> ### Bug Report or Feature Request (mark with an `x`) ``` - [X] bug report -> please search issues before submitting - [ ] feature request ``` ### Repro steps. 1. Create character 2. Grant experience enough to get enough skill points to purchase a new skill 3. Spend skill points on new skill 4. Wait a bit 5. Server throws exception ### The log given by the failure. {MySql.Data.MySqlClient.MySqlException (0x80004005): Duplicate entry '1342177282-23' for key 'PRIMARY' at MySql.Data.MySqlClient.MySqlStream.ReadPacket() at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at ACE.Database.Database.DatabaseTransaction.<>c__DisplayClass10_0.<Commit>b__0() in D:\Repos\spazmodica\ACE\Source\ACE.Database\Database.cs:line 200 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)} MySql.Data.MySqlClient.MySqlException ### Desired functionality. Purchasing new skill should not throw error. ### Mention any other details that might be useful. Exception is in Task so does not crash server Inserts vs Updates are determined by the IsDirty and HasEverBeenSavedToDatabase flags Skills are all added to db upon creation, but purchasing does not set above flags correctly triggering error | {"url": "https://api.github.com/repos/ACEmulator/ACE/issues/635/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | completed | 79078680 | issue |