commit libdbi for openSUSE:Factory
Hello community, here is the log from the commit of package libdbi for openSUSE:Factory checked in at 2014-05-13 20:44:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdbi (Old) and /work/SRC/openSUSE:Factory/.libdbi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libdbi" Changes: -------- --- /work/SRC/openSUSE:Factory/libdbi/libdbi.changes 2014-04-26 10:05:39.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libdbi.new/libdbi.changes 2014-05-13 20:44:36.000000000 +0200 @@ -1,0 +2,6 @@ +Thu May 8 21:12:16 UTC 2014 - jengelh@inai.de + +- Update to git snapshot 0.9.0+git27 +* dbi: resolve bogus seeking into dbd + +------------------------------------------------------------------- Old: ---- libdbi-0.9.0.g23.tar.xz New: ---- libdbi-0.9.0.g27.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdbi.spec ++++++ --- /var/tmp/diff_new_pack.cbe54f/_old 2014-05-13 20:44:37.000000000 +0200 +++ /var/tmp/diff_new_pack.cbe54f/_new 2014-05-13 20:44:37.000000000 +0200 @@ -18,8 +18,8 @@ Name: libdbi %define lname libdbi3 -Version: 0.9.0.g23 -#Snapshot: libdbi-0.9.0-23-gef3e376 +Version: 0.9.0.g27 +#Snapshot: libdbi-0.9.0-27-g814d7ea Release: 0 Summary: Database Independent Abstraction Layer for C License: LGPL-2.1+ @@ -76,7 +76,11 @@ %build autoreconf -fi sed -i s,\-O20,\-O3,g configure -%configure --disable-static --docdir="%_docdir/%name" +%configure \ +%if !%build_doc + --disable-docs \ +%endif + --disable-static --docdir="%_docdir/%name" make %{?_smp_mflags} %install @@ -96,6 +100,8 @@ %_includedir/dbi/ %_libdir/libdbi.so %_libdir/pkgconfig/dbi.pc +%if %build_doc %_docdir/%name/ +%endif %changelog ++++++ libdbi-0.9.0.g23.tar.xz -> libdbi-0.9.0.g27.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi/include/dbi/dbi-dev.h new/libdbi/include/dbi/dbi-dev.h --- old/libdbi/include/dbi/dbi-dev.h 2014-04-17 16:54:03.000000000 +0200 +++ new/libdbi/include/dbi/dbi-dev.h 2014-05-03 20:30:09.000000000 +0200 @@ -71,7 +71,14 @@ enum { NOTHING_RETURNED, ROWS_RETURNED } result_state; dbi_row_t **rows; /* array of filled rows, elements set to NULL if not fetched yet */ + + /* Current row pointer index (1-based) for DBI. */ unsigned long long currowidx; + /* + * Current row pointer index (1-based) that is synchronized to what + * the current pointer inside the DBD. + */ + unsigned long long dbd_currowidx; } dbi_result_t; typedef struct _field_binding_s { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi/src/dbd_helper.c new/libdbi/src/dbd_helper.c --- old/libdbi/src/dbd_helper.c 2014-04-17 16:54:03.000000000 +0200 +++ new/libdbi/src/dbd_helper.c 2014-05-03 20:25:36.000000000 +0200 @@ -78,6 +78,7 @@ result->field_types = NULL; result->field_attribs = NULL; result->result_state = (numrows_matched > 0) ? ROWS_RETURNED : NOTHING_RETURNED; + /* result->rows[0] is intentionally unused; rows are in [1..n] */ result->rows = calloc(numrows_matched+1, sizeof(dbi_row_t *)); result->currowidx = 0; @@ -606,6 +607,11 @@ size_t _dbd_decode_binary(const unsigned char *in, unsigned char *out){ int i, e; unsigned char c; + + if (in == NULL || *in == '\0') { + return (size_t)0; + } + e = *(in++); i = 0; while( (c = *(in++))!=0 ){ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi/src/dbi_main.c new/libdbi/src/dbi_main.c --- old/libdbi/src/dbi_main.c 2014-04-17 16:54:03.000000000 +0200 +++ new/libdbi/src/dbi_main.c 2014-05-03 20:25:36.000000000 +0200 @@ -587,7 +587,14 @@ void dbi_conn_close(dbi_conn Conn) { dbi_conn_t *conn = Conn; - if (!conn || !(conn->connection)) return; + if (!conn) { + return; + } + + if (!(conn->connection)) { + free(conn); + return; + } _update_internal_conn_list(conn, -1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi/src/dbi_result.c new/libdbi/src/dbi_result.c --- old/libdbi/src/dbi_result.c 2014-04-17 16:54:03.000000000 +0200 +++ new/libdbi/src/dbi_result.c 2014-05-03 20:30:39.000000000 +0200 @@ -108,7 +108,7 @@ } /* row is one-based for the user, but zero-based to the dbd conn */ - retval = RESULT->conn->driver->functions->goto_row(RESULT, rowidx-1, RESULT->currowidx-1); + retval = RESULT->conn->driver->functions->goto_row(RESULT, rowidx-1, RESULT->dbd_currowidx-1); if (retval == -1) { _error_handler(RESULT->conn, DBI_ERROR_DBD); return 0; @@ -120,6 +120,7 @@ } RESULT->currowidx = rowidx; + RESULT->dbd_currowidx = rowidx; _activate_bindings(RESULT); return retval; } @@ -1789,8 +1790,6 @@ } static int _is_row_fetched(dbi_result_t *result, unsigned long long row) { - /* Bull patch reported by Tom Lane */ - /* if (!result->rows || (row >= result->numrows_matched)) return -1; */ if (!result->rows || (row > result->numrows_matched)) return -1; return !(result->rows[row] == NULL); } -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de