Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Tickets Created with an ID of "0" #15458

Closed
2 tasks done
qaOYR opened this issue Aug 28, 2023 · 4 comments
Closed
2 tasks done

New Tickets Created with an ID of "0" #15458

qaOYR opened this issue Aug 28, 2023 · 4 comments
Labels

Comments

@qaOYR
Copy link

qaOYR commented Aug 28, 2023

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

Version

10.0.9

Bug description

New Tickets are created with an "ID" value of 0.

If ticket "0" is deleted, all subsequent new tickets are deleted. If it is "closed", all new tickets are closed. If it left as "New", all subsequent new tickets are then created successfully and with a status of "New".

In summary, my contention is that there is a serious bug in GLPi 10.0.9 that creates some tickets with an ID value of "0" as I have seen this happen in three separate installs. This ticket with an id of 0 determines what happens to subsequent tickets.

I assume that this isn´t a generalized problem and may be caused by interaction between code that was not there before 10.0.9 and a specific DB version of MariaDB, but it is quite clear to me that this bug was introduced by GLPi 10.0.9 as it never happened before the update.

It has taken us many hours to decipher what was going on.

Relevant log output

No response

Page URL

No response

Steps To reproduce

  1. Create new ticket
  2. See ticket created with an ID=0 and therefore cannot be acted upon.
  3. If you delete this ticket in the DB, all subsequent tickets will be deleted.
  4. If you close ticket 0 by changing its status in DB to 6, all subsequent tickets will be closed.

Your GLPI setup information

Operating system: Linux
Server Software: MariaDB Server
Server Version: 10.2.44-MariaDB
Server SQL Mode: NO_AUTO_VALUE_ON_ZERO

@cconard96
Copy link
Contributor

Try disabling the NO_AUTO_VALUE_ON_ZERO SQL mode flag. This mode shouldn't be enabled in a default installation of MySQL or MariaDB. Is the database server shared with another application that requires this SQL mode?

@qaOYR
Copy link
Author

qaOYR commented Aug 28, 2023

Try disabling the NO_AUTO_VALUE_ON_ZERO SQL mode flag. This mode shouldn't be enabled in a default installation of MySQL or MariaDB. Is the database server shared with another application that requires this SQL mode?

Thank you so much for your prompt reply. I actually thought about this, but did not recall changing the configuration of MySQL.

This was exactly the issue. We are going to review when this change was introduced in the configuration of our MySQL Server and make sure that this issue is clearly reflected in our internal docs to avoid having this issue resurface again in the future.

I really appreciate your prompt response as we have been scratching our heads for a while with this issue.

Many thanks and keep up the excellent work.

@qaOYR qaOYR closed this as completed Aug 28, 2023
@cedric-anne
Copy link
Member

Hi,

I reopen the issue as we should:

  • either fix the ticket creation logic (to not use the 0 value on creation, but NULL, to ensure compatibility with NO_AUTO_VALUE_ON_ZERO),
  • either force removal of this option (as we already do for ONLY_FULL_GROUP_BY), if we cannot be compatible with it.

@cedric-anne cedric-anne reopened this Sep 4, 2023
@cedric-anne cedric-anne added the bug label Sep 4, 2023
@trasher
Copy link
Contributor

trasher commented Sep 26, 2023

I do not really agree. Full group option was a default we cannot deal with; this one was explicitly set by user.

I'm pretty sure there are plenty of DB configuration options that can cause issues with GLPI (and many other software) - we can't deal with that.

@trasher trasher added question and removed bug labels Sep 26, 2023
cedric-anne added a commit to cedric-anne/glpi that referenced this issue Oct 3, 2023
@trasher trasher closed this as completed in c89019f Oct 3, 2023
btry pushed a commit to btry/glpi that referenced this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants