~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/backup_multi_blocks.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/not_embedded.inc
 
2
 
 
3
# Test that it is possible to restore backups of tables with more than
 
4
# a single block of data.
 
5
 
 
6
--disable_warnings
 
7
DROP DATABASE IF EXISTS mysqltest;
 
8
--enable_warnings
 
9
 
 
10
--echo Creating database and tables ...
 
11
CREATE DATABASE mysqltest;
 
12
USE mysqltest;
 
13
 
 
14
CREATE TABLE t1 (a LONGTEXT) ENGINE=MYISAM;
 
15
 
 
16
--echo Inserting data ...
 
17
USE mysqltest;
 
18
INSERT INTO t1 VALUES ("text");
 
19
LET $1=13;
 
20
WHILE ($1)
 
21
{
 
22
  UPDATE t1 SET a=CONCAT(a,a);
 
23
  DEC $1;
 
24
}
 
25
SELECT LENGTH(a) FROM t1;
 
26
 
 
27
--echo Performing backup ...
 
28
--replace_column 1 #;
 
29
BACKUP DATABASE mysqltest TO 'test.ba';
 
30
 
 
31
DROP DATABASE mysqltest;
 
32
 
 
33
# Perform restore.
 
34
--echo Performing restore ...
 
35
--replace_column 1 #;
 
36
RESTORE FROM 'test.ba';
 
37
 
 
38
--echo Checking contents of restore ...
 
39
SELECT LENGTH(a) FROM t1;
 
40
CHECKSUM TABLE t1;
 
41
 
 
42
--echo Clean-up
 
43
DROP DATABASE mysqltest;
 
44
--remove_file $MYSQLTEST_VARDIR/master-data/test.ba