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 8F6FB18F8E for ; Wed, 10 Feb 2016 18:56:18 +0000 (UTC) Received: (qmail 3758 invoked by uid 500); 10 Feb 2016 18:56:18 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3703 invoked by uid 500); 10 Feb 2016 18:56: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 3670 invoked by uid 99); 10 Feb 2016 18:56:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2016 18:56:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 139AE2C14F6 for ; Wed, 10 Feb 2016 18:56:18 +0000 (UTC) Date: Wed, 10 Feb 2016 18:56:18 +0000 (UTC) From: "sequoyha pelletier (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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 ] sequoyha pelletier updated CASSANDRA-11152: ------------------------------------------- Labels: (was: patch) > 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)