Closed vollkommenIrrelevant closed 2 years ago
@trasher
1. all ports having the same MAC address (nothing we can do about it)
We need an inventory file to reproduce and handle the case (if that cause an issue in glpi).
https://github.com/glpi-project/glpi/issues/13094#issuecomment-1326595917, search for e0:07:1b:4e:68:12 in the file.
OK, but I do not see what the problem is. Also, as you said, there is nothing we can do about it.
Anyways, I'm still not able to reproduce the initial reported issue.
OK, but I do not see what the problem is. Also, as you said, there is nothing we can do about it.
Anyways, I'm still not able to reproduce the initial reported issue.
Way to reproduce:
STRICT_ALL_TABLES
is set in sql_mode
(SET GLOBAL sql_mode = ...)diff --git a/tests/functionnal/Glpi/Inventory/Assets/NetworkEquipment.php b/tests/functionnal/Glpi/Inventory/Assets/NetworkEquipment.php
index 40407d329f..0d144fd315 100644
--- a/tests/functionnal/Glpi/Inventory/Assets/NetworkEquipment.php
+++ b/tests/functionnal/Glpi/Inventory/Assets/NetworkEquipment.php
@@ -336,7 +336,7 @@ Compiled Mon 23-Jul-12 13:22 by prod_rel_team</COMMENTS>
<CONNECTIONS>
<CDP>1</CDP>
<CONNECTION>
- <IFNUMBER>22</IFNUMBER>
+ <IFNUMBER>E0-07-1B-4E-68-12</IFNUMBER>
<SYSMAC>00:24:b5:bd:c8:01</SYSMAC>
</CONNECTION>
</CONNECTIONS>
3. inventory_format not enforcing data type:
Not sure I understand. With an "integer" type as it's currently set, file won't validate if you put a string. I'd be surprised if a mac as logical number is really converted, I guess XML converter casts or drop it. Anyways this is not a case we've already seen; and since no inventory file has been provided, no tests has been done.
That's right, the file shouldn't validate. And as it's passed anyway, the DB throws warnings as it gets strings instead of numbers.
2. Make sure `STRICT_ALL_TABLES` is set in `sql_mode` (SET GLOBAL sql_mode = ...)
That does not seems a good idea to do that.
Anyways, on the validation part, this should not be allowed; I'll test if that fails.
Anyways, on the validation part, this should not be allowed; I'll test if that fails.
Results of my tests (on current GLPI 10 nightly build):
Of course, MAC to integer conversion is not expected at all and can cause difficult to understand issues. I'll take an eye.
Code of Conduct
Is there an existing issue for this?
Version
1.0.3
Bug description
I have a lot errors in sql-errors.log. Is anybody having an Idea how to handle this errors?
Relevant log output
Page URL
No response
Steps To reproduce
No response
Your GLPI setup information
Informationen über das System, die Installation und die Konfiguration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
No response