Re: [libdbi-users] Found and fixed: dbd_mysql thread unsafe problem

2019-11-18 Thread Markus Hoenicka
emMetaData (database.c:2960)

==2828==

___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38


___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Lib DBI windows version

2018-12-30 Thread Markus Hoenicka
 

Hi, 

"dead" is relative here. It is unfortunately pretty much true that I was
not able to put much of an effort into further development of libdbi,
although there were a couple of bug fixes in the past couple of years. I
don't mean to whine, but sometimes life takes unexpected turns, and in
my case they're 6 and 3 years old now. Needless to say, this, and a new
position with extended responsibilities, caused a shift of priorities
that won't do my software projects any good. I'd hate to see libdbi die
of inactivity, but it is hardly possible to sleep less than I did in the
past couple of years just to do some extra programming. And I apologize
if I was not able to tend to questions on the lists in a timely fashion.


Regarding the original posters question: you can certainly use libdbi on
Linux and just about any unixish platform. This includes Cygwin
(http://www.cygwin.com), a library which provides a Unix-like interface
to Windows. To the best of my knowledge there is no native Windows port
available which would allow you to use it in native Windows
applications. Source code is available from a git repository at
SourceForge: 

https://sourceforge.net/p/libdbi/libdbi/ci/master/tree/ 

Documentation of the dbi interface is here (the Programmer's Guide is
what you want): 

http://libdbi.sourceforge.net/docs.html 

regards, 

Markus 

On 2018-12-29 03:25, Simon Walter was heard to say: 

> Hi Pabitra,
> 
> I asked a question on this list in 2015 and there has been no activity since 
> then. I didn't get an answer to my question. So I assumed that the project is 
> pretty dead. There is support for prepared statements. So I ended up using 
> APR DBD. The documentation is alright. Though I did find myself digging into 
> the source to understand a few things.
> 
> I haven't used it on Windows, but the whole point of the APR is cross 
> platform usage.
> 
> https://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html [2]
> 
> Best wishes,
> 
> Simon
> 
> On December 28, 2018 4:28:42 PM UTC, Pabitra Dash via libdbi-users 
>  wrote: 
> 
>> Hello, 
>> 
>> Good day. 
>> I have following queries. 
>> 
>> -As libdbi provides standard C abstraction, Can I use it in Windows and 
>> Linux platforms? 
>> -From where can I get DbiXX detail documentation and source code of the 
>> same? 
>> 
>> Regards, 
>> Pabitra
> 
> _______
> libdbi-users mailing list
> libdbi-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libdbi-users [1]

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

 

Links:
--
[1] https://lists.sourceforge.net/lists/listinfo/libdbi-users
[2]
https://apr.apache.org/docs/apr-util/1.6/group___a_p_r___util___d_b_d.html___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Problem getting SQLite last sequence value

2016-08-01 Thread Markus Hoenicka
 LOG_INFO, "Returning integer: %d", *buffer);
> 
>  return (0);
> }
> 
> Could this behavior relate to the dbi_conn reference passed? But then,
> why
> it works with MySQL and not with SQLite?
> 
> Or maybe it's the table schema? Then why everything works fine from the
> sqlite3 shell?
> 
> Thank you very much.
> Ciao!

Hi,

unfortunately I didn't find the time to actually reproduce your problem. 
However, I've found the following conspicuous line in dbd_sqlite3.c 
(line 1236 in my copy):

|| strstr(curr_type, "INTEGER PRIMARY KEY") /* BAD BAD HACK */

It is quite possible that the "bad bad" part of this hack came to life 
in your example. Could you please test your code again with a slightly 
modified table definition like this:

inode integer primary key not null autoincrement,

Please let me know if this helps.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38


--
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] prepared statements

2015-06-11 Thread Markus Hoenicka
At 2015-06-11 09:12, Simon Walter was heard to say:
 Hi all,
 
 I'm new to using libdbi and C in general. I am wondering why libdbi has
 no support for prepared statements.
 
 Is it that because the way libdbi is written, a prepared statement 
 would
 not provide any benefit? Or is it just lacking that feature? If it's
 just lacking the feature, are there plans to add that?
 
 If the application I'm writing can benefit from prepared statements, I
 would like to eventually either add that feature to libdbi or I may 
 have
 to use something else in the future.
 
 I haven't taken a deep look at the libdbi code. So any insight is
 appreciated.
 
 Kind regards,
 
 Simon
 
 PS
 
 If I should have sent this to the development list, please let me know.
 Thanks.

Hi,

I can't tell if prepared statements would speed up things when accessing 
databases through libdbi. As in many free software projects, the main 
reason for the lack of prepared statements is that nobody invested his 
time in implementing them. This includes myself, although I can't recall 
many requests for this feature. However, I think libdbi could support 
prepared statements if someone takes care of it. My commitments to my 
dayjob and to my family do not leave much dev time currently.

If you think about helping to implement this feature, you need to 
consider both libdbi and libdbi-drivers. libdbi needs a generic 
interface to prepared statements that covers all database backends. The 
drivers have to implement the feature using the functions of their 
respective client libraries. Therefore, it is best to design and discuss 
the interface first, and then to move on from there.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38


--
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Valgrind error with pgsql: Conditional jump or move depends on uninitialised value(s)

2014-11-03 Thread Markus Hoenicka
At 2014-11-02 19:05 Alex Bligh was heard to say:
 I have a very simple program (below) only marginally adapted from the
 example here:
   
 http://libdbi.sourceforge.net/docs/programmers-guide/quickstart-code.html
 
 which works, but when run through valgrind produces an enormous number
 of errors.
 The program in its entirety is below. It makes a connection to pgsql, 
 does no
 queries, and immediately shuts the connection.
 
 I'm not so much worried about the alleged memory leaks but the 85 
 instances of
 Conditional jump or move depends on uninitialised value(s). I don't
 know if this is a real problem, but even if not the challenge here
 is that /any/ query via dbi is now tainted as uninitialised, so it's 
 impossible
 to see 'real' errors.
 
 I've not attached a full valgrind dump as it's enormous. However, you 
 can see
 the first two below.
 
 Any ideas?
 

Hi,

I wouldn't bet from valgrind's output that it is libdbi variables which 
are uninitialized. Can you re-run your test with a different database 
engine? I'd suggest using the sqlite3 driver as this engine has few if 
any external dependencies.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38


--
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] DB2 support

2014-09-09 Thread Markus Hoenicka
 

At 2014-09-09 23:50 S M was heard to say: 

 I installed the 0.8.3 libdbi/libdbi-devl packages from the yum repos. I did 
 clone the latest version from git but there was configure file to compile 
 it.--

If you work straight from a repo you need to bootstrap your local
sources. Both libdbi and libdbi-drivers contain an autogen.sh script in
the top-level directory which will generate an appropriate configure
script for you.

regards
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

 --
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] DB2 support

2014-09-08 Thread Markus Hoenicka
 

At 2014-09-08 15:50 S M was heard to say: 

 Hi,
 
 I'm trying compile libdbi with DB2 support. I've downloaded the latest 
 version (libdbi-drivers-0.9.0) and exec'ed 
 
 ./configure --with-db2 --with-db2-incdir=/opt/ibm/db2/V10.5/include 
 --with-db2-dir=/opt/ibm/db2/V10.5
 
 That part worked. But when running 'make' it fails with:
 [...] 
 dbd_db2.c: At top level:
 dbd_db2.c:267: error: conflicting types for 'dbd_goto_row'
 /usr/include/dbi/dbd.h:41: note: previous declaration of 'dbd_goto_row' was 
 here

Hi,

this smells like a mismatch between your libdbi headers/libraries and
the driver version you're trying to build. The dbd_goto_row() prototype
and driver implementations were changed in early 2013. Make sure you
have a matching libdbi 0.9 for your libdbi-drivers 0.9, or better yet,
use the git versions of both if you're fiddling with experimental
drivers.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

 --
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi and SQL Injection

2014-01-10 Thread Markus Hoenicka
 

Am 2014-01-10 14:17, schrieb Markus Hoenicka: 

 if I understand you correctly, you attempt to insert a value containing the 
 string %s Saints going down tonight! using the libdbi function 
 dbi_conn_queryf(). Thing is, dbi_conn_queryf() is intended to make 
 dbi_conn_query() behave somewhat like sprintf() in that you can specify a 
 formatting string containing placeholders like %s, followed by parameters 
 that are filled in. If you want to preserve the %s literally, you either 
 need to escape or quote the values properly, or you should rather use 
 dbi_conn_query() which sends the string parameter to the db engine literally. 
 You still need to watch out for proper quoting and escaping as per the 
 language specs of your db engine.

I forgot to mention that the dbi_conn_quote_string() and
dbi_conn_escape_string() functions and their relatives can do the
quoting and escaping for you, please check the manual.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

 --
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi and SQL Injection

2014-01-10 Thread Markus Hoenicka
 

At 2014-01-10 15:56, Rick Robinson was heard to say: 

 I have tried the following, which I believe is on the right track but the 
 program crashes as soon as it gets to dbi_conn_quote_string_copy. I try to 
 use dbi_conn_quote_string_copy to keep the bad string locked down, and then 
 use dbi_conn_queryf to read the new locked down value into the db. Sadly, I 
 am not the greatest C coder so I am probably overlooking something relatively 
 simple to make this work. 
 
 char *pTitle=NULL; 
 
 char *pTitle2=NULL; 
 
 if ((ch)-player.title) 
 { 
 sprintf (pTitle, (ch)-player.title); 
 } 
 else 
 { 
 sprintf (pTitle, None); 
 } 
 
 dbi_conn_quote_string_copy(conn, pTitle, pTitle2); 
 
 sprintf (sql_columns, name, title); 
 sprintf (sql_string, REPLACE into data (%s) VALUES (%s, %s), 
 sql_columns, 
 GET_NAME (ch), 
 pTitle2 ); 
 
 result = dbi_conn_queryf (conn, sql_string);

Well, this is not a list about C coding, but it looks like you sprintf()
some string to a non-allocated buffer. I'm just wondering why the code
doesn't crash in sprintf() then.

In any case, it is far simpler to use dbi_conn_quote_string_copy() on
the assembled SQL query string rather than on single items. E.g. the
quoted string is surrounded by escape characters, and you subsequently
wrap another pair around the title. This does not seem to generate valid
SQL. Also, if you don't use the printf()-like capabilities of
dbi_conn_queryf(), there is no point in using this function. Use
dbi_conn_query() instead.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

 --
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments  Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] libdbi and libdbi-drivers versions 0.9.0 released, finally

2013-03-13 Thread markus . hoenicka
Hi,

unless you've already noticed I'd like to draw your attention to the
fact that after years of heavy development :-) libdbi and
libdbi-drivers are available at version 0.9.0. Although development
definitely took way too long due to my enormous workload in my dayjob
during the past couple of years (plus some extra burdens in my private
life), the releases are finally out in the wild. I hope that all
who have contributed code, ideas, and bug reports can be proud of the
result. I'd like to specifically point out the new test kit, the
concept of libdbi instances, transaction support, and the enormous
speedup of reading MySQL result sets sequentially, all of which were
either coded or requested by avid users. This holds true even if most
of the cvs checkins carry my name - I've checked in lots of things
originally provided by others.

I'll update the web pages asap (see above).

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] firebird driver segfault

2013-02-23 Thread markus . hoenicka
markus.hoeni...@mhoenicka.de writes:
  Christoph Kottke writes:
Am 19.02.2013 00:16, schrieb markus.hoeni...@mhoenicka.de:
 Did you ever succeed in running the new test
 kit? Or the old one shipped with 0.8.3 fwiw?

hi,

i can't remeber on old kit passes and the new one has never pass.

  

... even more findings

After perusing the available documentation I concluded that it is not
possible to drop tables from within a C program. Apparently you have
to resort to isql/isql-fb in order to get rid of them.

I modified our test program to do just that. Things work ok until just
after dropping a trigger and a generator (both of which are created
when creating the test table. I don't know what these are good for,
someone else coded that). The next step would be to actually drop the
table using isql. However, at this point the firebird client library
segfaults, although I can't see why. It is not being called at this
point. The test table is still present after the crash.

In any case I concluded that firebird is above my head. I've spent an
entire week trying to get a simple test case running, to no avail. I'm
going to release libdbi-drivers without official firebird support
unless someone steps up and takes a look at the firebird driver and
the tests.

best regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] firebird driver segfault

2013-02-22 Thread markus . hoenicka
Christoph Kottke writes:
  Am 19.02.2013 00:16, schrieb markus.hoeni...@mhoenicka.de:
   Did you ever succeed in running the new test
   kit? Or the old one shipped with 0.8.3 fwiw?
  
  hi,
  
  i can't remeber on old kit passes and the new one has never pass.
  

Hi,

maybe you can shed some light on my latest findings:

- isql-fb can connect from a FreeBSD box to a firebird server running
  on Debian

- the libdbi-drivers test_dbi program (cvs revision) connects to the
  server, successfully creates a database, but then immediately hangs
  forever

- the *old* test program as of approx. 0.8.3 runs most tests ok when
  run locally on Debian. However, trouble starts when the program
  tries to get rid of the table that was used during the tests

- the DROP TABLE command causes an error saying unsuccessful
  metadata update

- I took from several web resources that it may be necessary to
  explicitly commit a transaction before dropping a previously used
  table. However, this causes a Dynamic SQL Error

- this, in turn, seems to be fixed by enclosing the table name in
  double quotes. However, this now causes a invalid transaction
  handle (expecting explicit transaction start) kind of error

- if I try to fix this by issuing a SET TRANSACTION command, we're
  back to Dynamic SQL error, full circle

Can you confirm, from your experience, that firebird is kind of picky
about dropping tables which were previously used? This is kind of
weird, as any serious database should support dropping tables. How do
you deal with this in your own programs?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] firebird driver segfault

2013-02-21 Thread Markus Hoenicka
Christoph Kottke christoph.kot...@gmx.de was heard to say:

 Am 19.02.2013 00:16, schrieb markus.hoeni...@mhoenicka.de:
 Did you ever succeed in running the new test
 kit? Or the old one shipped with 0.8.3 fwiw?

 hi,

 i can't remeber on old kit passes and the new one has never pass.


Hi,

I've tried a few things with the new testkit in the past couple of  
days. However, it seems we're asking too much of firebird if we intend  
to create and drop tables with each test - this results in lock file  
errors which I was not yet able to resolve. gdb isn't cooperative at  
least on Linux, so I can't even tell exactly which SQL command kills  
the server. My tried and true printf debugger wasn't helpful either.  
I built the firebird client on FreeBSD yesterday. I'll try and see if  
gdb is more up to the task on that platform.

In any case, going back to your original problem report: could you  
please provide two simple but complete test cases, one which is  
supposed to succeed (i.e. which retrieves a single row of data) and  
one which fails (which retrieves three or more rows, according to what  
you mentioned). Both test cases should be complete in that they create  
the database, create the table, insert the data, and clean up after  
themselves when the test succeeds. It would be a major step forward  
towards debugging if I was able to run these test cases on my box.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] firebird driver segfault

2013-02-18 Thread Markus Hoenicka

Christoph Kottke christoph.kot...@gmx.de was heard to say:

 Hi,

 thanks for your investigating :)

 i've run an debian 6.0.6 on i386 and install the lastest firebird-1.5
 from http://firebirdsql.org/
 because libdbi-driver depends on old include files (gds.h, etc). but you
 can use the tarball only
 to compile and use the server from debian repository.

 i 've never had problems to install an firebird server on debian, it
 works always out of the box.

 the server is: firebird2.5-classic


Hi,

I've tried both classic and super. In order to get the latter up and  
running, you're supposed to configure the package like this (as root):

dpkg-reconfigure firebird2.5-super

Even that command fails, saying it cannot connect. As this is still  
part of the installation, I have to consider this package broken.  
Classic does not require this step, but it doesn't work either. I'm  
sure that I miss some critical step in the procedure. What about  
accounts: do you run your queries from a regular user account? root?  
firebird? Also, where do you create databases? What are the  
permissions of that directory, and who owns it? Do you use localhost  
in the database specifier, do you use any other host information, or  
none at all? I'll give it another try tonight, but of course there is  
no point in delaying libdbi-drivers 0.9 any further if I don't have a  
chance to fix the firebird driver anyway. We'd have to move that  
driver to the code present but unsupported vault.

BTW I'm running Debian Wheezy i386 on the test box. I've installed it  
from scratch on Saturday, so it shouldn't be screwed up in any way  
that affects firebird. If I include Debian's weird non-standard  
library directories, I don't have any problems building the firebird  
driver from the headers and libraries provided by the Debian packages.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] firebird driver segfault

2013-02-18 Thread markus . hoenicka
Christoph Kottke writes:
  some more hits,
  
  if you use xinet.d you must enabled by hand in 
  /etc/xinet.d/firebird.conf and restart xinetd.
  and new created db can only access by SYSDBA before the are activated...
  

Hi,

one reboot later things have improved considerably. I tried to start
the superserver process manually yesterday. There were no error
messages, but the commands apparently did not succeed. After I booted
the box tonight, the server was started correctly, and I was at least
able to connect to the test database.

I started to fiddle with tests/test_dbi in order to get some tests
running. The test database is created ok using isql-fb, and I can
connect to that (empty) database manually. I also found out the hard
way that you have to run ./test_dbi as root to avoid error messages
like:

Can't access lock files' directory /tmp/firebird

However, running the test as root results in error messages like
(printed using printf using a modified debug firebird driver):

Fatal lock manager error: invalid lock id (19892), errno: 11
--Resource temporarily unavailable

I'll have to investigate which commands exactly cause this error
messages, but at this time the test program does not run to completion
using this driver. Did you ever succeed in running the new test
kit? Or the old one shipped with 0.8.3 fwiw?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] firebird driver segfault

2013-02-17 Thread markus . hoenicka
Christoph Kottke writes:
  hi,
  
  i've installed the latest cvs revisions for libdbi and libdbi-driver and 
  when ever i try to fetch more than
  3 row from an firebird table it's end in an segfault.
  
  but when i revert the bull patch in dbi_result.c it works like a charm.
  

Hi,

I'd be happy to look at this issue. However, I haven't been able to
set up firebird on Debian either. I've followed the excellent Ubuntu
instructions which should work for Debian as well:

https://help.ubuntu.com/community/Firebird2.5

However, no luck. isql-fb never manages to make a connection. I cannot
create database, and I can't access the example database either. This
database drives me nuts, I haven't seen it work on any platform here
in the past couple of years.

In order to have a chance to debug the driver, would you please share
some information how you succeeded in running firebird at
all. Again, I'm not talking about libdbi or libdbi-drivers problems. I
just can't get the engine itself to work.

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] firebird driver segfault (c/o Christian???)

2013-02-14 Thread markus . hoenicka
Christoph Kottke writes:
  hi,
  
  i've installed the latest cvs revisions for libdbi and libdbi-driver and 
  when ever i try to fetch more than
  3 row from an firebird table it's end in an segfault.
  
  but when i revert the bull patch in dbi_result.c it works like a charm.
  
 
Hi,

thanks for the bug report. This one barely came in time to stop me
from packaging the long-awaited 0.9 releases :-/

Unfortunately, I haven't been able to make firebird
operational on my FreeBSD box for at least two years so I cannot do
any real debugging here. I plan to set up a Debian box shortly which
may be a better platform for this database engine.

It took me a couple of hours to more or less understand what's going
on in theory. In any case, I've got a hunch. I assume the bull patch
was correct as it fixed a memory leak shown by valgrind, without
causing any problems with the drivers that I can test over here. What
if the firebird driver just happened to work ok as long as libdbi
prevented one particular bordercase to occur, at the expense of some
bits of leaked memory? In that case it would be wrong to revert the
patch. Instead, someone in the know (Christian please ???) would have
to review the result fetching code of the firebird driver with an eye
on numrows_matched. According to what I've seen in the driver code,
firebird makes it particularly hard to get things right.

Also, Christoph, did you run make check? If that didn't crash, we need
extra tests to discover problems like these.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] pgsql problems

2013-02-07 Thread markus . hoenicka
markus.hoeni...@mhoenicka.de writes:
  Hi,
  
  I've moved libdbi to 0.9.0 in CVS and I've hoped to get libdbi-drivers
  release-ready as well. I've installed PostgreSQL 9.2 today to see if
  things worked as smoothly as they did a while back. I had to learn
  that the test harness doesn't manage to get through the database
  encoding test. After disabling that one, I still get 47 failures,
  while both mysql and sqlite3 succeed without a hitch. Is anyone using
  PostgreSQL with libdbi, and if yes, which versions?

kinda talking to myself, but maybe someone's still listening...

Turns out that there were both encoding and binary data
issues. PostgreSQL = 9.0 uses hex-encoded binary data which screwed
up all tests related to BYTEA data. I had to rewrite the entire BYTEA
decoding stuff in the pgsql driver to handle this new format. We're
now back at 0 errors, but I can test this against PostgreSQL 9.2
only. Would someone be kind enough to test the code on older versions
of this engine?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] pgsql problems

2013-02-04 Thread markus . hoenicka
Hi,

I've moved libdbi to 0.9.0 in CVS and I've hoped to get libdbi-drivers
release-ready as well. I've installed PostgreSQL 9.2 today to see if
things worked as smoothly as they did a while back. I had to learn
that the test harness doesn't manage to get through the database
encoding test. After disabling that one, I still get 47 failures,
while both mysql and sqlite3 succeed without a hitch. Is anyone using
PostgreSQL with libdbi, and if yes, which versions?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi transaction support

2013-01-25 Thread Markus Hoenicka

Rainer Gerhards rgerha...@hq.adiscon.com was heard to say:

 we have given it a try today and things look pretty good :-).

Sounds good :-)

 Unfortunately, we can reproduce the problem with MySQL. I barely  
 remember that MySQL by default has implicit commits enabled, what  
 needs to be turned off if you need real ones.


As Olivier already mentioned, any eplicit START TRANSACTION overrides  
autocommit, so this shouldn't interfere here. Even if an application  
using libdbi turns autocommit off or on deliberately, START  
TRANSACTION should still work as expected.

Another possible reason for problems is the table type. If someone  
uses MyISAM tables, the result I got would be expected. However, MySQL  
uses InnoDB tables as default these days, and I double-checked that  
they were used in my tests.

I'll try to test the pgsql driver on the weekend to see if that causes  
problems too. I'll also check the MySQL logs to see if I find  
something weird, and I'll run some transactions in MySQL's plain ol'  
command line interface just to make sure it isn't MySQL playing tricks  
on us.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread Markus Hoenicka

Zitat von Rainer Gerhards rgerha...@hq.adiscon.com:

 sorry for the long silence, we got sidetracked ourselfs. Finally, we  
 yesterday tried to write some test programs to get started. To do  
 so, I did a cvs checkout for both libdbi and libdbi-drivers  
 (according to instructions on the site). I can see the new  
 transaction functions inside the sgml files as well as the headers.  
 However, I do not find any implementation (.c files).

 Am I overlooking something?


No. Apparently my bad. I'll fix that tonight.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi transaction support

2013-01-24 Thread markus . hoenicka
Rainer Gerhards writes:
   Zitat von Rainer Gerhards rgerha...@hq.adiscon.com:
   
sorry for the long silence, we got sidetracked ourselfs. Finally, we
yesterday tried to write some test programs to get started. To do so,
I did a cvs checkout for both libdbi and libdbi-drivers (according to
instructions on the site). I can see the new transaction functions
inside the sgml files as well as the headers.
However, I do not find any implementation (.c files).
   
Am I overlooking something?
   
   
   No. Apparently my bad. I'll fix that tonight.
  
  Thanks a lot!
  Rainer

I've checked in new versions of libdbi/src/dbi_main.c containing the
implementations of the transaction functions and
libdbi-drivers/tests/test_dbi.c with a first shot at the required test
functions. MySQL seems to fail to rollback transactions on my box
whereas SQLite3 succeeds. I'm too tired now to track this down, maybe
someone else can have a look at this too. I hope I'll get back to this
on the weekend.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi+mysql speed issues

2013-01-09 Thread Markus Hoenicka
Olivier Doucet webmas...@ajeux.com was heard to say:

 Do you have any numbers? Would be nice to know what speed gain this
 (almost) one-line optimization effected.

 I've done a benchmark with rrdtool that uses libdbi.
 http://tof.canardpc.com/view/31953cab-4329-45e9-9e30-eed2d9148ee1.jpg
 max value on X-Axis is equivalent to ~ 35k rows retrieved from MySQL.

 Quite impressive, right ? ;)


Looks like my 30 min effort was well spent then. Thanks for kicking my  
butt to get this done.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka
Olivier Doucet webmas...@ajeux.com was heard to say:

 Hello everyone,

 I'm following a quite old topic about libdbi speed issues.
 I was able to track the cause of these issues : The major problem is
 how libdbi goes from one row to another.

 RRDTool (the tool that used libdbi and that I was inspecting) is using
 dbi_result_next_row() function (as stated in libdbi documentation
 btw).

 This function moves from one row to another with function
 dbi_result_seek_row(), incrementing currentRow index each time. This
 gives a call to dbd_mysql.c::dbd_goto_row() that uses
 mysql_data_seek() each time...

 That's why for a query result of 34k rows (yes it happens. No it is
 not a problem in the query itself), we have tens of thousands of call
 to this function (which is very low), and this is definitely not
 needed, because as we use fetch_row(), we automatically move from one
 row to another. Seeking is just a useless task (as internal driver
 does not know where we are, and needs to start from row 0 and seek to
 the given row - where we already were).

 I'm absolutely not a libdbi user, and I don't know what could be done
 outside libdbi to not use dbi_result_next_row() and use directly
 RESULT-onn-driver-functions-fetch_row() directly. Is it possible ?

 And/or patching dbi_result.c :
 just check RESULT-currowidx near line 102 before calling doing
 goto_row() function and call it only if we are not on the good row. Am
 I right ?


Hi,

your analysis is pretty much correct. If you look at the comments in  
dbd_mysql.c::dbd_goto_row(), the original author of the mysql driver  
was well aware of the limitations of his implementation. The reason is  
that other database APIs, e.g. PostgreSQL, allow to fetch rows from a  
result set by index, whereas the MySQL API assumes that you step  
through the rows sequentially. The original design of libdbi appears  
to somewhat favor PostgreSQL in this respect.

Anyway, without having thought about the issue in too much detail, one  
possible solution comes to mind. We could modify the driver function  
dbd_goto_row() by passing both the wanted row index rowidx and the  
current row index currowidx(which libdbi keeps track of anyway). This  
would allow drivers to decide whether they have to actually seek the  
position. pgsql doesn't have to anyway, and mysql doesn't have to if  
rowidx = currowidx+1. This API change would not mandate changes to  
existing drivers as they may ignore the additional parameter and keep  
working as before, but it may offer options to speed up queries in  
some drivers.

regards,
Markus



-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka
Olivier Doucet webmas...@ajeux.com was heard to say:

 Hi Markus,

 2013/1/8 Markus Hoenicka markus.hoeni...@mhoenicka.de:
 We could modify the driver function
 dbd_goto_row() by passing both the wanted row index rowidx and the
 current row index currowidx(which libdbi keeps track of anyway).

 This is one way to fix the problem, I agree. Unfortunately my level in
 C is too low to make such huge changes without breaking everything
 else :) Anyone willing to create the patch for this ?


I'll commit these changes asap (may take a day or two). Can you build  
libdbi and libdbi-drivers from the cvs sources? You seem to have a  
good test case to see if these changes help.

 Is there a way, outside libdbi, to fix this problem ? For example, go
 over dbd_goto_row() and call fetch_row directly() ? Or maybe the
 behaviour is different between database engines ?


I'm afraid you can't do that except if you bypass the abstraction  
layer altogether and use libmysqlclient natively.

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread Markus Hoenicka

Mike Rylander mrylan...@gmail.com was heard to say:

 Markus,

 Would it be worth the ugliness of a module-global variable to bury the
 value of the row index used in the previous call to  
 dbd_mysql.c::dbd_goto_row()
 inside the MySQL driver itself, side-stepping the function signature change
 for other drivers?  The benefit of avoiding the API change may not be
 outweighed by the potential fragility of naively tracking the state
 internally, of course, since in practice folks install and upgrade to new
 versions of drivers and the libdbi core at the same time, but then again,
 it may.  I'm a little nervous about the potential for problems when mixing
 direct goto_row() (cursor style) and next_row() calls, but I haven't looked
 at the code to see if there's actually an issue there...


Hi,

I'll have to read the code again a little more thoroughly, but to the  
best of my knowledge libdbi emulates MySQL's approach to retrieving  
rows from result sets. In order to walk through the rows of e.g. a  
PostgreSQL result set you have to retrieve the rows by index  
sequentially, so libdbi has to maintain an internal pointer anyway. We  
do not have to add one, so there are no extra changes. Also, libdbi  
internally already mixes the cursor style and next_row style calls,  
because we have to cater for database engines which use either of  
these methods without exposing these differences to the libdbi user.

As for the API change, we have extensive driver API changes between  
0.8.x and the upcoming(TM) 0.9 release anyway, think of the recent  
addition of the transaction stuff. You won't be able to keep your  
0.8.x drivers once you switch to libdbi 0.9. You'll probably notice  
problems only if you build from cvs regularly (and only if you update  
one but not the other), but I expect those users to know what they're  
doing.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi+mysql speed issues

2013-01-08 Thread markus . hoenicka
Markus Hoenicka writes:
  Hi,
  
  I'll have to read the code again a little more thoroughly, but to the  
  best of my knowledge libdbi emulates MySQL's approach to retrieving  
  rows from result sets. In order to walk through the rows of e.g. a  
  PostgreSQL result set you have to retrieve the rows by index  
  sequentially, so libdbi has to maintain an internal pointer anyway. We  
  do not have to add one, so there are no extra changes. Also, libdbi  
  internally already mixes the cursor style and next_row style calls,  
  because we have to cater for database engines which use either of  
  these methods without exposing these differences to the libdbi user.
  
  As for the API change, we have extensive driver API changes between  
  0.8.x and the upcoming(TM) 0.9 release anyway, think of the recent  
  addition of the transaction stuff. You won't be able to keep your  
  0.8.x drivers once you switch to libdbi 0.9. You'll probably notice  
  problems only if you build from cvs regularly (and only if you update  
  one but not the other), but I expect those users to know what they're  
  doing.
  

Hi,

I've implemented the suggested changes and checked in the updated
files. If you want to speed test the code, please check out, build,
and install the current cvs revisions of both libdbi and
libdbi-drivers. I've updated the mysql, pgsql, and sqlite3 drivers at
this time, but making the remaining drivers compile is trivial. I've
added the suggested check to speed up sequential row fetching in
mysql. I do see a small but significant decrease in the time required
to run gmake check (11.78 vs. 12.51 s), although the test code does
not test retrieving boatloads of rows specifically. I'd appreciate if
someone with a nice testcase (Olivier?) could give the changes a try
and report some numbers.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi transaction support

2012-12-08 Thread markus . hoenicka
markus.hoeni...@mhoenicka.de writes:
  I've stolen some time from myself to provide a first shot at
  transaction and savepoint support, see the current cvs revisions of
  libdbi and libdbi-drivers. The code is entirely untested except that
  the drivers which I use myself compile and don't crash upon loading. I
  didn't get round to adding the documentation and the tests, but feel
  free to test the current code yourself. Usage should be pretty obvious
  if you look at the diffs. I'm sure some rough edges remain, but
  then... it's a start.
  

FYI I've also updated the docs in cvs to reflect the latest changes.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] libdbi transaction support

2012-11-20 Thread Markus Hoenicka
Mike Rylander mrylan...@gmail.com was heard to say:

 I think I'd add three calls to the proposed API, though, for support
 of savepoints.  They're part of the SQL standard, and supported by
 several SQL RDBMS' including Postgres (the db my project uses, and we
 use libdbi to connect to PG).  The relevant PG documentation is
 available at http://www.postgresql.org/docs/9.1/static/sql-savepoint.html
 .  I have wrappers for savepoints in my implementation, and they are
 very handy for complex DB interactions.


Sounds like a no-brainer if it is as simple as you say. I don't keep  
the SQL standard underneath my pillow, but is it safe to assume that  
database engines are responsible to deal with any pending savepoints  
if a transaction is committed (i.e. no extra work for libdbi)?

This brings up another question. Applications should of course check  
the transaction_supported and savepoints_supported driver  
capabilities and act responsibly. But if a database engine does not  
support savepoints, or transactions altogether, should libdbi just go  
ahead when asked, or should it throw an error instead? I recall that  
MySQL supported transactions in MyISAM tables using no-ops.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Memory leak when using dbi_initialize in loop

2011-08-03 Thread Markus Hoenicka
Shakthi Kannan shakthim...@gmail.com was heard to say:

 int main() {
   dbi_conn conn;

   while (1) {
 dbi_initialize(NULL);

[...]

 dbi_shutdown();
   }

   return 0;
 }

Hi,

I'll test your code on my dev box as soon as time permits. libdbi is  
not supposed to lose memory under any circumstances. I'll have to see  
the valgrind output as sometimes the leak is not within libdbi itself,  
but within a driver or the client library (if the driver forgets to  
free memory allocated by the library).

In any case, I'd suggest to modify your code. dbi_initialize() is  
supposed to be run once per process, so the following is more  
appropriate:

int main() {
   dbi_conn conn;

   dbi_initialize(NULL);
   while (1) {

[...]

   }
   dbi_shutdown();

   return 0;
}

If it is indeed libdbi that leaks memory, it won't do so in every  
cycle of your loop.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos  much more. Register early  save!
http://p.sf.net/sfu/rim-blackberry-1
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] libdbi+mysql speed issues

2011-07-09 Thread markus . hoenicka
Adam Jacob Muller writes:
  Hi,
  I'm developing an application that utilizes rrdtool (and the lidbdi 
  interface into rrdtool) heavily and having some performance issues that seem 
  to center around libdbi,
  

Hi Adam,

I can't see any obvious issues with your C code, so I assume the speed
differences really stem from libdbi, one way or another. Unfortunately
I currently lack the time for any deeper analysis, but I'm somewhat
surprised about your results. libdbi has originally been developed as
a wrapper for MySQL and PostgreSQL and should work fairly well with
these database engines (other engines are a *lot* harder to fit). The
only overhead that the mysql driver contains is the column type
analysis and data conversion stuff. Some other engines have to buffer
the data and thus create way more overhead.

Did you have a chance to verify your results with any of the other
database drivers?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] sqlite3 multiple tables

2011-02-20 Thread markus . hoenicka
[Vikram's original mail from 2010-12-25 got lost from my inbox, so I
have to apologize for (1) being darn late and for (2) not keeping the
thread intact]

  1. Artist (id,name)
  2. Album (id,VA,name)
  3. Album_Artist (artist_id,album_id)
[...]
  no tables in statement !
  no tables in statement !

How did you create the tables? Did you specify types for each column?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] PATCH: sqlite3 parser bugs

2011-02-20 Thread markus . hoenicka
Vikram Ambrose writes:
  And here is an update to the patch for a third bug.

Better late than never ... I've applied your patch, and things seem to
work ok. Thanks for being this patient.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] Hello

2011-01-17 Thread markus . hoenicka
Vikram Ambrose writes:
  I've been emailing the list for about a month now with my patches and I 
  have got no responses. Can someone please confirm that these messages 
  are going through?

Hi,

they do, and I sincerely apologize that I haven't been able to take
care of your messages and patches yet. My dayjob currently eats all
available time (lest I stop sleeping entirely). I can't make any
promises, but I'll do my very best to return to my libdbi duties asap.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] dynamic loading

2011-01-14 Thread Markus Hoenicka
Rainer Gerhards rgerha...@hq.adiscon.com was heard to say:

 I don't remember if you use libtool. If not, Samuel may consider modifying
 libdbi to utilize libtool, which what should not be too hard. As of my
 understanding (never actually tried it), libtool provides full flexibility in
 deciding if dynamic or static linking is used.


Dynamic vs. static linking is a different issue. At this time, libdbi  
is not linked against the drivers at all, for the reasons mentioned in  
my previous mail. Instead it uses dlopen() to load the drivers at  
runtime. libtool is involved here only on platforms which do not  
provide their own dlopen() implementation. However, building libdbi as  
a dynamic library uses libtool anyway, and it should be possible to  
statically link a project against libdbi if desired without further  
modifications.

regards,
Markus



-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Timeout / Reconnect

2010-07-15 Thread Markus Hoenicka
Vikram Ambrose writes:
  There is indeed enough information to find this scenario. Here is a very 
  simple callback I use at the moment:
  
  void DB_error_callback(dbi_conn conn, void *udata){
   int rv;
   const char *errormsg = NULL;
  
   rv = dbi_conn_error(DB_conn,errormsg);
   if(strstr(errormsg,gone away)){
   rv = dbi_conn_connect(DB_conn);
   if(rv){
   printf(ERROR: DB_error_callback: Tried to reconnect - 
  failed\n);
   }else {
   printf(ERROR: DB_error_callback: Reconnected\n);
   }
   }
  }
  

Hi,

I just found some time to fiddle with this. As it seems, your solution
is pretty much focused on MySQL. However, I assume that the server
going away is a problem of all database engines, except maybe the
embedded ones. Adding some code to the MySQL driver to fix your
original problem thus might be the wrong solution. Don't you
experience the same problems with other DB engines? In that case, we'd
have to fix libdbi, rather than a driver.

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Timeout / Reconnect

2010-07-01 Thread Markus Hoenicka
Vikram Ambrose noel.ambr...@gmail.com was heard to say:

 Is there a way of having the mysql driver, reconnect and then complete
 the query without erroring out, in the case of driver/server timeout?
 This way I do not lose my query to a timeout or need to have some sort
 of global command buffer that the callback would use to re-execute the
 failed query.

Hi,

does the MySQL API provide enough information to tell from a failure  
of mysql_query that the connection has stalled? I've found a log entry  
in cvs which added a timeout option to the driver, so with that in  
place and a useful error message from libmysqlclient I'd say it's  
doable. We'd just have to loop over a limited number of retries,  
trying to reconnect each time before resending the query.

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] New release

2010-05-24 Thread Markus Hoenicka
Phil Longstaff writes:
  any idea on when the next release of libdbi will be?  It's been a long
  time since the last one and there are some good changes in svn.

Hi,

I wouldn't place any bets. I've been discussing things with João
lately, he has put an enormous amount of effort into updating our test
harness which is way better than the old one. We ran into problems
with firebird which both of us were unable to solve. Our latest guess
is that the test code triggers a documented firebird bug which we
can't work around. If we drop firebird support for now, we could
release a new version after doing some minor cleanup. Unfortunately
I'm haunted by a couple of deadlines in the next couple of weeks, so
it is very uncertain whether I'll be able to finalize a release.

Needless to say, test reports using the current cvs version are always
welcome.


regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--

___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-21 Thread Markus Hoenicka
Vikram Noel Ambrose noel.ambr...@gmail.com was heard to say:

 By the way, the url for the source code repository is dead on the website.

Thanks for the heads up. I may have missed a SourceForge announcement  
about restructuring their CVS servers.

regards,
Markus


-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-18 Thread Markus Hoenicka
Toby Thain t...@telegraphics.com.au was heard to say:

 This is probably driver dependent. IMHO the first check would be to
 see if the unexpected reversion to binary type is occurring within
 libdbi or in libmysqlclient (or mysqld).


I bet it is. The mysql driver uses some weird check (in  
_translate_mysql_type) to find out whether or not a field is binary.  
Unless I'm dense the code in question may actually cause other  
problems as well, so I'd like to ask everyone with some MySQL  
knowledge to have a look at it. Also, the existing check may be  
version dependent. Vikram, which MySQL version are you running?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38



--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-16 Thread Markus Hoenicka
Vikram Noel Ambrose writes:
  When I invoke dbi_result_get_string_idx on a column declared 
  VARCHAR(256) COLLATE 'binary', libdbi complains that: The requested 
  variable type does not match what libdbi thinks it should be.
  
  I then tried using _get_binary_idx, but that seems to cause the next dbi 
  call to segfault (_get_short_idx). I wasn't sure if dbi was giving me 
  the '\0' character, so I called _get_field_length_idx and that just 
  returns 0. I don't have any idea whats going on now.
  
  Has anyone else run into this?

I've never tried things like this. Which driver do you use?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] dbi_result_get_string_idx fails on VARCHAR COLLATE 'binary'

2010-01-16 Thread Markus Hoenicka
Vikram Noel Ambrose writes:
  Either mysql is telling libdbi that the field is binary or libdbi is 
  getting confused somewhere.
  

Could you please insert a call to dbi_result_get_field_type_idx() to
see what mysql thinks this is?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] dbi_result_get_ulonglong overflow

2010-01-09 Thread Markus Hoenicka
Devin Reade writes:
  The ato* are indeed often implemented in terms of strto*.  The problem
  is that the ato* signature just doesn't lend itself to error
  checks, so even if they wrap strto*, error information gets lost in
  the wrapper layer.

What about the portability of the strto* functions? I recall we had to
add an implementation of atoll() to the libdbi sources to compile it
on at least one platform (I can't quite recall which one). Can we
expect that all platforms which are currently supported provide all
required strto*() functions?

regards,
Markus

-- 
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


[libdbi-users] UNIX Timestamp - DATE to UTC conversion

2008-11-18 Thread Markus Hoenicka
Ken Ramsay writes:
time = dbi_result_get_uint(result,
  UNIX_TIMESTAMP(HIST_Timestamp));

Without actually trying the code: one rough guess is that MySQL does
not return the timestamp as an uint value but as something longer. Did
you try using dbi_result_get_field_type() and
dbi_result_get_field_attrib() to find out which type is returned?

regards,
Markus

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with mhoenicka)
http://www.mhoenicka.de

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] newline in query causes all field types to appear as DBI_TYPE_STRING

2008-10-13 Thread Markus Hoenicka
Hi,

just to clarify: it is sqlite, not the sqlite driver which does not  
support newlines in SQL statements. Some other SQL engines like MySQL  
do support newlines, so this appears to be a design decision (I don't  
know what the standard says). To verify, use these SQL scripts:

-
select
version()
-

and

-
select
sqlite_version()
-

write the scripts to a file using Unix line endings, and pipe them  
into mysql and sqlite, respectively. The former succeeds, whereas the  
latter complains about incomplete SQL. I think it is easier to avoid  
newlines on the input side rather than trying to fix sqlite's  
behaviour in the driver.

regards,
Markus

Quoting Kris Groves [EMAIL PROTECTED]:

 The parsing of the sql statement will fail at the first new line char as
 this indicates the end of the c-string.

 This is the first time I have seen newline characters explicitly
 embedded in an sql statement.  Is there a reason that the newline
 characters are needed ?

-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with mhoenicka)
http://www.mhoenicka.de


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
libdbi-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

2008-04-17 Thread Markus Hoenicka
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


[libdbi-users] libdbi and bind functions, testing

2008-04-16 Thread Markus Hoenicka
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


Re: [libdbi-users] postgresql and copy command

2008-04-05 Thread Markus Hoenicka
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


Re: [libdbi-users] postgresql and copy command

2008-03-27 Thread Markus Hoenicka
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

2008-03-18 Thread Markus Hoenicka
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


[libdbi-users] ANN: libdbi-1.0-pre1, libdbi-drivers-1.0-pre1 available for testing

2008-02-27 Thread Markus Hoenicka
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


[libdbi-users] Where is a bug? In code or in my head?

2008-02-18 Thread Markus Hoenicka
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] Feedback and Questions [resend]

2008-02-15 Thread Markus Hoenicka
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


[libdbi-users] ANN: libdbi-0.8.3, libdbi-drivers-0.8.3 released

2008-02-06 Thread Markus Hoenicka
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] unresolved issues of envisaged next releases

2008-02-05 Thread Markus Hoenicka
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.mininetforum_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


Re: [libdbi-users] [libdbi-devel] Compilation of MySQL driver under MingW

2007-08-25 Thread Markus Hoenicka
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] ANN: libdbi-drivers-0.8.2 released

2007-02-20 Thread Markus Hoenicka
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.phpp=sourceforgeCID=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?

2007-02-19 Thread Markus Hoenicka
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.phpp=sourceforgeCID=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

2007-02-15 Thread Markus Hoenicka
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.phpp=sourceforgeCID=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

2007-02-12 Thread Markus Hoenicka
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=detailaid=1578577group_id=65979atid=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=lnkkid=120709bid=263057dat=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

2006-11-07 Thread Markus Hoenicka
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=lnkkid=120709bid=263057dat=121642
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users


Re: [libdbi-users] Finding inserted rows

2006-05-27 Thread Markus Hoenicka
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=lnkkid=107521bid=248729dat=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

2006-05-16 Thread Markus Hoenicka
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

2006-05-16 Thread Markus Hoenicka
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=lnkkid=120709bid=263057dat=121642
___
libdbi-users mailing list
libdbi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-users