[
https://issues.apache.org/jira/browse/CASSANDRA-15787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kaden Luke Nelson updated CASSANDRA-15787:
------------------------------------------
Description:
When I have the following files;
{code:java}
# master.sql
CREATE TABLE asdf ( id text, primary key (id));{code}
{code:java}
# a.sql
SOURCE './master.sql';
CREATE TABLE asdf ( id text, primary key (id));{code}
{code:java}
# b.sql
SOURCE './a.sql';{code}
and execute
{code:java}
cqlsh --keyspace example --file ./b.sql{code}
I don't get returned the proper status code. This happens because when multiple
SOURCE commands are chained together like in the example above, the error
doesn't get passed through to the final 'shell'.
Subshell that needs to pass the statement error value to the parent shell:
https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L1776
final statement error check which returns the parent shell statement error:
[https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L2474]
was:
When I have the following files;
{code:java}
# master.sql
CREATE TABLE asdf ( id text, primary key (id));{code}
{code:java}
# a.sql
SOURCE './master.sql';
CREATE TABLE asdf ( id text, primary key (id));{code}
{code:java}
# b.sql
SOURCE './a.sql';{code}
and execute
{code:java}
cqlsh --keyspace example --file ./b.sql{code}
I don't get returned the proper status code. This happens because when multiple
SOURCE commands are chained together like in the example above, the error
doesn't get passed through to the final 'shell'.
Subshell that needs to pass the statement error value to the parent shell:
[https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L1776
]
final statement error check which returns the parent shell statement error:
[https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L2474]
> CQLSH doesn't exit with proper code with multiple SOURCE directives.
> --------------------------------------------------------------------
>
> Key: CASSANDRA-15787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15787
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/cqlsh
> Reporter: Kaden Luke Nelson
> Assignee: Kaden Luke Nelson
> Priority: Normal
>
> When I have the following files;
>
> {code:java}
> # master.sql
> CREATE TABLE asdf ( id text, primary key (id));{code}
> {code:java}
> # a.sql
> SOURCE './master.sql';
> CREATE TABLE asdf ( id text, primary key (id));{code}
> {code:java}
> # b.sql
> SOURCE './a.sql';{code}
>
> and execute
> {code:java}
> cqlsh --keyspace example --file ./b.sql{code}
>
> I don't get returned the proper status code. This happens because when
> multiple SOURCE commands are chained together like in the example above, the
> error doesn't get passed through to the final 'shell'.
>
> Subshell that needs to pass the statement error value to the parent shell:
> https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L1776
> final statement error check which returns the parent shell statement error:
> [https://github.com/apache/cassandra/blob/trunk/bin/cqlsh.py#L2474]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]