pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Disallow premature is broken
8+ messages / 3 participants
[nested] [flat]

* Disallow premature is broken
@ 2006-01-25 22:50  Ludek Finstrle <luf@pzkagis.cz>
  0 siblings, 0 replies; 8+ messages in thread

From: Ludek Finstrle @ 2006-01-25 22:50 UTC (permalink / raw)
  To: pgsql-odbc

Hello,

  Dmitry pointed me that Disallow premature is next broken feature.
I found next difference between old driver and new one.

  When there are more statements in one (using semicolon ';') that
07.03 driver returns more results QResultClass. The 08.01 one
returns only one QResultClass. The example of such mutlistatement is:
"BEGIN; SELECT * FROM table; COMMIT". The old driver returns 3
QResultClass but 08.01 driver returns only last result (from COMMIT)
QResultClass.
  This behaviour breaks Disallow premature so it fails with access
violation. I can fix it becouse now we are using PQgetResult. But I'm
not sure if it doesn't break something another.

  I could fix a little the Disallow premature so it doesn't fail
with access violation but it doesn't work at all.

  What do you think? How do we want change the behaviout before
releasing new stable release? I'm not sure. There is no much time
for testing new behaviour. The multistatements hasn't been reported
yet by users. It seems this feature isn't widely used.

Regards,

Luf



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 09:39  Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 2 replies; 8+ messages in thread

From: Dave Page @ 2006-01-27 09:39 UTC (permalink / raw)
  To: Ludek Finstrle <luf@pzkagis.cz>; pgsql-odbc; +Cc: Tom Lane <tgl@sss.pgh.pa.us>

 

> -----Original Message-----
> From: pgsql-odbc-owner@postgresql.org 
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Ludek Finstrle
> Sent: 25 January 2006 22:50
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] Disallow premature is broken
> 
> Hello,
> 
>   Dmitry pointed me that Disallow premature is next broken feature.
> I found next difference between old driver and new one.
> 
>   When there are more statements in one (using semicolon ';') that
> 07.03 driver returns more results QResultClass. The 08.01 one
> returns only one QResultClass. The example of such mutlistatement is:
> "BEGIN; SELECT * FROM table; COMMIT". The old driver returns 3
> QResultClass but 08.01 driver returns only last result (from COMMIT)
> QResultClass.
>   This behaviour breaks Disallow premature so it fails with access
> violation. I can fix it becouse now we are using PQgetResult. But I'm
> not sure if it doesn't break something another.
> 
>   I could fix a little the Disallow premature so it doesn't fail
> with access violation but it doesn't work at all.
> 
>   What do you think? How do we want change the behaviout before
> releasing new stable release? I'm not sure. There is no much time
> for testing new behaviour. The multistatements hasn't been reported
> yet by users. It seems this feature isn't widely used.

Yuck. My first thought is that we need to try to parse the query string
and extract the last result returning query, but perhaps we would be
better to look at returning multiple results again.

In the short term though, I say just stop it crashing and let's get a
release out seeing as Tom is getting antsy about FC5 :-)

Can you produce a final 08.01.0108 dev build, and I'll look to build
08.01.0200 on say Tuesday/Wednesday? Does that work for you Tom?

Regards, Dave



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 09:51  Ludek Finstrle <luf@pzkagis.cz>
  parent: Dave Page <dpage@vale-housing.co.uk>
  1 sibling, 1 reply; 8+ messages in thread

From: Ludek Finstrle @ 2006-01-27 09:51 UTC (permalink / raw)
  To: Dave Page <dpage@vale-housing.co.uk>; +Cc: Ludek Finstrle <luf@pzkagis.cz>; pgsql-odbc; Tom Lane <tgl@sss.pgh.pa.us>

> >   What do you think? How do we want change the behaviout before
> > releasing new stable release? I'm not sure. There is no much time
> > for testing new behaviour. The multistatements hasn't been reported
> > yet by users. It seems this feature isn't widely used.
> 
> In the short term though, I say just stop it crashing and let's get a
> release out seeing as Tom is getting antsy about FC5 :-)

Ok. I agree. (what is the word "antsy" I can't find it in vocabulary).

> Can you produce a final 08.01.0108 dev build, and I'll look to build
> 08.01.0200 on say Tuesday/Wednesday? Does that work for you Tom?

I'll try to create the patch for Disallow Premature today. But I'm not
sure if I will have enough time for it. I have few time today and during
weekend :-(

What's the next deadline Tom? I ask to know how much I'm under pressure.
If we are too late I could sleep for a shorter time today.

Regards,

Luf



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 10:03  Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 8+ messages in thread

From: Dave Page @ 2006-01-27 10:03 UTC (permalink / raw)
  To: Ludek Finstrle <luf@pzkagis.cz>; +Cc: pgsql-odbc; Tom Lane <tgl@sss.pgh.pa.us>

 

> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz] 
> Sent: 27 January 2006 09:52
> To: Dave Page
> Cc: Ludek Finstrle; pgsql-odbc@postgresql.org; Tom Lane
> Subject: Re: [ODBC] Disallow premature is broken
> 
> > >   What do you think? How do we want change the behaviout before
> > > releasing new stable release? I'm not sure. There is no much time
> > > for testing new behaviour. The multistatements hasn't 
> been reported
> > > yet by users. It seems this feature isn't widely used.
> > 
> > In the short term though, I say just stop it crashing and 
> let's get a
> > release out seeing as Tom is getting antsy about FC5 :-)
> 
> Ok. I agree. (what is the word "antsy" I can't find it in vocabulary).

Nervous that it might not arrive in time.

> > Can you produce a final 08.01.0108 dev build, and I'll look to build
> > 08.01.0200 on say Tuesday/Wednesday? Does that work for you Tom?
> 
> I'll try to create the patch for Disallow Premature today. But I'm not
> sure if I will have enough time for it. I have few time today 
> and during
> weekend :-(

:-( Me too.

Regards, Dave.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 15:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ludek Finstrle <luf@pzkagis.cz>
  0 siblings, 1 reply; 8+ messages in thread

From: Tom Lane @ 2006-01-27 15:02 UTC (permalink / raw)
  To: Ludek Finstrle <luf@pzkagis.cz>; +Cc: Dave Page <dpage@vale-housing.co.uk>; pgsql-odbc

Ludek Finstrle <luf@pzkagis.cz> writes:
>> In the short term though, I say just stop it crashing and let's get a
>> release out seeing as Tom is getting antsy about FC5 :-)

> What's the next deadline Tom? I ask to know how much I'm under pressure.
> If we are too late I could sleep for a shorter time today.

No, no, working on too little sleep is a good way to mess up...

According to http://fedora.redhat.com/About/schedule/
the next deadline is test3 devel freeze on 6 February, which is
a week from Monday.  So if we can get a release made by say the
middle of next week, there's plenty of time to push it into FC5.

BTW, I do have an x86_64 FC4 machine here, and will try to look at that
buffer overflow report today.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 15:24  Ludek Finstrle <luf@pzkagis.cz>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 8+ messages in thread

From: Ludek Finstrle @ 2006-01-27 15:24 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Ludek Finstrle <luf@pzkagis.cz>; Dave Page <dpage@vale-housing.co.uk>; pgsql-odbc

Fri, Jan 27, 2006 at 10:02:11AM -0500, Tom Lane napsal(a):
> Ludek Finstrle <luf@pzkagis.cz> writes:
> >> In the short term though, I say just stop it crashing and let's get a
> >> release out seeing as Tom is getting antsy about FC5 :-)
> 
> > What's the next deadline Tom? I ask to know how much I'm under pressure.
> > If we are too late I could sleep for a shorter time today.
> 
> No, no, working on too little sleep is a good way to mess up...

I make exception. I want give users one development snapshot before
official release. I give less time for psqlodbc in next week ;-)

> the next deadline is test3 devel freeze on 6 February, which is

Thanks for information.

> BTW, I do have an x86_64 FC4 machine here, and will try to look at that
> buffer overflow report today.

Good news. I have problem on x86_64 CentOS with disconnecting. I'm
curios if it's only my local problem. I have no time to trace it
more now. I don't know very well gdb and next development tools for
C on unix.

The disconnecting problem is with perl code:

use DBI;

my $dbh = DBI->connect('dbi:ODBC:<DSN>','username','password');
print "connect\n";
$dbh->disconnect;
print "This message doesn't show\n";
# This perl script fails with SIGSEGV.

Regards,

Luf



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-27 22:38  Ludek Finstrle <luf@pzkagis.cz>
  parent: Dave Page <dpage@vale-housing.co.uk>
  1 sibling, 1 reply; 8+ messages in thread

From: Ludek Finstrle @ 2006-01-27 22:38 UTC (permalink / raw)
  To: Dave Page <dpage@vale-housing.co.uk>; +Cc: pgsql-odbc

Fri, Jan 27, 2006 at 09:39:05AM -0000, Dave Page wrote:
> >   What do you think? How do we want change the behaviout before
> > releasing new stable release? I'm not sure. There is no much time
> > for testing new behaviour. The multistatements hasn't been reported
> > yet by users. It seems this feature isn't widely used.
> 
> In the short term though, I say just stop it crashing and let's get a
> release out seeing as Tom is getting antsy about FC5 :-)

Here is the patch. I'll include it into 08.01.0108 dev snapshot.
psqlodbc doesn't fall down on exception when "Disallow premature"
is checked and: SQLPrepare, SQLNumResultCols is called.
The SQLNumResultCols returns SQLSTATE HY0000 with message like
No result was returned by the query.

Please review and comment

Regards,

Luf

Attachments:

psqlodbc-disallow_premature_not_fail.diff (text/plain, 613B) download diff -c psqlodbc.orig\execute.c psqlodbc\execute.c *** psqlodbc.orig\execute.c Sun Dec 25 09:22:49 2005 --- psqlodbc\execute.c Sat Jan 28 00:19:05 2006 *************** *** 256,262 **** return SQL_ERROR; } SC_set_Result(stmt, res); ! for (curres = res; !curres->num_fields; curres = curres->next) ; SC_set_Curres(stmt, curres); if (CC_is_in_autocommit(conn)) --- 256,262 ---- return SQL_ERROR; } SC_set_Result(stmt, res); ! for (curres = res; curres && !curres->num_fields; curres = curres->next) ; SC_set_Curres(stmt, curres); if (CC_is_in_autocommit(conn))
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: Disallow premature is broken
@ 2006-01-28 21:25  Dave Page <dpage@vale-housing.co.uk>
  parent: Ludek Finstrle <luf@pzkagis.cz>
  0 siblings, 0 replies; 8+ messages in thread

From: Dave Page @ 2006-01-28 21:25 UTC (permalink / raw)
  To: Ludek Finstrle <luf@pzkagis.cz>; +Cc: pgsql-odbc




On 27/1/06 22:38, "Ludek Finstrle" <luf@pzkagis.cz> wrote:

> Fri, Jan 27, 2006 at 09:39:05AM -0000, Dave Page wrote:
>>>   What do you think? How do we want change the behaviout before
>>> releasing new stable release? I'm not sure. There is no much time
>>> for testing new behaviour. The multistatements hasn't been reported
>>> yet by users. It seems this feature isn't widely used.
>> 
>> In the short term though, I say just stop it crashing and let's get a
>> release out seeing as Tom is getting antsy about FC5 :-)
> 
> Here is the patch. I'll include it into 08.01.0108 dev snapshot.
> psqlodbc doesn't fall down on exception when "Disallow premature"
> is checked and: SQLPrepare, SQLNumResultCols is called.
> The SQLNumResultCols returns SQLSTATE HY0000 with message like
> No result was returned by the query.
> 
> Please review and comment

Looks like a perfectly fine temporary fix.

Regards, Dave.




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2006-01-28 21:25 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 22:50 Disallow premature is broken Ludek Finstrle <luf@pzkagis.cz>
2006-01-27 09:39 Re: Disallow premature is broken Dave Page <dpage@vale-housing.co.uk>
2006-01-27 09:51 ` Ludek Finstrle <luf@pzkagis.cz>
2006-01-27 15:02   ` Tom Lane <tgl@sss.pgh.pa.us>
2006-01-27 15:24     ` Ludek Finstrle <luf@pzkagis.cz>
2006-01-27 22:38 ` Ludek Finstrle <luf@pzkagis.cz>
2006-01-28 21:25   ` Dave Page <dpage@vale-housing.co.uk>
2006-01-27 10:03 Re: Disallow premature is broken Dave Page <dpage@vale-housing.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox