Skip to content

Commit

Permalink
rm tag 20544(main) (#20708)
Browse files Browse the repository at this point in the history
rm tag 20544

Approved by: @heni02
  • Loading branch information
Ariznawlll authored Dec 15, 2024
1 parent d34d2d8 commit d923d72
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
50 changes: 24 additions & 26 deletions test/distributed/cases/snapshot/snapshot_restore_lower_case.result
Original file line number Diff line number Diff line change
Expand Up @@ -123,44 +123,34 @@ select @@lower_case_table_names;
@@lower_case_table_names
0
drop database if exists test02;

create database test02;

use test02;

drop table if exists Departments;

drop table if exists Employees;

create table Departments (
DepartmentID INT PRIMARY KEY,
DepartmentName VARCHAR(255) NOT NULL
);

create table Employees (
EmployeeID INT PRIMARY KEY,
FirstName VARCHAR(255) NOT NULL,
LastName VARCHAR(255) NOT NULL,
DepartmentID INT,
foreign key (DepartmentID) REFERENCES Departments(DepartmentID)
);

insert into Departments (DepartmentID, DepartmentName) values
(1, 'Human Resources'),
(2, 'Engineering'),
(3, 'Marketing'),
(4, 'Sales'),
(5, 'Finance');

insert into Employees (EmployeeID, FirstName, LastName, DepartmentID) values
(101, 'John', 'Doe', 1),
(102, 'Jane', 'Smith', 2),
(103, 'Alice', 'Johnson', 3),
(104, 'Mark', 'Patterson', 4),
(105, 'David', 'Finley', 5);

drop view if exists EmployeeDepartmentView;

create view EmployeeDepartmentView as
select
e.FirstName,
Expand All @@ -170,7 +160,6 @@ from
Employees e
inner join
Departments d ON e.DepartmentID = d.DepartmentID;

select * from EmployeeDepartmentView;
firstname lastname departmentname
John Doe Human Resources
Expand All @@ -179,34 +168,43 @@ Alice Johnson Marketing
Mark Patterson Sales
David Finley Finance
drop snapshot if exists sp02_restore_lower;

create snapshot sp02_restore_lower for account acc01;

select @@lower_case_table_names;
@@lower_case_table_names
0
drop database test02;

restore account acc01 from snapshot sp02_restore_lower;
SQL parser error: table "employees" does not exist
use test02;
Unknown database test02
show tables;
No database selected
show create table Employees;
No database selected
Tables_in_test02
Departments
EmployeeDepartmentView
Employees
show create table EmployeeDepartmentView;
No database selected
View Create View character_set_client collation_connection
EmployeeDepartmentView create view EmployeeDepartmentView as\nselect\ne.FirstName,\ne.LastName,\nd.DepartmentName\nfrom\nEmployees e\ninner join\nDepartments d ON e.DepartmentID = d.DepartmentID; utf8mb4 utf8mb4_general_ci
restore account acc01 from snapshot sp02_restore_lower to account acc04;
SQL parser error: table "employees" does not exist
use test02;
Unknown database test02
show tables;
No database selected
show create table Employees;
No database selected
Tables_in_test02
Departments
EmployeeDepartmentView
Employees
show create table EmployeeDepartmentView;
No database selected
no such table test02.employeedepartmentview
set global lower_case_table_names = 0;
select @@lower_case_table_names;
@@lower_case_table_names
0
use test02;
show tables;
Tables_in_test02
Departments
EmployeeDepartmentView
Employees
show create table EmployeeDepartmentView;
View Create View character_set_client collation_connection
EmployeeDepartmentView create view EmployeeDepartmentView as\nselect\ne.FirstName,\ne.LastName,\nd.DepartmentName\nfrom\nEmployees e\ninner join\nDepartments d ON e.DepartmentID = d.DepartmentID; utf8mb4 utf8mb4_general_ci
drop account if exists acc01;
drop account if exists acc02;
drop account if exists acc04;
Expand Down
12 changes: 8 additions & 4 deletions test/distributed/cases/snapshot/snapshot_restore_lower_case.sql
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ drop database test;



-- @bvt:issue#20544
-- view
-- @session:id=2&user=acc01:test_account&password=111
select @@lower_case_table_names;
Expand Down Expand Up @@ -137,7 +136,6 @@ restore account acc01 from snapshot sp02_restore_lower;
-- @session:id=2&user=acc01:test_account&password=111
use test02;
show tables;
show create table Employees;
show create table EmployeeDepartmentView;
-- @session

Expand All @@ -146,10 +144,16 @@ restore account acc01 from snapshot sp02_restore_lower to account acc04;
-- @session:id=4&user=acc04:test_account&password=111
use test02;
show tables;
show create table Employees;
show create table EmployeeDepartmentView;
set global lower_case_table_names = 0;
-- @session

-- @session:id=5&user=acc04:test_account&password=111
select @@lower_case_table_names;
use test02;
show tables;
show create table EmployeeDepartmentView;
-- @session
-- @bvt:issue

drop account if exists acc01;
drop account if exists acc02;
Expand Down

0 comments on commit d923d72

Please sign in to comment.