cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Martinez Poblete (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-7117) cqlsh should return a non-zero error code if a query fails
Date Wed, 30 Apr 2014 16:56:19 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-7117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985737#comment-13985737
] 

Jose Martinez Poblete commented on CASSANDRA-7117:
--------------------------------------------------

This is an illustration of the described behavior

{noformat}
ubuntu@ip-10-182-163-57:~$ echo "select count(*) from word limit 1000000;" > /tmp/bad.sql
ubuntu@ip-10-182-163-57:~$ cqlsh -k Keyspace1 -f /tmp/bad.sql
/tmp/bad.sql:2:Bad Request: unconfigured columnfamily word
ubuntu@ip-10-182-163-57:~$ echo $?
0
ubuntu@ip-10-182-163-57:~$ echo "select count(*) from words limit 1000000;" > /tmp/good.sql
ubuntu@ip-10-182-163-57:~$ cqlsh -k Keyspace1 -f /tmp/good.sql

 count
--------
 650722

(1 rows)

ubuntu@ip-10-182-163-57:~$ echo $?
0
ubuntu@ip-10-182-163-57:~$ 
{noformat}

> cqlsh should return a non-zero error code if a query fails
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-7117
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7117
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: J.B. Langston
>            Priority: Minor
>
> cqlsh should return a non-zero error code when a query in a file or piped stdin fails.
 This is so that shell scripts to determine if a cql script failed or succeeded.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message