[rt-devel] Mysql DBI error on make install

Alex Krohn alex at gossamer-threads.com
Wed May 16 14:02:45 EDT 2001


Hi,

> Sorry again,
> 
> That error comes after this error:
> 
> This error is reported on make install:
> /usr/bin/perl /opt/webrt2/etc/insertdata
> RT::Handle=HASH(0x85bb414) no row id returned on row creation at
> /usr/lib/perl5/site_perl/5.005/DBIx/SearchBuilder/Handle/mysql.pm line 34.
> Creating system user...Could not create user
> 
> and the previous error was reported when running insertdata
> 
> Sorry for all the questions, anymore ideas?

I have a feeling you'll see a lot of these errors as I don't think this
version of RT has been tested with an older driver. 

Another difference with older DBD::mysql's is that it does not support:

        $sth->{mysql_insertid}

property to get the last inserted id. Instead, you use:

        $sth->{insertid}

This will throw a "depreciated warning" on the new DBD::mysql, so I
would recommend changing in DBIx/SearchBuilder/Handle/mysql.pm:

        $self->{'id'}=$self->dbh->{'mysql_insertid'};

to:

        $self->{id} = $sth->{mysql_insertid} || $sth->{insertid};

(I wasn't aware you could get it out of a dbh, is that correct? What if
you have multiple sth's doing inserts, which id would it be, the last
one?)

Cheers,

Alex

--------------------  Gossamer Threads Inc.  ----------------------
Alex Krohn                        Email: alex at gossamer-threads.com
Internet Consultant               Phone: (604) 687-5804
http://www.gossamer-threads.com   Fax  : (604) 687-5806





More information about the Rt-devel mailing list