2001-09-27 23:05:54 -06:00
set SQL_LOG_BIN=0;
2005-12-30 14:55:56 +04:00
drop table if exists t1, t2, t3, t4;
2003-03-17 15:05:04 +02:00
create table t4(n int);
2007-12-12 18:19:24 +01:00
backup table t4 to '../../bogus';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2003-03-17 15:05:04 +02:00
test.t4 backup error Failed copying .frm file (errno: X)
2010-02-09 11:30:50 +01:00
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2007-06-08 11:20:50 +05:00
test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X)
2003-03-17 15:05:04 +02:00
test.t4 backup status Operation failed
2007-12-12 18:19:24 +01:00
backup table t4 to '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2003-03-17 15:05:04 +02:00
test.t4 backup status OK
2007-12-12 18:19:24 +01:00
backup table t4 to '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2003-03-17 15:05:04 +02:00
test.t4 backup error Failed copying .frm file (errno: X)
2010-02-09 11:30:50 +01:00
test.t4 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2007-06-08 11:20:50 +05:00
test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X)
2003-03-17 15:05:04 +02:00
test.t4 backup status Operation failed
drop table t4;
2007-12-12 18:19:24 +01:00
restore table t4 from '../../tmp';
2003-03-17 15:05:04 +02:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t4 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2003-03-17 15:05:04 +02:00
test.t4 restore status OK
select count(*) from t4;
2001-01-18 17:36:20 -07:00
count(*)
0
2003-03-17 15:05:04 +02:00
create table t1(n int);
2001-09-27 23:05:54 -06:00
insert into t1 values (23),(45),(67);
2007-12-12 18:19:24 +01:00
backup table t1 to '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2001-01-18 17:36:20 -07:00
test.t1 backup status OK
2001-09-27 23:05:54 -06:00
drop table t1;
2007-12-12 18:19:24 +01:00
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
2005-02-24 23:33:42 +02:00
Warnings:
2010-02-09 11:30:50 +01:00
Warning 1287 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2006-01-24 08:30:54 +01:00
Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X)
2007-12-12 18:19:24 +01:00
restore table t1 from '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2001-01-18 17:36:20 -07:00
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);
2007-12-12 18:19:24 +01:00
backup table t2,t3 to '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t2 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2001-01-18 17:36:20 -07:00
test.t2 backup status OK
test.t3 backup status OK
2001-09-27 23:05:54 -06:00
drop table t1,t2,t3;
2007-12-12 18:19:24 +01:00
restore table t1,t2,t3 from '../../tmp';
2001-01-18 17:36:20 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2001-01-18 17:36:20 -07:00
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
2003-03-17 15:05:04 +02:00
drop table t1,t2,t3,t4;
2007-12-12 18:19:24 +01:00
restore table t1 from '../../tmp';
2001-01-23 08:20:51 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2001-01-23 08:20:51 -07:00
test.t1 restore status OK
2003-03-17 15:05:04 +02:00
rename table t1 to t5;
lock tables t5 write;
2007-12-12 18:19:24 +01:00
backup table t5 to '../../tmp';
2001-09-27 23:05:54 -06:00
unlock tables;
2001-01-23 08:20:51 -07:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t5 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2003-03-17 15:05:04 +02:00
test.t5 backup status OK
drop table t5;
2006-08-03 08:12:56 +02:00
DROP TABLE IF EXISTS `t+1`;
CREATE TABLE `t+1` (c1 INT);
INSERT INTO `t+1` VALUES (1), (2), (3);
2007-12-12 18:19:24 +01:00
BACKUP TABLE `t+1` TO '../../tmp';
2006-08-02 17:57:06 +02:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t+1 backup Warning 'BACKUP TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2006-08-03 08:12:56 +02:00
test.t+1 backup status OK
DROP TABLE `t+1`;
2007-12-12 18:19:24 +01:00
RESTORE TABLE `t+1` FROM '../../tmp';
2006-08-02 17:57:06 +02:00
Table Op Msg_type Msg_text
2010-02-09 11:30:50 +01:00
test.t+1 restore Warning 'RESTORE TABLE' is deprecated and will be removed in a future release. Please use MySQL Administrator (mysqldump, mysql) instead
2006-08-03 08:12:56 +02:00
test.t+1 restore status OK
SELECT * FROM `t+1`;
2006-08-02 17:57:06 +02:00
c1
1
2
3
2006-08-03 08:12:56 +02:00
DROP TABLE `t+1`;