[libdbi-users] Fwd: compilation of libdbi mysql driver on MSYS/MINGW
- Weitergeleitete Nachricht von Tom Petersen <[EMAIL PROTECTED]> - Datum: Fri, 07 Oct 2005 14:33:52 +0200 Von: Tom Petersen <[EMAIL PROTECTED]> Antwort an: Tom Petersen <[EMAIL PROTECTED]> Betreff: compilation of libdbi mysql driver on MSYS/MINGW An: Markus Hoenicka <[EMAIL PROTECTED]> Hello, I am trying to build libdbi under MSYS/MINGW. Building libdbi went fine, but I ran into problems building the mysql driver dll. The compiler complains about the syntax in the mysql header files. I have the mysql.lib library in /usr/local/lib/mysql, which I converted to a libmysql.a library using dlltool and mysql.def from mysql-4.0.21-win/include. I first used ./autogen to regenerate the autotools, because there was some errors during make. Output after ./configure --with-mysql && make && make install, which ran fine. But when I try to build the dll, this happened: [EMAIL PROTECTED] /c/libdbi-drivers-0.8.0 $ make libmysql-dll -f Makefile.w32 LDFLAGS="-L/usr/local/lib/mysql" CPPFLAGS=" -I/usr/local/include" gcc -I/usr/local/include -c -o drivers/mysql/dbd_mysql.o drivers/mysql/dbd_mysql.c In file included from C:/msys/1.0/local/include/mysql/mysql.h:57, from drivers/mysql/dbd_mysql.c:50: C:/msys/1.0/local/include/mysql/mysql_com.h:116: error: syntax error before "SOCKET" C:/msys/1.0/local/include/mysql/mysql_com.h:116: warning: no semicolon at end of struct or union C:/msys/1.0/local/include/mysql/mysql_com.h:135: error: syntax error before '}' token C:/msys/1.0/local/include/mysql/mysql_com.h:135: warning: data definition has no type or storage class C:/msys/1.0/local/include/mysql/mysql_com.h:167: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:168: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:169: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:170: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:171: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:172: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:173: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:175: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:176: error: syntax error before '*' token C:/msys/1.0/local/include/mysql/mysql_com.h:180: error: syntax error before "s" In file included from drivers/mysql/dbd_mysql.c:50: C:/msys/1.0/local/include/mysql/mysql.h:168: error: syntax error before "NET" C:/msys/1.0/local/include/mysql/mysql.h:168: warning: no semicolon at end of struct or union C:/msys/1.0/local/include/mysql/mysql.h:205: error: syntax error before '}' token C:/msys/1.0/local/include/mysql/mysql.h:205: warning: data definition has no type or storage class C:/msys/1.0/local/include/mysql/mysql.h:214: error: syntax error before "MYSQL" C:/msys/1.0/local/include/mysql/mysql.h:214: warning: no semicolon at end of struct or union C:/msys/1.0/local/include/mysql/mysql.h:220: error: syntax error before '}' toke n C:/msys/1.0/local/include/mysql/mysql.h:220: warning: data definition has no typ e or storage class C:/msys/1.0/local/include/mysql/mysql.h:235: error: syntax error before "NET" C:/msys/1.0/local/include/mysql/mysql.h:235: warning: no semicolon at end of str uct or union C:/msys/1.0/local/include/mysql/mysql.h:241: error: conflicting types for 'last_ errno' C:/msys/1.0/local/include/mysql/mysql_com.h:118: error: previous declaration of 'last_errno' was here C:/msys/1.0/local/include/mysql/mysql.h:244: error: conflicting types for 'last_ error' C:/msys/1.0/local/include/mysql/mysql_com.h:121: error: previous declaration of 'last_error' was here C:/msys/1.0/local/include/mysql/mysql.h:245: error: syntax error before '}' toke n C:/msys/1.0/local/include/mysql/mysql.h:245: warning: data definition has no typ e or storage class C:/msys/1.0/local/include/mysql/mysql.h:282: error: syntax error before '*' toke n C:/msys/1.0/local/include/mysql/mysql.h:283: error: syntax error before '*' toke n C:/msys/1.0/local/include/mysql/mysql.h:284: error: syntax error before '*' toke n C:/msys/1.0/local/include/mysql/mysql.h:285: error: syntax error before '*' toke n C:/msys/1.0/local/include/mysql/mysql.h:287: error: syntax error before '*' toke
Re: [libdbi-users] Fwd: compilation of libdbi mysql driver on MSYS/MINGW
[I've forwarded your mail to the appropriate mailing list. Please cc the list in future replies] > [EMAIL PROTECTED] /c/libdbi-drivers-0.8.0 > $ make libmysql-dll -f Makefile.w32 LDFLAGS="-L/usr/local/lib/mysql" > CPPFLAGS=" I'm not sure whether we can expect these Makefiles to work with MinGW. They were developed for Cygwin. The suffix .w32 may be misleading, but at the time of their inception there was only one way to get things done on Windows. I do not use MinGW myself, so someone else on the list should step in here. 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: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ libdbi-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Fwd: compilation of libdbi mysql driver on MSYS/MINGW
Hi Tom, Tom Petersen <[EMAIL PROTECTED]> was heard to say: > A question about the mysql.h header file: > > On line 48-54 the macro my_socket is defined (to value SOCKET) if the > system is Windows. When I try to compile the libdbi-driver for mysql, this > leads to an error in mysql_com.h on line 116 (because SOCKET is not > defined...) Is there something missing in the libdbi files in connection > with this? It is very well possible that the mysql driver code (or all drivers) requires some porting to work with MinGW. But as I said before, I don't use that system and I can't be of much help here. Let's hope that Ashish, our MinGW expert, can eventually look into this. > > How is this handled in the cygwin build of libdbi? > No porting was required to compile libdbi and the mysql driver on Cygwin, as this system nicely emulates a Unix-style environment. There is only some extra work required to build the drivers as DLLs which explains the extra Makefiles. But this is not related to your 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: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Problems with dbi_initialize()
Hi, Daniel Berger writes: > I get "libdbi: Failed to load driver: /usr/local/lib/dbd/libpgsql.so". > Yet, I clearly have it: > > [EMAIL PROTECTED]:/usr/local/lib/dbd> pwd > /usr/local/lib/dbd > [EMAIL PROTECTED]:/usr/local/lib/dbd> ls -l > total 120 > -rw-r--r-- 1 root root 23794 2005-10-29 16:59 libdbdpgsql.a > -rwxr-xr-x 1 root root 831 2005-10-29 16:59 libdbdpgsql.la > -rwxr-xr-x 1 root root 30507 2005-10-29 16:59 libdbdpgsql.so > -rw-r--r-- 1 root root 21374 2005-07-23 16:12 libpgsql.a > -rwxr-xr-x 1 root root 823 2005-07-23 16:12 libpgsql.la > -rwxr-xr-x 1 root root 29325 2005-07-23 16:12 libpgsql.so > libdbi complains about libpgsql.so because it is most likely a 0.7.x driver (note the date) which won't work with libdbi 0.8.x. It does not complain about libdbdpgsql.so which apparently loads without a hitch. The drivers were renamed in 0.8.1 to avoid name clashes in Debian which packages each driver individually. You can safely remove the libpgsql.* files. > PS - I'm also curious why this sent an error to STDERR. > dbi_main.c defines static int complain = 1; close to the top. I didn't know either, but there's an undocumented libdbi API function which can modify this value: int dbi_set_verbosity(int verbosity); Call this function with verbosity set to 0 to switch off error output on stderr before calling dbi_initialize(). At least that's what I guess from the sources. 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 JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Documentation question
Hi, No. You'll have to peruse the header files. regards, Markus Daniel Berger writes: > Hi, > > Are the data types in the PDF documentation anywhere? Stuff like > dbi_info_t, dbi_functions_t, etc? I looked around, but I didn't seem them. > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] finding out if an insert failed because the record already exists.
Hi Ron, not that I know of. I'm afraid your only option is to use dbi_conn_error() and parse the error string in your application. regards, Markus Ron Arts writes: > Hi, > > I am looking into libdbi. In my application (which currently > is MySQL only) I check the return value of a query to find > out if it is ER_DUP_ENTRY, which means record already exists, > or something along that lines. > > Can I do that in a database portable way in libdbi? > Could not find it in the docs. > > Thanks, > Ron Arts -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
RE: [libdbi-users] Problems with dbi_initialize()
Hi, I don't think this is a good idea. If there is no error output, your app will simply not work if a driver is bad or missing, and you're left guessing what's wrong. I think it is better if you switch off the warning when you really know what you're doing. regards, Markus Berger, Daniel writes: > Thanks! I would prefer that it be set to 0 default, not 1, however. > Any chance of changing this? > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: Cygwin binaries available
Hi, I've built Cygwin binaries of libdbi-0.8.1 and of libdbi-drivers-0.8.1. The package contains the library and headers as well as the MySQL, PostgreSQL, and SQLite drivers. I had to patch Makefile.w32 as the version contained in the 0.8.1 tarball did not take into account that the driver files were renamed (e.g. libmysql.dll is now libdbdmysql.dll). The fixed version is also available from CVS. The tarball is not a Cygwin package. Instead you should simply untar it in /. Download the tarball right here: http://libdbi.sourceforge.net/downloads/libdbi-cygwin-bin-0.8.1.tar.gz 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 JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] ANN: Cygwin binaries available
Hi Tom, Tom Petersen <[EMAIL PROTECTED]>: > But I cannot find the cygdbi-0.dll in the tarball, did you forget it? Or is > there a way to convert the static libraries to a dynamic one? Or is it > better to just link in the static libraries? > No, I'm afraid this is my fault. I'll fix the tarball tonight. I'm sorry about the inconvenience. > I also have another question: is there something special to think about > when linking to the libdbi libraries, e.g., which calling convention do > they use? > libdbi is a standard C library using the C calling convention. You can use it like any other C library. 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 JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] ANN: Cygwin binaries available
Tom Petersen writes: > But I cannot find the cygdbi-0.dll in the tarball, did you forget it? Or is > there a way to convert the static libraries to a dynamic one? Or is it > better to just link in the static libraries? > I've fixed the tarball, please download it again and give it a try. 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 JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] trouble making libdbi-drivers for mysql
Hi, Ulf Martin <[EMAIL PROTECTED]> was heard to say: > > openjade:E: specification document does not have the DSSSL \ > architecture as a base architecture > make[3]: *** [dbd_mysql.pdf] Error 1 > make[2]: *** [all-recursive] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > (Full './configure' & 'make' output below.) Any suggestions? > Openjade does not find the DocBook DTD, presumably because it is not listed in the master catalog, or because SGML_CATALOG_FILES is not set appropriately. > If this has to do with building some documentation, one might, perhaps, > be able to switch it off. However, I cannot find a configure option to > do this. > In theory such a switch is not necessary because the source tarball contains the documentation in PDF format. I just downloaded and unpacked the archive from SF: $ ls -al total 185 drwxr-xr-x+ 3 Administrator Kein 0 Oct 26 20:40 . drwxr-xr-x+ 10 Administrator Kein 0 Oct 26 20:40 .. -rw-r--r-- 1 Administrator Kein245 Jun 11 2003 AUTHORS -rw-r--r-- 1 Administrator Kein 1490 Sep 25 23:47 Makefile.am -rw-r--r-- 1 Administrator Kein 19332 Oct 26 20:32 Makefile.in -rw-r--r-- 1 Administrator Kein 1149 Jun 11 2003 README -rw-r--r-- 1 Administrator Kein183 Jun 11 2003 TODO drwxr-xr-x+ 2 Administrator Kein 0 Oct 26 20:40 dbd_mysql -rw-r--r-- 1 Administrator Kein 20813 Aug 8 2005 dbd_mysql.c -rw-r--r-- 1 Administrator Kein 3599 Jun 14 2003 dbd_mysql.h -rw-r--r-- 1 Administrator Kein 127482 Aug 28 01:15 dbd_mysql.pdf -rw-r--r-- 1 Administrator Kein 10218 Jul 17 2005 dbd_mysql.sgml That is, the pdf file is newer than the sgml source, therefore make should not attempt to build the pdf file. I don't know why it does in your case. If you accidentally edited the SGML file, a simple "touch dbd_mysql.pdf" might convince make to leave this target alone. If you ran into this error because you build outside of the source directory, then the Makefile in this directory needs to be fixed. As a workaround, try building in the source directory. 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. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] trouble making libdbi-drivers for mysql
Ulf Martin <[EMAIL PROTECTED]> was heard to say: > 'libdbi-drivers-0.8.1/drivers/mysql/dbd_mysql.c' with > >#include > > better be changed to: > >#include > This seems to be a packaging issue. What OS are you using? I assume you installed MySQL from packages rather than from source. Looks like we need to have configure check for the location of the header file and modify the source file accordingly. > Now since I had run './configure' before I thought I should 'make > distclean' before I gave it another try. And *that* seems to remove the > PDF, leaving me with the mentioned error. Thus, when I started afresh, > fixing the 'dbd_mysql.c' *before* everything else, no error occured. > Then the Makefile needs a fix too. make distclean should not remove the PDF, make maintainer-clean should. I'll fix this on the weekend. 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. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Persistent Connections with MySQL
Hi Greg, I'm afraid there is no such support in the library. Looking at Google and at the MySQL docs I couldn't even figure out how persistent connections are created. Are there any C code samples out there that accomplish this? regards, Markus Greg Taylor writes: > Greetings, > > I was looking through the documentation and saw no mention of > persistent connections in MySQL. Is this left up to the developer to > implement, rather than used as a flag of some sort? If so, are there any > example programs out there that use libdbi and an implementation of > persistent connections with MySQL? > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Persistent Connections with MySQL
Martin Kutschker writes: > It's just a pooling of a long living enviroment, eg in http servers. Usually > the server spawns a number of processes that server multiple requests. Each > of these processes may now have a pool of DB connections. Whenever the > client API request a connection with the same connection parameters as a > previous request it will return this connection from the pool. Otherwise it > will create a new connection and add it to the pool. > > > > Are there any C code samples out there that accomplish this? > > > The code for the PHP DB extensions? > I'm still confused. What you describe here sounds like persistent connections are a server-only feature. In this case, it would be none of libdbi's business. I've found a switch in the MySQL manual that turns this feature on or off on the server side, but there is no switch or function in the client API. Does this mean persistent connections are supported by libdbi out of the box as soon as you switch them on on the server side? BTW my brief google search turned up lots of pages that are very critical about any performance benefits of this feature. It seems to have an edge over individual connections only under very specific circumstances. I doubt that it is worth the effort to add support for this to libdbi (if this is doable at all). regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Persistent Connections with MySQL
Martin Kutschker <[EMAIL PROTECTED]> was heard to say: > I'm not aware of any Mysql switch for that. I've only encountered the > desrcribed method with a webserver and PHP, Perl and in the new Apache 2.2 DB > layer. > > Could you point me to the part of the Mysql docs where this switch is > described? > I'm sorry for the confusion. I've re-read the google hits, and I mistakenly read a table describing "MySQL configuration options" to be describing MySQL server variables. Indeed it was a table describing PHP settings for MySQL. That is, PHP seems to implement the persistent connection stuff. If that code is portable to a C library, libdbi could use a similar mechanism indeed. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] project using libdbi
Hi, It'll be my pleasure to add this project. Thanks for the pointer. FYI: when visiting your homepage I got these errors on top of the page (the remainder is displayed ok): Warning: fopen(counterlog.txt): failed to open stream: Read-only file system in /home/groups/c/ch/chessd/htdocs/counter.php on line 4 Warning: fwrite(): supplied argument is not a valid stream resource in /home/groups/c/ch/chessd/htdocs/counter.php on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /home/groups/c/ch/chessd/htdocs/counter.php on line 6 regards, Markus Toby Thain <[EMAIL PROTECTED]> was heard to say: > Hi, > > http://chessd.sourceforge.net/ is adopting libdbi as its backend > interface, if you wish to add a link on your projects page, thankyou! > > --Toby > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > libdbi-users mailing list > libdbi-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libdbi-users > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] libdbi tests for autoconf
Hi Jim, I think I should add something along these lines to the docs. Thanks for providing the code. regards, Markus J.J. Green writes: > Hi all, > > I had a search for these on google but couldn't find > anything simple -- so I did a version myself which checks > for libdl, libdbi and that the mysql driver can be loaded > at runtime (which is the tricky one). Perhaps this would be > useful to others > > AC_CHECK_LIB(dl,dlopen,,echo "Dynamic loading library not found!",) > AC_CHECK_LIB(dbi,dbi_initialize,,echo "DBI library not found!",) > AC_MSG_CHECKING([for libdbi mysql driver (dynamic load)]) > AC_RUN_IFELSE( >[AC_LANG_PROGRAM(,[[dbi_initialize(0);dbi_conn_new("mysql");]])], >[AC_MSG_RESULT([yes])], >[AC_MSG_FAILURE([failed - libdbd not insatlled?])]) > > Cheers & thanks for a great library! > > Jim > -- > J.J. Green, Dept. Applied Mathematics, Hicks Bld., > University of Sheffield, UK. +44 (0114) 222 3742 > http://pdfb.wiredworkplace.net/pub/jjg > > > > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > libdbi-users mailing list > libdbi-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libdbi-users > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] driver issues and timezones
Mike Rylander writes: > I'd be interested to see what the optimization was. :) > I've replaced if (strlen(*cur)) { with if (*cur) { Saves us one function call. Whoohoo. Besides, I've changed index() calls to strchr() calls just to make the code consistent. > > 04:05:06-08:00 (time) > > 1999-01-08 04:05:06 -8:00 (timestamp) > > It may just be a typo, but this is incorrect based on my original > patch. I followed ISO8601 format for using numeric timezone > extentions on a timestamp, which requires the format of > > {+|-}hh[:mm] > According to my tests both '-8:00' and '-08:00' work. '-0800' is another option, whereas '-800' fails (correctly so). I did not change the logic of your string parsing. Your patch is probably a bit more forgiving than you thought. In any case, according to the PostgreSQL docs all of the above notations that work conform to ISO8601. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] driver issues and timezones
Mike Rylander writes: > [UPDATE]While my coworker was investigating the problem > described above further, I've developed (and attached) a patch to > dbd_helper.c to parse ISO8601 timezone offsets inside > _dbd_parse_datetime() if they happen to occur. I use Postgres as my > main database, and this allows me to use TIMESTAMP WITH TIME ZONE > columns and get the correct date and time out, without having to > mangle the timezone on the system (or inside the database) to assume > UTC. It is untested with other databases, but it's fairly protective, > looking for specific timezone markers, and should be able to handle > any standard ISO timezone offset. > I've applied this patch (with one micro-optimization). I'll have to add some information to the driver docs in order to explain how temporal types are handled. For the time being, the following description must suffice: - you can pass time and datetime values with a numeric timezone suffix. The suffix starts with '-' or '+'. The timezone can be given either as hours only ('-8'), as hours and minutes ('-800'), or as hours and minutes separated by a colon ('-8:00'). Other forms, e.g. strings like 'PST', are currently not supported. Examples: 04:05:06-08:00 (time) 1999-01-08 04:05:06 -8:00 (timestamp) - some database engines support timezones by default and provide no special column type. sqlite and sqlite3 use a string notation internally and therefore have no problems with timezones. - some database engines use specific column types to honor a timezone suffix. This is true for pgsql. Use TIMESTAMP WITH TIME ZONE instead of TIMESTAMP and TIME WITH TIME ZONE instead of TIME if you want to use timezone suffixes. - some database engines ignore the timezone suffix. This is true for mysql. - I can't tell how the other supported database engines and their drivers handle timezones. Do the driver maintainers listen? - due to the differences between the implementations, the use of timezone data creates a portability problem. If your application is supposed to support all available libdbi drivers, it may be necessary to do the math inside your application before you store temporal data. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] driver issues and timezones
Hi Mike, Mike Rylander writes: > However, I'm having a problem using libdbi from within a shared > object. In much the same way that Apache loads DSOs, we have built a > server infrastructure that allows loading of application > implementation shared libraries. The problem is that in order for > libdbi to load a driver on demand we must link both libdbi proper > (normal) any driver we may want to use (eh?) against our > implementation libraries. Not only that, but we have to add an > LDFLAGS setting to the libdbi-drivers configure.in to tell it to link > against libdbi.so. > > I'm hoping that we're just overlooking something simple here, but > we've been pulling our hair out for the last couple days trying to > figure this out, and that's the only solution we could come up with. > I don't think you're missing something obvious here. See also a previous thread on the devel list: http://comments.gmane.org/gmane.comp.db.libdbi.drivers/7 (the SF archive is currently down. You'd see a few more posts of this thread) Linking the drivers against libdbi appears to be a hack that works in this situation. > [UPDATE]While my coworker was investigating the problem > described above further, I've developed (and attached) a patch to > dbd_helper.c to parse ISO8601 timezone offsets inside > _dbd_parse_datetime() if they happen to occur. I use Postgres as my > main database, and this allows me to use TIMESTAMP WITH TIME ZONE > columns and get the correct date and time out, without having to > mangle the timezone on the system (or inside the database) to assume > UTC. It is untested with other databases, but it's fairly protective, > looking for specific timezone markers, and should be able to handle > any standard ISO timezone offset. > At a glance the patch appears to do what it should. I'll give it a try with the other database engines that run on my box and check in the patch if it runs ok. Thanks for the code. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] driver issues and timezones
Mike Rylander writes: > I've attached a patch against my local copy of the new file, so it > should patch CVS with out too much of a fight. I've added a little > logic to look for a ':' minute separator in the -8:00 format. It > compiles and runs for me, so please give it a whirl and make sure it > passes muster. > The patch works as advertized. However, I felt the same could be achieved with less code, and I started to reimplement the timezone handling by reversing the logic. Checking for a separator first allows a cleaner implementation imho. I've checked in the code, a patch against the pre-timezone dbd_helper.c is attached. Please check whether the current implementation works ok for your testcases. regards, Markus dbd_helper.c.patch Description: dbd_helper timezone patch V.2 -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de
[libdbi-users] driver issues and timezones
Mike Rylander writes: > [UPDATE]While my coworker was investigating the problem > described above further, I've developed (and attached) a patch to > dbd_helper.c to parse ISO8601 timezone offsets inside > _dbd_parse_datetime() if they happen to occur. I use Postgres as my > main database, and this allows me to use TIMESTAMP WITH TIME ZONE > columns and get the correct date and time out, without having to > mangle the timezone on the system (or inside the database) to assume > UTC. It is untested with other databases, but it's fairly protective, > looking for specific timezone markers, and should be able to handle > any standard ISO timezone offset. > While the supplied patch appears to work ok for TIMESTAMP WITH TIME ZONE columns, I had a problem with TIME WITH TIME ZONE columns. Turns out that the pgsql driver did not handle this column type correctly. I've fixed this here, but I'll run a few more tests to make sure all is fine now. I guess I'll be able to check in the changes tomorrow. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Posting restricted to list members
Hi, now that I've learned that I can hijack the lists by exerting my admin permissions to set new list passwords, I finally managed to, well, manage the lists. The main purpose of this exercise was to restrict posting to the libdbi lists to list subscribers. As many of you may have noticed, the libdbi-devel list has been Chinese only for a couple of months, and I can only vaguely guess that most of these mails deal with the usual topics like male naughty bit enlargement, pills to make said part move upwards again, or top-secret stock tips. I sincerely hope that all of you can live without this junk. I apologize if this restriction causes any inconvenience. But as both lists are fairly low-traffic, I think it is fair to ask anyone to subscribe if she wants to engage in a discussion. If non-subscribers still want to post, they're welcome to do so, but I have to nod off each of these posts which can take anywhere from 5 min to several days. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi tests for autoconf
Hi Jim, something along these lines went into the programmer's guide and will be available in the next release. Thanks again for contributing the chunk. regards, Markus J.J. Green writes: > dnl check for required libraries, we can use the autoconf > dnl built-in macros > AC_CHECK_LIB(dl,dlopen) > AC_CHECK_LIB(dbi,dbi_initialize) > dnl for the libdbd mysql driver we need a runtime check (since > dnl the driver is loaded dynamically). replace "mysql" with the > dnl required driver, of course > AC_MSG_CHECKING("for libdbi mysql driver (dynamic load)") > AC_RUN_IFELSE( > [AC_LANG_PROGRAM(, > [[dbi_initialize(0); return(dbi_conn_new("mysql") ? 0 : 1);]])], > [AC_MSG_RESULT("yes")], > [AC_MSG_FAILURE("mysql driver not installed?")]) -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Finding inserted rows
Andrew Sidwell writes: > I couldn't see any interface to selecting back the row that was just > inserted, even though PostgreSQL (and I believe most other DBs) support > some method of doing this. In the end I had to write a nasty hack in > the PGSQL driver just for my project, but it'd be nice if this had an > API within libdbi and was supported by all DB drivers that could do so. > libdbi has the following function for this purpose: unsigned long long dbi_conn_sequence_last(dbi_conn Conn, const char *name); Requests the row ID generated by the last INSERT command. The row ID is most commonly generated by an auto-incrementing column in the table. Use the return value to address the dataset that was last inserted. Arguments Conn: The current database connection. name: The name of the sequence, or NULL if the database engine does not use explicit sequences. Note: You may have noted that this function does not sufficiently encapsulate the peculiarities of the underlying database engines. You must keep track of sequence names yourself if your target database engine does use sequences. Returns An integer value corresponding to the ID that was created by the last INSERT command. Hope this helps 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=lnk&kid=107521&bid=248729&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Finding inserted rows
Martin Kutschker writes: > Have the systems which use sequences some nameing schemes, which build the > sequence name from the table name? > SQLite and MySQL don't use sequences, so I can speak only of PostgreSQL (don't know about Oracle, Sybase et al.). If you use the Serial type in PostgreSQL, a sequence is automatically created with a predictable name (tablename_colname_seq). However, you can do this just as well: CREATE SEQUENCE whatever_seq; CREATE TABLE tablename ( colname integer DEFAULT nextval('whatever_seq') NOT NULL A mechanism that relies on a particular naming scheme of sequences would fail in the second case. > And perhaps dbi couild handle the problem that Mysql doesn't store the id by > table or sequence but by connection by automatically calling > mysql_last_insert_id() on every insert and storing the ids in a dbi > datastructure per table. > I don't see a real problem here. If an application makes sure to store relevant id values after INSERT commands, you'll get a portable code without causing dbi to interfere with tables behind the users back. 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=lnk&kid=107521&bid=248729&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi installation problem
Hi, arup barua <[EMAIL PROTECTED]> was heard to say: > While installing libdbi 0.8.1, this error occurs: > openjade:E: specification document does not have the DSSSL architecture as a > base architecture > make[2]: *** [programmers-guide.pdf] Error 1 libdbi ships with prebuilt docs, so in general it should not happen that make tries to rebuild them. Did you run "make distclean" or "make maintainer-clean" by any chance? In order to build the documentation you need some SGML tools installed, most notably openjade, the DocBook DTD and stylesheets, as well as the JadeTeX macros. If you can't get your SGML toolchain up and running, try to configure libdbi like this: ./configure --disable-docs You will then be able to build the binaries. You can install the prebuilt docs from the tar.gz archive manually, or peruse the versions available on the web: http://libdbi.sourceforge.net/docs.html regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Problem with libdbi-cygwin-bin-0.8.1.tar.gz
Hi, I'm not familiar with Dev-Cpp. If you want to use the libdbi Cygwin binaries, you have to make sure that: 1) Cygwin is installed properly. I'm afraid having cygwin1.dll on your system is not sufficient 2) You actually create a Cygwin program. If the compiler used by your IDE attempts to build a native Win32 application, it is most likely not going to work. Now, if you have Cygwin installed, you should either call dbi_initialize() with NULL, or with the path in Unix notation ("/usr/local/lib/dbd"). The drivers will only load if the Cygwin versions of the client libraries of the database engines are installed. If you don't intend to use Cygwin but want to build native Win32 app, you should try to compile libdbi and libdbi-drivers using the MinGW compiler used by Dev-Cpp. It is unlikely that the Cygwin binaries will do you any good in this context. regards, Markus Iván Cruces <[EMAIL PROTECTED]> was heard to say: > Hi, I am spanish computer student, sorry my english. I am development with > Dev-Cpp in Windows Xp and I want use libdbi for communicate with SQLite. I > have put "cygdbi-0.dll" and "cygwin1.dll" in System32 folder and I have > include usr/local/include and usr/local/lib in path dev-cpp. My source > compile ok, but the instruction dbi_initialize("C:\\usr\\local\\lib\\dbd") > gives error and the program is closed. If quit SQLite's drivers ( > libdbdsqlite.a, libdbdsqlite.dll.a, libdbdsqlite.dll and libdbdsqlite.la) of > driver's folder the program doesn't error but dbi_initialize return 0 (it > doesn´t detect Mysql and PostgreSQL drivers). ¿What I make bad? > > Thanks and sorry my english. > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Timeout on operation if server is unreachable.
Hi Claudiu, I'm not sure whether I fully understand your problem. However, you should be aware that libdbi does not pull any magic tricks in terms of the database client/server networking. libdbi uses whichever function(s) the database client library provides. Therefore I suggest you ask a MySQL mailing list if there are some libmysqlclient settings which relate to your problem. Once you know what to do, you're welcome to get back to this list so we can see if libdbi can handle that. regards, Markus Claudiu Cismaru <[EMAIL PROTECTED]> was heard to say: > > Hello, > > I created the following problem: > > Host A runs my software that uses libdbi. Host B it's the database > server (MySQL one, for now is in the same LAN with Host A). > > I have a thread that receive a linked list with the data that has to be > written to the database. At every 5 minutes, this thread is created and > runs until it finish the inserts, then terminates. > > On the Host B (the db one) I'm using iptables to simulate the network > down problem, like: > > iptables -A INPUT -s IP_OF_HOST_A -p tcp --dport 3306 -j REJECT > --reject-with icmp-host-unreachable > > This generates ICMP packets simulating that host has gone away, if > packets arrive on 3306. > > In the writing thread I have a simple: > > res = dbi_conn_query (...); > > When the program call the function it blocks for unlimited amount of > time (as much as I leave the REJECT rule on the DB host)... > > There is a way to make somehow a kind of timeout? A timer and killing > the thread it's not a clean solution... Or there is a parameter that > can be set? Or I have to hack in the libdbi source code? > > I'm using persistent connection (connection is made at the start of the > program). I don't know if: connect, do job, disconnect it's a good > solution also... > > -- > Claudiu Cismaru > GPG Key: http://maya.cnixs.com/~claudiu/claudiu.gpg > -- 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] driver issues and timezones
Claudiu Cismaru <[EMAIL PROTECTED]> was heard to say: > Why don't you release SVN tags and make tarballs, also? This is actually what I meant. I'm sorry if my message was a bit unclear. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] driver issues and timezones
Mike Rylander <[EMAIL PROTECTED]> was heard to say: > Continuing this long-dormant thread, I want to thank the libdbi core > team for the help and support in getting basic ISO timezone support > into the code base. It has helped the Evergreen[1] project immensely, > as we wouldn't have a fast and stable database connector without it. > It is nice to see such a high-profile project use libdbi successfully! > Is it time for 0.8.2? > libdbi has a history of being developed in batch mode. Development usually is dormant as long as no one complains about bugs or missing features. Maybe it is time again for a wake-up call to the hibernating developers to collect all issues which should be addressed in an upcoming new release. From my POV, the following things come to mind (they have been requested previously, but I couldn't find the mails right away as I'm away from my development box): - change the release version numbers to the library interface numbers. The issue has been discussed before (http://sourceforge.net/tracker/index.php?func=detail&aid=1578577&group_id=65979&atid=512948). This change will allow better version checks by the runtime linker and thus will avoid frustrations when using applications built against an incompatible libdbi version. - add a "late binding" interface to libdbi. Currently you have either to know in advance which type a particular query is going to return, or you have to add type checks after each query in order to find out. A "late binding" interface would allow to request e.g. a string or an integer from any type of field, with libdbi performing all required conversions. - the drivers should be overhauled too where necessary. I've fiddled with some experimental code to improve concurrent accesses with sqlite3. Also, we should check at least the MySQL and PostgreSQL drivers with the latest versions of these database engines to work out any compatibility issues. The above issues are just suggestions. If anything else seems worth to be included in the next release, feel free to add your favourites. > > UPDATE: While looking at the code I notices that one of my original > debugging fprintf's managed to hang around. Attached is a patch that > comments out that one line, and does nothing else. It's probably just > as easy for someone to go in and remove all the fprintf lines, > commented out or not, since they're not needed at all, AFAICS. Thanks > again! I've noticed that fprintf message too, but it didn't bother me enough to correct it. I'll do as soon as time permits. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] driver issues and timezones
Toby Thain <[EMAIL PROTECTED]> was heard to say: > I wish Sourceforge would deprecate tarballs entirely and just use Svn > tags. It seems (from another project I'm on, at least) that the > tarball is always woefully out of date. > > My advice - go ahead and make a new release. > Well, we'd have to move to subversion first in order to make use of SVN tags. I'm afraid that "releasing" SVN tags instead of tarballs will deter end-users who just need to satisfy some application dependency. A tarball is something familiar to non-technical Unix/Linux users, whereas subversion is not. Package maintainers are also used to build from tarball releases. Besides, if I find the time to bless a subversion revision with a stable tag, most of the work is done anyway. I can just as well build the tarball and upload it. This takes just another cup of coffee's amount of time. While we're at it: how do other developers and users feel about moving libdbi development to subversion? Is it worth the hassle? regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] driver issues and timezones
s been tested > stable, etc) my immediate concern is stamping the code as "good" and > being able to point others at a tarball to say "that is tested and > works." As it stands, I get funny looks (or worse, no second look at > all) when I say, "Grab libdbi from CVS. Yes, it's stable and safe, > it's just not wrapped up in a download yet." So ... I'm sure you can > understand my frustration ... > I can feel your pain :-( I'm personally inclined to follow your suggestion and use the current CVS version plus the "link libdbi into drivers" patch (if it does not break things) to release 0.8.2 in a matter of days. I'd suggest to put the other changes on the back burner for another month or two and take our time to do it right. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] driver issues and timezones
Mike Rylander writes: > It's actually the libdbi-drivers Makefile that needs patching, and > it's currently specific to linux builds for us. Mingw and Cygwin may > not mind dl-loading-a-dl like linux seems to. It's documented here: > > http://open-ils.org/dokuwiki/doku.php?id=libdbi > > and amounts to adding -ldbi to the LDFLAGS var for the drivers. > I've comitted a couple of changes to the cvs repositories of libdbi and libdbi-drivers: - removed the leftover fprintf debug call from libdbi/src/dbd_helper.c - added a --enable-libdbi switch to libdbi-drivers/configure.in. If you use this switch, all drivers will be linked against libdbi. Please suggest a better name for this option if you can come up with one. Making this configurable does not require us to run tests on all available platforms whether or not the drivers linked against libdbi fail. - added a --with-dbi-libdir option to set the library path appropriately if libdbi.so/libdbi.a should be installed in an odd place - fixed a typo in libdbi-drivers/configure.in which may be responsible that the docs get built on some platforms although the --disable-docs switch was used I didn't check in the sqlite3 concurrency code yet as I'll have to run some more tests before releasing it into the wild. Please give the current cvs version a try and let me know if it works out of the box for your setup. I'll try to come up with some additions to the documentation to describe the new options and the possible setups. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] driver issues and timezones
Toby Thain <[EMAIL PROTECTED]> was heard to say: > > While we're at it: how do other developers and users feel about > > moving libdbi > > development to subversion? Is it worth the hassle? > > > Assuming I'm included in "other": My vote is yes, I'd feel more > comfortable with Svn. > As you brought up the issue, I was assuming you'd vote for Subversion anyway, but thanks for clarifying your vote again. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] libdbi-0.8.2, libdbi-drivers 0.8.2: ready for prime time?
Hi all, as previously announced here I've checked in a couple of minor changes that make the CVS versions of both libdbi and libdbi-drivers ready for release. All I need to move on is some feedback from platforms that I can't test. I ran a few tests on FreeBSD and on Windows XP/Cygwin which showed no regressions. Could anyone else please confirm that the current CVS versions work ok on major platforms (Linux, OSX, Solaris, other *BSDs)? I'd like to get this release off my desk. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi-0.8.2, libdbi-drivers 0.8.2: ready for prime time?
Mike Rylander <[EMAIL PROTECTED]> was heard to say: > I'm very happy to report that everything builds and works fine on > Linux (as far as I've tested). Specs for the setup: > Thanks for the feedback. Did you, by any chance, test whether my libdbi-driver/configure.in massage solved the build problem with the pgsql driver that you reported previously (doc was built in spite of the --disable-docs switch)? This is one of these things that always seem to work ok on my FreeBSD box but rarely anywhere else. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-0.8.2 released
Hi, a new release of libdbi (0.8.2, the "Sunday Night Buttermilk Waltz" release) has just hit the shelves. As usual, the sources are available through the SourceForge download area at: http://sourceforge.net/project/showfiles.php?group_id=23824 This release implements the following enhancements: - the TIME and DATETIME types now support a numeric timezone suffix, like in "23:12:30+01:00" - improved error handling and error reporting code - some memory leaks were plugged - the "--disable-docs" configure switch now allows to build libdbi from CVS without having the sgml toolchain installed Please let the list know if you encounter any problems. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-drivers-0.8.2 released
Hi, as a companion to the recently announced new libdbi release, there is also a new libdbi-drivers release: http://sourceforge.net/project/showfiles.php?group_id=65979 The benefits of using this new release are as follows: - to avoid possible conflicts with database client libraries (think package names!) all driver libraries were renamed from libname.suffix to libdbdlibname.suffix. E.g. the MySQL shared library was renamed from mysql.so to libdbdmysql.so. Unless your package manager does this automatically, it is recommended to clean out old driver libraries from /usr/local/lib/dbd (or wherever they ended up). Remember that this change affects only the library names. The driver names (the ones your program uses to load particular drivers) did *not* change - assorted fixes in the oracle driver - the mysql driver now supports the BIT and NEWDECIMAL types introduced in MySQL 5.0.3 - added a new (experimental) Ingres 2006 driver - the "--disable-docs" configure switch now allows to build libdbi-drivers without having the sgml toolchain installed - plugged a few memory holes - fixed a segfault in the error message handling code of sqlite/sqlite3 - improved compatibility with older PostgreSQL versions - sqlite and sqlite3 now grok semicolons in query strings - you can now optionally link the drivers against libdbi by using the "--enable-libdbi" configure switch. This sounds weird at first, but it allows to load libdbi into a dlopen'ed module, like this: Parent => dl_open(module) => dl_open(libdbi) => dl_open(driver) Drivers compiled with this option should work ok in the regular context (your app linked against libdbi) as well. Please let us know if you bump into any problems. 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] ANN: libdbi-drivers-0.8.2 released
Quoting Markus Hoenicka <[EMAIL PROTECTED]>: > Hi, > > as a companion to the recently announced new libdbi release, there is > also a new libdbi-drivers release: > Sure enough I hit the send button too early. The new release is called 0.8.2 and it goes by the weird name "Payday in a Pub". 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-drivers 0.8.2-1 released
Hi all, much to my regrets the libdbi-drivers 0.8.2 tarball contains a packaging error which prevents a successful build, see bug #1665718 (http://sourceforge.net/tracker/index.php?func=detail&aid=1665718&group_id=65979&atid=512945). CVS checkouts are not affected by this problem. I've uploaded a new tarball which fixes the build problem: http://sourceforge.net/project/showfiles.php?group_id=65979&package_id=63770&release_id=488230 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.php&p=sourceforge&CID=DEVDEV ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] MingW and libdbi
Duncan McQueen writes: > In file included from c:/mysql-5.1.20-beta-win32/include/mysql/mysql.h:67, > from dbd_mysql.c:50: > c:/mysql-5.1.20-beta-win32/include/mysql_com.h:191: error: expected > specifier-qualifier-list before 'SOCKET' > c:/mysql-5.1.20-beta-win32/include/mysql_com.h:366: error: expected > ')' before 's' > dbd_mysql.c: In function 'dbd_get_socket': > dbd_mysql.c:227: error: 'NET' has no member named 'fd' > make[3]: *** [dbd_mysql.lo] Error 1 > make[2]: *** [all-recursive] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all] Error 2 > > Anyone make sense of this? > Not really. Usually these errors indicate incompletely ported system header files which lack some stuff that mysql depends on. I guess you'll get more interesting answers on a MinGW 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 DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] Compilation of MySQL driver under MingW
Duncan McQueen writes: > One thing I have noticed (and I don't yet have the full technical > details of what is happening), but if the libdbi MySQL driver attempts > to connect to an unknown or unavailable database - there is a nasty > crash on my WIndows application. > Someone with a MingW setup will have to look into this. Connecting to an unknown database on Unixish systems fails gracefully. > I will rest sqllite shortly. Also, isn't Firebird a core driver as > well? I have a vested interest in getting that to work - has anyone > tried under MinGW? > Depends on how you define "core driver". I'd love to keep the Firebird driver as well-maintained as the other core drivers, but last time I tried Firebird would not work properly on my FreeBSD box (back then, on 5.4 if I recall correctly). As I don't have a Linux box running at the moment, I can't do any Firebird maintenance currently. I'd be glad if someone else could. 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-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] Compilation of MySQL driver under MingW
Duncan McQueen writes: > I am not sure if there is a more specific libdbi-drivers list, but I > noticed the libdbi is under the LGPL while libdbi-drivers appears > under the GPL - is this correct? > This question is probably the only one that qualifies as a "FAQ" - surprisingly many people take notice of this licensing hiccup :-o The full story is here: http://sourceforge.net/mailarchive/forum.php?thread_name=1173345812.7772.11.camel%40bzorp.balabit&forum_name=libdbi-drivers-devel In brief, libdbi-drivers will move to LGPL as soon as there are enough changes to justify a new release. 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-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] Compilation of MySQL driver under MingW
Duncan McQueen writes: > So - to be clear - I have a commercial produc that uses libdbi and the > libdbi-drivers, but doesn't include the actual databse drivers (such > as MySQL). I don't static link. Am I okay? > IANAL, but to the best of my knowledge you are okay. As your app links only against libdbi, whereas the drivers are dlopen'ed, you should even be ok when the drivers are GPL, not LGPL. But if your income depends on this in any way, I'd rather seek professional legal help. 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-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Current status of libdbi?
Hi, João Henrique Freitas writes: > Is the code stable for product environments? Probably a matter of definition. I've been using libdbi almost daily for several years now, and I didn't run into any problems so far. The last bug that might have caused data loss was reported and fixed approx. two years ago. If you look at the mailing list archives or the bug trackers, you won't find reports about crashes, data loss, or other bad stories. I assume libdbi is in fairly good shape. > Exists some license issues with others proprietary databases? Can I write > some drivers for others proprietary databases? This was exactly the intention of the original libdbi authors. Make the framework open source, and leave it to the database driver authors what to connect to and how to license that. That is, you can even write drivers for sinister database engines which require to make everything proprietary which is linked against their client library. I don't know if such database engines exist, but libdbi could handle that case. The only license issue that we're currently struggling with are the differing licenses in some of the drivers included in libdbi-drivers. > > Currently, exists some serious issue with the code? > To the best of my knowledge, no. > What are the plans for next releases and new features? > We haven't discussed this for a while. The development model of libdbi is probably best described as "don't fix it unless someone requests new features, or unless new database engine versions require immediate action". Stuff that comes to mind are (speaking of both libdbi and libdbi-drivers): - there are a couple of fixes in cvs which should be made available in an official release - the sqlite3 driver should be rewritten to make use of the new API - firebird version 2 apparently has a new API as well, so the driver should be fixed - fix the licensing differences in libdbi-drivers - we've discussed a "late-binding" libdbi API a while ago. This would be implemented in addition to the strongly typed API that we have now. This new API would allow you to retrieve data as e.g. integer or string, regardless of what the underlying data type is. Data would be transformed transparently by libdbi. I may have forgotten half of what we've been discussing, but these are the things that I recall. Feel free to request further changes if you have some specific usage in mind. Hope this helps Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] MySQL driver bug may screw up data
Hi all, I'd like to issue a word of warning about the MySQL driver. While running a few tests with an app that uses libdbi (http://refdb.sourceforge.net) I came across a problem which I initially thought to be a bug in the MySQL version that I used. Turns out that it was a problem with the MySQL driver. Applications that use this driver may fail to find particular data when running queries. Even worse, if you upgrade to a fixed version of the driver, your data may come back corrupted, making you think the fixed driver is broken. I've checked in a fix yesterday. I cannot recommend to upgrade to the current cvs version unless you understand the nature of the possible data corruption. The problem is known to occur under the following circumstances (other scenarios are possible though): 1) Your application set the encoding to "auto" which is supposed to make the client library encoding match the encoding of the database you're connecting to. 2) Your database uses a multibyte encoding like UTF-8 3) Your data contain multibyte characters like in UTF-8 The bug caused the driver to use the IANA name of the target encoding instead of the MySQL-specific one, causing the initial "SET NAMES" command to be without effect. As the command seemed so trivial the driver did not check for errors. Now with the default client encoding in effect, MySQL may attempt to transform the incoming data UTF-8 data from "latin1" to "UTF-8", causing e.g. umlauts to take up 4 instead of 2 bytes. If you later retrieve the data through the same application, these characters will correctly be translated back to their 2-byte versions, making everything seem alright. However, if you attempt to match an umlaut in a SELECT statement, it will always fail because the stored version differs from what you're searching for. Obviously, if you'll switch to a fixed version of the driver, the data won't be translated back as the driver now (correctly, but to the wrong end) thinks that no conversion is required. If the application that you use libdbi for allows to retrieve the contents of the database one way or another, you should think about ways to detect the existence of multibyte characters in your data. If there are none, you're pretty much on the safe side. If there are, you'd have to find a way to retrieve all data with the old version of the driver, and add them again using the new version. Please feel free to discuss these kinds of upgrade problems right on this list, as others may benefit from your thoughts. Please also accept my apologies for screwing up this feature of the MySQL driver. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - SF.Net email is sponsored by: 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-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] 2006: MySQL server has gone away
Ethan Funk writes: > 2006: MySQL server has gone away > Lost connection to MySQL server during query > Do you see the same errors when using the mysql command line tool directly? It could be a problem of the mysqlclient library as well, or a problem of the server. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] 2006: MySQL server has gone away
Quoting Ethan Funk <[EMAIL PROTECTED]>: > I have not used the mysql command line tool in a while, but I do NOT > get the error when I use other GUI based applications that most > likely were compiled against the mysqlclient library. > Did you compile libdbi-drivers yourself, or did you use some precompiled package? I have no idea of how OS X handles this, but it is possible that your GUI tools use a different version of the client library than the libdbi driver. Your safest bet is to build libdbi-drivers with the latest installed version of the client library and test both the command line tool and the libdbi driver. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] --with-ltdl in libdbi-drivers, anyone?
Hi, there is a fairly old libdbi-drivers bug report about the --with-ltdl switch on SuSE, see http://sourceforge.net/tracker/index.php?func=detail&aid=1593419&group_id=65979&atid=512945 (summary for the impatient: --with-ltdl is not required, but crashes any libdbi app if it is used when configuring libdbi-drivers). Come to think of it, the switch does not make any sense in libdbi-drivers anyway. It is likely a leftover when we transferred the build system from libdbi to libdbi-drivers. So my quesion is: has anyone used this switch in the past, or is there any code out there in the wild which requires this switch? If not, I'd like to remove it before pushing out the next release. Just to make sure: the same switch in libdbi will remain because libdbi uses dlopen(). 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] updated firebird driver available
Hi, I've finished fiddling with the firebird driver. The code now apparently works on FreeBSD and on Debian, and it should work both with Firebird 1.5.3 (only a few tests) and with Firebird 2.0.3 (full set of tests). I've also added a short documentation about the driver's peculiarities. There are still a few rough spots where I'm not sure whether we're doing the right thing. Therefore I'd greatly appreciate if everyone with a little spare time on his/her hands could go and check the current cvs version of libdbi-drivers. Only real-world tests on a variety of platforms will show whether everything works ok. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Invalid sql query and dbi_conn_error_flag
Hi, João Henrique Freitas writes: > My question is: After a invalid sql query, the error flag is 1, > following, after a valid query the error flag is 1. This is right? > I'm sorry for the late answer, but it took me some time to investigate, and I'm still not 100% sure whether my analysis is correct. As far as I can tell, dbi_conn_error_flag() was not designed to indicate success or failure of a query. You should consult dbi_conn_error() instead. The purpose of dbi_conn_error_flag() is to provide additional information about the success or failure of the dbi_result_get*() family of functions. That is, after calling e.g. dbi_result_get_int(), the value returned by dbi_conn_error_flag() might indicate that you tried to access a field defined as TEXT with the wrong getter. There are two things left to fix: 1) I'll try to find out why the error flag is not reset properly after each query. In no case the flag should indicate an error if the query was successful. 2) As the function name apparently suggests improper use of the dbi_conn_error_flag() function, we might consider renaming it to dbi_result_error_flag(), as the error flag is used only in context of a successful query. Do I hear any second opinions about this? In any case, thanks for reporting this problem. I'll work on this before pushing out the next libdbi and libdbi-drivers releases. 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi, libdbi-drivers prereleases available
Hi, I've uploaded tarballs of the current libdbi and libdbi-drivers cvs versions. Both will identify themselves as 0.8.3-pre1. I intend to release them as 0.8.3 shortly, unless someone finds showstoppers. The tarballs are available here: http://libdbi.sourceforge.net/downloads/libdbi-0.8.3-pre1.tar.gz http://libdbi.sourceforge.net/downloads/libdbi-drivers-0.8.3-pre1.tar.gz I'd greatly appreciate (wink, wink) if at least one soul besides me would be kind enough to test this code (and report about the results). My platform is FreeBSD, and I'll run a few tests on a Debian box that I happen to have. Please (wink, wink) try to run tests on other Linux distros, on OS X, MingW, Cygwin, and whatever you may have at your disposal. I've tested the following drivers on my box: firebird, mysql, pgsql, sqlite, sqlite3. Unless I get positive test results from other drivers (wink, wink), these will be the "core drivers", while I'll package the remainder "as is", with no warranties whatsoever that they even compile, let alone do something remotely useful. Please (wink, wink) report any remaining problems right here. A detailed list of changes is appended below. regards, Markus __ libdbi - database engine client libraries which install exit handlers are not safe to unload on some systems. libdbi now checks the driver capability "safe_dlclose" and leaves those drivers in memory to avoid segfaults. - error handling and reporting was changed once again. The dbi_conn_error_flag() function is now deprecated. Instead, a call of dbi_conn_error() is all it takes to check the error status. This function returns zero if the last operation was successful, < 0 (one of several predefined libdbi error codes) for internal errors, and > 0 for client library errors. To maintain backwards compatibility, dbi_conn_error_flags() reports the same error codes as dbi_conn_error() so older code should not break as long as you checked against the predefined error codes. - deprecated functions will now cause compiler warnings to make you aware of this fact - the documentation was updated accordingly __ libdbi-drivers - major overhaul of the firebird driver. The driver is now linked to libfbembed.so instead of libfbclient.so. You can request a local connection (bypassing the server altogether) by using an empty hostname, or a local connection through the server by using "localhost" or the actual computer name as the hostname. The driver should work with Firebird versions 1.5.x and 2.0.x. - changed all driver code to LGPL, and all doc code to GFDL with no invariant sections - made linking drivers against libdbi the default. This behaviour can be switched off by --disable-libdbi, a reversal of the previous default - improved support for MySQL and PostgreSQL connection options - assorted fixes for MinGW compatibility - improved error handling and reporting -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] escape a string, not quoted
Hi, there is no such function at this time. For the time being you may consider stripping off the first and last char of the quoted strings. I'll be happy to review a patch for the missing functions. They should match the existing quoting functions, so we'd need dbi_conn_escape_string(), dbi_conn_escape_string_copy(), and dbi_conn_escape_binary_copy(). Also, we'll have to rewrite the driver functions that implement the quoting, e.g. by having dbd_conn_quote_string() call a new function dbd_conn_escape_string() and have it add the quotes. Since the addition of these functions is an incompatible change of the driver API, we'd have to move to version 0.9 for both libdbi and libdbi-drivers. And if we do that, we should make sure to integrate all pending changes that anyone could ask for in the next year or so. regards, Markus João Henrique Freitas writes: > Hello, > > Has libdbi some function to escape a string? Like PQescapeStringConn > (http://www.postgresql.org/docs/current/interactive/libpq-exec.html). > > I use dbi_conn_quote_string_copy, but it escape and quote the string. > > > Thanks. > > PS: if not exists I will create this function in libdbi and send the patch. > > -- > --- > João Henrique Freitas - joaohf_at_gmail.com > Campinas-SP-Brasil > BSD051283 > LPI 1 > http://joaohf.pbwiki.com > http://www.livejournal.com/users/joaohf/ > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > libdbi-users mailing list > libdbi-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libdbi-users -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] unresolved issues of envisaged next releases
Hi all, I haven't seen much feedback on the latest development version of libdbi and libdbi-drivers lately. I don't mean to complain - if we think positively, no mail on this list must mean that everything is running smoothly... However, I don't like to rush out releases that happen to work on the box of a single developer. I'd like to solicit at least some feedback about the development version, whether it works on other boxes too, whether the dbi_conn_error_flag() vs. dbi_conn_error() change is the right way to go, whether all drivers that anyone may want to use works in its current state, and so on. Also, I haven't heard much of the requested escape-only vs. escape-and quote functions? If no one complains, I'll implement these as a libdbi-only patch which will leave both libdbi and libdbi-drivers at 0.8.3. For those who may have missed the announcement of the development version: they-re right here: http://libdbi.sourceforge.net/downloads/libdbi-0.8.3-pre1.tar.gz http://libdbi.sourceforge.net/downloads/libdbi-drivers-0.8.3-pre1.tar.gz And the announcement with all the changes was here: http://sourceforge.net/mailarchive/forum.php?thread_name=18316.50900.29885.923646%40yeti.mininet&forum_name=libdbi-users 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-0.8.3, libdbi-drivers-0.8.3 released
Hi all, I've added the escape functions to libdbi, and with at least one positive feedback (thanks Mike!) I dare to pronounce released libdbi-0.8.3 and libdbi-drivers-0.8.3. Both are available on the SF project pages: http://libdbi.sourceforge.net http://libdbi-drivers.sourceforge.net The changes are appended below. I hope that these releases meet the most pressing demands, especially the requests for a uniform licensing. regards, Markus libdbi 0.8.3 (the "Steeltown" release) Bugfixes - database engine client libraries which install exit handlers are not safe to unload on some systems. libdbi now checks the driver capability "safe_dlclose" and unloads the driver only if the driver claims it is safe to do so. Improvements - three functions were added: dbi_conn_escape_string(), dbi_conn_escape_string_copy(), and dbi_conn_escape_binary_copy() perform the same escaping of special characters as the corresponding *_quote_* functions do, but they do not surround the resulting string with quotes. This may at times be more convenient if the escaped strings are not directly inserted into a SQL query. - error handling and reporting was changed once again. The dbi_conn_error_flag() function is now deprecated. Instead, a call of dbi_conn_error() is all it takes to check the error status. This function returns zero if the last operation was successful, < 0 (one of several predefined libdbi error codes) for internal errors, and > 0 for client library errors. To maintain backwards compatibility, dbi_conn_error_flags() reports the same error codes as dbi_conn_error() so older code should not break as long as you checked against the predefined error codes. - deprecated functions will now cause compiler warnings to make you aware of this fact. This does not negatively affect your programs but it kindly reminds you of the fact that right now is a good time to modify your sources. 0.8.3 (the "Shores of California" release) - major overhaul of the firebird driver. The driver is now linked to libfbembed.so instead of libfbclient.so. You can request a local connection (bypassing the server altogether) by using an empty hostname, or a local connection through the server by using "localhost" or the actual computer name as the hostname. - changed all driver code to LGPL, and all doc code to GFDL with no invariant sections as requested by several packagers - made linking drivers against libdbi the default. This behaviour can be switched off by --disable-libdbi, a reversal of the previous default - improved support for MySQL and PostgreSQL connection options - assorted fixes for MinGW compatibility - all drivers now implement the "safe_dlclose" driver capability to signal libdbi whether or not the driver can safely be unloaded from memory. -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes: > As I said, rsyslog itself uses plugins. I have no control over who > writes and loads which plugins (neither would I like to have to ;)). > What happens if another (maybe not-yet-written) plugin also uses libdbi > and ALSO calls dbi_initialize()? I guess this is not supported. If so, Do you have any experimental data which indicate that there will be a problem? I don't mean to claim that there is no problem, but I reckon that both plugins, when linked to libdbi, would load the drivers separately and maintain these copies separately. That is, you'll waste some memory but the plugins and the loaded drivers should not interfere. Would rsyslog be suitable to run such a test, e.g. by loading the output plugin and another (maybe renamed) copy of the same plugin? This is an interesting problem also for other projects which use a plugin system and libdbi. > A second question is on the status of the Ingres/mSQL and Oracle > drivers. I hope it is OK to post here (it's a one-timer and I'd like to > save me another mailing list subscription). > Unfortunately there is only rare and irregular feedback on the non-core drivers. However, as "insert" statements are a prerequisite to do anything useful with a driver, I'd suspect that these should work ok. As for the database engines you mentioned, Ingres is the one that was added last. I assume it supports basic functionality. Oracle has been around a little longer, and there have been some bug reports and patches in the past, so I'd also say it is going to work. I can't recall any feedback about mSQL though, and I'm not sure if anyone on this list is currently using it. As a rule of thumb you may want to steer your users towards the core drivers (firebird, mysql, pgsql, sqlite, sqlite3) and leave the other drivers as an option that will require some end-user testing. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes: > I just notice that you don't list openTDS as a core driver. Any problems > with that one. Or have you just overlooked it? I probably have an actual > use case to run it against Sybase soon. "core" currently means that I can test it on one of my boxen :-) I do not have the means to test or modify the remaining drivers, and there were no volunteers lately that would run a "make check" using these drivers to turn them into "core" drivers. There are no known issues with the FreeTDS driver at this time, but I hesitate to include it into the list of actively supported drivers if there is no feedback. If you can run "make check" with the FreeTDS driver, or convince someone to do so, I'd greatly appreciate to see the results. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes: > In any case, I suggest that a second call of dbi_initialize() inside the > same instance should return an error state - sounds better than > unpredictable behavior. Making it multi-init safe could IMHO easily be > done by using one additional handle. > I can't claim to be an expert at these issues, but I imagine that moving the sentinel of the driver list into the application linked against libdbi instead of implementing it as a static global variable might resolve this problem. dbi_initialize would then look somewhat like: dbi_driver_t* dbi_initialize(const char *driverdir, int* numdrivers); (dbi_driver_t may not be user-visible at this time, but you get the idea). I'll be happy to consider this change if it helps to make libdbi "plugin-safe". 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes: > Markus, > > I had a somewhat deeper look at dbi_main now. I think four or five > functions would need to be changed in the way you propose. However, as The functions dbi_initialize(), dbi_shutdown(), dbi_driver_list(), and dbi_driver_open() access rootdriver. All of these can easily be modified to accept the sentinel as an additional parameter. > this is an interface change, the previous functions would need to remain > as is (including the plugin problem). While I looked at the code, I This is how we handled most incompatible changes in the past. The old functions were usually labelled as "deprecated", but in fact most of them are still around. We'll just have to find suitable names for the additional functions. > think a few mutex lock/unlock calls would also make it thread-safe. That > is not a big issue for me, as rsyslog allows plugins to run on a single > thread, but it may be a benefit for other situations. > > If you like, I can try to apply a number of changes and provide a patch > file for your review. > Patches are more than welcome. Feel free to send them at your earliest convenience. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Feedback and Questions [resend]
Rainer Gerhards writes: > I suggest to add a "_r" prefix, e.g. dbi_initialize() becomes > dbi_initialize_r(). I think this is in line with clib functions like > strerror() and strerror_r(). While the actual code fix with strerror() > (renentrancy) is not 100% identical to what we see here, I think it is > sufficiently close to justify the naming. But of course, this are just > my personal thoughts... > Fair enough from my point of view. It's rather "recallable" than "reentrant", but this still makes an "_r"... > One thought on "deprecated" from my very limited point of view. I see > they are good to tell projects its time to upgrade. On the other hand, > there may be valid reasons to support both. For example, I intend to > check the version number and use dbi_initialize() if we are 0.8.3.1 or > lower - because that works well enough with my application in its > current state. And it is better to use what is there then to deny > functionality. After all, the user may be unable to compile a package > himself and so relies on whatever the distro provides - and that may be > an older release. Of course, I can issue a warning message in that case, > so that the more knowledgeable user can update. The bottom line is that > with that logic, the "deprecated" message will always spoil my build > log, which is a cosmetic issue but still not nice ;) > I see one of the main effects of "deprecated" messages to prevent the use of these functions in *new* code, which works best by violating the aesthetics of the developers :-) If package maintainers do their job, the "deprecated" messages will eventually go away also for those users that prefer packaged code - its all a matter of time. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] [libdbi-devel] [patch] plugin support
Rainer Gerhards writes: > The problem was that I originally had the caller define the instance > structure (well, kind of... ;)). I discovered this didn't work (I was > too much rsyslog-minded, especially in my assumptions), changed things > and forgot to re-test with the old interface. New patch attached, > replaces the old one. I have done some limited testing with rsyslog > itself. > I've applied and checked in the suggested patch with a few minor modifications: 1) dbi.h is an autogenerated file, so I moved the changes into dbi.h.in 2) some drivers need access to the instance (see below), so I added the accessor dbi_driver_get_instance() I've adapted test_dbi.c in libdbi-drivers and checked both interfaces. It turned out that some drivers (ingres, sqlite, sqlite3) run dbi_conn_new() in order to access databases other than the one they're connected to. This works when using the old interface, but must fail when the plugin-safe interface is used instead. I've changed these calls to dbi_conn_new_r() which works ok with both interfaces. However, this means that we'll have to move at least to 0.9 because the next libdbi release won't work with 0.8.x drivers as soon as you use the plugin-safe interface. Both libdbi and libdbi-drivers currently call themselves 0.9.0-pre1. Once we move to a new major release, we should review the discussion about unifying the version numbers and the library versioning information, see this feature request: http://sourceforge.net/tracker/index.php?func=detail&aid=1578577&group_id=65979&atid=512948 This would finally get us to 1.0 for both libdbi and libdbi-drivers. Before doing so, I'd once again ask everyone to test the new interface with all OSes you can get hold of, and to speak up now if any other important changes are required. I'll update the Programmer's Manual and the Driver Manual in the next days to reflect the API changes. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Where is a bug? In code or in my head?
Hi, first of all, thanks for the complete test kit. This amount of information makes it a lot simpler to find out what's wrong. I didn't run the code, but I suspect the problem is here: case DBI_TYPE_INTEGER: printf("\tint\tfield %d %s (type %d) = %d\n", fields, dbi_result_get_field_name(result, fields), dbi_result_get_field_type_idx(result, fields), dbi_result_get_int_idx(result, fields)); and here: [EMAIL PROTECTED]:/data/development$ ./sample "select COUNT(*) from CODERS" DBI version = libdbi v0.8.3 Query: select COUNT(*) from CODERS Next row: int field 1 COUNT(*) (type 1) = 0 Your code assumes that the count is returned as an int (a 4 byte integer on linux). However, as MySQL can handle far larger row numbers, I assume the return value is long long (8 byte) instead. In that case you'd have to retrieve the value with dbi_result_get_longlong_idx(). If you need to find out at runtime, you may use the dbi_result_get_field_attrib() functions and check the size of the returned value (defined in dbi.h as DBI_INTEGER_SIZEx). 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-1.0-pre1, libdbi-drivers-1.0-pre1 available for testing
Hi, I've uploaded prereleases of the upcoming libdbi and libdbi-drivers releases: http://libdbi.sourceforge.net/downloads/libdbi-1.0-pre1.tar.gz http://libdbi.sourceforge.net/downloads/libdbi-drivers-1.0-pre1.tar.gz These prereleases serve the purpose of checking two major changes: 1) The "_r" or "recallable" interface As discussed previously, libdbi so far had problems to support projects which dlopen() modules which in turn are linked against libdbi. As the modules are usually designed to operate independently, both dbi_initialize() and dbi_shutdown() may be invoked more than once within the same process and wreak havoc on modules that expect their connections to be around as long as they run. The functions dbi_initialize(), dbi_shutdown(), dbi_set_verbosity(), dbi_driver_list(), and dbi_driver_open() now have equivalent implementations carrying the name suffix "_r". dbi_initialize_r() fills in a handle which the other functions use to access a particular libdbi "instance". A new function dbi_driver_get_instance() allows a connection to determine the instance. These changes were requested and largely implemented by Rainer Gerhards. 2) library versioning libdbi so far used arbitrary release numbers. libdbi-drivers release numbers were only half-arbitrary in that they were chosen to make it easy to guess which libdbi version they'd run with. Moreover, although libdbi is set up to use the libtool library versioning scheme, the version information has never been updated since the first release. This didn't haunt us so far, as the library is still backwards-compatible. However, it is just a matter of time until something breaks. Therefore I went ahead and set up configure.in to assemble the libdbi version string from the (now updated) libtool library version numbers. This eliminates one point of failure (no need to change *two* numbers) and results in reasonable version numbers. The next official release will be "1.0". If we add features that do not alter the interface, there will be "1.1", "1.2"... releases. If we alter the interface, a "2.0" release will follow. libdbi-drivers release numbers will match these, so "1.x" will again be compatible with any "1.y" libdbi release. Also, libtool takes care of tagging the shared objects appropriately (at least on unixish systems). After installing the prerelease, you'll find a libdbi.so.1 right next to your existing libdbi.so.0. This allows the loader to detect applications that were not linked against a compatible version of the library if we'll ever have to introduce changes which are not backwards-compatible. While the new interface and the new versioning scheme made it into the programmers manual, I didn't get round to add an UPGRADING file yet. In brief, upgrading isn't that hard at all. Although the older interface functions are labelled as "deprecated", they are still around. Therefore your applications should link against 1.0 with no changes whatsoever. To make use of the new interface, you'll have to change all occurrences of the old interface functions and replace them with calls to the new equivalents. It is mandatory *not* to mix old and new interface function calls! This is almost guaranteed to crash your app. If you start to migrate, stop no sooner as all "deprecated" messages in your "make" output are gone. If you want your application to support both 0.8.3 and 1.0 installations (packaged OSes are sometimes slow to pick up new versions), you can use wrapper functions in your program. See tests/test_dbi.c in libdbi-drivers for an example how this might look like. Now if you made it until here, please allow me to ask you to test the new releases on as many OSes as possible. Although the "1.0" label was chosen for different reasons (see above), unsuspecting users may infer some sort of stability or maturity. I'd hate to disappoint their prejudices, so please flood this list with feedback! 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > Hello, > > Is a way to use PQputCopyData and PQputCopyEnd (like describe > http://www.postgresql.org/docs/8.3/static/libpq-copy.html) with libdbi > framework? > > Maybe *dbi_driver_specific_function()? > Basically yes. I've never looked into this interface, but apparently the drivers must actively export the functions in order to make them available. The pgsql driver currently does not export any functions. I'll have to look into this. Are there other candidate functions which should be exported, once I'm at it? 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] ANN: libdbi-1.0-pre1, libdbi-drivers-1.0-pre1 available for testing
Toby Thain writes: > I'd like a chance to test the Ingres driver before these go final. > I'll be able to do that in a few days. > I'm not in a frantic hurry :-) I'll sure wait until you have some test results. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] libdbdsqlite3.so: undefined symbol: _dbi_internal_error_handler
Sebastien RAFFALLI writes: > /usr/local/lib/dbd/libdbdsqlite3.so: undefined symbol: > _dbi_internal_error_handler Thanks for catching this. This is a plain typo which you can fix yourself (change _dbi_ to _dbd_ in libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c, line 741), or you may use the attached diff. I wonder why I never stumbled across this. I'm happily using the driver on FreeBSD... As this is a pretty severe problem, at least on some platforms, I'll upload a fixed version (libdbi-drivers-0.8.3-1) later tonight. regards, Markus dbd_sqlite3.c.diff Description: patch for dbi typo -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] ANN: libdbi-drivers 0.8.3-1 available
Hi, as mentioned previously, a typo in the sqlite3 driver of libdbi-drivers-0.8.3 would prevent loading of the driver on some systems. An updated package is available on the SF download page: https://sourceforge.net/project/showfiles.php?group_id=65979 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > Hello > > For now no. > In the code that I am convert to libdbi this two functions > (PQputCopyData and PQputCopyEnd) it is not covered by libdbi. > > Postgresql COPY is not SQL standard yet. > Thanks again. I'm still trying to figure out how the custom function interface was supposed to work. I'll be back with some results real soon now (tm). 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] postgresql and copy command
João Henrique Freitas writes: > Hello, > > Is a way to use PQputCopyData and PQputCopyEnd (like describe > http://www.postgresql.org/docs/8.3/static/libpq-copy.html) with libdbi > framework? > > Maybe *dbi_driver_specific_function()? > I've started implementing the driver_specific_function API for the firebird, mysql, pgsql, sqlite, and sqlite3 drivers. Using the API required minor changes in libdbi as well, so in order to test the interface you'll need the CVS versions of both libdbi and libdbi-drivers. First of all, using driver-specific functions is a bad thing :-/ unless you provide workarounds for other drivers in your code. That said, libdbi now supports calling the database engine client library functions of the abovementioned drivers as far as possible. A few limitations exist: (1) MySQL apparently implements some of the (usually deprecated) functions as macros which have no symbol in the library. You can't call these "functions", but usually a newer replacement exists. (2) Using driver-specific functions requires an additional header file, in addition to (3) Calling the functions often requires knowledge of the inner workings of the driver. This holds true e.g. for firebird, as the connection handle cannot simply be cast to a structure pointer which provides a database handle. I've added appropriate tests to the test program which you can conveniently run by "make check". Please have a look at test_custom_function() to see how to call driver-specific functions. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > Some questions; > - If custom_function(myconn->connection) need more parameters (ex:. > for the function > dbi_driver_specific_function(dbi_conn_get_driver(conn), > "mysql_get_row")) like custom_function(myconn->connection, > command_sql) is possible too, ok? This is supposed to work too. You'll just have to declare the function pointer appropriately, e.g.like this: int (*custom_function)(void*, int); Using the void* pointer is a hack as your program usually does not have database-specific types and structures available (this would require including the client library header which we must not do). All other (not database engine specific) arguments can be declared as usual. > - In my code I have the follow structure > struct B_DB { >BQUEUE bq; /* queue control */ >brwlock_t lock;/* transaction lock */ >dbi_conn *db; >dbi_result *result; >dbi_inst instance; > } > > - How I can cast the follow: > > dbi_conn_t *myconn = mdb->db; > > Because in line 560 of test_dbi.c we have: > > int test_custom_function(struct CONNINFO* ptr_cinfo, dbi_conn conn) { > dbi_conn_t *myconn = conn; > If I understand correctly what you're trying to do here, you'll have to change "dbi_conn *db" to "dbi_conn db". dbi_conn is typedef'd as a pointer which we can cast to the explicit pointer dbi_conn_t *myconn. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > Markus, what's the status of this implementations? Is works? > Well, it does work on my box. If it doesn't work on your box, it may be due to a version issue (maybe the functions that the test program checks just so happen to be missing in your version of the databases), or there may be yet another platform issue. To check the former, could you please let me know which versions of MySQL and PostgreSQL you run? To check the latter, I'll try to run a few tests on Linux, but I'm not sure I'll be able to do so before end of the week. Has anyone else tried make check with the current cvs versions? 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > What plataform you use to test? > I'm running FreeBSD 6.1-RELEASE with these database engines: mysql Ver 14.12 Distrib 5.0.51a, for portbld-freebsd6.1 (i386) using 5.0 postgres (PostgreSQL) 8.0.15 The gmake check output for mysql looks like this: Library information: Current:1 Revision: 0 Age:1 Version string: libdbi v1.0-pre1 Driver information: --- Name: mysql Filename: /usr/local/lib/dbd/libdbdmysql.so Desc: MySQL database support (using libmysqlclient) Maintainer: Mark M. Tobenkin <[EMAIL PROTECTED]> URL:http://libdbi-drivers.sourceforge.net Version:dbd_mysql v1.0-pre1 Compiled: Mar 7 2008 Successfully connected! Using database engine version 50051 (numeric) and 5.0.51a (string) Test 1: List databases: Got result, try to access rows information_schema allpapers alltypes jeremy latin1test menutest mysql phptest refdb refdb1 ristest stemmat styletest test utf8test utf8testsql Test 2: Run driver-specific function: mysql_get_proto_info returned: 10 and the corresponding output for pgsql is here: [...] Driver information: --- Name: pgsql Filename: /usr/local/lib/dbd/libdbdpgsql.so Desc: PostgreSQL database support (using libpq) Maintainer: David A. Parker <[EMAIL PROTECTED]> URL:http://libdbi-drivers.sourceforge.net Version:dbd_pgsql v1.0-pre1 Compiled: Mar 7 2008 Successfully connected! Using database engine version 80015 (numeric) and 8.0.15 (string) Test 1: List databases: Got result, try to access rows template1 template0 stemmat roundtrip refdb alltypes Test 2: Run driver-specific function: PQprotocolVersion returned: 3 and sqlite3 works as well: [...] Driver information: --- Name: sqlite3 Filename: /usr/local/lib/dbd/libdbdsqlite3.so Desc: SQLite3 database support (using libsqlite3) Maintainer: Markus Hoenicka <[EMAIL PROTECTED]> URL:http://libdbi-drivers.sourceforge.net Version:dbd_sqlite3 v1.0-pre1 Compiled: Mar 7 2008 Successfully connected! Using database engine version 30401 (numeric) and 3.4.1 (string) Test 1: List databases: Got result, try to access rows Test 2: Run driver-specific function: sqlite3_libversion returned: 3.4.1 However, if I run the test on a Debian Linux box: Linux ocean 2.6.18-5-486 #1 Fri Jun 1 00:07:22 UTC 2007 i686 GNU/Linux the tests also fail (tried with sqlite3 here). That is, we're looking at a platform issue. I'll investigate later this week. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > > int (*custom_function)(void*, int); > > > It's realy works? > It is supposed to work. However, as the custom function stuff apparently does not work at all on Linux, I'll have to revisit this stuff anyway later this week. If possible at all, I'll add a test for custom functions using multiple parameters as well. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > It's realy works? > Could you please try the latest cvs version? I've discovered a portability issue of dlsym on at least FreeBSD and Linux. This does apparently not affect the symbols which are directly loaded by dlopen() (i.e. the driver functions), but those symbols which are defined in the shared libraries that drivers are linked against. On Linux, dlsym() will find the latter symbols just fine when using the handle returned by dlopen(), but this fails on FreeBSD. On that platform I have to use the special handle RTLD_NEXT to make it work. This trick in turn does not work on Linux. I had to resort to a hack in configure.in which sets a flag appropriately based on $host. If anyone knows how to handle this in a simpler fashion, please let me know. Also, if you have access to a platform other than FreeBSD and Linux, please build and install the cvs version of libdbi and run "make check" in libdbi-drivers to see whether custom functions work. If not, fiddle with the conditional in configure.in which sets dlsym_handle, and let me know the results. 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
Markus Hoenicka writes: > João Henrique Freitas writes: > > It's realy works? > > > > Could you please try the latest cvs version? I've discovered a Just to make sure: as the fix includes a modification of configure.in, you'll have to re-run ./autogen.sh and ./configure to get everything working. 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > > Markus, what is : "custom_functions went to 0x80576f0" and > "custom_functions went to 0x805a048" > Don't worry about that, this is a leftover printf() call which I inserted during debugging. This simply told me whether or not the custom functions linked list was properly created (if not, the output would be nil). I'll remove it asap. 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > In weekend, I will try to do a complete example with g++. But the key > is use typedef (see http://www.newty.de/fpt/functor.html) > Thanks a lot for the example code. This is probably already sufficient for the experienced C++ programmer, but of course a complete example will be even more helpful. 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://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] postgresql and copy command
João Henrique Freitas writes: > Hello, > > Now it's works > I've checked in your patches as the tests run ok on my platform too. While being at it I've also fixed an off-by-one error in dbd_quote_binary() which I haven't noticed previously. 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 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] libdbi and bind functions, testing
Hi, João Henrique Freitas writes: > Hello, > > I need to work with some bind functions in libdbi. And I will test all > and put on dbi_test.c. This is greatly appreciated, as the test program so far does not cover the bind* functions. > while (dbi_result_next_row(result)) { > error = dbi_result_bind_uint(result, "id", &idnumber); > > dbi_result_bind_string(result, "name", &fullname); > printf("%i. %s\n", idnumber, fullname); > } I have to admit that I've never used the bind* functions myself. But I recall from the programmers manual that you have to set up bindings after a successful query, but before retrieving any rows. I don't know whether this explains the error you mention, but you may want to try to reverse the order of your code, just in case. I'll be happy to review any problems once you have integrated the tests into dbi_test.c. BTW as you seem to contribute more and more code to libdbi, would you like to sign up as a developer? This way you could check in your changes directly and make them available for other developers. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] Use dynamic dbi_result_bind_* functions
João Henrique Freitas writes: > Hello, > > Following, I have a function my_dbi_get_value. I use dbi_result_get > and tranform the value received in a char *buf to return. > [...] > How I can use dbi_result_bind_* and not need to allocate a char *buf? > What is the advantage of using bind* instead of get* here? As a side note, your code is close to an alternative interface which we've discussed in the past. Instead of using strongly typed return values, the alternative interface would allow to retrieve data as a string or an integer, regardless of the storage type. For obvious reasons, the results would not always be meaningful, but at least you'd be able to retrieve a string representation of each and every value. Your request indicates that such an interface would be a useful addition. Would you be interested to integrate such an interface into libdbi? I'd be happy to help. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Use dynamic dbi_result_bind_* functions
João Henrique Freitas writes: > char *dbi_get_value(dbi_result *result, int row_number, unsigned int > column_number); > > int dbi_bind_value(dbi_result *result, int row_number, unsigned int > column_number, char *value); > I'd prefer to model these functions after the existing interface. The names are open for discussion (the f prefix means "force"), but in terms of the functionality I thought about something like: char* dbi_result_fget_string_copy(dbi_result Result, const char* fieldname); char* dbi_result_fget_string_copy_idx(dbi_result Result, unsigned int fieldidx); int dbi_result_fbind_string_copy(dbi_result Result, const char* fieldname, char** bindto); These resemble the dbi_result_get_string_copy() et al. functions. As all values which are not strings will have to be provided in an allocated buffer anyway, this seems the most logical approach to such a function. Obviously, the calling function has to free the returned buffer eventually. In addition, I'd suggest another group of functions that retrieves integers regardless of the storage type: long long dbi_result_fget_longlong(dbi_result Result, const char* filename); long long dbi_result_fget_longlong_idx(dbi_result Result, unsigned int fieldidx); int dbi_result_fbind_longlong(dbi_result Result, const char* fieldname, long long* bindto); These functions would convert and return all numerical values (integers, floats, datetime, even strings if they happen to contain a number) as long long integers which the calling function can cast to whatever it needs. Let me know if that would meet your needs. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Use dynamic dbi_result_bind_* functions
Markus Hoenicka writes: > char* dbi_result_fget_string_copy(dbi_result Result, const char* > fieldname); > char* dbi_result_fget_string_copy_idx(dbi_result Result, unsigned int > fieldidx); > int dbi_result_fbind_string_copy(dbi_result Result, const char* > fieldname, char** bindto); > Come to think of it, the following names may be more appropriate: dbi_result_get_as_string_copy() dbi_result_get_as_string_copy_idx() dbi_result_bind_as_string_copy() dbi_result_get_as_longlong() dbi_result_get_as_longlong_idx() dbi_result_bind_as_longlong() 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Use dynamic dbi_result_bind_* functions
João Henrique Freitas writes: > How we will automatically convert the types into strings formats, > inside dbi_result_fget_string*? > Yes, this should happen within libdbi to make it independent of the drivers. We should use standard C library conversion functions as far as possible. > > Meanwhile, the dbi_result_get_as_longlong* return integers. What will > be the retur If this get a string? > I'd suggest to use strtoll() for the conversion. If the string happens to be the representation of an integer which makes sense to strtoll(), we'll return this value. If the string does not represent a number, strtoll() returns 0 and sets errno. We should return 0 as well and report the conversion failure by setting the libdbi error status appropriately which you can query by calling dbi_conn_error() if necessary. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Use dynamic dbi_result_bind_* functions
Markus Hoenicka writes: > João Henrique Freitas writes: > > How we will automatically convert the types into strings formats, > > inside dbi_result_fget_string*? > > > > Yes, this should happen within libdbi to make it independent of the > drivers. We should use standard C library conversion functions as far > as possible. > I've got a first implementation available for testing in CVS. There are only get_as* functions at this time as I'm still struggling with the bind* interface. The new functions can be admired by running "make check" in libdbi-drivers. That is, you'll need the CVS versions of both libdbi and libdbi-drivers. The conversions are currently done as follows: get_as_string_copy/get_as_string_copy_idx (returns allocated buffer) integers: rendered by sprintf float and double: rendered by sprintf strings: as is. NULL strings are returned as empty strings though. binary strings: returned as empty strings date and time: pretty-printed as -MM-DD HH:MM:SS. Date-only values will show an allballs time, and time-only values will claim 1970-01-01 (the start date of the Unix epoch) as date. get_as_longlong/get_as_longlong_idx (returns long long integer value) integers: typecast to long long float and double: typecast to long long. Remember that float and double values easily exceed the range of long long. Currently there is no such thing as an overflow error flag. strings: rendered by strtoll(). If the string contains a number as understood by that function, its value is returned. NULL strings, empty strings, and strings that cannot be parsed as a number return 0. binary strings: returned as 0 date and time: returned as number of seconds elapsed since the Unix epoch. Time-only values will be calculated as of 1970-01-01, and date-only values will indicate the number of seconds elapsed at midnight (the first second of the given date). All in all, these new functions are certainly no "one-size-fits-all" solution for retrieving field values without knowing the types of the fields, but they may be convenient in many cases. Please let me know if these defaults don't seem reasonable, or if we should attempt to report overflows, unconvertible values etc. with error flags. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Use dynamic dbi_result_bind_* functions
João Henrique Freitas writes: > "Name" is type binary has a string like "xorg.conf". > > You see any problem if binary does not return a string? Yes, binary > data could be a image. It will only return a without sense string. > Well, I figured that if you expect a field to contain null-terminated strings you wouldn't use BLOB or BINARY in the first place. From a practical point of view, BLOB or BINARY fields are allowed to contain sequences of characters which are not zero-terminated. We could always add a NULL byte just in case, but I somehow feel you should rather use the correct field type if you expect to store strings. But then, this is just my opinion and I'm open for discussions. 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 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] PTHREAD_CANCEL_ASYNCHRONOUS safe?
Hi, I have to admit that I'm not exactly familiar with this kind of stuff. Is there any documentation available about the requirements to call a code PTHREAD_CANCEL_ASYNCHRONOUS safe? regards, Markus Ethan Funk writes: > Does any one know if the dbi_conn_query function (and the underlying > drivers) are PTHREAD_CANCEL_ASYNCHRONOUS safe? > I would like to be able to cancel a query if it is taking too long. > > Ethan... > > - > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ > ___ > libdbi-users mailing list > libdbi-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libdbi-users -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] PTHREAD_CANCEL_ASYNCHRONOUS safe?
Hi, thanks for the excellent explanation. With that in mind, I'd say it depends. libdbi does not use mutexes. Also, the libdbi library does not allocate any memory *before* the database client query function returns. However, some client libraries require the allocation of memory before the query can performed (e.g. firebird), so these drivers will have allocated some memory in case you cancel a query. Everything else is beyond the control of libdbi/libdbi-drivers. If the query implementation of one of the supported client libraries uses mutexes or allocates memory which is not freed if you cancel a query, you'll experience the same problems as if you didn't use libdbi as an abstraction layer. It is probably advisable to ask the lists of the database engines you plan to support if their clients safely handle cancelling queries. regards, Markus Rainer Gerhards writes: > Well, the base requirement is that you need to make sure no resource is > left after you are cancelled. Let's say you lock a mutex (A), than do > some work (B), and later unlock the mutex (C). Then you get cancelled > during B). In that case the mutex will remain locked if you do not > explicitly unlock it. That, of course, will cause trouble when you come > back the next time - you'll then block on A) because the mutex is still > locked. > > Less severe problems occur if you malloc() in A and free() in C). If you > are cancelled in B, the result is a mem leak. > > To prevent these situations, you can either block cancellation before A > and enable it again after C or you can work with so-called cancel > cleanup handlers, which in essence do what you would do in C. > > The bottom line is that an app must be aware of cancellation. I'd > personally find this a bit dangerous, given the third party nature of > libdbi. IMHO the best option would be the caller handle the complexity. > At least this is what I am doing in rsyslog (but, granted, cancellation > happens very infrequently there, so I may be overlooking something > obvious). > > HTH, > Rainer -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] PTHREAD_CANCEL_ASYNCHRONOUS safe?
Ethan Funk writes: > This may be a suggestion more for the libdbi_driver folks, but it > sure would be nice if I could set a Timeout property for connection > settings on the postgress and mysql drivers. The SQLite drivers have > this. > The libdbi_driver folks isn't far either :-) Both the pgsql and mysql drivers can be trivially retrofitted with a timeout option. I'll see to it tomorrow. I'll also check if the other engines support a timeout setting too, so we could use a general option to keep things simple. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] PTHREAD_CANCEL_ASYNCHRONOUS safe?
Ethan Funk writes: > That would be really great! I believe the SQLite3 driver currently > uses the "sqlite3_timeout" property: not very generic. To make this It does so on purpose, as there were no plans back then to make it a generic option. Older versions of SQLite had a very coarse locking mechanism which made timeouts likely as soon as several users access the same database. This has been improved since, but the option remained in place, using the naming scheme for non-generic options which are always prefixed with the driver name . > generic, you would need to use something like "timeout" across all > the drivers and have the SQLite3 driver alias this to the old > property to maintain back compatibility. > Yup. Should be available real soon now. 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] PTHREAD_CANCEL_ASYNCHRONOUS safe?
Hi, I've checked in the required changes to make timeout a generic option. Currently the mysql, pgsql, sqlite, and sqlite3 drivers support this option. I couldn't find a way to set the timeout on the client side for the firebird driver. I'd like to ask the maintainers of the remaining drivers to check whether they can support this option too. The timeout option specifies the timeout in seconds. The sqlite/sqlite3 drivers used to specify the timeout in milliseconds though. Both drivers now support the generic option which is in seconds, although sqlite_timeout/sqlite3_timeout override the generic option if both are set. Please be aware of this change. regards, Markus Ethan Funk writes: > That would be really great! I believe the SQLite3 driver currently > uses the "sqlite3_timeout" property: not very generic. To make this > generic, you would need to use something like "timeout" across all > the drivers and have the SQLite3 driver alias this to the old > property to maintain back compatibility. > -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] Multithreading question
Quoting Rainer Gerhards <[EMAIL PROTECTED]>: > You need to be very careful. Not just libdbi's own thread safety must be > considered, but the thread safety of the drivers. In short, IMHO it is > not possibly to correctly assume that a libdbi call, at least on the > same connection handle, is thread safe. For example, this will always > fail with MySQL. To the best of my knowledge libdbi does not use mutexes > itself to avoid threading pitfalls on the driver layer (and I think this > is a good design-decision, as most apps do not need these and they cost > performance). > > So your app must make sure that it calls into the drivers only in a > thread safe way. In short: you must mutex-protect these cases yourself. I have to admit that I do not have any experience in terms of thread-safe programming, but as always I'm trying to understand. Is the problem you mentioned MySQL specific? Is there anything we can (or should?) do about it in libdbi or in the driver? If I understand correctly, the best way to avoid problems is to use one connection handle per thread. Is this solution applicable to most programs, or does it have a performance penalty that most apps want to avoid? Maybe it's worthwhile to add a section about threading issues to the programmer's guide? Being a non-expert myself, I'd greatly appreciate contributions from those "in the know". 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-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
[libdbi-users] cannot get int from second table in a query
Kris Groves writes: > Hi List, > > I'm seeing strange behavior here : > > This is a sqlite/sqlite3 driver problem, not a generic libdbi problem. The sqlite driver has to guess the column types from the "CREATE TABLE" statement that was used to build the tables involved in a query. The reason is that sqlite is essentially typeless. It is obvious that aliases strain the column type guessing code. The situation has improved somewhat in sqlite3, now that there is limited support for data types. However, the internals of the sqlite3 driver do not yet make good use of the improved type support. I'll try to rewrite the sqlite3 driver to take advantage of the type support, but I haven't checked yet whether this is possible within the constraints of libdbi's current design. In any case it'll take some time to implement. For the time being you may have a look at the functions long long dbi_result_get_as_longlong(dbi_result Result, const char *fieldname); long long dbi_result_get_as_longlong_idx(dbi_result Result, unsigned int fieldidx); char *dbi_result_get_as_string_copy(dbi_result Result, const char *fieldname); char *dbi_result_get_as_string_copy_idx(dbi_result Result, unsigned int fieldidx); These functions are available in the latest cvs version. The first two functions return any value as a long long integer (which you can cast to any other integer type) using reasonable conversions if necessary and if possible at all. The last two functions return just about anything as strings. Obviously these are merely workarounds in your case, but they still may be helpful to get things done. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] cannot get int from second table in a query
Quoting Kris <[EMAIL PROTECTED]>: > I am currently trying to fix the find_result_field_types function so > that it can work with aliases as well as multiple table selects without > the table prefix (e.g. select * from one,two). I'll see if I can use > anything from daniels "dirty patch" on the cvs version. > > Kris. I've had a look at the driver code yesterday, and I'm confident that I can migrate the code to the prepare/step/finalize interface which is now considered the default in sqlite3. This allows us to use the sqlite3_column_type() function which is preferable over the guessing code in find_result_field_types(). The only downside is that sqlite3_column_type() won't distinguish between integer types, so we'll probably have to keep some of the weird logic currently in use. If you find a way to make the current code work with aliases and such, I'll most likely be able to reuse this code with the new interface as well. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] cannot get int from second table in a query
Quoting Daniel Moreno <[EMAIL PROTECTED]>: > Markus, > We could add queries like these to the tests or if is a known issue > should be documented that didn't work with sqlite3 driver. > I absolutely agree. I have always tried in the past to use bug reports as an excuse to add yet another test... Someone else on the list is currently rewriting the test program to make it more modular. This will allow us to add further tests without adding further complexity. I'll add the alias problem to the driver documentation unless we manage to fix the problem before the next release. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] cannot get int from second table in a query
Daniel Moreno writes: > Markus, > I'm new using libdbi so we didn't talk before so I want to say good job > to you and all the people that made it possible. > Why thank you. A fair share of all praise should always go to David Parker and Mark Tobenkin who started the project with an excellent design which still works as intended today. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] static link to libdbi
Hi, thanks for your inquiry. For future posts please use an appropriate mailing list so others can benefit or chime in too: libdbi-users@lists.sourceforge.net [EMAIL PROTECTED] I've cc'ed the former, please address your replies to that list too. As for the linking problem, I suppose you have to link the drivers statically too. For some reason the driver (libmysql.so) cannot access the libdbi library functions if they are statically linked into your project. Try linking the drivers statically against libdbi and try again. regards, Markus Quoting A C <[EMAIL PROTECTED]>: > Hi, > >I try to link statically to libdbi (either link to libdbi.a or w/ > the linker flag "gcc -g -static -ldbi) but every time I run just a > simple app, I keep getting the following error: > /usr/lib64/dbd/libmysql.so: undefined symbol: > _dbd_result_set_numfields libdbi: Failed to load driver: > /usr/lib64/dbd/libmysql.so > >The same app works fine if linked dynamically w/ the linker flag > "gcc -ldl -ldbi. > >Would you please provide some instructions how to do it? Thanks > > Peter Long. > _ > See how Windows Mobile brings your life together—at home, work, or on the go. > http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ -- 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=100&url=/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi, driver sqlite3 and 64 bits
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > /usr/local/lib/dbd/libdbdsqlite3.so: undefined symbol: > _dbi_internal_error_handler Hi, this typo was fixed in revision 1.22 on March 4, 2008. If you don't want to work with the current cvs revisions, simply change "_dbi_internal_error_handler" to _dbd_internal_error_handler" in dbd_sqlite3.c, around line 733. 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=100&url=/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi, driver sqlite3 and 64 bits
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > If I compiling and install libdbi and libdbi-drivers in a Linux > 64bits, the library will go to /usr/local/lib. Is more confortable put > it on /usr/local/lib64? Because we has compiled and installed in a > 64bits plataform? > /usr/local/lib is the default directory chosen by the autotools, this is not specific to libdbi. I guess the autotools would use a different directory on 64bit OSes if there was a standard which says so. It is probably going to cause more grief than benefit to fiddle with this location. 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=100&url=/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users
Re: [libdbi-users] libdbi 1.0, plan to launch
Quoting João Henrique Freitas <[EMAIL PROTECTED]>: > Hello, > > Have we plan to launch libdbi 1.0 release? > Not yet. I've found a serious issue with an application using libdbi when running on Windows/Cygwin. Using the latest code of both the app and libdbi, the app crashes when it forks. I was not able to debug this problem as the crash happens inside the fork() call (which is implemented in real strange ways in Cygwin due to the lack of a native fork in Windows). A simple ten-liner using libdbi and fork() does not crash though. I'm reluctant to release libdbi before I can make sure this problem is not related to libdbi instances in any way. Unfortunately I'm currently not able to work on this issue as I'm being absorbed by my dayjob and a relocation next week. In order to schedule a release later this year (late October, November?) I'd like to know if anyone else would like to see additional features in 1.0. What about your rewritten tests? 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=100&url=/ ___ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users