No subject


Tue Jun 24 01:22:11 CDT 2008


If you specify the keyword IGNORE in an INSERT with many rows, any rows that
duplicate
an existing PRIMARY or UNIQUE key in the table are ignored and are not
inserted.

***********************************
Brandon Mullenberg
Dialup USA, Inc.
Tel: 888-460-2286 ext 202
Fax: 866-627-8808
Email: brandon at dialupusa.net
**********************************

----- Original Message ----- 
From: "Brian Morris" <brian at netspeed.com.au>
To: "Brandon" <brandon at dialupusa.net>; "Paul" <paul at kbs.net.au>
Cc: <radiator at open.com.au>
Sent: Thursday, July 24, 2003 8:29 PM
Subject: Re: (RADIATOR) Issue with Duplicate Key when Adding a Session


> Hmm... What are the implications of an "Insert Ignore"?
>
> Will it override the primary key constraint thus giving you two rows with
> the same primary key or will it simply not do the insert?
>
> Regards,  Brian.
>
> (The reason I ask is that I get them too)
>
>
>
> ----- Original Message ----- 
> From: "Brandon" <brandon at dialupusa.net>
> To: "Paul" <paul at kbs.net.au>
> Cc: <radiator at open.com.au>
> Sent: Friday, July 25, 2003 1:07 PM
> Subject: Re: (RADIATOR) Issue with Duplicate Key when Adding a Session
>
>
> > I would recommend using an INSERT IGNORE instead of an INSERT.
> >
> > This is a mysql issue, it means that you have a unique key (primary key)
> > defined in
> > your mysql table and your are trying to add another entry with the same
> > unique key.
> >
> > ***********************************
> > Brandon Mullenberg
> > Dialup USA, Inc.
> > Tel: 888-460-2286 ext 202
> > Fax: 866-627-8808
> > Email: brandon at dialupusa.net
> > **********************************
> >
> > ----- Original Message ----- 
> > From: "Paul" <paul at kbs.net.au>
> > To: <radiator at open.com.au>
> > Sent: Thursday, July 24, 2003 6:49 PM
> > Subject: (RADIATOR) Issue with Duplicate Key when Adding a Session
> >
> >
> > > Hi All,
> > >
> > > We are using Radiator 3.6 with latest patches but we are seeing an
issue
> > > when a new session is added. We're getting Duplicate key which appears
> to
> > be
> > > coming from the internal handler code rather than MySQL itself. Below
is
> > the
> > > error when it occurs. We've modified our "delete from RADONLINE" query
> to
> > > match the details more accurately and we don't appear to be having any
> > > problems with this, it's just "Adding session for %s" is where it
seems
> to
> > > go astray.
> > >
> > > Thu Jul 24 20:57:37 2003: DEBUG:  Adding session for myuser at hehe.com,
> > > 1.2.3.4, 6256
> > >
> > > Thu Jul 24 20:57:37 2003: DEBUG: do query is: 'delete from RADONLINE
> where
> > > NASIDENTIFIER='1.2.3.4' and NASPORT=6256 and ACCTSESSIONID =
> '00062398'':
> > >
> > > Thu Jul 24 20:57:37 2003: DEBUG: do query is: 'INSERT INTO RADONLINE
> > > (USERNAME, NASIDENTIFIER, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS,
> > > NASPORT, NASPORTTYPE, SERVICETYPE, DNIS, PHONENO, SESSIONKEY,
> > > ACCTSESSIONTIME, INPUTOCTETS, OUTPUTOCTETS, POPID,targetid,
> DOWNLOADRATE,
> > > UPLOADRATE, ORIGUSER)
> > >
> >
>
VALUES('myuser','1.2.3.4','00062398','1059044257','5.6.7.8','6256','Async','
> > > Framed-User','0312345678','03912345678', '6F419DF2',
> > > '2185','346903','2410144','61', '15', '45333', '26400',
> > 'myuser at hehe.com')':
> > >
> > > Thu Jul 24 20:57:37 2003: ERR: do failed for 'INSERT INTO RADONLINE
> > > (USERNAME, NASIDENTIFIER, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS,
> > > NASPORT, NASPORTTYPE, SERVICETYPE, DNIS, PHONENO, SESSIONKEY,
> > > ACCTSESSIONTIME, INPUTOCTETS, OUTPUTOCTETS, POPID, targetid,
> DOWNLOADRATE,
> > > UPLOADRATE, ORIGUSER)
> > >
> >
>
VALUES('myuser','1.2.3.4','00062398','1059044257','5.6.7.8','6256','Async','
> > > Framed-User','0312345678','03912345678', '6F419DF2',
> > > '2185','346903','2410144','61', '15', '45333', '26400',
> > 'myuser at hehe.com')':
> > > Duplicate entry '1.2.3.4-6256' for key 1
> > >
> > > If you have any ideas that'd be great. Thanks
> > >
> > > Regards,
> > >
> > > Paul Rivoli
> > > paul at kbs.net.au
> > > K B S   I N T E R N E T
> > >
> > >
> > >
> > > ===
> > > Archive at http://www.open.com.au/archives/radiator/
> > > Announcements on radiator-announce at open.com.au
> > > To unsubscribe, email 'majordomo at open.com.au' with
> > > 'unsubscribe radiator' in the body of the message.
> > >
> >
> > ===
> > Archive at http://www.open.com.au/archives/radiator/
> > Announcements on radiator-announce at open.com.au
> > To unsubscribe, email 'majordomo at open.com.au' with
> > 'unsubscribe radiator' in the body of the message.
>
>

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list