Hello,

 

Kamailio is not multi-threaded, it is multi-process. Each process opens its own connection to the DB.

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Kjeld Flarup
Sent: Wednesday, August 12, 2020 10:55 PM
To: miconda@gmail.com; Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Mysql lastinsertid

 

Hi Daniel

I can do that, but am I guaranteed, that the right value is returned?

Kamailio is multithreaded, and I do now know if the mysql connection is shared across threads.

-------------------- Med Liberalistiske Hilsner ----------------------
   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk

On 8/12/20 12:25 PM, Daniel-Constantin Mierla wrote:

Have you tried to do "SELECT LAST_INSERT_ID()" with sql_query() from sqlops module?

Cheers, Daniel

On 12.08.20 11:24, Kjeld Flarup wrote:

In the configuration file. 

 

  Kjeld

 

Den ons. 12. aug. 2020 kl. 11.14 skrev Daniel-Constantin Mierla <miconda@gmail.com>:

Hello,

do you need it in the configuration file, or inside C code?

Cheers,
Daniel

On 12.08.20 00:09, Kjeld Flarup wrote:
> Hello
>
> I wonder if there is some way to get the lastinsertid from an "INSERT
> INTO" sql_query
>
> -- 
> -------------------- Med Liberalistiske Hilsner ----------------------
>    Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
>    Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
>    Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla


 

--

--------------------- Med Liberalistiske Hilsner ----------------------

   Civilingeniør, Kjeld Flarup - Mit sind er mere åbent end min tegnebog
   Sofienlundvej 6B, 7560 Hjerm, Tlf: 40 29 41 49
   Den ikke akademiske hjemmeside for liberalismen - www.liberalismen.dk
 



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla