[sr-dev] [kamailio/kamailio] Free database column name as part of database result cleanup (#611)

Daniel-Constantin Mierla notifications at github.com
Wed May 11 14:08:25 CEST 2016


I don't really like this approach. The column names are not used inside the modules that conenct to the database, is only sqlops that exposes them and can be accessed in the configuration file. So I would not like to clone the column names if they are not necessary, some db operations are done quite frequest (e.g., auth db).

You haven't named the modules with issues, just some generic description that some do and some don't. I am not saying that there are not issues, but they need to be identified properly and see what is the best fix for it. I manly use mysql module for databases (and some bits of mongo).

I remember there was a similar patch back in August-September last year more or less trying to address some issues with the Postgres module, but afaik there was a different patch.

Anyhow, there can be indeed cases when the column name must be cloned. For this case I would go with the approach done for db result values. A flag is kept for each to indicate whether it has to be freed or not. That means adding a flags or similar field in db column structure that will be set by each db module if they do cloning of the column name. I can add this to the core and you can come with the patch for the module that really needs this cloning.

Of course, comments about my suggestion and other proposals are welcome.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/611#issuecomment-218440401
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160511/6e1d472a/attachment.html>


More information about the sr-dev mailing list