[Libdbi-drivers-devel] anyone still listening?
Hi, here's a ping to everyone who is still and maybe accidentally subscribed to this list. A bout of corona, quite harmless thanks to three helpings of Comirnaty, created some free time to fiddle with my software projects again, after being forced to neglect them for years. Long story short, I'd like to revert an ill-advised patch from 2017 and add an option to the MySQL driver which allows users to set the SQL mode per session, without having to reconfigure an entire server for specific purposes like some legacy SQL code. Problem is, my knowledge about release versioning and, even more so, library versioning, is rusty, to say the least. Neither of the changes will affect backward compatibility. The change to libdbi fixes a stupid patch which caused an extra error message without affecting the function of the library itself. The change to the driver honors another option but the driver works the same if the option is not set. So how am I supposed to deal with the versioning here? Helpful hints are greatly welcome. Also, feel free to suggest additional changes that the project might need. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] [PATCH 1/1] build: Use MYSQL_CONFIG variable instead of 'mysql_config'
Am 2021-10-14 09:17, schrub Herve Codina: The MYSQL_CONFIG variable is used to check 'mysql_config' prog. This variable can be override by the user but was not used for retrieving MYSQL_INCLUDE, MYSQL_LIBS, ... This commit replaces the hardcoded usage of 'mysql_config' by the use of MYSQL_CONFIG variable. This lead to 'MYSQL_CONFIG=/some/where/mysql_config ./configure' command to work properly. Signed-off-by: Herve Codina --- acinclude.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index e99318f..9dd2b0f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -116,15 +116,15 @@ if test "$ac_mysql" = "yes"; then fi if test "$ac_mysql_incdir" = "no"; then - MYSQL_INCLUDE=`mysql_config --include` + MYSQL_INCLUDE=`$MYSQL_CONFIG --include` else MYSQL_INCLUDE=-I$ac_mysql_incdir fi if test "$ac_mysql_libdir" = "no"; then if test "$ac_mysql_threadsafe" = "YES"; then - MYSQL_LIBS=`mysql_config --libs_r` + MYSQL_LIBS=`$MYSQL_CONFIG --libs_r` else - MYSQL_LIBS=`mysql_config --libs` + MYSQL_LIBS=`$MYSQL_CONFIG --libs` fi else if test "$ac_mysql_threadsafe" = "YES"; then Hi Herve, thanks for providing the patch - I've just pushed the changes. best regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] [PATCH] build: adjust configure for postgresql 10/11
Am 2019-03-21 15:45, schrieb Jan Engelhardt: The openSUSE PostgreSQL 11 no longer ships the pg_config program. Instead, there exists a .pc file (likewise in pg10), so make use of that, by default. The old --with-pgsql-inc and --with-pgsql-lib option are going away and replaced by the standardized mechanisms pkg-config.m4 has in store for when there is no .pc file or an unusual location: ./configure --with-pgsql pgsql_CFLAGS="-I/opt/pgsql/include" \ pgsql_LIBS="-L/opt/pgsql/lib -lpq" --- acinclude.m4 | 66 ++- drivers/pgsql/Makefile.am | 4 +-- 2 files changed, 12 insertions(+), 58 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 85eec28..e99318f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -154,64 +154,18 @@ AC_SUBST(MYSQL_TEST) AC_DEFUN([AC_CHECK_PGSQL], [ -AM_CONDITIONAL(HAVE_PGSQL, false) -ac_pgsql="no" -ac_pgsql_incdir="no" -ac_pgsql_libdir="no" -# exported variables -PGSQL_LIBS="" -PGSQL_LDFLAGS="" -PGSQL_INCLUDE="" -PGSQL_TEST="" +AC_ARG_WITH([pgsql], [AS_HELP_STRING([--without-pgsql], [Build without pgsql output plugin [default=test]])], + [ac_pgsql="$withval"], [ac_pgsql=auto]) +enable_pgsql=no +AS_IF([test "$ac_pgsql" = "auto"], [ + PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes], [:]) +], [test "$ac_pgsql" != "no"], [ + PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes]) +]) -AC_MSG_CHECKING(for PostgreSQL support) - -AC_ARG_WITH(pgsql, - [ --with-pgsqlInclude PostgreSQL support.], - [ ac_pgsql="$withval" ]) -AC_ARG_WITH(pgsql-incdir, - [ --with-pgsql-incdir Specifies where the PostgreSQL include files are.], - [ ac_pgsql_incdir="$withval" ]) -AC_ARG_WITH(pgsql-libdir, - [ --with-pgsql-libdir Specifies where the PostgreSQL libraries are.], - [ ac_pgsql_libdir="$withval" ]) - -if test "$ac_pgsql" = "yes"; then - AC_MSG_RESULT([yes]) - if test "$ac_pgsql_incdir" = "no" || test "$ac_pgsql_libdir" = "no"; then - AC_CHECK_PROG([PG_CONFIG], [pg_config], [yes], [no]) - if test "$PG_CONFIG" = "no"; then - AC_MSG_ERROR([cannot auto-configure PostgreSQL without pg_config]) - fi - fi - if test "$ac_pgsql_incdir" = "no"; then - PGSQL_INCLUDE="-I"`pg_config --includedir` - else - PGSQL_INCLUDE=-I$ac_pgsql_incdir - fi - if test "$ac_pgsql_libdir" = "no"; then - PGSQL_LDFLAGS=`pg_config --libdir` - else - PGSQL_LDFLAGS=-L$ac_pgsql_libdir - fi - - PGSQL_LIBS=-lpq - PGSQL_TEST="test_pgsql.sh" - - - AM_CONDITIONAL(HAVE_PGSQL, true) - - AC_SUBST(PGSQL_LIBS) - AC_SUBST(PGSQL_INCLUDE) - AC_MSG_CHECKING(for PostgreSQL includes) - AC_MSG_RESULT($PGSQL_INCLUDE) - AC_SUBST(PGSQL_LDFLAGS) - AC_MSG_CHECKING(for PostgreSQL libraries) - AC_MSG_RESULT($PGSQL_LDFLAGS) -else - AC_MSG_RESULT(no) -fi +AM_CONDITIONAL([HAVE_PGSQL], [test "$enable_pgsql" = yes]) +AS_IF([test "$enable_pgsql" = yes], [PGSQL_TEST="test_pgsql.sh"]) AC_SUBST(PGSQL_TEST) ]) diff --git a/drivers/pgsql/Makefile.am b/drivers/pgsql/Makefile.am index 058a9b5..f482eac 100644 --- a/drivers/pgsql/Makefile.am +++ b/drivers/pgsql/Makefile.am @@ -28,11 +28,11 @@ pgsql_sources = endif -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ @PGSQL_INCLUDE@ +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ ${pgsql_CFLAGS} driver_LTLIBRARIES = $(pgsql_ltlibs) libdbdpgsql_la_LDFLAGS = $(pgsql_ldflags) -libdbdpgsql_la_LIBADD = @PGSQL_LDFLAGS@ @PGSQL_LIBS@ @LIBADD_LIBDBI@ +libdbdpgsql_la_LIBADD = ${pgsql_LIBS} @LIBADD_LIBDBI@ libdbdpgsql_la_SOURCES = $(pgsql_sources) libdbdpgsql_la_DEPENDENCIES = dbd_pgsql.h Hi Jan, thanks for taking care of these PostgreSQL changes. Will you go ahead and push your changes to the repository? regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Make dbi_result an unspecified struct
Jan Engelhardt writes: Oh that is just a naming thing then. Use struct dbi_driver_s; typedef struct dbi_driver_s *dbi_driver; then for dbi.h. Yup, that worked like a charm. I've checked in the changes, see include/dbi/dbi.h.in revision 1.15. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] dbd_sqlite3 things
Jan Engelhardt writes: The find_result_field_types function in dbd_sqlite3.c tests for total( abs( and round( twice, which seems redundant. if ( strstr(curr_field_lower,avg() || strstr(curr_field_lower,sum() || strstr(curr_field_lower,total() || strstr(curr_field_lower,abs() || strstr(curr_field_lower,round() ) { return FIELD_TYPE_FLOAT; } ... if ( strstr(curr_field_lower,randomblob() || strstr(curr_field_lower,zeroblob() || strstr(curr_field_lower,total() || strstr(curr_field_lower,abs() || strstr(curr_field_lower,round() ) { return FIELD_TYPE_BLOB; } Hi, the second occurrences of these checks were indeed never reached during execution. I've checked in a fix (revision 1.51). thanks Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] dbd_sqlite3 turns PKINTEGER into longlong
Jan Engelhardt writes: dbd_sqlite3 has a discrepancy in how it treats integral primary key fields. sqlite CREATE TABLE foo (id int(11) primary key); sqlite CREATE TABLE bar (id integer primary key); when SELECTing from foo and bar with dbd_sqlite3, the find_result_field_types function turns bar.id into a LONGLONG. else if (strstr(curr_type, BIGINT) || strstr(curr_type, INTEGER PRIMARY KEY) /* BAD BAD HACK */ || strstr(curr_type, INT8)) { type = FIELD_TYPE_LONGLONG; } I think that LONGLONG is incorrect for INTEGER PRIMARY KEY. It should just be FIELD_TYPE_LONG. Hi, I think the current behaviour is correct. According to the SQLite docs (http://www.sqlite.org/lang_createtable.html#rowid), a column declared as INTEGER PRIMARY KEY always uses 64 bit integers. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60134791iu=/4140/ostg.clktrk ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] libdbi and libdbi-drivers versions 0.9.0 released, finally
Hi, unless you've already noticed I'd like to draw your attention to the fact that after years of heavy development :-) libdbi and libdbi-drivers are available at version 0.9.0. Although development definitely took way too long due to my enormous workload in my dayjob during the past couple of years (plus some extra burdens in my private life), the releases are finally out in the wild. I hope that all who have contributed code, ideas, and bug reports can be proud of the result. I'd like to specifically point out the new test kit, the concept of libdbi instances, transaction support, and the enormous speedup of reading MySQL result sets sequentially, all of which were either coded or requested by avid users. This holds true even if most of the cvs checkins carry my name - I've checked in lots of things originally provided by others. I'll update the web pages asap (see above). regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Debian oddities
Hi, I installed Debian Wheezy the other day to get access to a functional installation of firebird for testing purposes. In oder to build the firebird driver, I had to bend over backwards and issue the following commands: LDFLAGS=-L/usr/lib/i386-linux-gnu ./configure --with-firebird LDFLAGS=-L/usr/lib/i386-linux-gnu make To a longtime FreeBSD user, the requirement of such an arcane LDFLAGS setting appears just odd. Have I been missing something in terms of linuxisms in the past couple of years? Does firebird offer something along the lines of mysql-config to deal with headers and libraries in a platform-independent way? At this time, the magic in acinclude.m4 fails to uncover the libraries on Debian. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials, tech docs, whitepapers, evaluation guides, and opinion stories. Check out the most recent posts - join the conversation now. http://goparallel.sourceforge.net/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Cassandra driver
Hi Emmanuel, sorry for the delay, but I finally managed to add you as a developer today. Feel free to upload your driver at your earliest convenience. regards, Markus Emmanuel Courreges writes: Thanks for your reply Markus, I now have a working version which uses thrift c++ 0.8, cql3 queries which works fine with Cassandra 1.1.1 I realized later that I could have done it with thrift c_glib or thrift qt, but it would have been a bit more painful. There was no problem with types, as cassandra supports most of them. http://www.datastax.com/docs/1.1/references/cql/cql_data_types I would like to commit to CVS for the benefit of others, so I need write access to the repository. My login is ecourreges on sourceforge. Thank you. Regards, Emmanuel Courrèges. P.S: I see that the CVS version has the pgsql base36 error-code that I suggested a couple of years ago :-) On Wed, Jun 20, 2012 at 11:40 PM, markus.hoeni...@mhoenicka.de wrote: Emmanuel Courreges writes: FYI in case someone has already done it before me, I am about to attempt to write a driver for Cassandra using CQL-Thrift. Our C++ Apache WebService which already uses libdbi with drivers for mysql and postgres is going to need access to Cassandra, and it seems to me like coding a driver is less work than a whole backend with thread-pooling etc, which I've already built on top of dbi. I will keep you posted, and hope I can give it back to the community when done. It will have to be C++ with a lot of extern C declarations apparently, since thrift is C++. Regards, Emmanuel Courrèges Orange France - Profile and Syndication. Sounds like an interesting project, although it is unclear to me at this time how this apparently non-SQL database will fit into the strongly typed libdbi architecture. Please note also that we have planned long ago to move on to the 0.9 series which has several advantages over the latest official releases. You may wish to have a look at the current CVS code. The documentation contained therein should be quite up to date. I wish I had the time to finalize a release ... regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] multiple postgres versions
David Reiser writes: Can libdbi and libdbi-drivers handle multiple versions of the postgres driver (built for different postgres versions) on the same machine? I can readily segregate the drivers built with the different postgres headers and libraries and put symlinks back to the main libdbi dbd dir, but I don't see any way for libdbi to differentiate between two postgres drivers. Hi David, it can't out of the box, but as far as I understand you could still trick libdbi in thinking these are separate drivers. Please have a look at the driver source (libdbi-drivers/drivers/pgsql/dbd_pgsql.c). There's a structure called driver_info around line 59. The first member is the internal name of the driver. It should be possible to build one of your drivers with a different internal name, say pgsql-904, and use that name in your application to reference this particular version of the driver. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Solaris 10x86
Tim Tessier writes: To inform you - libdbi compiles fine on solaris 10x86 by performing the following: Thanks for reporting this, as I wouldn't be able to test this platform myself. line 734 _dbi_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME); changed to _dbd_internal_error_handler(conn, NULL, DBI_ERROR_BADNAME); To the best of my knowledge, this has been fixed a while ago. Would you mind testing the CVS versions of both libdbi and libdbi-drivers? diff -u test_dbi.c test_dbi.new.c test_dbi.patch patch test_dbi.c test_dbi.patch I'm sorry to say that we've entirely rewritten the test kit, so unfortunately I won't be able to just apply your patch. I'd greatly appreciate if you could use the current CVS versions (see above) and see if this problem still exists. If it does, you might be able to adapt your patch accordingly. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Segmentation fault in dbi_geterror
Peter Zimmerer writes: Hi Markus, thanks for your quick response. In the meantime I have corrected the names within my (local) copies of the sources and could successfully run the tests (except the drop database step, because the sqlite3 db file seems to be still open when the unlink(..) is executed). After looking at the code I realized that it was exactly this name clash that we fixed at some point in the path. The current cvs revisions all use err_no or my_errno to work around this issue. Therefore, the problem should no longer come up in the next release. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Segmentation fault in dbi_geterror
Peter Zimmerer writes: or rename the formal parameter error to ierror the problem will disappear. The same applies to function _dbd_internal_error_handler in file dbd_helper.c of the libdbi package. Have I done something wrong in the configuration or is this a bug? Hi Peter, I don't think you've done anything wrong in your setup. We have had previous cases of name clashes on Windows. I'll try to clean up the code in libdbi and libdbi-drivers and avoid using errno as a variable or parameter name. CVS at Sourceforge is still not back online, so it may take a few more days until you see the changes. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Problem compiling libdbi-drivers-0.8.3-1 on RHEL4 - Sender blocklisted
Hi Melissa, Huber, Melissa mhu...@ascentdata.com was heard to say: $Id: dbd.h,v 1.15 2002/06/14 22:08:22 dap Exp $ I think this makes it pretty clear that your libdbi version is ancient, to say the least. The version number you mentioned (0.6.5) is pretty much right. You'd need something like 0.8.3 to compile the 0.8.3 drivers. A quick search confirms that RHEL4 still ships 0.6.5 packages these days - this is also some sort of stability :-) Fedora seems to have 0.8.3 rpms. Could you use these? In any case, compiling libdbi shouldn't be a problem on RedHat. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
Toby Thain writes: It looks like cgreen is now built OK: That's good. test_dbi.c: In function 'main': test_dbi.c:543: error: expected expression before '' token test_dbi.c:550: error: expected expression before '==' token test_dbi.c:560: error: expected expression before '' token This again is pretty weird. Look at the corresponding source lines: 543: /* inform to cdash about your environment, just a bit */ 550: } 560: exit(1); This leaves me clueless. Are you sure your local copy of test_dbi.c is up to date? Or is that the result of some weird macro expansion that screws up the line numbers? It seems to me that the warnings should be eliminated. I'm with you here. Looks like there's some more work to be done. Most of these look like they can be eliminated by using, or casting to, more appropriate types. Not sure what to think about the compile error. Do you want to investigate (if you can reproduce), or shall I? As I cannot reproduce this, I'd greatly appreciate if you could investigate. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
João Henrique Freitas joa...@gmail.com was heard to say: libdbi-drivers have bundled with a version of cgreen. You don't need cmake or cgreen.h or libcgreen.a installed in your system. The automake tests/cgreen/Makefile.am do the cgreen build to be used by libdbi. Yes, I am aware of that. I was just wondering whether my attempts to build the cgreen subdir from a fresh CVS checkout did *not* fail because some version of cgreen was actually installed on my system, and hence the cgreen.h were available even if the directory structure of cgreen in our repository was incorrect. However, my test showed that I can indeed build the self-contained cgreen version that we ship with the libdbi-drivers sources. There is apparently nothing wrong with our sources and our repository. BTW I've tested the current cvs revision on Cygwin today, with the same results: cgreen builds without a hitch when running make in the libdbi-drivers top-level directory. cgreen is not installed here either. cvs co libdbi-drivers cd libdbi-drivers ./autogen.sh ./configure --with-sqlite3 --disable-docs gmake gmake dist gmake check It's right, I do it in Mandriva 2009 and Ubuntu 10.04, using make. This way is transparent to user. This is good to know. Cmake is used by cgreen as default build system. We provide a Makefile.am to glue with tests/Makefile.am. In tests/README, the step * Install Cgreen (optional, we provide it) is wrong. So, if I understand all this correctly, there is no need for having cmake installed on the libdbi-drivers developers or the end-users boxes. The cgreen version shipped with the libdbi-drivers sources should be built automatically when running make in the libdbi-drivers top-level directory. This would make things quite painless, unless we knew that it fails at least on Toby's box. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
Toby Thain t...@telegraphics.com.au was heard to say: I am having trouble building cgreen, either the bundled version b1 or latest from sf.net, b2. I create a cgreen-build directory and in it, cmake ../cgreen make But the cgreen.h header file is not created, etc, and nor would it be installed by make install. What am I missing? The header is required for 'make check'. I've just tried to build the CVS revision on Cygwin, and that doesn't work either. It used to work on my FreeBSD box though. The cgreen.h header file is present, but not where it is supposed to be, or maybe the -I setting of Makefile.am is incorrect. I'm wondering whether I screwed something up when importing the cgreen folder into CVS. João, are you listening? Could you please review the cgreen folder in CVS? I'll also look into that tonight. I reviewed the mysql script. When you refer to 'database cluster', I assume you mean an entire instance that can be set up, tested, and torn down, correct? -- Not just a schema in an existing instance. (Which is of course easier.) Yes. The cluster thing may be Postgres terminology, but you got the point. The idea is that most database engines use a default username and password right after initial setup which makes it easier to run automated tests. If you try to run the tests in an existing instance, you'll have to ask for the credentials which is not possible during automated tests. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
Toby Thain writes: For Ingres, it is probably not possible to create a new instance in an automated way, because (unlike MySQL, say) the scripts which do so are only part of the distribution package (rpm or tar) and are not in a standard installed system. If tests are run as the Ingres user (default 'ingres') then a new schema can be created within the existing instance. As I mentioned previously, this solution is second best but way better than no test script. I'd greatly appreciate if you could whip up something that uses the existing instance. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
Toby Thain writes: How much effort is it to change to use the test kit? The Ingres driver was complete and working last time I checked (some time ago), perhaps I can do something about this. Hi Toby, in order to fully support Ingres you'd have to check two things. First, João has migrated most of the existing tests to his new test framework, but as neither he nor I have access to all database engines, some tests may currently fail. We have designed the tests such that most of the checks are now against a structure close to the top of test_dbi.c which contains the expected results of the various tests for each database engine. As the tests themselves were not changed (except for a typo here and there), you'd mostly have to run the tests and edit the expected values until all tests succeed. Second, make check was rewritten to call a test script for each driver which was selected using ./configure. This test script runs test_dbi with appropriate input values. If real database engines are involved (i.e. all drivers except sqlite and sqlite3), it would be a nice thing if the test script would create separate database clusters and start a separate database engine for running the tests, if this is at all supported. This has been implemented for mysql and pgsql. You may have a look at these scripts and see if Ingres could be exercized in a similar fashion. If not, a simpler approach as in sqlite3 would be acceptable too, as long as things like username and password can be hard-coded. If even that is impossible, you might use a test script which gives appropriate instructions how to run test_dbi for this particular engine. I'd greatly appreciate if you could come up with something. The more drivers we support in full, the better for the project. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test harness: help and testers needed
João Henrique Freitas writes: DB2 driver is experimental and not test with new test framework yet. Ok, so this one remains experimental in any case. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] new test harness: help and testers needed
Markus Hoenicka writes: I'd greatly appreciate if you could help in testing and extending these features for our upcoming next release. As I haven't heard much about this lately, I reckon we'll have to make do without these amenities. Our current status is as follows: - 4 drivers (mysql, pgsql, sqlite, sqlite3) are in fairly good shape, the tests appear to work ok on several platforms - 1 driver (firebird) might be ok, but our test kit triggers a documented bug in firebird which no one was capable of working around yet - the remaining drivers are in various stages of completion. They may or may not work currently as I can't test them. In order to ship a release anytime soon, I'll have to declare all but the 4 working drivers as experimental. If anyone on this list has particular reasons to officially support one of these drivers, please speak up now. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r
Ethan Funk et...@redmountainradio.com was heard to say: Even with libdbi linked against the libmysqlclient_r library, the API is not thread safe with out the mysql_thread_start() and mysql_thread_end() calls on a **shared** connection, so including my change would not **hurt**. Linking agains the non _r library and you can't even run different connection on different threads. Would it be feasible to tell the libdbi driver how your app uses threads by means of a driver option? Something like mysql_one_conn_per_thread? This way, the driver could use some optimizations like yours which apply only under these particular conditions. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] mysql libdbi driver compiled against libmysqlclient not libmysqlclient_r
Ethan Funk writes: 2. Modify the dbd_mysql.c source file, changing dbd_disconnect as follows: int dbd_disconnect(dbi_conn_t *conn) { if (conn-connection) mysql_close((MYSQL *)conn-connection); // added the next three lines to resolve memory leak in threadsafe mysqlclient library: assumes each thread has it's own connection if(mysql_thread_safe()) mysql_thread_end(); return 0; } Is this generally applicable, or would that hurt if several threads share a connection? I wonder if this should be applied to the driver sources. 3. build and link the dbd_mysql driver. It MUST be linked agains the _r version of the mysqlclientlib. This was really tricky on OS X. I've added an --enable-mysql-threadsafe option to ./configure which allows to optionally link against libmysqlclient_r instead of libmysqlclient. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] new test framework available in cvs, please test
Balazs Scheidler ba...@balabit.hu was heard to say: What is needed to run a make check? Do we need all kind of database engines installed locally, or make check will only check those which were compiled? Sorry, I should have mentioned this. The new test framework is basically a drop-in replacement for the old one. It'll ask you which driver to test, so you can test whichever engine you prefer. There is no need to have all of them compiled. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] pgsql error codes
Emmanuel Courreges writes: You will find attached the patch for version 0.8.2-1 and 0.8.3-1 I've applied the patch with a little massaging to the current cvs revision. Could you run some tests with this version to see whether it works as expected? regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] dbi_result_free
kris.gro...@mmlab.de writes: I was wondering if anyone could enlighten me as to what happens in the following pseudo code: dbi_result x; dbi_result y; dbi_conn z; ...initialize whatever needs to be initialized... x = dbiquery(z,whatever); y = dbiquery(z,whatever2); ...process results... free x; free y; I am asking because of the text in the driver guide : Before the next database operation is performed, you must call dbi_result_free. Hi, I assume that this statement is simply wrong, but feel free to prove me wrong :-). libdbi does not reuse result handles, therefore you should be able to create as many result sets at a time as your memory can hold. It is only mandatory to free the result sets before you close the connection. This will help libdbi and the client libraries to free any allocated memory which was associated with these results. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] cgreen test problems [was: DB2 driver]
João Henrique Freitas writes: My first question is: I can pass one query with many statements together split by a semicolon? like above? I didn't find a definitive answer to this question, but looking at the Firebird API Guide makes me think the DSQL interface accepts only one statement per call: SQL statement strings do not begin with the EXEC SQL prefix or end with a semicolon (;) as they do in typical embedded applications I guess you're better off using separate calls and wrap them into transactions. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Table list from postgresql backend
Quoting Toby Thain t...@telegraphics.com.au: The Ingres driver has the same 'issue', system tables are returned by default. I tend to think that no tables should be suppressed from the result by default when using *this* libdbi function. I think more input from actual use cases would be needed to see whether anything needs to be done. libdbi is an abstraction layer, literally, and I tend to think that it should abstract away implementation-specific stuff like system tables by default. This doesn't mean we should make it impossible for users to get at these tables. Nor should we break backwards-compatibility in case some programs rely on the current behaviour. What about providing an additional function called something like dbi_conn_get_user_table_list() which returns only non-system tables, i.e. those usually created by the user or some piece of software? This would allow software linked against libdbi to not be pestered by implementation-specific system tables and such, if this behaviour is desired. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Table list from postgresql backend
Phil Longstaff writes: According to postgresql documentation, there is a standard information schema which exists in all databases (http://www.postgresql.org/docs/8.3/interactive/information-schema.html). Is there any easy way of having these extra tables *not* returned from dbi_conn_get_table_list() ? I suppose I can always get the list and remove them, but it would be easier if they weren't returned in the first place. I see from the implementation of the dbd_list_tables() function that the pgsql driver removes all tables matching the regexp '^pg_' anyway. These appear to be additional schemas as well. This could be expanded to exclude 'information_schema' as well. Question is, should this be the default? Would anyone *want* these tables to be listed? I assume no one wants these, as they are implementation-specific to PostgreSQL and should not be returned by a database-independent function that lists all tables. I'm open to discussions. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Memory Leak in sqlite3 driver
Quoting Wallywhitefish wallywhitef...@yahoo.com: While testing a library I'm working on, I had a memory leak. I traced it to the dbd_sqlite3.c source, in dbd_list_tables(), where a tempconn is created (dbi_conn_new) but never freed using dbi_conn_close(). Thanks for reporting this problem. I assume you use one of the stable releases (0.8.3?). I've checked the current code, and it appears that this problem has been fixed almost a year ago, see http://libdbi-drivers.cvs.sourceforge.net/viewvc/libdbi-drivers/libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c?r1=1.25r2=1.26 For your own purposes, you may wish to patch the code along the lines of the diff above, or you may consider upgrading to the current cvs release (you'll need libdbi from cvs as well). And yes, we should release 0.9.0 real soon now... regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] sqlite selects for bigint return 0
Markus Hoenicka writes: There is quite obviously some sort of platform-dependence at work. While everything seems fine on my development platform, the performance on Linux is less than desired. As I haven't seen any complaints about the mysql or pgsql drivers on Linux lately I assume these are driver problems, not libdbi problems. I'll investigate. Turns out this is a libdbi problem, not a driver problem. The libdbi function _isolate_attrib() used floating-point math to isolate the relevant bits of an integer to e.g. determine the size of an integer field. Apparently the implementations of the log() function differ between FreeBSD and Linux sufficiently to break this code. I've replaced the floating point math with a simple bit shifting loop (feel free to improve the performance) which works ok both on FreeBSD and on Linux (and, most likely, everywhere else). The reason why only the sqlite and sqlite3 drivers appeared to be affected is that not all drivers use _isolate_attrib() as there are other ways to do this. Thus only firebird, oracle, sqlite, and sqlite3 were affected by this libdbi bug. I've checked in this libdbi fix (revision 1.96 of dbi_main.c). If anyone needs to fix one of the affected drivers on Linux without using the cvs version of libdbi, please apply the appended patch. regards, Markus --- dbi_main.c 2008/11/28 22:28:51 1.95 +++ dbi_main.c 2009/05/08 23:22:33 1.96 @@ -1570,8 +1574,19 @@ /* hahaha! who woulda ever thunk strawberry's code would come in handy? */ // find first (highest) bit set; methods not using FP can be found at // http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogObvious - unsigned startbit = log(rangemin)/log(2); - unsigned endbit = log(rangemax)/log(2); +/* unsigned startbit = log(rangemin)/log(2); */ +/* unsigned endbit = log(rangemax)/log(2); */ + unsigned int startbit = 0; + unsigned int endbit = 0; + + while (rangemin = 1) { +startbit++; + } + + while (rangemax = 1) { +endbit++; + } + // construct mask from startbit to endbit inclusive unsigned attrib_mask = ((1(endbit+1))-1) ^ ((1startbit)-1); return attribs attrib_mask; -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] cgreen test problems [was: DB2 driver]
Quoting João Henrique Freitas joa...@gmail.com: See http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html Item 4.1.2.1. In test_dbi_cgreen.c:803 I use: E'AB000C''D', E'AB000C''D', In pgsql 8.0 it is no supported. May be I need to change it? Yes, please. I think we should support 8.0 for a while. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] sqlite selects for bigint return 0
João Henrique Freitas writes: the_longlong: in:-9223372036854775807 out:0 the_ulonglong: in:9223372036854775807 out:0 I've confirmed this problem on a Debian box. The following logs demonstrate the poblem. I've included only relevant lines. @Mariusz: I see these problems both in the sqlite and the sqlite3 driver. Both seem to suffer from the same problem. sqlite3 on FreeBSD: Library information: Current:1 Revision: 0 Age:1 Version string: libdbi v0.9.0-pre1 Driver information: --- Name: sqlite3 Filename: /usr/local/lib/dbd/libdbdsqlite3.so Desc: SQLite3 database support (using libsqlite3) Maintainer: Markus Hoenicka mhoeni...@users.sourceforge.net URL:http://libdbi-drivers.sourceforge.net Version:dbd_sqlite3 v0.9.0-pre1 Compiled: Apr 22 2009 Successfully connected! Using database engine version 30611 (numeric) and 3.6.11 (string) [...] the_longlong: in:-9223372036854775807 out:-9223372036854775807 the_ulonglong: in:9223372036854775807 out:9223372036854775807 the_float: in:3.402823466E+38 out:3.402823e+38 the_double: in:1.7976931348623157E+307 out:1.797693e+307 [...] the_datetime: in:'2001-12-31 23:59:59' out:2001-12-31 23:59:59 the_datetime_tz: in:'2001-12-31 23:59:59 -10:00' out:2002-1-1 9:59:59 the_date: in:'2001-12-31' out:2001-12-31 the_time: in:'23:59:59' out:23:59:59 the_time_tz: in:'23:59:59-10:00' out:9:59:59 sqlite3 on Debian: Library information: Current:1 Revision: 0 Age:1 Version string: libdbi v0.9.0-pre1 Driver information: --- Name: sqlite3 Filename: /usr/local/lib/dbd/libdbdsqlite3.so Desc: SQLite3 database support (using libsqlite3) Maintainer: Markus Hoenicka mhoeni...@users.sourceforge.net URL:http://libdbi-drivers.sourceforge.net Version:dbd_sqlite3 v1.0-pre2 Compiled: May 6 2009 Successfully connected! Using database engine version 30509 (numeric) and 3.5.9 (string) [...] the_longlong: in:-9223372036854775807 out:0 the_ulonglong: in:9223372036854775807 out:0 the_float: in:3.402823466E+38 out:3.402823e+38 the_double: in:1.7976931348623157E+307 out:0.00e+00 [...] the_datetime: in:'2001-12-31 23:59:59' out:2001-12-31 0:0:0 the_datetime_tz: in:'2001-12-31 23:59:59 -10:00' out:2001-12-31 0:0:0 the_date: in:'2001-12-31' out:2001-12-31 the_time: in:'23:59:59' out:0:0:0 the_time_tz: in:'23:59:59-10:00' out:0:0:0 There is quite obviously some sort of platform-dependence at work. While everything seems fine on my development platform, the performance on Linux is less than desired. As I haven't seen any complaints about the mysql or pgsql drivers on Linux lately I assume these are driver problems, not libdbi problems. I'll investigate. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] firebird: linux experience with the current cvs version of the driver
Hi Matyas, Quoting Dr. Matyas Koniorczyk koni...@gmail.com: Then I tried make check with the result below. Thanks for the report. Unfortunately I cannot reproduce this on FreeBSD, and valgrind does not indicate any such buffer overflow. I'll try to repeat my tests on a Debian box. It is hard to fix something which you can't reproduce. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] libdbi oracle driver based on ocilib
vincent rogier writes: For example, instead of using cached values (that need extra memory from dbbdi core module while the driver sometimes already hold cached values), the public dbdbi functions like dbi_result_get_int() could use callback to specific drivers functions that delivers the value. This would solve as well the problem of strong typed columns. It would be the driver to return the value as requested, whatever the real type of the column, making its own conversions. That's what OCILIB does. The application requests a column value with a desired type and OCILIB makes conversion if needed and possible. The current cvs revision of libdbi has a lightweight variant of this approach: long long dbi_result_get_as_longlong(); long long dbi_result_get_as_longlong_idx(); char *dbi_result_get_as_string_copy(); char *dbi_result_get_as_string_copy_idx(); These functions return any value as either a long long integer or a string after converting the value returned by the database engine. Client programs can cast the integers to whatever they need. I figured this would cover the most urgent needs. Introducing this possibility through callbacks would not break the actuals drivers. The libdbi core could check if the driver supports this feature and then call its functions. If not, it could work as it does now... This is an interesting idea how to introduce this feature without breaking backwards compatibility. Thanks for sharing this. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] libdbi oracle driver based on ocilib
vincent rogier writes: So, i'm still suck in the ocilib based libdbo driver to set the integer type bit... For example, a column created as INT (4 bytes integer range) or NUMBER (38 digits for scale and precision that can holds integer, numeric, real, etc..) will be reported by Oracle client library (OCI) as NUMBER... There's no way to make nay difference... So my question : how to deal with that into an libdbi driver ? The sqlite/sqlite3 drivers have to deal with a similar problem. sqlite is essentially typeless, so you can't even distinguish between numbers and text. sqlite3 has something like sticky types but these distinguish only between text and numeric data. The sqlite/sqlite3 drivers have to retrieve the command which was used to create a table (this is fortunately stored in each sqlite database) and figure out which type to use as a return value. This approach has its problems (think functions which mangle values retrieved from several columns) but it mostly works ok. Would that approach be useful for an ocilib based driver? PS : about the actual oracle libdbi driver : the driver can't even compile (syntax problems) and is wrong (LONG types, etc..) and buggy. I'm sure no one has tested it... AFAIK there is no current oracle driver maintainer. Several people have fiddled with the code in the past, but at this time hardly anyone is able to even run the tests in lack of an Oracle installation. It may very well be true that the driver is broken. I can't verify this. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] DB2 driver
Hi João, Quoting João Henrique Freitas joa...@gmail.com: I commited a new version of the tests to address the create database problem. I tested with mysql only. When the tests begin the framework, a new database for test (libdbitest) is created. So, all the tests are run and the test database can be dropped at last. Thanks for adding this code. It'll make testing a lot easier. This mechanism is similar implemented in the old test_dbi. I need to test with pgsql, firebird and sqlite. For Db2, Ingress and Oracle I think it would be necessary create the test database by hand. I'll try to run the tests as well with the database engines that I run. I will test with others engines and address the zero_rows issue. Much appreciated. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] cgreen test problems [was: DB2 driver]
Hi João, I've moved the test suite discussion to a separate thread, as it is no longer related to the DB2 driver status at the head of this thread. I had a chance to play with the current version of your test code today. Again, I've applied your patches to a copy of HEAD to test the current drivers. These are my results: 1) a typo in ask_for_conninfo() garbled the logic of the connection settings dialog. Specifically, the program wouldn't ask for the database directory when testing the firebird driver, causing it to fail. I've reverted an else if to if to fix this, see revision 1.1.2.4 of test_dbi_cgreen.c. Also, there was a superfluous else which would affect engines that do not use database directories, see revision 1.1.2.5. 2) testing the return values of functions which retrieve floating point numbers is doomed to fail due to rounding errors. Is there a way to express is approximately equal to as opposed to equals in cgreen? If not, we'd have to compute mantissa and exponent of the input and output values and compare these integers with reasonable precision. 3) testing the firebird driver is a PITA. The old test code runs to completion except for the final DROP TABLE test. The new test code triggers a Fatal lock manager error: invalid lock id (X), errno: 83 error on my platform. According to what Google says this is a Firebird bug which has been fixed only recently in version 2.5. Did you have a chance to test the firebird driver? 4) the mysql test runs clean except for the test_retrieve_zero_rows test which we talked about previously. 5) pgsql complains about 'type e does not exist' when inserting data into the table. This is apparently caused by the strings which you use to fill the blob fields. What is the leading non-quoted 'E' intended for? 6) sqlite and sqlite 3 report 6 failures. Two stem from the test_dbi_result_field_is_null(_idx) tests which may actually indicate driver bugs. I'll look into that. The remainder are the problems mentioned above. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Bug with mysql driver with errors from timeouts from mysql
Hi Chuck, Chuck Hemker writes: When you get a lock timeout on a select, it is reported by mysql by returning a null from mysql_store_result. This currently isn't noticed by the driver. In dbd_query (and dbd_query_null) in dbd_mysql.c there should be 3 cases: mysql_store_result() != null good select mysql_store_result() = null mysql_field_count() = 0 good insert ... mysql_store_result() = null mysql_field_count() 0 error on select thanks for reporting this problem and for suggesting a fix. Is this MySQL behaviour documented somewhere, or did you just observe this? Is your fix supposed to work with all MySQL releases since, say, 4.0? If both answers are yes, your suggested fix is likely to make its way into the driver. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Register Now Save for Velocity, the Web Performance Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] bug: segmentation faults, probably related to the firebird driver
Hi Matyas, Dr. Matyas Koniorczyk writes: I hope next week I can put some effort into it as well (unfortunately I had simply no time for this task in the last few weeks). I'm neither a firebird expert but I need it for a project. The C API is really complicated to use (compared with, e.g. that of MySQL). I can only second this. The API must have been designed eons ago and never changed since. The problem should be of course some minor allocation problem which is, up to my experience, not hard to achieve with this API. Apparently I freed a buffer when I was not supposed to. I've checked in a fixed version of dbd_firebird.c which works mostly ok on both FreeBSD and Debian. That is, it no longer crashes on Debian, although I still get the unsuccessful metadata update error in the Drop table test on both platforms. I'll look into this as well. I also see some suspicious values in the data retrieval tests, so this asks for a little additional polish. I'd appreciate if you could confirm the fix on Ubuntu. And the platform dependence, that is again a weird issue... This is most likely due to the fact that FreeBSD uses an entirely different and far more versatile malloc() implementation. Using the default settings allocated memory access is very forgiving on FreeBSD, so it is always a good idea to use valgrind. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] docs building on HEAD
Quoting Mariusz Mazur mma...@kernel.pl: Btw: I don't know if anyone noticed, but new bacula (www.bacula.org) depends on libdbi from CVS (and claims it needs a 1.0.0 release). Maybe it's time for that 1.0.0 release? :) That's quite interesting, because we've discussed the versioning scheme of libdbi just recently, concluding that the next release will be 0.9.0. So they'll have to wait quite a bit until 1.0.0 :-) In any case, you're absolutely right that we should finalize the next release. It is just a lack of time which kept me from doing libdbi and libdbi-drivers releases, with the following issues still unresolved: - the firebird driver appears to be broken - there's a brand new test program which is almost finished, with just a few issues remaining - queries that return zero rows report an incorrect number of rows Any help in fixing these problems is much appreciated. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] docs building on HEAD
Markus Hoenicka writes: I'm sorry, I have to correct myself. It is the number of *columns* which is reported incorrectly, not the number of *rows*. Any reasonable application won't care about the number of columns if you don't get back a single row. The incorrect column issue is just something which is not supposed to happen, and I want to see it fixed before doing another release. I've checked this problem again. It appears now that the new test framework had a bug in this particular test in that it assumed the number of fields had to be 0 if a query returned zero rows. In fact, this is not the case in most database engines. At least MySQL, PostgreSQL, SQLite3, and Firebird return the requested number of fields even if no rows are returned. SQLite returns 0 which is apparently a feature of the 2.x series of SQLite. I can't comment on the other engines at this time. So all we need to do on this issue is to fix the test :-/ regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] docs building on HEAD
Mariusz Mazur writes: The autoconf macro for --enable-docs is borked. Here's a fix: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/libdbi-drivers-docs_acfix.patch Thanks also for this patch. I've applied it as well. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] bug: segmentation faults, probably related to the firebird driver
Dr. Matyas Koniorczyk writes: It is worse than a good old Fortran 77 compiler: I'm not sure but the limit is some 50 characters. But it happens only if it receives something from a pipe or file to stdin, if it comes from the keyboard interactively, everything is O.K. I found this from my experience while I was writing stored procedures and trying to feed the code to isql-fb from stdin. Moreover, the error message you receive does not reflect this issue, it simply acts as if you just had not written the rest of the command. Since you cannot even break the line within the path to the database, maybe you should use another directory to store the databases, or cd to the database and omit the path to eliminate the problem. Ok, using /tmp as the database directory worked around this problem. I wonder why this never was a problem on FreeBSD? Additionally I had to run make check from the firebird account. If I try as a regular user, I run into the cannot attach to password database problem. I have no idea whether firebird is supposed to work like this, or whether I have to jump through additional hoops to be able to access it as a regular user. As for the segfault itself: unfortunately I didn't have the time to collect more experience yet, but as soon as I find out something, I'll let you know. My results on Debian look like this: Test 12: Retrieve data: libdbi: [query] SELECT * from test_datatypes Got result, try to access rows /bin/sh: line 4: 2768 Segmentation fault ${dir}$tst This is different from your problem, and again different from the problem I see on FreeBSD. But as both problems on Debian/Ubuntu happen when trying to access rows, I reckon these are related. I'll try and see whether I can gather some information from valgrind. As I'm not exactly a firebird expert (let alone a firebird driver expert), any help will be greatly appreciated. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] bug: segmentation faults, probably related to the firebird driver
Dr. Matyas Koniorczyk writes: Use CONNECT or CREATE DATABASE to specify a database CREATE DATABASE 'localhost:/var/databases/libdbitest'; I've tried to reproduce the firebird driver failures on a Debian 5.0 box, but my firebird skills seem to be insufficient to get anywhere on this platform. I've installed firebird 2.0 as a package and managed to use gsec to change the SYSDBA password. I can use isql-fb interactively and create databases when logged in as root. However, what doesn't work is the non-interactive command that the libdbi-drivers test program uses to set up the test database: echo CREATE DATABASE 'localhost:/usr/local/var/lib/libdbi/firebird/libdbitest';|isql-fb -user SYSDBA -password XXX -sql_dialect 3 Use CONNECT or CREATE DATABASE to specify a database Expected end of statement, encountered EOF I have write access in the directory (as root), and I can create the database file using touch. Can anyone please help me figure out why this fails on Debian? regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] bug: segmentation faults, probably related to the firebird driver
Hi, Quoting Dr. Matyas Koniorczyk koni...@gmail.com: The platform is Xubuntu Ibex Intrepid, running on a 32-bit Intel platform. Everything expect libdbi and its drivers are installed from packages, I have Firebird 2.0 (LI-V6.3.4.13130). The libdbi and libdbi-drivers (ver. 0.8.3) are installed from source as there was no firebird driver amongst the Ubuntu packages. I have mysql and firebird drivers installed. I'm running the current cvs version of libdbi and libdbi-drivers on a FreeBSD 6.4 box. However, there were no relevant changes in the firebird driver since 0.8.3. Firebird reports itself as 2.0.3.129 During installation the compilation of the html documentation produced a large amunt of errors, but after commenting out the related stuff from the makefiles, the libraries have compiled. The --disable-docs configure switch helps to circumvent these problems which are usually due to an incomplete SGML toolchain. [...] Test 6: List tables: Got result, try to access rows *** glibc detected *** ./test_dbi: malloc(): memory corruption: 0x097c9f38 *** Unfortunately I cannot confirm this problem on my box. However, I found a different problem (the cvs test program has a few more tests than 0.8.3 had, so don't be confused by the test numbers): Test 15: Drop table: libdbi: [query] DROP TABLE test_datatypes AAH! Can't drop table! Error message: 1: unsuccessful metadata update I can't recall seeing this problem when 0.8.3 was released. Strange enough, the DROP TABLE command succeeds when issued from the isql command line client right after the above failure. I suspect this might be an allocation problem of sorts as well. Did anyone else run into problems with the firebird driver? I'm not a Firebird expert by any means, but I'll try to reproduce these results on a Debian box as soon as time permits. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] problems building docs
Hi David, Quoting David Reiser dbrei...@gmail.com: I'm trying to build libdbi-drivers-sqlite3 0.8.3, and I'm getting errors: Converting dbd_sqlite3.sgml to HTML... mkdir -p dbd_sqlite3 cd dbd_sqlite3 openjade -t sgml -d ../../../ doc/include/doc-html.dsl ../dbd_sqlite3.sgml openjade:/sw/share/sgml/dtd/docbook/4.1/dbpool.mod:414:23:Q: length of interpreted parameter literal must not exceed LITLEN (1024) openjade:/sw/share/sgml/dtd/docbook/4.1/dbpool.mod:630:24:Q: length of interpreted parameter literal must not exceed LITLEN (1024) openjade:/sw/share/sgml/dtd/docbook/4.1/dbpool.mod:720:38:Q: the number of tokens in a group must not exceed GRPCNT (64) and lots more GRPCNT complaints. Can you suggest a solution? For the moment I could just skip building the docs, but that's less than desirable if I want fink to adopt the latest version of the driver(s). Mac OS X 10.5.6, using fink-supplied dependencies (Openjade 1.3.2, sqlite3 3.6.9) The error messages indicate that openjade does not pick up the correct SGML declaration, or it doesn't find any at all and uses the builtin defaults. If DocBook is packaged correctly on Mac OS X, you should have a file called docbook.dcl on your system. This should also be referenced in docbook.cat. I assume that fink also provides some mechanism to build system-wide SGML catalogs. If that is the case, you may have found a DocBook packaging error. If that is not the case, or if this can't be fixed reasonably, you can patch the Makefiles that invoke openjade. You can pass the SGML declaration as the first non-option argument just before the SGML filename, like so: openjade -t sgml -d ../../../doc/include/doc-html.dsl /path/to/docbook.dcl ../dbd_sqlite3.sgml If autogen.sh works properly on Mac OS X, you should patch Makefile.am in the doc subdirectory and then run ./autogen.sh ./configure [your options] make. Let me know if that is going to work for you. If not, we'd have to retrofit a --with-sgml-declaration configure switch to manually pass the declaration if needed. regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] DB2 driver
João Henrique Freitas writes: In your environment the libdbitest database exists? If not, the test framework will not create it. You need to create it before run the tests. Have you another way to solve it? No, the libdbitest database does not exist on my system. So your test obviously has to fail if this is a prerequisite. make check should not rely on the existence of a particular database except those which exist anyway in a default installation of a database engine. This is what the initial_dbname setting is good for in test_dbi.c. This database is used in all queries *before* the test database is created, and when the test database is being deleted. All MySQL installation have a database called mysql. Likewise, all PostgreSQL installation have a database called template1. The connection to these initial databases is dropped as soon as the test database has been created, and the test program then reconnects to the test database. See init_db() in test_dbi.c for further details. I don't know how DB2 and Oracle handle this. If you can't connect to a database and create another one, how do you bootstrap a fresh installation of these engines? Can you simply connect without specifying a database? Or do these engines rely on external programs to create and delete databases? regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] DB2 driver
João Henrique Freitas writes: Hello. test_dbi_cgreen.c:32:27: cgreen/cgreen.h: No such file or directory Seems like the test program assumes that cgreen is installed on the system. Instead, it should look for the header in the private cgreen subdirectory of libdbi-drivers. Could you please fix that? Fixed. Thank you. Now the cgreen part of the tests appears to be ok. I can run sqlite and sqlite3 tests successfully. They report a few errors which I'll investigate. One major showstopper remains though: I cannot connect to MySQL or PostgreSQL databases. In order to simplify testing with my current libdbi version I've merged your changes on the Branch-2008-11-11-cgreen back into a copy of HEAD (the branch was against an older version which used an older libdbi version). Running make check in this directory results in the following output: Connection information: [...] Initial tables schema: [...] Initial data schema: [...] Beggin (sic!) tests: Running libdbi tests... Could not connect. Please check the option settings I've checked these settings over and over again, to no avail. If I run macke check from HEAD on the same installed drivers, I can connect without problems. Again, this problem does not occur with the sqlite/sqlite3 drivers. I could not infer from your test sources whether the option settings are mangled somewhere, so I'm pretty much lost here. Did you run the tests successfully using either pgsql or mysql? regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] DB2 driver
Hi João, Quoting João Henrique Freitas joa...@gmail.com: Today I commited (in CVS HEAD) the initial driver to DB2. The driver works but need some refactoring and adjusts. Thanks. If anyone else out there has access to DB2, please help getting this done. PS0: I commited the test suite ( CVS Branch-2008-11-11-cgreen) too. These tests help to do some sort of test driver development (TDD). I'll try to finally have another look at the new test suite. I've scheduled some time this weekend to work on libdbi and the obnoxious crashes of an app using libdbi HEAD on Cygwin. PS1: I have some doubts about use the trademark 'DB2' or 'IBM DB2' in the code. IANAL, but shouldn't it suffice to put a note at the top of each affected file saying that DB2 is a trademark of IBM? regards, Markus -- Markus Hoenicka markus.hoeni...@cats.de (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] libdbi-drivers not linked against libdbi themselves
; Martino:p/o:p/span/p p class=MsoNormalspan lang=EN-USo:pnbsp;/o:p/span/p p class=MsoNormalspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif; color:gray'-- br /spanbspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif; color:navy'br MARTIN SPERLbr /span/bspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif; color:gray'Manager, System Engineeringbr /spanbspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif; color:gray'Amdocs Qpass Austria GmbH /span/bspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif;color:blue'o:p/o:p/span/p p class=MsoNormalspan lang=EN-US style='font-size:7.5pt;font-family:Verdana,sans-serif; color:black'FN 185962 z, Commercial Court Vienna/spanspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif;color:blue'o:p/o:p/span/p p class=MsoNormalspan lang=EN-US style='font-size:7.5pt;font-family:Verdana,sans-serif; color:black'Neutorgasse 12/1, 1010 Vienna, Austria/spanspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif;color:blue'o:p/o:p/span/p p class=MsoNormalspan lang=EN-US style='font-size:7.5pt;font-family:Verdana,sans-serif; color:black'+43.1.5326464.708 (desk)br +43.676.6688634 (mobile)br +43.1.5326464.300 (fax)br br /spanbspan lang=EN-US style='font-size:7.5pt;font-family:Verdana,sans-serif; color:black'AMDOCS gt; CUSTOMER EXPERIENCE SYSTEMS INNOVATION/span/bspan lang=EN-US style='font-size:10.0pt;font-family:Arial,sans-serif;color:blue'o:p/o:p/span/p p class=MsoNormalspan lang=EN-USo:pnbsp;/o:p/span/p /div /body /html tabletrtd bgcolor=#fffont color=#00preThis message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp/pre/font/td/tr/table -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] [libdbi-users] libdbi 1.0, plan to launch
João Henrique Freitas writes: I will check every item more detailed later. Thanks. So far I don't know much about your implementation, but I'll do my best to dig into it and to see whether I can help fixing the remaining issues. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] [libdbi-users] libdbi 1.0, plan to launch
[3.402820e+38] at [test_dbi_retrieving_fields_as.c] line [234] Failure!: LIBDBI fixture - Test select cases - test_retrieve_zero_rows - [26] should match [0] at [test_dbi_misc.c] line [13] Completed libdbi tests: 468 passes, 6 failures, 0 exceptions. FAIL: test_dbi firebird: [first try, accidentally using wrong username/password] Your user name and password are not defined. Ask your database administrator to set up a Firebird login. Could not create initial database /usr/local/bin/bash: line 4: 22752 Segmentation fault: 11 (core dumped) ${dir}$tst [second try] AAH! Can't drop database libdbitest connected to database libdbitest! Error message: 1: Dynamic SQL Error Exception!: LIBDBI fixture - Database Infrastructure - test_dbi_conn_select_db - Test test_dbi_conn_select_db failed to complete Fatal lock manager error: invalid lock id (12112), errno: 83 --Permission denied Exception!: LIBDBI fixture - Database Infrastructure - test_dbi_conn_get_table_list - Test test_dbi_conn_get_table_list failed to complete Fatal lock manager error: invalid lock id (12112), errno: 83 --Permission denied FAIL: test_dbi -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] libdbi oracle ocilib
vincent rogier writes: For the cleanup function, it's not an oligation but would be nice ! At the moment i hold a counter to call the initialization and cleanup functions in the libdbi connect and disconnect functions. As per your request I've added a dbd_finalize() function to all drivers which is called from libdbi just before the driver is dlclose()'d. This usually happens when an instance (new interface) or the library (old interface) is shut down. The dbd_finalize() function is the proper place to do any cleanup in the client libraries. I've noted that the ingres driver has a FIXME note saying it would require such a shutdown. I'd appreciate if the ingres maintainer could add the required code to do so. The current cvs revision of libdbi-drivers (1.0-pre2) which has these changes requires the current cvs revision of libdbi (also 1.0-pre2). Let me know if there are any problems. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] [PATCH] fix asprintf portability problem
Balazs Scheidler writes: Hi, We encountered crashes on solaris-10/amd64 platform, the root cause seems to be that the asprintf implementation in libdbi uses memcpy() to duplicate the argument array. This is not portable. The attached patch fixes it. Please apply. Applied checked in. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] install pkg-config file in libdbi
Balazs Scheidler writes: Hi, this patch makes the source install the pkg-config file. I should probably send this to libdbi-devel, but I'm not subscribed there and the list server didn't respond to my subscription request yet. diff -u -r1.24 Makefile.am --- Makefile.am 17 Aug 2008 21:30:40 - 1.24 +++ Makefile.am 4 Oct 2008 17:18:40 - @@ -11,3 +11,6 @@ profile: $(MAKE) all CFLAGS=@PROFILE@ + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dbi.pc I've applied this patch to the sources and checked the new version into cvs. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] sqlite3 leaks
Quoting Balazs Scheidler [EMAIL PROTECTED]: (although it would probably be nice to remove the test-dbi program from libdbi as it does not work there). That's a good point. The test program is a leftover from the times when libdbi shipped the mysql and pgsql drivers. Now that all drivers are in the libdbi-drivers project, libdbi does not have much to test. I'll put that on my todo list. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] sqlite3 leaks
Quoting Balazs Scheidler [EMAIL PROTECTED]: hi, I've found some leaks in the sqlite3 driver. As the code in question is difficult to understand and easy to break (for me), I'd like to request a review before I go on and commit it. Are you using the current cvs revision? I've checked in two patches just yesterday which may affect the code you are about to fix. If you are using the latest code, I'll have a look at your patches tonight. I was trying to run the testsuite this time, but without much success. As it seems the tests subdirectory is not even referenced in the root Makefile and neither from the configure script. So no Makefile is generated for it. The test suite has been present from day one and should run by just typing make check in the top level directory. It worked just fine on my box yesterday. I'll try a fresh checkout tonight to see if something is missing in the cvs repository. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Fwd: Re: forwarded message from Balazs Scheidler
Hi, this is what Vadym (who developed the FreeTDS driver) had to say about the current status of the driver. regards, Markus - Forwarded message from [EMAIL PROTECTED] - Date: Thu, 7 Aug 2008 11:28:13 +0300 From: Vadym Kononenko [EMAIL PROTECTED] Reply-To: Vadym Kononenko [EMAIL PROTECTED] Subject: Re: forwarded message from Balazs Scheidler To: Markus Hoenicka [EMAIL PROTECTED] Thursday 07 August 2008 00:42:11 ви написали: two things: 1) I've removed your previous Sourceforge account from the libdbi-drivers developer list as you told me you can't access this account anyway. As mentioned previously, if you want to rejoin the project with your new account, let me know and I'll be happy to add you again. Ok. Rejoin at this time have no sense. I have not ability to test driver cause have not MS SQL db access now. 2) we're currently about to fix a problem with the FreeTDS driver. The driver apparently allows only a single connection at a time. See also the attached mail for further information. I just wanted to ask whether you intentionally limited the driver to a single connection or whether you simply had no need for multiple connections. Second one. I had no need for multiple connections. regards, Markus Yeah, freetds driver code could be small ameliorate: 1) commented code should be removed or to macroses changed (debug strings output); 2) CS_TDS_80 at code writting moment was not support by freetds community. Now its supported and comments should be removed. 3) And common code review eventually need (charset or locale work should be reviewed and more tested. I just forgoted now why I commented some block code with recoding) I could did it but can't test my code changes nowhere. -- Best regards Vadym Kononenko - End forwarded message - -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] freetds driver, single instance?
Quoting Balazs Scheidler [EMAIL PROTECTED]: It works with light testing, e.g. now it does not crash where it used to. I did not check for leaks or similar stuff, however I think I only needed to free the allocated memory in dbd_disconnect() and in case of an error. I've added both of these spots, so it should be ok in this regard. We are installing the patch in production, but now I think it is safe to commit it. So I assume that make check runs without errors and without crashing? It is probably a good idea to add a check to test_dbi.c for creating two connections at a time too. I'll look into this. Just let me know if you accept patches that remove these kind of code blocks. (for instance the oracle compilation problem we fixed last contained some dead code that I didn't remove, as I didn't want to be too intrusive. if it was my code, I would have removed those as well). As far as I know no one currently claims to be the oracle maintainer, so chances are low that you will step on anyone's toes. Feel free to go ahead and remove the dead code. Another completely unrelated topic: have you thought of using git instead of CVS? It would be so much simpler to contribute :) I'm not familiar with git, and I felt perfectly fine so far using the infrastructure provided by SourceForge. I have other SF projects using Subversion which I personally prefer to CVS, but I avoided the migration hassles for libdbi and libdbi-drivers. All you need to do to check in your patches is to get a SF account (which you may already have) and to allow me to add you as a developer to libdbi-drivers. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] freetds driver, single instance?
Quoting Balazs Scheidler [EMAIL PROTECTED]: Hi, As it seems we're a bit unlucky at these times. Now I've ran into a problem in the FreeTDS driver, we're getting heap corruptions inside freetds, and as it seems the root cause is the DBD freetds driver. More exactly, dbd_freetds seems to have a single state instance, instead of allocating a new state for each connection: typedef struct freedts_type { CS_CONTEXT *ctx; CS_CONNECTION *conn; CS_COMMAND *cmd; } FREETDSCON; static FREETDSCON freetds; ^ This is certainly against the idea of being able to create as many connections as you need. Afaict no other driver suffers from such a limitation. Does anyone know why this limitation was added to the freetds driver? I'm afraid no. Vadym (who developed the driver) is no longer active as he does not seem to work with MS SQL Server anymore, but I'll forward your mail to him and see whether he can explain. I'm experimenting with the following patch, but still testing it. I'd appreciate if you could review it for mistakes I possibly made. Your patch looks good to me although I can't test-drive it. BTW: what is the policy about commented out code in libdbi/libdbi-drivers source? I personally feel that commented out code is not good practice, especially if the code in question is commented out without a note stating the exact reason why it was done. For me it makes the code harder to read. There is no such thing as a policy right now. If anyone feels like we should have a policy, I'll be happy to help finding or writing one. There are quite a few things that we could improve, from aesthetic (C vs. C++ style comments) to good practice (variable names, comments describing the usage and parameter list of functions). I use commented-out code mainly for printf() debugging which I personally feel is reasonable. I agree that blocks of commented-out code should be avoided or at least explained and signed. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] custom_functions, what's the purpose
Balazs Scheidler writes: Where are these symbols defined? in the dbd driver file, or by the client library of the given database engine? If the first, then I don't see why RTLD_NEXT is needed, if the second, then I can understand. The symbols we're looking for are the functions defined in the database engine client libraries. The reason why FreeBSD behaves differently might also be caused by this test: case $host in *-*-*bsd*) dlsym_handle=0 dlopen_flag=RTLD_LAZY ;; *) dlsym_handle=1 dlopen_flag=RTLD_NOW ;; esac e.g. all platforms except BSD use RTLD_NOW, but BSDs use RTLD_LAZY. Why is that? In fact, I was close to suspecting that this is a self-inflicted problem, see this note in configure.in: dnl note to self: is this hack a consequence of dnl using RTLD_LAZY in the first place?? However, removing this check and treating FreeBSD like any other OS does not change the behaviour. The FreeBSD dlopen man page states that RTLD_LAZY is preferred for reasons of efficiency. This is apparently why someone added the check to configure.in And another thing, you seem to define RTLD_NEXT if it is undefined: #ifndef RTLD_NEXT #define RTLD_NEXT ((void *) -1) /* taken from FreeBSD */ #endif This is almost certainly not correct. Platforms that do not have RTLD_NEXT defined probably don't support it. For instance AIX 5.2 has no support for RTLD_NEXT, I even found a 'what changed' document for AIX 5.3, which announces RTLD_NEXT as a new feature. I absolutely agree that this is going to cause trouble at some point, but there's no way to even compile the code if the symbol is not defined. I dunno what needs to be specified for dlsym() if I don't have a handle to look up symbols from. . I think I've found it: both the AIX and Linux manual page for dlopen state: If filename is NULL, then the returned handle is for the main program. If my assumption is true and the symbols to be resolved are indeed exported by the database client library, which is linked in because of the database driver, then either of these options would work: 1) use RTLD_NEXT where available This used to work on FreeBSD 2) dlopen(NULL) and use dlsym() with the returned handle This won't even load the drivers on FreeBSD. Does it work on one of your platforms? Even worse, after reverting the above changes, custom functions stopped working on my system too. I'm kinda screwed now. Frankly, this problem is a little above my head. Any help is greatly appreciated. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] rewrite of configure.in, acinclude.m4 - please help
Hi all, we've received bad marks from some Debian developers, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493349 The problems are twofold: 1) the Freetds configure checks look for the wrong library. This is trivial to fix. 2) the library checks themselves are called utterly wrong and absurd. The AC_FIND_FILE macro used in all of these tests is called reinventing the wheel - poorly We should try not to be offended by the language (which tends to be hard among developers to be heard at all) as Steve has a good point here. The code used in acinclude.m4 has been copied around many times (also by myself, among others) and was apparently developed eons ago to work around some issues with antique autotools versions. I think its about time to rewrite the stuff using today's capabilities of the autotools and of compilers and linkers. I've tried to address this issue with these changes: 1) I've rewritten the MySQL and PostgreSQL checks using the mysql_config and pg_config utilities, respectively. These tools allow to retrieve the appropriate compiler and linker switches without having to do any guesswork. 2) I've rewritten other tests (SQLite, SQLite3, mSQL, Firebird, Freetds) using standard macros (AC_CHECK_HEADER) or more sane custom macros (AC_SEARCH_LIBS_VAR). These tests check only the default locations unless the --with-xy-incdir or --with-xy-libdir switches are used. This is reasonable with these drivers as the headers and libraries are usually installed in default directories (not in some subdirectory as e.g. MySQL does). However, this means that we have to take care of OS oddities somewhere else. E.g. FreeBSD does not include the /usr/local/ hierarchy into the compiler and linker search paths by default - but that's where all database engine headers and libraries end up. To fix this, we have to extend the host check section in configure.in to set CFLAGS, CPPFLAGS, and LDFLAGS appropriately. While being at it, I've also made sure these variables pick up whatever you may have set in your environment. Now there's some more work to do. I do not have access to Oracle and Ingres databases. Both seem to install their headers and libraries in odd places. Anyone with access to these engines, please let me know whether these engines ship a xy_config tool, or suggest other mechanisms to get rid of AC_FIND_FILE. Also, we'll have to test the build system on as many operating systems as possible. We may have to do some porting again, but this should now be restricted to the host checks in configure.in. I can cover FreeBSD, Debian GNU/Linux, and Windows/Cygwin. I need help for all other platforms. To simplify your (greatly appreciated) input, I've prepared a prerelease from the current cvs version: http://libdbi.sourceforge.net/downloads/libdbi-drivers-1.0-pre2.tar.gz There is no need to install or test drive the code at this time (although you may of course do so). All you need to do is to configure and to build this prerelease and report any weird output of configure or of make. And of course any suggestions to further improve the checks are very welcome. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] custom_functions, what's the purpose
Quoting Balazs Scheidler [EMAIL PROTECTED]: Hi, I was trying to compile libdbi on AIX 5.2, which lacks RTLD_NEXT used by libdbi to resolve something called custom functions. I've grepped the libdbi-drivers code, and none of the drivers currently use custom_functions. The custom_function interface has been around since the days of yore (i.e. before I joined the project) without a proper documentation. I assume it was originally intended to allow drivers to export additional functions which extend the libdbi API for that particular driver. No driver has used the interface this way yet. However we received a request lately to support some PostgreSQL client library functions which are not covered by the libdbi API. This led to the idea to export all client library functions through the custom_function interface to make them available to libdbi end-users (who should know what they're doing as this leads to driver-specific code in their programs). This is also why no driver accesses this interface, but many drivers export functions via this interface (at least in cvs). I was wondering what the aim with this function is, and whether I could replace RTLD_NEXT with the driver's shared object handle. E.g. something like this: [EMAIL PROTECTED]:~/src/libdbi8-0.8.3/src$ diff -u dbi_main.c dbi_main.c-bazsi --- dbi_main.c2008-06-02 14:45:33.0 +0200 +++ dbi_main.c-bazsi 2008-08-01 08:57:46.0 +0200 @@ -1277,7 +1277,7 @@ /* snprintf(function_name, 256, DLSYM_PREFIX dbd_%s, custom-name); */ /* printf(loading %s\n, custom-name); */ - custom-function_pointer = my_dlsym(RTLD_NEXT, custom-name); + custom-function_pointer = my_dlsym(driver-dlhandle, custom-name); if (!custom-function_pointer) { /* printf(my_dlerror()); */ /* this usually fails because a function was Please have a look at the latest cvs revisions of dbi_main.c and the related autotools files (configure.in, Makefile.am etc.). The dlsym stuff is platform-dependent, and I've started to implement a mechanism which autodetects the proper value of the handle. If AIX requires dlhandle, it is a matter of setting DLSYM_HANDLE appropriately in configure.in for this platform. I'd greatly appreciate if you could test the current cvs revision of libdbi on AIX and report whether the tests in place work appropriately for that platform. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] oracle compilation problem
Quoting Balazs Scheidler [EMAIL PROTECTED]: Hi, While reviewing our local libdbi patches, we've found this one in the Oracle driver, which should be fixed in mainline IMHO: As the patch looks entirely reasonable and as I can't test the Oracle driver anyway, I've checked in the suggested fix as is. Thanks for reporting and fixing this problem. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] sqlite driver problem?
Balazs Scheidler writes: This sounds doable, however I potentially have hundreds of tables in the database, I'd prefer avoiding having to list all tables when I need to open a new one. This is, admittedly, inconvenient. Hmm, I tried but sqlite reports an error: sqlite create table aaa (a,b,c); sqlite alter table aaa add d; SQL error: duplicate column name: d This looks really screwed. I looked into the SQLite3 interface again to see whether we'd get at more information if we stop using the sqlite3_get_table() function which is just a wrapper around some low-level interface. However, that interface is implemented using callbacks which receive the row data and the row metadata (column names and such). That is, no rows, no metadata. However, there is a PRAGMA table_info(table_name) which may come in handy at this point. We'd have to run a query using this PRAGMA whenever a query returns 0 rows to manually fix the column number in the (empty) libdbi result set. I'll check whether this is doable. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] find_result_field_types
Kris Groves writes: Hi, Here's the path for the 'select distinct' problem. It's a patch against the cvs version. However, I coded it against 0.8.3-1 release. If there's any problems, let me know. I've applied the patch to the current cvs revision. I get a compiler error though: dbd_sqlite3.c:1180: error: too few arguments to function `getTables' Could you please check again using the cvs revision? I'm currently too much tied up to attempt to understand your code and fix it myself. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] [PATCH] Problem with VARCHAR in freetds (sybase)
Markus Hoenicka writes: Quoting Eddy Pronk [EMAIL PROTECTED]: In this case libdbi returns an empty result. I found 2 problems: * dbd_freetds.c doesn't allocate enought to store the a null terminator. * freetds ignores a field when it has exactly 20 characters. I think I fixed both. I used valgrind to find the memory allocation usage. Thanks for contributing the patch. I can't test it over here, but as it looks reasonable and seems to fix the problem in your tests, I'll take care to apply it and check it in tonight. I've checked in the patched version. Eddy, if you have some time on your hands, please try to build from the cvs sources to make sure everything is ok now. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] oracle driver has no error checking
Hi, I've applied your patch, or rather, I tried to. For reasons which are beyond me patch refused 3 out of 4 hunks. I've applied them manually. Could you please check the current cvs version (1.21) whether it works ok, just to make sure I didn't screw up anything. regards, Markus Balazs Scheidler writes: This one actually worked for me, for my limited needs. -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] _translate_mysql_type make error
Hi, Quoting gypsy [EMAIL PROTECTED]: The version of mysql installed is 4.0.27. Includes are in /usr/include/mysql. Libraries are in /usr/lib/mysql. Binaries are in /usr/bin. dbd_mysql.c:638: error: structure has no member named `charsetnr' The MySQL docs say (http://www.mysql.org/doc/refman/4.1/en/c-api-datatypes.html): unsigned int charsetnr The character set number for the field. This member was added in MySQL 4.1.0. Apparently the current version of the MySQL driver requires MySQL 4.1 or later. Would upgrading your MySQL installation cause major problems? The README says: Make sure you have both the libdbi framework installed and the development libraries and headers of the database engine(s) that you want to build the driver(s) for. What _*EXACTLY*_ does the development libraries mean? May we please have a paragraph here rather than one sentence? Simply put, a library usually provides two types of files: a .so file which contains the binary code that is used at runtime by an application linked against the library. This is all you need if you install applications linked against this library from binary packages. The other type is a .a file which contains the information for the linker to *build* an application linked against that library. Some systems like Debian use separate packages for the runtime files and the development files. I don't know how Slackware handles this, but you could simply check whether MySQL installed a libmysqlclient.a somewhere. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] licensing inconsistency
Hi Balasz, I'm actually surprised to learn that all drivers except sqlite/sqlite3 are LGPL'ed. I wasn't aware that we distribute software with inconsistent licensing. I'd like to hear what the other developers think about this problem. Can we simply change the license of the sqlite/sqlite3 drivers to LGPL to make the whole thing consistent? Please rest assured that we did not intentionally make the licensing a problem. I personally would not mind changing the license in the sqlite/sqlite3 drivers. regards, Markus Quoting Balazs Scheidler [EMAIL PROTECTED]: Hi, I'm thinking about using libdbi/libdbi-drivers in a dual-licensed free/non-free product of ours (to be exact, the product is syslog-ng which you might know) we would like to be able to distribute a commercial alternative to the currently free version. The inconsistency that I see is: * libdbi is itself LGPLd, which is fine. * libdbi-drivers states that it is GPLd in the root of the distribution tarball, but individual drivers have an LGPL copyright header in the beginning of the source files (for instance drivers/oracle/dbd_oracle.c has LGPL header, but as I see all of them too). I understand that the license of various database libraries add further problems to the mix (e.g. libmysqlclient is GPLd, oracle is a commercial license, etc.) But assuming that we have proper commercial licenses for the required set of databases, can we use libdbi + drivers to actually use them? As I understand the header of the source file is really what matters, but I certainly don't want to do anything that is against the intentions of libdbi developers. Thanks in advance for any advice. -- Bazsi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Corrected debian repository
David Nebauer [EMAIL PROTECTED] was heard to say: Hi Markus, You will have noticed the debian repository problems caused by a build problem generating incorrect Packages.gz files. The libdbi repository was also affected. I've dropped a corrected repository in refdb's sourceforge website root directory. The url is http://refdb.sourceforge.net/libdbi-repository.tar.gz Thanks for taking care of this. I've unzipped the repository at the libdbi website. As soon as anyone can confirm than dselect can read the repository properly, I'll close the bug report #1597376. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
[Libdbi-drivers-devel] Fix for memory leak in dbi_conn_ping(), Postgresql driver.
Hi Kjell, I've applied both patches, see revision 1.51. I'll see when we'll have enough changes to wrap up a new driver release, but I guess you can live with the CVS version for the time being. Thanks for reporting the problems, and even more thanks for providing the patches! regards, Markus Kjell Irgens writes: Hi list, I found a memory leak in the pgsql driver that is not fixed in CVS. Here is a patch: --- drivers/pgsql/dbd_pgsql.c.orig 2006-09-20 12:07:39.0 +0200 +++ drivers/pgsql/dbd_pgsql.c 2006-09-20 12:35:06.0 +0200 @@ -543,8 +543,10 @@ int dbd_ping(dbi_conn_t *conn) { PGconn *pgsql = (PGconn *)conn-connection; + PGresult *res; - PQexec(pgsql, SELECT 1); + res = PQexec(pgsql, SELECT 1); + if (res) PQclear (res); if (PQstatus(pgsql) == CONNECTION_OK) { return 1; In addition, it would be nice if you could incorporate the following patch, as this makes the pgsql driver compatible with the Redhat 9 supplied postgresql 7.3 (yes it is old, but it is still used by NASA for the project I am working on): --- drivers/pgsql/dbd_pgsql.c.orig 2006-08-24 09:59:36.0 +0200 +++ drivers/pgsql/dbd_pgsql.c 2006-08-24 09:59:50.0 +0200 @@ -38,6 +38,12 @@ long long strtoll(const char *nptr, char **endptr, int base); #endif +/* In 7.4 PQfreeNotify was deprecated and PQfreemem is used instead. A + macro exists in 7.4 for backwards compatibility. */ +#ifndef PQfreeNotify /* must be earlier than 7.4 */ +#define PQfreemem PQfreeNotify +#endif + #include stdio.h #include stdlib.h #include string.h - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel
Re: [Libdbi-drivers-devel] Postgres lastval for 8.1 and up (WAS Re: [libdbi-users] Finding inserted rows)
Mike Rylander writes: Well, like I said, I haven't had a chance to test it. Any confirmation that it works properly would be great. I'm about to be offline for about a week, and then I'll have work stuff piled up. I'll take another look as soon as I can, though ... :) I don't have a chance to test the patch right now (my PostgreSQL is still at 8.0) but it looks fine to me. I'll check it in if someone can confirm that it does work. I'll probably be able to install 8.1 next week, but I'd be glad if someone else can confirm the patch works. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with mhoenicka) http://www.mhoenicka.de --- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnkkid=107521bid=248729dat=121642 ___ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel