This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
glue: create schema/table directly with info #216
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
906b3cd
glue: create schema/table directly with info
kennytm b5a2ca1
Merge branch 'master' into kennytm/fix-215
kennytm 15d9a25
go.mod: change to use the master version
kennytm 5c280d8
gluetidb: fix failure to create schema
kennytm d9e67b6
gluetidb: exclude non-public indices when restoring
kennytm 336332c
go.mod: removed unused replace
kennytm b3bb18e
Merge branch 'master' into kennytm/fix-215
3pointer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# config of tidb | ||
|
||
# Schema lease duration | ||
# There are lot of ddl in the tests, setting this | ||
# to 360s to test whther BR is gracefully shutdown. | ||
lease = "360s" | ||
|
||
alter-primary-key = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# config of tikv | ||
|
||
[coprocessor] | ||
region-max-keys = 20 | ||
region-split-keys = 12 | ||
|
||
[rocksdb] | ||
max-open-files = 4096 | ||
[raftdb] | ||
max-open-files = 4096 | ||
[raftstore] | ||
# true (default value) for high reliability, this can prevent data loss when power failure. | ||
sync-log = false | ||
capacity = "10GB" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright 2020 PingCAP, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -eu | ||
|
||
cur=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
source $cur/../_utils/run_services | ||
|
||
DB="$TEST_NAME" | ||
|
||
# prepare database | ||
echo "Restart cluster with alter-primary-key = true" | ||
start_services "$cur" | ||
|
||
run_sql "drop schema if exists $DB;" | ||
run_sql "create schema $DB;" | ||
|
||
run_sql "create table $DB.a (a int primary key, b int unique);" | ||
run_sql "insert into $DB.a values (42, 42);" | ||
|
||
# backup | ||
run_br --pd $PD_ADDR backup db --db "$DB" -s "local://$TEST_DIR/$DB" | ||
|
||
# restore | ||
run_sql "drop schema $DB;" | ||
run_br --pd $PD_ADDR restore db --db "$DB" -s "local://$TEST_DIR/$DB" | ||
|
||
run_sql "drop schema $DB;" | ||
echo "Restart service with alter-primary-key = false" | ||
start_services |
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.
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.
should update this to new tidb