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

Liviu Chircu liviu at opensips.org
Wed Oct 15 18:08:50 CEST 2014


  Branch: refs/heads/1.11
  Home:   https://github.com/OpenSIPS/opensips
  Commit: e0c1fea5145906a25ca89fc49d3c361543972410
      https://github.com/OpenSIPS/opensips/commit/e0c1fea5145906a25ca89fc49d3c361543972410
  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