Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it clear that transactions can't be enabled after table creation #1048

Open
frozenspider opened this issue Mar 21, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@frozenspider
Copy link
Contributor

commented Mar 21, 2019

Right now, attempting to use ALTER TABLE to enable transactions given conflicting error messages complaining on the type only:

cqlsh> ALTER TABLE k.num WITH transactions.enabled = true;
SyntaxException: Invalid SQL Statement. syntax error, unexpected '.', expecting '='
ALTER TABLE k.num WITH transactions.enabled = true;
                                   ^
 (error -11)
cqlsh> ALTER TABLE k.num WITH transactions = '{"enabled": true}';
InvalidRequest: Error from server: code=2200 [Invalid query] message="Datatype Mismatch. Invalid value for option 'transactions'. Value must be a map
ALTER TABLE k.num WITH transactions = '{"enabled": true}';
                       ^^^^^^^^^^^^
 (error -201)"
cqlsh> ALTER TABLE k.num WITH transactions = {'enabled': true};
SyntaxException: Invalid SQL Statement. syntax error, unexpected '{'
ALTER TABLE k.num WITH transactions = {'enabled': true};
                                      ^
 (error -11)

So, error message asks user to use map value but complains about unexpected '{' if he does.

Proposal:

  • Any attempt to alter read-only property must report that clearly, e.g. cannot change read-only property
  • Transactions property being immutable should be explicitly mentioned in our docs
@mrpanda

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

@rkarthik007 will this be resolved by GA or will this remain as an ongoing issue as a difference between pg & YB ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.