-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use 'SHOW CREATE ALL TABLES' instead of cockroach dump #44
Open
adammohammed
wants to merge
3
commits into
glerchundi:master
Choose a base branch
from
adammohammed:support-for-v21.2-and-newer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use 'SHOW CREATE ALL TABLES' instead of cockroach dump #44
adammohammed
wants to merge
3
commits into
glerchundi:master
from
adammohammed:support-for-v21.2-and-newer
Conversation
This file contains 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
adammohammed
changed the title
Support for v21.2 and newer
Use 'SHOW CREATE ALL TABLES' instead of cockroach dump
Jun 7, 2022
adammohammed
force-pushed
the
support-for-v21.2-and-newer
branch
from
June 7, 2022 16:50
c0ab29f
to
9a38a11
Compare
adammohammed
commented
Jun 7, 2022
LGTM, please rebase on top of master as it already includes the fix proposed in #41. Thanks for the contribution, once rebased I will review ASAP. |
adammohammed
force-pushed
the
support-for-v21.2-and-newer
branch
from
June 13, 2022 14:21
9a38a11
to
2791dc9
Compare
@glerchundi Do you have time to take another pass at this? |
rwrz
reviewed
Dec 20, 2022
all = bytes.Replace(all, []byte("create_statement"), []byte{}, -1) | ||
all = bytes.Replace(all, []byte("\"CREATE"), []byte("CREATE"), -1) | ||
all = bytes.Replace(all, []byte(";\""), []byte(";"), -1) | ||
f.buf = bytes.NewBuffer(all) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had issues with DOUBLE DOUBLE QUOTES.
To fix, I had to replace "" with ", like this:
all = bytes.Replace(all, []byte("\"\""), []byte("\""), -1)
In CRDB v21.2 and newer `cockroach dump` is removed and the docs say to use `SHOW CREATE ALL TABLES`. This isn't quite a drop in replacement since it dumps some other non-sql information out. Signed-off-by: Adam Mohammed <admohammed@equinix.com>
Signed-off-by: Adam Mohammed <admohammed@equinix.com>
Signed-off-by: Adam Mohammed <admohammed@equinix.com>
adammohammed
force-pushed
the
support-for-v21.2-and-newer
branch
from
February 21, 2023 15:54
2791dc9
to
dffb9a3
Compare
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
In CRDB v21.2 and newer
cockroach dump
is removed and the docs say to useSHOW CREATE ALL TABLES
. This isn't quite a drop in replacement since it dumps some other non-sql information out.This PR builds off of #41 and filters out the non-sql bits so that the generated tests still work.
Should fix #43 - but not sure if this is backwards compatible with previous CRDB releases.