backup.result 4.31 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
test.t4	backup	error	Failed copying .frm file (errno: X)
7 8
test.t4	backup	Warning	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
test.t4	backup	Error	Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
9 10
test.t4	backup	status	Operation failed
backup table t4 to '../tmp';
11
Table	Op	Msg_type	Msg_text
12
test.t4	backup	Warning	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
13 14
test.t4	backup	status	OK
backup table t4 to '../tmp';
15
Table	Op	Msg_type	Msg_text
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
16
test.t4	backup	error	Failed copying .frm file (errno: X)
17 18
test.t4	backup	Warning	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
test.t4	backup	Error	Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
19 20 21 22
test.t4	backup	status	Operation failed
drop table t4;
restore table t4 from '../tmp';
Table	Op	Msg_type	Msg_text
23
test.t4	restore	Warning	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
24 25
test.t4	restore	status	OK
select count(*) from t4;
26 27
count(*)
0
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
28
create table t1(n int);
29 30
insert into t1 values (23),(45),(67);
backup table t1 to '../tmp';
31
Table	Op	Msg_type	Msg_text
32
test.t1	backup	Warning	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
33
test.t1	backup	status	OK
34 35
drop table t1;
restore table t1 from '../bogus';
36 37
Table	Op	Msg_type	Msg_text
t1	restore	error	Failed copying .frm file
38
Warnings:
39
Warning	1287	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
40
Error	29	File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
41
restore table t1 from '../tmp';
42
Table	Op	Msg_type	Msg_text
43
test.t1	restore	Warning	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
44
test.t1	restore	status	OK
45
select n from t1;
46 47 48 49
n
23
45
67
50 51 52 53
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
54
backup table t2,t3 to '../tmp';
55
Table	Op	Msg_type	Msg_text
56
test.t2	backup	Warning	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
57 58
test.t2	backup	status	OK
test.t3	backup	status	OK
59 60
drop table t1,t2,t3;
restore table t1,t2,t3 from '../tmp';
61
Table	Op	Msg_type	Msg_text
62
test.t1	restore	Warning	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
63 64 65
test.t1	restore	status	OK
test.t2	restore	status	OK
test.t3	restore	status	OK
66
select n from t1;
67 68 69 70
n
23
45
67
71
select m from t2;
72 73 74 75
m
123
145
167
76
select k from t3;
77 78 79 80
k
223
245
267
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
81
drop table t1,t2,t3,t4;
82
restore table t1 from '../tmp';
sasha@mysql.sashanet.com's avatar
sasha@mysql.sashanet.com committed
83
Table	Op	Msg_type	Msg_text
84
test.t1	restore	Warning	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
sasha@mysql.sashanet.com's avatar
sasha@mysql.sashanet.com committed
85
test.t1	restore	status	OK
monty@narttu.mysql.fi's avatar
monty@narttu.mysql.fi committed
86 87 88
rename table t1 to t5;
lock tables t5 write;
backup table t5 to '../tmp';
89
unlock tables;
sasha@mysql.sashanet.com's avatar
sasha@mysql.sashanet.com committed
90
Table	Op	Msg_type	Msg_text
91
test.t5	backup	Warning	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
92 93
test.t5	backup	status	OK
drop table t5;
94 95 96 97
DROP TABLE IF EXISTS `t+1`;
CREATE  TABLE `t+1` (c1 INT);
INSERT  INTO  `t+1` VALUES (1), (2), (3);
BACKUP  TABLE `t+1` TO '../tmp';
98
Table	Op	Msg_type	Msg_text
99
test.t+1	backup	Warning	The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
100 101 102
test.t+1	backup	status	OK
DROP    TABLE `t+1`;
RESTORE TABLE `t+1` FROM '../tmp';
103
Table	Op	Msg_type	Msg_text
104
test.t+1	restore	Warning	The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead
105 106
test.t+1	restore	status	OK
SELECT * FROM `t+1`;
107 108 109 110
c1
1
2
3
111
DROP    TABLE `t+1`;