backup.result 3.64 KB
Newer Older
1
set SQL_LOG_BIN=0;
bar@mysql.com's avatar
bar@mysql.com committed
2
drop table if exists t1, t2, t3, t4;
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
3 4
create table t4(n int);
backup table t4 to '../bogus';
5
Table	Op	Msg_type	Msg_text
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
6 7
test.t4	backup	error	Failed copying .frm file (errno: X)
test.t4	backup	status	Operation failed
8
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
9
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
10
Error	1	Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
11
backup table t4 to '../tmp';
12
Table	Op	Msg_type	Msg_text
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
13
test.t4	backup	status	OK
14
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
15
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
16
backup table t4 to '../tmp';
17
Table	Op	Msg_type	Msg_text
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
18 19
test.t4	backup	error	Failed copying .frm file (errno: X)
test.t4	backup	status	Operation failed
20
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
21
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
22
Error	1	Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi 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:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
28
Warning	1541	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
29
select count(*) from t4;
30 31
count(*)
0
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
32
create table t1(n int);
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:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
38
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
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:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
44
Warning	1541	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
45
Error	29	File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
46
restore table t1 from '../tmp';
47 48
Table	Op	Msg_type	Msg_text
test.t1	restore	status	OK
49
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
50
Warning	1541	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
51
select n from t1;
52 53 54 55
n
23
45
67
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);
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi 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:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
65
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
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:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
73
Warning	1541	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
74
select n from t1;
75 76 77 78
n
23
45
67
79
select m from t2;
80 81 82 83
m
123
145
167
84
select k from t3;
85 86 87 88
k
223
245
267
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
89
drop table t1,t2,t3,t4;
90
restore table t1 from '../tmp';
sasha@mysql.sashanet.com's avatar
sasha@mysql.sashanet.com committed
91 92
Table	Op	Msg_type	Msg_text
test.t1	restore	status	OK
93
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
94
Warning	1541	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
95 96 97
rename table t1 to t5;
lock tables t5 write;
backup table t5 to '../tmp';
98
unlock tables;
sasha@mysql.sashanet.com's avatar
sasha@mysql.sashanet.com committed
99
Table	Op	Msg_type	Msg_text
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
100
test.t5	backup	status	OK
101
Warnings:
mikael@zim.(none)'s avatar
mikael@zim.(none) committed
102
Warning	1541	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead.
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
103
drop table t5;