Cannot connect to Keyspace with Uppercase characters

Description

I am using the PHP driver, but I believe the problem is with C++ driver.

After upgrading the C++ driver from 2.7.1 to 2.11.0, we are no longer able to connect to the keyspace. Our keyspace has uppercase characters - something like "MyKeyspace".

The error message we get is:

Using cqlsh, we connect to the keyspace by:
{{ USE "MyKeyspace"; }}
And it fails if the double quote is omitted.

I suspect the problem is with this line, we may need a double-quote around the keyspace name.
https://github.com/datastax/cpp-driver/blob/master/src/connector.cpp#L274

Environment

  • Cassandra server 2.2

  • PHP Driver 1.3.2 on Debian linux

Pull Requests

None

Activity

Show:
Michael Penick
January 30, 2019, 1:17 PM

You need to wrap the keyspace in inner quotes "\"MyKeyspace\"" (the inner quotes "\"" need to be escaped).

Michael Penick
January 30, 2019, 1:21 PM

In PHP I think you can do single quotes on the outside like:

Derek Chan
January 31, 2019, 2:36 AM
Edited

Thank you Michael.

I am able to connect to the keyspace, but somehow it throws an error when I try to query it with the PHP driver. I do not know if it is an issue with C++ or PHP driver. I have only got a PHP test case and so opened ticket on the PHP Driver for this ().

Fixed

Assignee

Unassigned

Reporter

Derek Chan

Labels

None

PM Priority

None

Reproduced in

2.11.0

External issue ID

None

Doc Impact

None

Reviewer

None

Pull Request

None

Size

None

Fix versions

Affects versions

Priority

Major
Configure