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

release-19.2: sql: allow booleans in SET tracing and friendlier error message #44347

Merged
merged 1 commit into from Jan 24, 2020

Conversation

yuzefovich
Copy link
Member

Backport 1/1 commits from #44260.

/cc @cockroachdb/release


Previously, we would fail an assertion if a datum of the wrong type is
provided in SET tracing query (only strings were allowed). This resulted
in an internal error and printing out of the stack trace which can be
scary to users. This commit removes the assertion and makes it a regular
query error.

Also, booleans are now allowed as argument to SET tracing, and true
is mapped to on mode and false to off.

Fixes: #44244.

Release note (sql change, bug fix): Previously, CockroachDB would return
an internal error when using SET tracing with any type other than
string. Now it will return a regular query error. Additionally, boolean
arguments are now supported in SET tracing, and true is mapped to
on mode of tracing whereas false is mapped to off.

Previously, we would fail an assertion if a datum of the wrong type is
provided in `SET tracing` query (only strings were allowed). This resulted
in an internal error and printing out of the stack trace which can be
scary to users. This commit removes the assertion and makes it a regular
query error.

Also, booleans are now allowed as argument to `SET tracing`, and `true`
is mapped to `on` mode and `false` to `off`.

Release note (sql change, bug fix): Previously, CockroachDB would return
an internal error when using `SET tracing` with any type other than
string. Now it will return a regular query error. Additionally, boolean
arguments are now supported in `SET tracing`, and `true` is mapped to
`on` mode of tracing whereas `false` is mapped to `off`.
@yuzefovich yuzefovich requested a review from knz January 24, 2020 16:59
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich
Copy link
Member Author

I don't think we should backport it to 19.1 and 2.1 because in those releases the query in question would not produce an internal error (it was a regular query error back then).

@yuzefovich yuzefovich merged commit 4ad4fb8 into cockroachdb:release-19.2 Jan 24, 2020
@yuzefovich yuzefovich deleted the backport19.2-44260 branch January 24, 2020 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants