[Asterisk-Dev] Re: Query on SQL Query

Peter Nixon listuser at peternixon.net
Sat Apr 24 12:28:22 MST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Regardless if the queries are made configureable of not, the default queries 
should be correct. If you ask any professional DBA they will tell you that 
the only correct time to use a SELECT * is when the * is wrapped in brackets. 
(For example "SELECT count(*) from cdr").
The current queries do not allow the addition of extra fields for external 
processing, or even an auto incremented Primary Key as it would break the C 
code that processes the result returned from "SELECT *". With my patch, these 
type of changes and additions are possible without killing asterisk..

Regards

Peter

On Saturday 24 April 2004 23:00, brian k. west wrote:
> Why aren't the queries a config option?
>
> bkw
>
> ----- Original Message -----
> From: "Olle E. Johansson" <oej at edvina.net>
> To: <asterisk-dev at lists.digium.com>
> Sent: Saturday, April 24, 2004 12:26 PM
> Subject: [Asterisk-Dev] Query on SQL Query
>
> > http://bugs.digium.com/bug_view_page.php?bug_id=0001479
> >
> > This patch changes SQL SELECTs in MYSQL_FRIENDS for IAX2 and SIP from
> > SELECT * to SELECT <fieldnamelist>.
> >
> > The contributor feels that this is a better way. If you agree or
> > disagree, add your notes to the bug report so that we can move this
> > forward or close
>
> this
>
> > report.
> >
> > Thank you for your contribution!
> >
> > /Olle
> > _______________________________________________
> > Asterisk-Dev mailing list
> > Asterisk-Dev at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-dev
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev

- -- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAir/dAcdsUt9pJjwRAiWGAKCb0xpiPJ3Hsn3FSEj3tIgkUITNogCg0QzA
2g+COtIZIoYqfaSZU5GfdJE=
=zW5E
-----END PGP SIGNATURE-----



More information about the asterisk-dev mailing list