[OpenSIPS-Devel] [OpenSIPS/opensips] baa9c3: db_unixodbc: fix query result handling and improve...

Liviu Chircu liviu at opensips.org
Wed Oct 15 18:11:43 CEST 2014

  Branch: refs/heads/1.10
  Home:   https://github.com/OpenSIPS/opensips
  Commit: baa9c36421bc62ef1f1a389fd33d3a5ce0ab3522
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2014-10-15 (Wed, 15 Oct 2014)

  Changed paths:
    M modules/db_unixodbc/con.h
    M modules/db_unixodbc/dbase.c
    R modules/db_unixodbc/list.c
    R modules/db_unixodbc/list.h
    M modules/db_unixodbc/res.c
    M modules/db_unixodbc/row.c
    M modules/db_unixodbc/row.h
    M modules/db_unixodbc/val.c
    M modules/db_unixodbc/val.h

  Log Message:
  db_unixodbc: fix query result handling and improve performance

Until now, query rows were incrementally stored in a list with
separately allocated length and string buffers, along with a great deal
of useless pointer dereferencing, effectively wasting CPU cycles and pkg
mem usage.

This patch eliminates the linked list logic with a global buffer of
pointers (doubling in size when required) meant to hold each result column.
Each column is transparently freed by the DB backend. This completes
commit d63ee19a8.
(cherry picked from commit 683dfaa63df0af317f7485042539bdacf8646eab)



More information about the Devel mailing list