Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71EA9182FB for ; Fri, 12 Feb 2016 13:50:18 +0000 (UTC) Received: (qmail 3075 invoked by uid 500); 12 Feb 2016 13:50:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3044 invoked by uid 500); 12 Feb 2016 13:50:18 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 3028 invoked by uid 99); 12 Feb 2016 13:50:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Feb 2016 13:50:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 19A6C2C1F5B for ; Fri, 12 Feb 2016 13:50:18 +0000 (UTC) Date: Fri, 12 Feb 2016 13:50:18 +0000 (UTC) From: "Francesco Animali (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (CASSANDRA-11152) SOURCE command in CQLSH 3.2 requires that "use keyspace" is in the cql file that you are sourcing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Animali updated CASSANDRA-11152: ------------------------------------------ Comment: was deleted (was: hi Sequoyha, not sure about the comment you put on the jira. Let me know if I missed anything. Francesco On Wed, Feb 10, 2016 at 6:57 PM, sequoyha pelletier (JIRA) ) > SOURCE command in CQLSH 3.2 requires that "use keyspace" is in the cql file that you are sourcing > ------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-11152 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11152 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: CQLSH 3.2.1 > Reporter: Francesco Animali > > a difference in behaviour between SOURCE command in CQLSH 3.1 and 3.2. > In CQLSH 3.1 SOURCE will NOT require "use keyspace" in the cql file that you execute: the "keyspace" directive in the qlshrc file will work and the cql file will be executed. > In CQLSH 3.2.1, SOURCE command requires that "use keyspace" is in the cql file that you are sourcing, otherwise it throws this error: > "No keyspace has been specified. USE a keyspace, or explicitly specify keyspace.tablename". > The "keyspace" directive in cqlshrc is overridden by source command. > steps to reproduce: > create a file called select.cql in your home directory: > {noformat} > echo "CONSISTENCY ONE;" > select.cql > echo "select * from tab;" >> select.cql > {noformat} > in cqlsh: > {noformat} > create KEYSPACE kspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; > create TABLE tab ( id int primary key); > insert into tab (id) VALUES ( 1); > {noformat} > Add this to cqlsgrc: > {noformat} > [authentication] > keyspace = kspace > {noformat} > Then exit cqlsh and rerun cqlsh using the cqlshrc just modified. > Note that you are in keyspace "kspace". > execute: > {noformat} > source 'select.cql' > {noformat} > this will have different behaviour in CQLSH 3.2 and 3.1 -- This message was sent by Atlassian JIRA (v6.3.4#6332)