backup.result 3.91 KB
Newer Older
unknown's avatar
unknown committed
1
set SQL_LOG_BIN=0;
unknown's avatar
unknown committed
2
drop table if exists t1, t2, t3, t4;
unknown's avatar
unknown committed
3 4
create table t4(n int);
backup table t4 to '../bogus';
5
Table	Op	Msg_type	Msg_text
unknown's avatar
unknown committed
6 7
test.t4	backup	error	Failed copying .frm file (errno: X)
test.t4	backup	status	Operation failed
8
Warnings:
9
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
10
Error	1	Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
unknown's avatar
unknown committed
11
backup table t4 to '../tmp';
12
Table	Op	Msg_type	Msg_text
unknown's avatar
unknown committed
13
test.t4	backup	status	OK
14
Warnings:
15
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
16
backup table t4 to '../tmp';
17
Table	Op	Msg_type	Msg_text
unknown's avatar
unknown committed
18 19
test.t4	backup	error	Failed copying .frm file (errno: X)
test.t4	backup	status	Operation failed
20
Warnings:
21
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
22
Error	1	Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
unknown's avatar
unknown committed
23 24 25 26
drop table t4;
restore table t4 from '../tmp';
Table	Op	Msg_type	Msg_text
test.t4	restore	status	OK
27
Warnings:
28
Warning	1540	The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
29
select count(*) from t4;
30 31
count(*)
0
unknown's avatar
unknown committed
32
create table t1(n int);
unknown's avatar
unknown committed
33 34
insert into t1 values (23),(45),(67);
backup table t1 to '../tmp';
35 36
Table	Op	Msg_type	Msg_text
test.t1	backup	status	OK
37
Warnings:
38
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
39 40
drop table t1;
restore table t1 from '../bogus';
41 42
Table	Op	Msg_type	Msg_text
t1	restore	error	Failed copying .frm file
43
Warnings:
44
Warning	1540	The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
45
Error	29	File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
unknown's avatar
unknown committed
46
restore table t1 from '../tmp';
47 48
Table	Op	Msg_type	Msg_text
test.t1	restore	status	OK
49
Warnings:
50
Warning	1540	The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
51
select n from t1;
52 53 54 55
n
23
45
67
unknown's avatar
unknown committed
56 57 58 59
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);
unknown's avatar
unknown committed
60
backup table t2,t3 to '../tmp';
61 62 63
Table	Op	Msg_type	Msg_text
test.t2	backup	status	OK
test.t3	backup	status	OK
64
Warnings:
65
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
66 67
drop table t1,t2,t3;
restore table t1,t2,t3 from '../tmp';
68 69 70 71
Table	Op	Msg_type	Msg_text
test.t1	restore	status	OK
test.t2	restore	status	OK
test.t3	restore	status	OK
72
Warnings:
73
Warning	1540	The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
74
select n from t1;
75 76 77 78
n
23
45
67
unknown's avatar
unknown committed
79
select m from t2;
80 81 82 83
m
123
145
167
unknown's avatar
unknown committed
84
select k from t3;
85 86 87 88
k
223
245
267
unknown's avatar
unknown committed
89
drop table t1,t2,t3,t4;
unknown's avatar
unknown committed
90
restore table t1 from '../tmp';
unknown's avatar
unknown committed
91 92
Table	Op	Msg_type	Msg_text
test.t1	restore	status	OK
93
Warnings:
94
Warning	1540	The 'RESTORE TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
95 96 97
rename table t1 to t5;
lock tables t5 write;
backup table t5 to '../tmp';
unknown's avatar
unknown committed
98
unlock tables;
unknown's avatar
unknown committed
99
Table	Op	Msg_type	Msg_text
unknown's avatar
unknown committed
100
test.t5	backup	status	OK
101
Warnings:
102
Warning	1540	The 'BACKUP TABLE' statement is deprecated and will be removed in MySQL 5.2. Please use client programs (e.g. mysqldump, mysql, MySQL Administrator) instead.
unknown's avatar
unknown committed
103
drop table t5;