Hi Anoop
I changed the code in InputStmt::findBlockStmt, which deals with the block.
Previously this feature is controlled by environment variable
ALLOW_CS_IN_SQLCI, and the blocks was controlled by blockStmt_, which is a int
number, and it increases when entering a block,
and decreases when getting out of a block.
I changed it to a stack, pushing the header when entering a block, and popping
when meeting a end tag, i.e. exiting a block.
And do not care about the env var ALLOW_CS_IN_SQLCI.
E.g., for IF...END, push IF onto the stack, and pop IF when meeting END.
For SQL statement
Create table if exists t1(c1 int);
Which obviously is not a block, We do a little trick with the word `exists` as
following:
* push IF onto the stack,
* when meet `exists`, check if the peek of the stack is `IF` or not, if it is,
pop the `IF` out.
We can determine if it is in block by checking if the stack is empty.
-----邮件原件-----
发件人: Anoop Sharma <[email protected]>
发送时间: 2018年4月27日 11:29
收件人: [email protected]
主题: RE: `log` command in regression test
in sqlci, log with no argument will stop logging.
The doc you refer to is for trafci where 'log off' will stop logging. Not all
options listed in that doc specific to trafci are supported in sqlci.
Also note that sqlci is not externalized. It is for internal or platform usage
only.
What changes are you making to sqlci?
anoop
-----Original Message-----
From: Zhu, Wen-Jun <[email protected]>
Sent: Thursday, April 26, 2018 8:16 PM
To: [email protected]
Subject: `log` command in regression test
Hi,
Recently I have modified the code in sqlci, and then run the regression, and I
find that there are cases which do not output anymore.
I go through with these cases, and is a little confused.
1. The log commands in one section do not affect other section.
As my understanding, .every section in the case should contain `log off` and
`log LOGxxx`, in which `log` does not output for the commands following, and
`log LOGxxx` outputs the results for the commands following, right?
2. As http://trafodion.apache.org/docs/command_interface/index.html#cmd_log
shows, log command need a argument to specify the action.
but the log command in regression tests lacks argument, so does that mean `log
OFF`, or something else?