OCSInventory-NG / OCSInventory-Server

Communication server of OCS Inventory
http://www.ocsinventory-ng.org/
GNU General Public License v2.0
353 stars 140 forks source link

[BUG] SQL registry_regvalue_cache, regvalue column type #299

Closed dust63 closed 3 years ago

dust63 commented 3 years ago

Operating system : Cent OS 7

Server informations Perl version : 5.16.3 Mariadb : 10.3.12

Server installation method ( Only one choice ) RPM Package Install SH Manual installation OCS Inventory informations Ocs server version : 2.7

Problem's description We can see in the log of MariaDB that a query take some time: INSERT INTO registry_regvalue_cache(REGVALUE) SELECT distinct REGVALUE FROM registry;

When we execute this request we have a error that regvalue is too long to insert in table registry_regvalue_cache. The problem that the the column reg_value on registry_regvalue_cache is structure of VARCHAR 255 and in the registry value the column is set to TEXT.

We update the column type on registry_regvalue_cache to TEXT too and it's ok. Need to be fix in your side ;)

dust63 commented 3 years ago

In addition we can't find where the SQL query "INSERT INTO registry_regvalue_cache(REGVALUE) SELECT distinct REGVALUE FROM registry;" is executed.

gillesdubois commented 3 years ago

Hi @dust63

To anwser your last question, cache queries are generated so searching for the query itself won't show any result.

Thanks for your report we keep note of that for our next release :)

Regards, Gilles.

charleneauger commented 3 years ago

Hi @dust63 ,

This issue has been fixed with the following PR : https://github.com/OCSInventory-NG/OCSInventory-ocsreports/pull/1200

Best regards, Charlene