Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

DB Error #1062 (presumably while adding new staff member)

While configuring and testing my osTicket installation suddenly got this mail:

Title: DB Error #1062
Body:
[INSERT INTO `ost_team_member` SET `team_id` = '1', `flags` = 1]

Duplicate entry '1-0' for key 'PRIMARY'<br /> <br />
---- Backtrace ----<br />
#0 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\include\mysqli.php(204): osTicket->logDBError('DB Error #1062', '[INSERT INTO `o...')<br />
#1 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\include\class.orm.php(3133): db_query('INSERT INTO `os...', true, true)<br />
#2 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\include\class.orm.php(597): MySqlExecutor->execute()<br />
#3 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\include\class.staff.php(711): VerySimpleModel->save()<br />
#4 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\include\class.staff.php(1041): Staff->updateTeams(Array, Array)<br />
#5 C:\Bitnami\rubystack-2.3.4-4\apache2\htdocs\osTicket\scp\staff.php(47): Staff->update(Array, Array)<br />
#6 {main}
==========================================================================================

Staff member has been added as far as I can see, but what does this error mean (besides that there was a DB error - this I realize).
What should I now check and what steps should I check to repair possible damage (if any) and prevent this error in future?

Thank you!

Comments

  • Check their teams.. looks like it was trying to persist attributes after saving, so they might not have the intended permissions or access to the team you specified.
  • I added several members, but only once got this error. And, that last member was also added despite this error and I can't see any problems with him so far

    Is there a way to check db integrity?
  • Well, it's saying there is a duplicate key.. so maybe it tried to add the attributes twice at once? In which case, it's probably fine.

    No, I've not heard of any database integrity checkers. Apart from normal MySQL ones like
    https://mariadb.com/kb/en/mariadb/mysqlcheck/
  • Thank you Grizly, I'll try that checker
Sign In or Register to comment.