sql/sem/builtins: mark timeofday as impure#44268
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Jan 23, 2020
madelynnblue:timeofday-pure
Merged
sql/sem/builtins: mark timeofday as impure#44268craig[bot] merged 1 commit intocockroachdb:masterfrom madelynnblue:timeofday-pure
craig[bot] merged 1 commit intocockroachdb:masterfrom
madelynnblue:timeofday-pure
Conversation
Member
otan
suggested changes
Jan 23, 2020
Contributor
otan
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @mjibson)
a discussion (no related file):
Ah what happens if we don't do this?
Also, not sure release note is necessary as timeofday hasn't been released yet.
otan
approved these changes
Jan 23, 2020
Release note: None
Contributor
Author
|
Incorrectly marked impure functions can change how plan caching is done and maybe some other stuff? It's like a theoretical correctness issue I think. |
Contributor
Author
|
bors r+ |
Contributor
Author
|
Oh also sqlsmith uses function purity to decide if a query can be run in two places identically. |
craig bot
pushed a commit
that referenced
this pull request
Jan 23, 2020
43301: sql: fix a few issues with reporting of errors to sentry r=yuzefovich a=yuzefovich **sql: use the correct context when recording an error for sentry** Previously, context.Background() was used to record an internal error. That context is missing the registered tags (e.g. 'statement' tag) which results in an incomplete sentry report. Now this is fixed. Release note: None **sql: remove CloseWithErr method from CommandResultClose interface** The behavior of CloseWithErr method can be obtained with SetError followed by Close, so this commit does such refactoring which simplifies the interface. Release note: None **sql: fix double reporting of the same error with sentry** Previously, in a certain code path both connExecutor and pgwire would record telemetry for the same error to be sent to sentry. This resulted in duplicated events. Now this is fixed. Release note: None 44246: build: fix teamcity-compose script r=mjibson a=mjibson 44250: backupccl,importccl: fix privilege checks for BACKUP/RESTORE and IMPORT r=pbardea a=pbardea This changes the privilege checks in IMPORT, IMPORT INTO and RESTORE to run during the *planning* of the job, in the SQL plan hook execution, rather than during the execution of the job. This is done because privilege checks are implemented on planner, and close over the planner's txn in some branches/cases, so invoking them later, on a txn-less planner in a resumed jobs execution, can cause problems. Before this, the planStateHook's txn was assumed to be set and caused a panic on checking RBAC privileges. Additionally, permission checks in these operations did not properly give access to all admin users. Fixes #44252. Release note (bug fix): Allow all admin users to use BACKUP/RESTORE and IMPORT. 44268: sql/sem/builtins: mark timeofday as impure r=mjibson a=mjibson Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Matt Jibson <matt.jibson@gmail.com> Co-authored-by: Paul Bardea <pbardea@gmail.com>
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.