You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by Dave Birdsall <da...@esgyn.com> on 2017/04/05 21:13:54 UTC

I want to get a core file on a particular SQL error. How to do it?

Hi,

I dimly remember that there was a CQD or environment variable that one could use in a debug environment to cause a core when a particular SQL error occurs.

Can anyone supply the missing details?

Thanks,

Dave

RE: I want to get a core file on a particular SQL error. How to do it?

Posted by Dave Birdsall <da...@esgyn.com>.
Hi,

I've documented these debugging tips on the Trafodion wiki here:

https://cwiki.apache.org/confluence/display/TRAFODION/Debugging+Tips#DebuggingTips-EnvironmentVariablesandTrafodionProcesses

https://cwiki.apache.org/confluence/display/TRAFODION/Debugging+Tips#DebuggingTips-CatchingSQLErrorsattheSource

Feel free to comment and/or correct.

Dave

-----Original Message-----
From: Dave Birdsall 
Sent: Wednesday, April 5, 2017 2:19 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: I want to get a core file on a particular SQL error. How to do it?

Thank you, Wei-Shiun! Yes, that's exactly what I was trying to remember.

-----Original Message-----
From: Wei-Shiun Tsai [mailto:wei-shiun.tsai@esgyn.com] 
Sent: Wednesday, April 5, 2017 2:18 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: I want to get a core file on a particular SQL error. How to do it?

Not sure about CQD, but adding ABORT_ON_ERROR=<error num> to ms.env would do what you want to do.

Thanks,

Weishiun

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Wednesday, April 5, 2017 2:14 PM
To: dev@trafodion.incubator.apache.org
Subject: I want to get a core file on a particular SQL error. How to do it?

Hi,

I dimly remember that there was a CQD or environment variable that one could use in a debug environment to cause a core when a particular SQL error occurs.

Can anyone supply the missing details?

Thanks,

Dave

RE: I want to get a core file on a particular SQL error. How to do it?

Posted by Dave Birdsall <da...@esgyn.com>.
Thank you, Wei-Shiun! Yes, that's exactly what I was trying to remember.

-----Original Message-----
From: Wei-Shiun Tsai [mailto:wei-shiun.tsai@esgyn.com] 
Sent: Wednesday, April 5, 2017 2:18 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: I want to get a core file on a particular SQL error. How to do it?

Not sure about CQD, but adding ABORT_ON_ERROR=<error num> to ms.env would do what you want to do.

Thanks,

Weishiun

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Wednesday, April 5, 2017 2:14 PM
To: dev@trafodion.incubator.apache.org
Subject: I want to get a core file on a particular SQL error. How to do it?

Hi,

I dimly remember that there was a CQD or environment variable that one could use in a debug environment to cause a core when a particular SQL error occurs.

Can anyone supply the missing details?

Thanks,

Dave

RE: I want to get a core file on a particular SQL error. How to do it?

Posted by Wei-Shiun Tsai <we...@esgyn.com>.
Not sure about CQD, but adding ABORT_ON_ERROR=<error num> to ms.env would do what you want to do.

Thanks,

Weishiun

-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com] 
Sent: Wednesday, April 5, 2017 2:14 PM
To: dev@trafodion.incubator.apache.org
Subject: I want to get a core file on a particular SQL error. How to do it?

Hi,

I dimly remember that there was a CQD or environment variable that one could use in a debug environment to cause a core when a particular SQL error occurs.

Can anyone supply the missing details?

Thanks,

Dave

RE: I want to get a core file on a particular SQL error. How to do it?

Posted by Dave Birdsall <da...@esgyn.com>.
Hi,

As often seems to happen, as soon as I sent out an e-mail, I found the answer.

In ComCondition::setSQLCODE (export/ComDiags.cpp), there are two environment variables that developers can set.

If you set LOOP_ON_ERROR to a SQL error number (without a minus sign), the code will loop forever when it encounters that error.

If you set ABORT_ON_ERROR to a SQL error number (again without a minus sign), the code will call abort().

Thanks,

Dave

From: Dave Birdsall
Sent: Wednesday, April 5, 2017 2:14 PM
To: dev@trafodion.incubator.apache.org
Subject: I want to get a core file on a particular SQL error. How to do it?

Hi,

I dimly remember that there was a CQD or environment variable that one could use in a debug environment to cause a core when a particular SQL error occurs.

Can anyone supply the missing details?

Thanks,

Dave