Hello community, here is the log from the commit of package libdbi-drivers for openSUSE:Factory checked in at 2014-07-15 08:01:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdbi-drivers (Old) and /work/SRC/openSUSE:Factory/.libdbi-drivers.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdbi-drivers" Changes: -------- --- /work/SRC/openSUSE:Factory/libdbi-drivers/libdbi-drivers.changes 2014-05-13 20:44:45.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libdbi-drivers.new/libdbi-drivers.changes 2014-07-15 08:01:14.000000000 +0200 @@ -1,0 +2,9 @@ +Mon Jul 7 11:17:31 UTC 2014 - [email protected] + +- Update to new git snapshot 0.9.0+git46 +* Support automatic reconnect under MySQL +* Support character set retention across autoreconnect cycles +* Have drivers use the new DBI_TYPE_XDECIMAL type +- Enable building FreeTDS plugin + +------------------------------------------------------------------- Old: ---- libdbi-drivers-0.9.0.g42.tar.xz New: ---- libdbi-drivers-0.9.0.g46.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdbi-drivers.spec ++++++ --- /var/tmp/diff_new_pack.knvuGo/_old 2014-07-15 08:01:15.000000000 +0200 +++ /var/tmp/diff_new_pack.knvuGo/_new 2014-07-15 08:01:15.000000000 +0200 @@ -17,21 +17,23 @@ Name: libdbi-drivers -Version: 0.9.0.g42 -#Snapshot: libdbi-drivers-0.9.0-42-g209e317 +Version: 0.9.0.g46 +#Snapshot: libdbi-drivers-0.9.0-46-g0ee8394 Release: 0 Summary: Database drivers for libdbi License: LGPL-2.1+ Group: Productivity/Databases/Servers URL: http://libdbi-drivers.sf.net/ +#Git-Clone: git://git.code.sf.net/p/libdbi-drivers/libdbi-drivers #Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz Source: %name-%version.tar.xz BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext -BuildRequires: libdbi-devel >= 0.9.0.g21 +BuildRequires: freetds-devel +BuildRequires: libdbi-devel >= 0.9.0.g30 BuildRequires: libtool BuildRequires: mysql-devel BuildRequires: openjade @@ -54,6 +56,16 @@ similar to the DBI/DBD layer in Perl. Drivers are distributed separately from the library itself. +%package dbd-freetds +Summary: FreeTDS driver for libdbi +Group: System/Libraries + +%description dbd-freetds +This driver provides connectivity to FreeTDS database servers +through the libdbi database independent abstraction layer. Switching +a program's driver does not require recompilation or rewriting source +code. + %package dbd-mysql Summary: MySQL driver for libdbi Group: System/Libraries @@ -75,7 +87,7 @@ code. %package dbd-sqlite -Summary: SQLite (old) driver for libdbi +Summary: SQLite2 driver for libdbi Group: System/Libraries %description dbd-sqlite @@ -94,17 +106,18 @@ %prep %setup -qn %name - -#ensure license doesn't have a executable permission -chmod 644 COPYING +chmod a-x COPYING # Fake the __DATE__ so we do not needelessly rebuild FAKE_BUILDDATE=$(LC_ALL=C date -u -r %_sourcedir/%name.changes '+%%b %%e %%Y') sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" drivers/*/*.c %build -autoreconf -fi +if [ ! -e configure ]; then + autoreconf -fi +fi %configure \ + --with-freetds \ --with-mysql \ --with-pgsql \ --with-sqlite3 --with-sqlite \ @@ -121,6 +134,12 @@ %check make check || : +%files dbd-freetds +%defattr(-,root,root) +%doc COPYING +%dir %_libdir/dbd +%_libdir/dbd/libdbdfreetds.so + %files dbd-mysql %defattr(-,root,root) %doc COPYING ++++++ libdbi-drivers-0.9.0.g42.tar.xz -> libdbi-drivers-0.9.0.g46.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/db2/dbd_db2.c new/libdbi-drivers/drivers/db2/dbd_db2.c --- old/libdbi-drivers/drivers/db2/dbd_db2.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/db2/dbd_db2.c 2014-06-30 12:02:07.000000000 +0200 @@ -714,6 +714,8 @@ case SQL_DECIMAL: case SQL_NUMERIC: case SQL_DECFLOAT: + _type = DBI_TYPE_XDECIMAL; + break; case SQL_CHAR: case SQL_LONGVARCHAR: case SQL_VARCHAR: @@ -942,6 +944,7 @@ } break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: ptr = malloc(100); CALL_SQL_GET_DATA(ptr, SQL_C_CHAR, 100); RETVAL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/freetds/dbd_freetds.c new/libdbi-drivers/drivers/freetds/dbd_freetds.c --- old/libdbi-drivers/drivers/freetds/dbd_freetds.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/freetds/dbd_freetds.c 2014-06-30 12:02:07.000000000 +0200 @@ -1061,6 +1061,7 @@ switch (result->field_types[idx]) { case DBI_TYPE_BINARY: case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: /* * Result is more that 8 bytes - * allocate additional memory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/ingres/dbd_ingres.c new/libdbi-drivers/drivers/ingres/dbd_ingres.c --- old/libdbi-drivers/drivers/ingres/dbd_ingres.c 2014-01-05 10:32:43.000000000 +0100 +++ new/libdbi-drivers/drivers/ingres/dbd_ingres.c 2014-06-30 12:02:07.000000000 +0200 @@ -614,10 +614,12 @@ // variable length UTF-16 string; first 2 bytes are length case IIAPI_NVCH_TYPE: case IIAPI_LNVCH_TYPE: + *type = DBI_TYPE_STRING; + break; // Ingres-native types, must be converted case IIAPI_DEC_TYPE: // packed decimal; use convertData or formatData case IIAPI_MNY_TYPE: // Ingres money; use convertData or formatData - *type = DBI_TYPE_STRING; + *type = DBI_TYPE_XDECIMAL; break; case IIAPI_DTE_TYPE: // Ingres date; use convertData or formatData *type = DBI_TYPE_DATETIME; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/msql/dbd_msql.c new/libdbi-drivers/drivers/msql/dbd_msql.c --- old/libdbi-drivers/drivers/msql/dbd_msql.c 2014-05-04 10:41:08.000000000 +0200 +++ new/libdbi-drivers/drivers/msql/dbd_msql.c 2014-06-30 12:02:07.000000000 +0200 @@ -402,6 +402,8 @@ break; case MONEY_TYPE: + _type = DBI_TYPE_XDECIMAL; + break; case IPV4_TYPE: case CIDR4_TYPE: case CIDR6_TYPE: @@ -503,6 +505,7 @@ } break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: data->d_string = strdup(raw); row->field_sizes[curfield] = strlen( raw ); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/mysql/dbd_mysql.c new/libdbi-drivers/drivers/mysql/dbd_mysql.c --- old/libdbi-drivers/drivers/mysql/dbd_mysql.c 2014-05-04 10:41:08.000000000 +0200 +++ new/libdbi-drivers/drivers/mysql/dbd_mysql.c 2014-07-07 13:15:43.000000000 +0200 @@ -164,6 +164,7 @@ const char *dbname = dbi_conn_get_option(conn, "dbname"); const char *encoding = dbi_conn_get_option(conn, "encoding"); const char *port = dbi_conn_get_option(conn, "port"); + int reconnect; if (port) { n_port = strtol(port, NULL, 10); } @@ -206,6 +207,12 @@ mysql_options(mycon, MYSQL_OPT_CONNECT_TIMEOUT, (const char*) &timeout); } + reconnect = dbi_conn_require_option_numeric(conn, "reconnect"); + if (reconnect >= 0) { + my_bool opt = reconnect; + mysql_options(mycon, MYSQL_OPT_RECONNECT, &opt); + } + if (!mysql_real_connect(mycon, host, username, password, dbname, (unsigned int)n_port, unix_socket, client_flags)) { /* printf("mysql_real_connect failed with host=%s\nusername=%s\npassword=%s\ndbname=%s\nport=%s\n", username,password,dbname,port); */ conn->connection = (void *)mycon; // still need this set so _error_handler can grab information @@ -224,17 +231,13 @@ if (!strcmp(encoding, "auto")) { encoding = dbd_get_encoding(conn); if (encoding) { - asprintf(&sql_cmd, "SET NAMES '%s'", dbd_encoding_from_iana(encoding)); - result = dbd_query(conn, sql_cmd); - free(sql_cmd); - dbi_result_free(result); + if (mysql_set_character_set(conn->connection, dbd_encoding_from_iana(encoding)) != 0) + printf("failure on charset\n"); } } else { - asprintf(&sql_cmd, "SET NAMES '%s'", dbd_encoding_from_iana(encoding)); - result = dbd_query(conn, sql_cmd); - free(sql_cmd); - dbi_result_free(result); + if (mysql_set_character_set(conn->connection, dbd_encoding_from_iana(encoding)) != 0) + printf("failure on charset\n"); } } @@ -555,6 +558,8 @@ MYSQL_RES *res; if (mysql_query((MYSQL *)conn->connection, statement)) { + fprintf(stderr, "mysql error: %s\n", + mysql_error((MYSQL *)conn->connection)); return NULL; } @@ -802,15 +807,18 @@ _type = DBI_TYPE_BINARY; break; } + /* fallthru */ case FIELD_TYPE_VAR_STRING: case FIELD_TYPE_STRING: + case FIELD_TYPE_ENUM: + case FIELD_TYPE_SET: + _type = DBI_TYPE_STRING; + break; #ifdef FIELD_TYPE_NEWDECIMAL case FIELD_TYPE_NEWDECIMAL: // Precision math DECIMAL or NUMERIC field (MySQL 5.0.3 and up) #endif case FIELD_TYPE_DECIMAL: /* decimal is actually a string, has arbitrary precision, no floating point rounding */ - case FIELD_TYPE_ENUM: - case FIELD_TYPE_SET: - _type = DBI_TYPE_STRING; + _type = DBI_TYPE_XDECIMAL; break; } @@ -891,6 +899,7 @@ break; default: case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: data->d_string = strdup(raw); row->field_sizes[curfield] = strsizes[curfield]; break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/oracle/dbd_oracle.c new/libdbi-drivers/drivers/oracle/dbd_oracle.c --- old/libdbi-drivers/drivers/oracle/dbd_oracle.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/oracle/dbd_oracle.c 2014-06-30 12:02:07.000000000 +0200 @@ -708,6 +708,7 @@ switch (result->field_types[curfield]) { case DBI_TYPE_BINARY: case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: row->field_sizes[curfield] = length; break; @@ -755,6 +756,7 @@ break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: slen = row->field_sizes[curfield]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/pgsql/dbd_pgsql.c new/libdbi-drivers/drivers/pgsql/dbd_pgsql.c --- old/libdbi-drivers/drivers/pgsql/dbd_pgsql.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/pgsql/dbd_pgsql.c 2014-06-30 12:02:07.000000000 +0200 @@ -843,6 +843,7 @@ } break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: strsize = (size_t)PQgetlength((PGresult *)result->result_handle, rowidx, curfield); data->d_string = strdup(raw); row->field_sizes[curfield] = strsize; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/sqlite/dbd_sqlite.c new/libdbi-drivers/drivers/sqlite/dbd_sqlite.c --- old/libdbi-drivers/drivers/sqlite/dbd_sqlite.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/sqlite/dbd_sqlite.c 2014-06-30 12:02:07.000000000 +0200 @@ -1197,6 +1197,8 @@ break; case FIELD_TYPE_DECIMAL: /* decimal is actually a string, has arbitrary precision, no floating point rounding */ + _type = DBI_TYPE_XDECIMAL; + break; case FIELD_TYPE_ENUM: case FIELD_TYPE_SET: case FIELD_TYPE_VAR_STRING: @@ -1273,6 +1275,7 @@ } break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: data->d_string = strdup(raw); row->field_sizes[curfield] = strlen(raw); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c new/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c --- old/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c 2014-05-01 17:10:53.000000000 +0200 +++ new/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c 2014-06-30 12:02:07.000000000 +0200 @@ -1654,6 +1654,8 @@ break; case FIELD_TYPE_DECIMAL: /* decimal is actually a string, has arbitrary precision, no floating point rounding */ + _type = DBI_TYPE_XDECIMAL; + break; case FIELD_TYPE_ENUM: case FIELD_TYPE_SET: case FIELD_TYPE_VAR_STRING: @@ -1732,6 +1734,7 @@ } break; case DBI_TYPE_STRING: + case DBI_TYPE_XDECIMAL: data->d_string = strdup(raw); row->field_sizes[curfield] = strlen(raw); break; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
