Updated Branches:
refs/heads/cassandra-1.2 5632a56c4 -> 7347d968d
Merge branch 'cassandra-1.1' into cassandra-1.2
Conflicts:
bin/cqlsh
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7347d968
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7347d968
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7347d968
Branch: refs/heads/cassandra-1.2
Commit: 7347d968d0d65fe14c6d8bf37c877f62a16ba34a
Parents: 5632a56 310bf34
Author: Aleksey Yeschenko <[email protected]>
Authored: Fri Feb 8 21:53:13 2013 +0300
Committer: Aleksey Yeschenko <[email protected]>
Committed: Fri Feb 8 21:53:13 2013 +0300
----------------------------------------------------------------------
bin/cqlsh | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7347d968/bin/cqlsh
----------------------------------------------------------------------
diff --cc bin/cqlsh
index b2e9755,be4ecfc..4f58bdc
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@@ -478,26 -592,15 +478,26 @@@ class Shell(cmd.Cmd)
if use_conn is not None:
self.conn = use_conn
else:
- self.conn = cql.connect(hostname, port, user=username,
password=password)
+ transport = transport_factory(hostname, port, os.environ,
CONFIG_FILE)
+ self.conn = cql.connect(hostname, port, user=username,
password=password,
+ cql_version=cqlver, transport=transport)
- self.set_expanded_cql_version(cqlver)
- # we could set the keyspace through cql.connect(), but as of
1.0.10,
- # it doesn't quote the keyspace for USE :(
- if keyspace is not None:
- tempcurs = self.conn.cursor()
- tempcurs.execute('USE %s;' % self.cql_protect_name(keyspace))
- tempcurs.close()
+ self.set_expanded_cql_version(cqlver)
+ # we could set the keyspace through cql.connect(), but as of 1.0.10,
+ # it doesn't quote the keyspace for USE :(
+ if keyspace is not None:
+ tempcurs = self.conn.cursor()
+ tempcurs.execute('USE %s;' % self.cql_protect_name(keyspace))
+ tempcurs.close()
self.cursor = self.conn.cursor()
+ self.get_connection_versions()
+
+ # use 3.0.0-beta1 syntax if explicitly requested, or if using
+ # cassandra < 1.2. this only affects use of cql3; cql2 syntax
+ # in either case is the same.
+ if self.cassandraver_atleast(1, 2) and not self.is_cql3_beta():
+ cql3handling.use_post_3_0_0_syntax()
+ else:
+ cql3handling.use_pre_3_0_0_syntax()
self.current_keyspace = keyspace