Thread: Disallow premature is broken

Disallow premature is broken

From
Ludek Finstrle
Date:
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

Re: Disallow premature is broken

From
"Dave Page"
Date:

> -----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

Re: Disallow premature is broken

From
Ludek Finstrle
Date:
> >   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

Re: Disallow premature is broken

From
"Dave Page"
Date:

> -----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.

Re: Disallow premature is broken

From
Tom Lane
Date:
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

Re: Disallow premature is broken

From
Ludek Finstrle
Date:
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

Re: Disallow premature is broken

From
Ludek Finstrle
Date:
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

Attachment

Re: Disallow premature is broken

From
Dave Page
Date:


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.