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

[Bug]: cluster level snapshot cannot restore acc01 to new account acc02. #17300

Closed
1 task done
Ariznawlll opened this issue Jul 3, 2024 · 4 comments
Closed
1 task done
Assignees
Labels
kind/bug Something isn't working needs-triage phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Milestone

Comments

@Ariznawlll
Copy link
Contributor

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

580f61a

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

image

Expected Behavior

No response

Steps to Reproduce

drop account if exists acc01;
create account acc01 admin_name = 'test_account' identified by '111';
drop account if exists acc02;
create account acc02 admin_name = 'test_account' identified by '111';

-- @session:id=1&user=acc01:test_account&password=111
drop database if exists acc_test01;
create database acc_test01;
use acc_test01;
drop table if exists s3t;
create table s3t (col1 int, col2 int, col3 int, primary key(col1, col2));
insert into s3t select result, 2, 12 from generate_series(1, 30000, 1) g;
select count(*) from s3t;
select sum(col1) from s3t;
select avg(col1) from s3t;
select count(col3) from s3t where col1 > 1000;
alter table s3t add column col4 int after col2;
-- @session

drop snapshot if exists sp01;
create snapshot sp01 for cluster;
-- @ignore:1
show snapshots;

-- @session:id=1&user=acc01:test_account&password=111
use acc_test01;
insert into s3t values (300001, 34, 23, 1);
select count(*) from s3t;
-- @session

restore account acc01 from snapshot sp01 to account acc02;

-- @session:id=3&user=acc02:test_account&password=111
show databases; -->出错位置(应该看到恢复后的数据,现在没有)

Additional information

No response

@Ariznawlll Ariznawlll added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Jul 3, 2024
@Ariznawlll Ariznawlll added this to the 1.3.0 milestone Jul 3, 2024
@Ariznawlll
Copy link
Contributor Author

view的恢复也阻塞在这里,麻烦钊哥一起看一下 @YANGGMM
image

drop account if exists acc01;
create account acc01 admin_name = 'test_account' identified by '111';
drop account if exists acc02;
create account acc02 admin_name = 'test_account' identified by '111';

-- @session:id=1&user=acc01:test_account&password=111
-- create simple view
drop database if exists test;
create database test;
use test;
drop table if exists table01;
create table table01 (col1 int, col2 decimal(6), col3 varchar(30));
insert into table01 values (1, null, 'database');
insert into table01 values (2, 38291.32132, 'database');
select count(*) from table01;

drop view if exists v01;
create view v01 as select * from table01;
show create view v01;
select * from v01;
-- @session

drop snapshot if exists sp100;
create snapshot sp100 for cluster;

-- @session:id=1&user=acc01:test_account&password=111
drop view v01;
-- @session

restore account acc01 from snapshot sp100 to account acc02;

-- @session:id=2&user=acc02:test_account&password=111
use test; -->此处报错,应该恢复成功
select * from v01; -->此处应该查找到v01的内容

@YANGGMM
Copy link
Contributor

YANGGMM commented Jul 5, 2024

好的

@Ariznawlll
Copy link
Contributor Author

testing

@Ariznawlll
Copy link
Contributor Author

commit: 5b822dd
场景一:
image

场景二:
image

测试通过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-triage phase/testing severity/s0 Extreme impact: Cause the application to break down and seriously affect the use
Projects
None yet
Development

No branches or pull requests

3 participants