You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafodion.apache.org by "Liu, Ming (Ming)" <mi...@esgyn.cn> on 2016/02/27 16:37:55 UTC
how to abort for a given SQL Error?
Hi, all,
I think it is possible to configure Trafodion to abort and core dump for specific SQL Error, for debug purpose, could anyone share with me how to do that?
For example, for a given SQL error 15001, I want compiler abort immediately so that I can know in which code path that error is detected .
Thanks,
Ming
RE: 答复: how to abort for a given SQL Error?
Posted by Dave Birdsall <da...@esgyn.com>.
Hi,
I'm very glad to learn about this technique! In the past I have resorted to
using gdb with a conditional breakpoint at DgSqlCode::DgSqlCode, but often
you get more than you want with this technique, and often you discover the
error isn't being created in that process.
Thanks,
Dave
-----Original Message-----
From: Anoop Sharma [mailto:anoop.sharma@esgyn.com]
Sent: Saturday, February 27, 2016 11:56 AM
To: dev@trafodion.incubator.apache.org
Subject: RE: 答复: how to abort for a given SQL Error?
yes, will be good to add this kind of info to the guide.
Would also suggest that the person who initially asked the question should
collect/collate/document after testing that the solution works. They can
also add an example of how they tested it.
anoop
-----Original Message-----
From: Gunnar Tapper [mailto:tapper.gunnar@gmail.com]
Sent: Saturday, February 27, 2016 9:42 AM
To: dev@trafodion.incubator.apache.org
Subject: Re: 答复: how to abort for a given SQL Error?
It's always good to capture this type of information in the Contributor
Guide How-To section.
In this case:
https://cwiki.apache.org/confluence/display/TRAFODION/How-To#How-To-ForceCoreDumponSpecificSQLError
Please edit if needed.
Thanks,
Gunnar
On Sat, Feb 27, 2016 at 8:53 AM, Liu, Ming (Ming) <mi...@esgyn.cn> wrote:
> Thanks Anoop and Qifan,
>
> I tested, by modifying ms.evn, it works well.
> This is a very convenient debug weapon!
>
> Best Regards,
> Ming
>
> -----邮件原件-----
> 发件人: Anoop Sharma [mailto:anoop.sharma@esgyn.com]
> 发送时间: 2016年2月27日 23:44
> 收件人: dev@trafodion.incubator.apache.org
> 主题: RE: how to abort for a given SQL Error?
>
>
> from sqlci:
> set ennvar abort_on_error '<errnum>';
>
> Or set this envvar in shell before running your query.
>
> anoop
>
> -----Original Message-----
> From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
> Sent: Saturday, February 27, 2016 7:38 AM
> To: dev@trafodion.incubator.apache.org
> Subject: how to abort for a given SQL Error?
>
> Hi, all,
>
> I think it is possible to configure Trafodion to abort and core dump
> for specific SQL Error, for debug purpose, could anyone share with me
> how to do that?
> For example, for a given SQL error 15001, I want compiler abort
> immediately so that I can know in which code path that error is detected .
>
> Thanks,
> Ming
>
>
>
--
Thanks,
Gunnar
*If you think you can you can, if you think you can't you're right.*
RE: 答复: how to abort for a given SQL Error?
Posted by Anoop Sharma <an...@esgyn.com>.
yes, will be good to add this kind of info to the guide.
Would also suggest that the person who initially asked the question
should collect/collate/document after testing that the solution
works. They can also add an example of how they tested it.
anoop
-----Original Message-----
From: Gunnar Tapper [mailto:tapper.gunnar@gmail.com]
Sent: Saturday, February 27, 2016 9:42 AM
To: dev@trafodion.incubator.apache.org
Subject: Re: 答复: how to abort for a given SQL Error?
It's always good to capture this type of information in the Contributor Guide How-To section.
In this case:
https://cwiki.apache.org/confluence/display/TRAFODION/How-To#How-To-ForceCoreDumponSpecificSQLError
Please edit if needed.
Thanks,
Gunnar
On Sat, Feb 27, 2016 at 8:53 AM, Liu, Ming (Ming) <mi...@esgyn.cn> wrote:
> Thanks Anoop and Qifan,
>
> I tested, by modifying ms.evn, it works well.
> This is a very convenient debug weapon!
>
> Best Regards,
> Ming
>
> -----邮件原件-----
> 发件人: Anoop Sharma [mailto:anoop.sharma@esgyn.com]
> 发送时间: 2016年2月27日 23:44
> 收件人: dev@trafodion.incubator.apache.org
> 主题: RE: how to abort for a given SQL Error?
>
>
> from sqlci:
> set ennvar abort_on_error '<errnum>';
>
> Or set this envvar in shell before running your query.
>
> anoop
>
> -----Original Message-----
> From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
> Sent: Saturday, February 27, 2016 7:38 AM
> To: dev@trafodion.incubator.apache.org
> Subject: how to abort for a given SQL Error?
>
> Hi, all,
>
> I think it is possible to configure Trafodion to abort and core dump
> for specific SQL Error, for debug purpose, could anyone share with me
> how to do that?
> For example, for a given SQL error 15001, I want compiler abort
> immediately so that I can know in which code path that error is detected .
>
> Thanks,
> Ming
>
>
>
--
Thanks,
Gunnar
*If you think you can you can, if you think you can't you're right.*
Re: 答复: how to abort for a given SQL Error?
Posted by Gunnar Tapper <ta...@gmail.com>.
It's always good to capture this type of information in the Contributor
Guide How-To section.
In this case:
https://cwiki.apache.org/confluence/display/TRAFODION/How-To#How-To-ForceCoreDumponSpecificSQLError
Please edit if needed.
Thanks,
Gunnar
On Sat, Feb 27, 2016 at 8:53 AM, Liu, Ming (Ming) <mi...@esgyn.cn> wrote:
> Thanks Anoop and Qifan,
>
> I tested, by modifying ms.evn, it works well.
> This is a very convenient debug weapon!
>
> Best Regards,
> Ming
>
> -----邮件原件-----
> 发件人: Anoop Sharma [mailto:anoop.sharma@esgyn.com]
> 发送时间: 2016年2月27日 23:44
> 收件人: dev@trafodion.incubator.apache.org
> 主题: RE: how to abort for a given SQL Error?
>
>
> from sqlci:
> set ennvar abort_on_error '<errnum>';
>
> Or set this envvar in shell before running your query.
>
> anoop
>
> -----Original Message-----
> From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
> Sent: Saturday, February 27, 2016 7:38 AM
> To: dev@trafodion.incubator.apache.org
> Subject: how to abort for a given SQL Error?
>
> Hi, all,
>
> I think it is possible to configure Trafodion to abort and core dump for
> specific SQL Error, for debug purpose, could anyone share with me how to do
> that?
> For example, for a given SQL error 15001, I want compiler abort
> immediately so that I can know in which code path that error is detected .
>
> Thanks,
> Ming
>
>
>
--
Thanks,
Gunnar
*If you think you can you can, if you think you can't you're right.*
答复: how to abort for a given SQL Error?
Posted by "Liu, Ming (Ming)" <mi...@esgyn.cn>.
Thanks Anoop and Qifan,
I tested, by modifying ms.evn, it works well.
This is a very convenient debug weapon!
Best Regards,
Ming
-----邮件原件-----
发件人: Anoop Sharma [mailto:anoop.sharma@esgyn.com]
发送时间: 2016年2月27日 23:44
收件人: dev@trafodion.incubator.apache.org
主题: RE: how to abort for a given SQL Error?
from sqlci:
set ennvar abort_on_error '<errnum>';
Or set this envvar in shell before running your query.
anoop
-----Original Message-----
From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
Sent: Saturday, February 27, 2016 7:38 AM
To: dev@trafodion.incubator.apache.org
Subject: how to abort for a given SQL Error?
Hi, all,
I think it is possible to configure Trafodion to abort and core dump for specific SQL Error, for debug purpose, could anyone share with me how to do that?
For example, for a given SQL error 15001, I want compiler abort immediately so that I can know in which code path that error is detected .
Thanks,
Ming
RE: how to abort for a given SQL Error?
Posted by Anoop Sharma <an...@esgyn.com>.
from sqlci:
set ennvar abort_on_error '<errnum>';
Or set this envvar in shell before running your query.
anoop
-----Original Message-----
From: Liu, Ming (Ming) [mailto:ming.liu@esgyn.cn]
Sent: Saturday, February 27, 2016 7:38 AM
To: dev@trafodion.incubator.apache.org
Subject: how to abort for a given SQL Error?
Hi, all,
I think it is possible to configure Trafodion to abort and core dump for
specific SQL Error, for debug purpose, could anyone share with me how to do
that?
For example, for a given SQL error 15001, I want compiler abort immediately
so that I can know in which code path that error is detected .
Thanks,
Ming
Re: how to abort for a given SQL Error?
Posted by Qifan Chen <qi...@esgyn.com>.
Hi Ming,
Here are some methods that worked before. You may try them to see if they
work for you. In the worse case, you may need to cook something similar.
Thanks --Qifan
1) In $MY_SQROOT/etc/ms.env, add the line:
ABORT_ON_ERROR=8609
2) In $MY_SQROOT/sqenvcom.sh, add the line:
export ABORT_ON_ERROR=8609
On Sat, Feb 27, 2016 at 9:37 AM, Liu, Ming (Ming) <mi...@esgyn.cn> wrote:
> Hi, all,
>
> I think it is possible to configure Trafodion to abort and core dump for
> specific SQL Error, for debug purpose, could anyone share with me how to do
> that?
> For example, for a given SQL error 15001, I want compiler abort
> immediately so that I can know in which code path that error is detected .
>
> Thanks,
> Ming
>
>
--
Regards, --Qifan