Welcome, Guest. Please login or register.

Author Topic: slot fieldīs lenght in modules table  (Read 1062 times)

joserra

  • Newbie
  • *
  • Posts: 15
    • View Profile
slot fieldīs lenght in modules table
« on: March 07, 2016, 02:44:17 PM »
Hi,

Discovery process broke with the following message:

Code: [Select]
...
WDEV:core6509-VSS written to nedi.devices
WIF :366 interfaces written to nedi.interfaces
DBD::mysql::st execute failed: Data too long for column 'slot' at row 1 at /var/nedi/inc/libdb.pm line 1234.
DBD::mysql::st execute failed: Data too long for column 'slot' at row 1 at /var/nedi/inc/libdb.pm line 1234.

After changing slot field definition with MySQL sentence ALTER TABLE modules MODIFY COLUMN slot varchar(255) DEFAULT ''; discovery process worked fine.
But NeDIO14 reboot changed again slot field definition to varchar(64).

Which is the process to fix this error ?

Tkx.

JoSerra

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2532
    • View Profile
    • NeDi
Re: slot fieldīs lenght in modules table
« Reply #1 on: March 07, 2016, 05:40:27 PM »
I went for truncating slots to fix this. Open inc/libsnmp.pm and look for this line in the Modules() function:

      my $slot  = substr(&misc::Strip($msl{"$misc::sysobj{$so}{mt}.$i"}),0,255);

Change to:
      my $slot  = substr(&misc::Strip($msl{"$misc::sysobj{$so}{mt}.$i"}),0,63);
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

joserra

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: slot fieldīs lenght in modules table
« Reply #2 on: March 09, 2016, 02:16:12 PM »
Hi Remo,

Thanks for your response.

There was a mistake in my question (i am using another NeDi installation for testing purpose  ::)).
Slot field definition can be changed on database schema and change is permanent (it is not affect by database repair on Nedio14 start).

Thks.