Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branch-3.0: [Test](binlog) Check correctly for show create database #45472 #45549

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
216 changes: 0 additions & 216 deletions regression-test/data/ddl_p0/test_recover.out
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -89,33 +62,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -151,33 +97,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -213,33 +132,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -275,33 +167,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -337,33 +202,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -399,33 +237,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down Expand Up @@ -461,33 +272,6 @@ test_recover_tb_new
test_recover_tb
test_recover_tb_new

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_db CREATE DATABASE `test_recover_db`

-- !select --
test_recover_db_new CREATE DATABASE `test_recover_db_new`

-- !select --
test_recover_tb
test_recover_tb_2
Expand Down
27 changes: 18 additions & 9 deletions regression-test/suites/ddl_p0/test_recover.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ suite("test_recover") {

// test drop/recover db

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
def showDatabase = sql """ SHOW CREATE DATABASE test_recover_db """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
DROP DATABASE `test_recover_db`
Expand All @@ -283,7 +284,8 @@ suite("test_recover") {
RECOVER DATABASE `test_recover_db`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
showDatabase = sql """ SHOW CREATE DATABASE test_recover_db """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
CREATE TABLE `test_recover_db`.`test_recover_tb_1` (
Expand Down Expand Up @@ -312,7 +314,8 @@ suite("test_recover") {
CREATE DATABASE `test_recover_db`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
DROP DATABASE `test_recover_db`
Expand All @@ -321,7 +324,8 @@ suite("test_recover") {
CREATE DATABASE `test_recover_db`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
DROP DATABASE `test_recover_db`
Expand All @@ -331,7 +335,8 @@ suite("test_recover") {
CREATE DATABASE `test_recover_db`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
CREATE TABLE `test_recover_db`.`test_recover_tb` (
Expand Down Expand Up @@ -359,7 +364,8 @@ suite("test_recover") {
CREATE DATABASE `test_recover_db`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))

sql """
DROP DATABASE `test_recover_db`
Expand All @@ -369,7 +375,8 @@ suite("test_recover") {
RECOVER DATABASE `test_recover_db` AS `test_recover_db_new`
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db_new` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db_new` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db_new`"))

sql """
CREATE TABLE `test_recover_db_new`.`test_recover_tb_2` (
Expand Down Expand Up @@ -413,8 +420,10 @@ suite("test_recover") {
)
"""

qt_select """ SHOW CREATE DATABASE `test_recover_db` """
qt_select """ SHOW CREATE DATABASE `test_recover_db_new` """
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db`"))
showDatabase = sql """ SHOW CREATE DATABASE `test_recover_db_new` """
assertTrue(showDatabase[0][1].contains("CREATE DATABASE `test_recover_db_new`"))
res = sql """SHOW CREATE TABLE `test_recover_db`.`test_recover_tb`"""
assertTrue(res.size() != 0)
qt_select """SHOW TABLES FROM `test_recover_db`"""
Expand Down
Loading