forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Error: "compressed lz4 data is corrupt" when dropping database
Previously, when dropping a database, the error is raised with a message: "compressed lz4 data is corrupt", due to inaccurate comparison method used for Name type. Now, with correct comparison method for the specific type, the error is not thrown when database is being dropped. Task: BABEL-3655 Signed-off-by: Ray Kim <raydhkim@amazon.com>
- Loading branch information
Showing
17 changed files
with
182 additions
and
2 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
USE MASTER | ||
GO | ||
|
||
CREATE DATABASE babel_3655_test_db | ||
GO | ||
|
||
USE babel_3655_test_db | ||
GO | ||
|
||
CREATE SCHEMA babel_3655_test_s1 | ||
GO | ||
|
||
CREATE FUNCTION babel_3655_test_f1() | ||
RETURNS INT AS | ||
BEGIN | ||
RETURN 1; | ||
END | ||
GO |
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,5 @@ | ||
USE MASTER | ||
GO | ||
|
||
DROP DATABASE babel_3655_test_db | ||
GO |
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,75 @@ | ||
-- psql | ||
ALTER SYSTEM SET babelfishpg_tsql.migration_mode = 'multi-db'; | ||
SELECT pg_reload_conf(); | ||
GO | ||
~~START~~ | ||
bool | ||
t | ||
~~END~~ | ||
|
||
-- Wait to sync with another session | ||
SELECT pg_sleep(1); | ||
GO | ||
~~START~~ | ||
void | ||
|
||
~~END~~ | ||
|
||
SHOW "babelfishpg_tsql.migration_mode"; | ||
GO | ||
~~START~~ | ||
text | ||
multi-db | ||
~~END~~ | ||
|
||
|
||
-- tsql | ||
USE MASTER | ||
GO | ||
|
||
CREATE DATABASE babel_3655_test_db | ||
GO | ||
|
||
USE babel_3655_test_db | ||
GO | ||
|
||
CREATE SCHEMA babel_3655_test_s1 | ||
GO | ||
|
||
CREATE FUNCTION babel_3655_test_f1() | ||
RETURNS INT AS | ||
BEGIN | ||
RETURN 1; | ||
END | ||
GO | ||
|
||
USE MASTER | ||
GO | ||
|
||
DROP DATABASE babel_3655_test_db | ||
GO | ||
|
||
-- psql | ||
ALTER SYSTEM SET babelfishpg_tsql.migration_mode = 'single-db'; | ||
SELECT pg_reload_conf(); | ||
GO | ||
~~START~~ | ||
bool | ||
t | ||
~~END~~ | ||
|
||
-- Wait to sync with another session | ||
SELECT pg_sleep(1); | ||
GO | ||
~~START~~ | ||
void | ||
|
||
~~END~~ | ||
|
||
SHOW "babelfishpg_tsql.migration_mode"; | ||
GO | ||
~~START~~ | ||
text | ||
single-db | ||
~~END~~ | ||
|
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,18 @@ | ||
USE MASTER | ||
GO | ||
|
||
CREATE DATABASE babel_3655_test_db | ||
GO | ||
|
||
USE babel_3655_test_db | ||
GO | ||
|
||
CREATE SCHEMA babel_3655_test_s1 | ||
GO | ||
|
||
CREATE FUNCTION babel_3655_test_f1() | ||
RETURNS INT AS | ||
BEGIN | ||
RETURN 1; | ||
END | ||
GO |
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,5 @@ | ||
USE MASTER | ||
GO | ||
|
||
DROP DATABASE babel_3655_test_db | ||
GO |
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,45 @@ | ||
-- psql | ||
ALTER SYSTEM SET babelfishpg_tsql.migration_mode = 'multi-db'; | ||
SELECT pg_reload_conf(); | ||
GO | ||
-- Wait to sync with another session | ||
SELECT pg_sleep(1); | ||
GO | ||
SHOW "babelfishpg_tsql.migration_mode"; | ||
GO | ||
|
||
-- tsql | ||
USE MASTER | ||
GO | ||
|
||
CREATE DATABASE babel_3655_test_db | ||
GO | ||
|
||
USE babel_3655_test_db | ||
GO | ||
|
||
CREATE SCHEMA babel_3655_test_s1 | ||
GO | ||
|
||
CREATE FUNCTION babel_3655_test_f1() | ||
RETURNS INT AS | ||
BEGIN | ||
RETURN 1; | ||
END | ||
GO | ||
|
||
USE MASTER | ||
GO | ||
|
||
DROP DATABASE babel_3655_test_db | ||
GO | ||
|
||
-- psql | ||
ALTER SYSTEM SET babelfishpg_tsql.migration_mode = 'single-db'; | ||
SELECT pg_reload_conf(); | ||
GO | ||
-- Wait to sync with another session | ||
SELECT pg_sleep(1); | ||
GO | ||
SHOW "babelfishpg_tsql.migration_mode"; | ||
GO |
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 |
---|---|---|
|
@@ -188,4 +188,5 @@ BABEL_GRANT_CONNECT | |
BABEL-sp_helpdb | ||
BABEL-2795 | ||
BABEL-PG-SYSTEM-FUNCTIONS | ||
BABEL-3655 | ||
sys-table_types_internal |
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 |
---|---|---|
|
@@ -238,4 +238,5 @@ BABEL_GRANT_CONNECT | |
BABEL-sp_helpdb | ||
BABEL-2795 | ||
BABEL-PG-SYSTEM-FUNCTIONS | ||
BABEL-3655 | ||
sys-table_types_internal |
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