-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add upgrade test make sure analyze is working
Signed-off-by: Sumit Jaiswal <[email protected]>
- Loading branch information
Sumit Jaiswal
committed
Oct 24, 2023
1 parent
c9bdba3
commit b5fb8d0
Showing
26 changed files
with
159 additions
and
8 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
test/JDBC/expected/AUTO_ANALYZE-before-15-5-or-14-10-vu-prepare.out
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,22 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
|
||
|
||
-- will return null as none of the catalog has been analyzed | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
GO | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
15 changes: 15 additions & 0 deletions
15
test/JDBC/expected/AUTO_ANALYZE-before-15-5-or-14-10-vu-verify.out
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,15 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
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,22 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
|
||
|
||
-- will return null as all of the catalog has been analyzed during extension create | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
~~START~~ | ||
varchar | ||
~~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,15 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
~~START~~ | ||
varchar | ||
~~END~~ | ||
|
||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
GO |
18 changes: 18 additions & 0 deletions
18
test/JDBC/input/AUTO_ANALYZE-before-15-5-or-14-10-vu-prepare.sql
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 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
|
||
|
||
-- will return null as none of the catalog has been analyzed | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
GO |
11 changes: 11 additions & 0 deletions
11
test/JDBC/input/AUTO_ANALYZE-before-15-5-or-14-10-vu-verify.sql
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,11 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
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,18 @@ | ||
-- function to list all the babelfish catalogs that has not been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NULL) | ||
GO | ||
|
||
-- function to list all the babelfish catalogs that has been analyzed manually | ||
CREATE FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed() | ||
RETURNS TABLE | ||
AS RETURN | ||
(SELECT relname FROM pg_stat_all_tables WHERE schemaname = 'sys' and last_analyze IS NOT NULL) | ||
GO | ||
|
||
|
||
-- will return null as all of the catalog has been analyzed during extension create | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
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,11 @@ | ||
|
||
-- list all the babelfish catalogs that has not been analyzed manually after upgrade | ||
-- will return null | ||
SELECT * FROM auto_analyze_vu_prepare_catalogs_have_not_been_analyzed() | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_not_been_analyzed | ||
GO | ||
|
||
DROP FUNCTION auto_analyze_vu_prepare_catalogs_have_been_analyzed | ||
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 |
---|---|---|
|
@@ -215,4 +215,5 @@ TestXML | |
timefromparts | ||
triggers_with_transaction | ||
BABEL-4046 | ||
getdate | ||
getdate | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -268,4 +268,5 @@ TestXML | |
timefromparts | ||
triggers_with_transaction | ||
BABEL-4046 | ||
getdate | ||
getdate | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -325,3 +325,4 @@ BABEL-4046 | |
getdate | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -316,4 +316,5 @@ TestXML | |
timefromparts | ||
triggers_with_transaction | ||
BABEL-4046 | ||
getdate | ||
getdate | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -316,4 +316,5 @@ TestXML | |
timefromparts | ||
triggers_with_transaction | ||
BABEL-4046 | ||
getdate | ||
getdate | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -321,3 +321,4 @@ BABEL-4046 | |
getdate | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -338,4 +338,5 @@ BABEL-4046 | |
BABEL_4330 | ||
BABEL-2619 | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -354,3 +354,4 @@ BABEL_4330 | |
BABEL-2619 | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -388,3 +388,4 @@ BABEL_4330 | |
BABEL-2619 | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -408,3 +408,4 @@ getdate | |
BABEL_4330 | ||
BABEL-2619 | ||
BABEL-4410 | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -416,3 +416,4 @@ getdate | |
BABEL_4330 | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -437,3 +437,4 @@ datetimeoffset-timezone | |
BABEL-4046 | ||
getdate | ||
BABEL_4330 | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -450,3 +450,4 @@ sp_who | |
BABEL_4330 | ||
BABEL-4410 | ||
GRANT_SCHEMA | ||
AUTO_ANALYZE-before-15-5-or-14-10 |
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 |
---|---|---|
|
@@ -474,3 +474,4 @@ sys_certificates | |
sys_database_permissions | ||
BABEL-4279 | ||
BABEL-4484 | ||
AUTO_ANALYZE |