2001-09-27 23:05:54 -06:00
|
|
|
set SQL_LOG_BIN=0;
|
2003-01-06 01:48:59 +02:00
|
|
|
drop table if exists t1, t2, t3;
|
2001-09-27 23:05:54 -06:00
|
|
|
create table t1(n int);
|
|
|
|
backup table t1 to '../bogus';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
2001-04-21 03:03:08 +03:00
|
|
|
test.t1 backup error Failed copying .frm file: errno = X
|
2001-01-18 17:36:20 -07:00
|
|
|
test.t1 backup status Operation failed
|
2001-09-27 23:05:54 -06:00
|
|
|
backup table t1 to '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 backup status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
drop table t1;
|
|
|
|
restore table t1 from '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 restore status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
select count(*) from t1;
|
2001-01-18 17:36:20 -07:00
|
|
|
count(*)
|
|
|
|
0
|
2001-09-27 23:05:54 -06:00
|
|
|
insert into t1 values (23),(45),(67);
|
|
|
|
backup table t1 to '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 backup status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
drop table t1;
|
|
|
|
restore table t1 from '../bogus';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
t1 restore error Failed copying .frm file
|
2001-09-27 23:05:54 -06:00
|
|
|
restore table t1 from '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 restore status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
select n from t1;
|
2001-01-18 17:36:20 -07:00
|
|
|
n
|
|
|
|
23
|
|
|
|
45
|
|
|
|
67
|
2001-09-27 23:05:54 -06:00
|
|
|
create table t2(m int not null primary key);
|
|
|
|
create table t3(k int not null primary key);
|
|
|
|
insert into t2 values (123),(145),(167);
|
|
|
|
insert into t3 values (223),(245),(267);
|
|
|
|
backup table t1,t2,t3 to '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 backup status OK
|
|
|
|
test.t2 backup status OK
|
|
|
|
test.t3 backup status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
drop table t1,t2,t3;
|
|
|
|
restore table t1,t2,t3 from '../tmp';
|
2001-01-18 17:36:20 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 restore status OK
|
|
|
|
test.t2 restore status OK
|
|
|
|
test.t3 restore status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
select n from t1;
|
2001-01-18 17:36:20 -07:00
|
|
|
n
|
|
|
|
23
|
|
|
|
45
|
|
|
|
67
|
2001-09-27 23:05:54 -06:00
|
|
|
select m from t2;
|
2001-01-18 17:36:20 -07:00
|
|
|
m
|
|
|
|
123
|
|
|
|
145
|
|
|
|
167
|
2001-09-27 23:05:54 -06:00
|
|
|
select k from t3;
|
2001-01-18 17:36:20 -07:00
|
|
|
k
|
|
|
|
223
|
|
|
|
245
|
|
|
|
267
|
2001-09-27 23:05:54 -06:00
|
|
|
drop table t1,t2,t3;
|
|
|
|
restore table t1 from '../tmp';
|
2001-01-23 08:20:51 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 restore status OK
|
2001-09-27 23:05:54 -06:00
|
|
|
lock tables t1 write;
|
|
|
|
backup table t1 to '../tmp';
|
|
|
|
unlock tables;
|
2001-01-23 08:20:51 -07:00
|
|
|
Table Op Msg_type Msg_text
|
|
|
|
test.t1 backup status OK
|
2001-11-26 03:52:23 +02:00
|
|
|
drop table t1;
|