dbTalk Databases Forums  

ESQL/C problem, ^C does not work under Windows when fetching NCHARcolumns

comp.databases.ingres comp.databases.ingres


Discuss ESQL/C problem, ^C does not work under Windows when fetching NCHARcolumns in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tomasz Konojacki
 
Posts: n/a

Default ESQL/C problem, ^C does not work under Windows when fetching NCHARcolumns - 07-31-2012 , 07:48 AM






Hi everyone!

I'm trying to debug strange bug in my Perl Ingres driver, I really don't
know what is causing it.

The problem is that, after fetching row, ^C stops working.

I have created minimal test case using ESQL/C:

( code is at http://pastebin.com/QFrDdYQa )

Example assumes that you have standard Ingres demonstration database
(demodb).

There is infinite loop, so ^C should be only way to cause program
termination, but it does not work in my example - if I press ^C nothing
happens.

If I comment out "EXEC SQL FETCH ..." line, everything works as expected.

I'm using latest Ingres Community Edition. Problem is present only under
Windows (I have tried Win 2003 R2 32-bit and Win7 64-bit), under Linux
everything works as expected.

What am I doing wrong?

Regards,
Tomasz

Reply With Quote
  #2  
Old   
nikosv_
 
Posts: n/a

Default Re: ESQL/C problem, ^C does not work under Windows when fetchingNCHAR columns - 08-02-2012 , 04:46 PM






maybe the fetch instruction resets the signal handler;it sets the setctrlhandler win api function to null so it does not get interrupted and then forgets to turn it on again.but thats a speculation and a look on the underlying c code should be taken...

Reply With Quote
  #3  
Old   
Karl Schendel
 
Posts: n/a

Default Re: [Info-Ingres] ESQL/C problem,^C does not work under Windows when fetching NCHAR columns - 08-03-2012 , 09:00 AM



On Jul 31, 2012, at 8:48 AM, Tomasz Konojacki wrote:

Quote:
Hi everyone!

I'm trying to debug strange bug in my Perl Ingres driver, I really don't
know what is causing it.

The problem is that, after fetching row, ^C stops working.
I don't really do Windows, but a couple thoughts:

Is this specific to the data type fetched? i.e. does it really only happen when
fetching NCHAR data? or does it happen regardless of what you fetch?
If it's data type specific, I would suspect some kind of memory corruption.

Quote:
From your example program, it appears that the condition persists even after
disconnecting from the Ingres session. So, it must be something that the
Ingres library is setting and not restoring upon disconnect. You could try
poking around in $ING_SRC/cl/clf/ex_win to see if you can figure out
what is happening.

Karl

Reply With Quote
  #4  
Old   
Tomasz Konojacki
 
Posts: n/a

Default Re: [Info-Ingres] ESQL/C problem, ^C does not work under Windowswhen fetching NCHAR columns - 08-03-2012 , 11:10 AM



Well, I'm stupid, I don't know why I thought that NCHAR is the problem.
Problem is present only when I'm fetching DECIMAL columns, I have made
really trivial tests with only one (DECIMAL) column and results are
excactly the same as in posted test case.

Thanks,
Tomasz

W dniu 2012-08-03 16:00, Karl Schendel pisze:
Quote:
On Jul 31, 2012, at 8:48 AM, Tomasz Konojacki wrote:

Hi everyone!

I'm trying to debug strange bug in my Perl Ingres driver, I really don't
know what is causing it.

The problem is that, after fetching row, ^C stops working.

I don't really do Windows, but a couple thoughts:

Is this specific to the data type fetched? i.e. does it really only happen when
fetching NCHAR data? or does it happen regardless of what you fetch?
If it's data type specific, I would suspect some kind of memory corruption.

From your example program, it appears that the condition persists even after
disconnecting from the Ingres session. So, it must be something that the
Ingres library is setting and not restoring upon disconnect. You could try
poking around in $ING_SRC/cl/clf/ex_win to see if you can figure out
what is happening.

Karl



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.