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

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


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




More information about the Devel mailing list