[rt-users] EffectiveId

Bruce Campbell bruce_campbell at ripe.net
Thu Aug 1 18:14:06 EDT 2002


On Thu, 1 Aug 2002, Walter Marchuk wrote:

> I am upgrading from RT 2.0.4 to RT 2.0.14.  I too believe it is an SQL
> issue, because if I install from scratch everything then works.
> The problem is that I need to retain the old data otherwise there is
> no upgrade.

Ok, so at a rough guess the id field in the Tickets table is somehow not
auto-incrementing.  Its late here ;)

> RT works except for new ticket creation.  Looking through mysql logs
> here is what I see:
> mysql> INSERT INTO Tickets (Creator, Due, Status, LastUpdatedBy, Resolved,
> Type, TimeWorked, LastUpdated, Subject, FinalPriority, Queue, Created,
> TimeLeft, InitialPriority, Owner, Priority, Starts) VALUES ('5',
> '1970-01-01 00:00:00', 'new', '5', NULL, 'ticket', '', '2002-08-01
> 18:10:56', 'test', '0', '8', '2002-08-01 18:10:56', '', '0', '5', '0',
> '1970-01-01 00:00:00');
> ERROR 1062: Duplicate entry '4485' for key 1

Hrm.  Personally I'd install from scratch to a new database to insure that
all of the tables are created correctly.  If the tables are the same as
etc/schema.mysql in the tarball, then you might be having oddities with
auto_increment.  Try:

mysql --user=rt_user --pass=PASSWORD rt2 \
      -e "ALTER TABLE Tickets AUTO_INCREMENT = someval;"

where someval is your highest ticket number plus 5 or 10.

> I only see one insert in the logs and then it quits..probably because of
> the error?

Yes, as it doesn't know which ticket id it just has, it cannot create any
other aspects of the transaction (well, it can create them, it just
doesn't know which ticket they're for).

> I've ran insertdata 2.0.4 and it doesnt seem to do much.

Regards,

-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B             Operations/Security






More information about the RT-Users mailing list