MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Hema Sridharan Date:May 7 2009 9:36pm
Subject:bzr commit into mysql-6.0-backup branch (hema:2807) Bug#36471 Bug#43604
WL#4834
View as plain text  
#At file:///export/home/tmp/wl4834/mysql-6.0-backup/ based on revid:charles.bell@stripped

 2807 Hema Sridharan	2009-05-07
      WL#4834(Test ndb and backup)
      New test case ndb_backup.test is included in ndb suite.
      Note that this test will not satisfy BUG#43604 and BUG#36471
      Once these bugs are fixed backup will use consistent snapshot drivers
      for NDB / NDBCLUSTER storage engine.
      added:
        mysql-test/suite/ndb/r/ndb_backup.result
        mysql-test/suite/ndb/t/ndb_backup.test

=== added file 'mysql-test/suite/ndb/r/ndb_backup.result'
--- a/mysql-test/suite/ndb/r/ndb_backup.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/r/ndb_backup.result	2009-05-07 21:36:16 +0000
@@ -0,0 +1,371 @@
+DROP DATABASE IF EXISTS ndbbup1;
+DROP DATABASE IF EXISTS ndbbup2;
+
+# Create database and table
+CREATE DATABASE ndbbup1;
+CREATE DATABASE ndbbup2;
+CREATE TABLE ndbbup1.t1 (a INT NOT NULL PRIMARY KEY, b INT) ENGINE=NDBCLUSTER;
+INSERT INTO ndbbup1.t1 VALUES (1,1), (2,2), (3,3);
+CREATE TABLE ndbbup1.t2(letter VARCHAR(10))ENGINE=NDBCLUSTER;
+INSERT INTO ndbbup1.t2 VALUES('a'),('ab'),('abc'),('abcd');
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+a	b
+1	1
+2	2
+3	3
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+letter
+a
+ab
+abc
+abcd
+
+# Perform backup
+PURGE BACKUP LOGS;
+BACKUP DATABASE ndbbup1 TO 'ndbbup1.bak';
+backup_id
+#
+# Drop database and perform restore
+DROP DATABASE ndbbup1;
+RESTORE FROM 'ndbbup1.bak';
+backup_id
+#
+
+# Check data contents
+SHOW CREATE TABLE ndbbup1.t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  `b` int(11) DEFAULT NULL,
+  PRIMARY KEY (`a`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SHOW CREATE TABLE ndbbup1.t2;
+Table	Create Table
+t2	CREATE TABLE `t2` (
+  `letter` varchar(10) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+a	b
+1	1
+2	2
+3	3
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+letter
+a
+ab
+abc
+abcd
+
+# Verify backup history logs for type of drivers used by backup and
+# restore for ndbcluster storage engine
+
+SELECT operation, drivers, command FROM mysql.backup_history;
+operation	drivers	command
+backup	Default	BACKUP DATABASE ndbbup1 TO 'ndbbup1.bak'
+restore	Default	RESTORE FROM 'ndbbup1.bak'
+# From the above table we can notice that NDBCLUSTER uses DEFAULT
+# drivers for backup and restore. There are 2 bug reports
+# Bug#43604 and Bug#36471 related to Backup and NDB. These bugs 
+# are created as feature request for backup to use consistent
+# snapshot drivers for NDB and NDBCLUSTER storage engines.
+# Create table using ndb storage engine
+CREATE TABLE ndbbup2.t3(id INT NOT NULL, a CHAR(10))ENGINE=NDB;
+INSERT INTO ndbbup2.t3 VALUES(1,'a'),(4,'d'),(3,'c'),(4,'d');
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+4	d
+
+# Perform backup
+PURGE BACKUP LOGS;
+BACKUP DATABASE ndbbup2 TO 'ndbbup2.bak';
+backup_id
+#
+# Drop database and perform restore
+DROP DATABASE ndbbup2;
+RESTORE FROM 'ndbbup2.bak';
+backup_id
+#
+
+# Verify data contents
+SHOW CREATE TABLE ndbbup2.t3;
+Table	Create Table
+t3	CREATE TABLE `t3` (
+  `id` int(11) NOT NULL,
+  `a` char(10) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+4	d
+
+# Verify backup history logs for type of drivers used by backup and
+# restore for ndbcluster storage engine
+
+SELECT operation, drivers, command FROM mysql.backup_history;
+operation	drivers	command
+backup	Default	BACKUP DATABASE ndbbup2 TO 'ndbbup2.bak'
+restore	Default	RESTORE FROM 'ndbbup2.bak'
+PURGE BACKUP LOGS;
+
+# Create objects that are directly or indirectly influenced by 
+# storage engines and backup (partitions, triggers and views)
+CREATE TABLE ndbbup1.p1 (c1 INT) ENGINE= NDB 
+PARTITION BY HASH (c1) PARTITIONS 5;
+CREATE TABLE ndbbup2.p2 (a INT, b INT, PRIMARY KEY(a,b))ENGINE=NDBCLUSTER 
+PARTITION BY KEY(b, a) PARTITIONS 4;
+INSERT INTO ndbbup1.p1 VALUES(1),(2),(3),(4);
+INSERT INTO ndbbup2.p2 VALUES(0,0),(1,1),(2,2),(3,3);
+CREATE VIEW ndbbup1.v1 AS SELECT * FROM ndbbup2.t3;
+CREATE VIEW ndbbup2.v2 AS SELECT * FROM ndbbup1.t1;
+CREATE TRIGGER ndbbup1.trg2 AFTER INSERT ON ndbbup1.t2 FOR EACH ROW
+BEGIN 
+UPDATE ndbbup2.t3 SET id=40 WHERE a='d' LIMIT 1;
+END; ||
+CREATE TRIGGER ndbbup2.trg3 AFTER UPDATE ON ndbbup2.t3 FOR EACH ROW
+BEGIN
+DELETE FROM ndbbup1.t1 WHERE b=2;
+END;||
+# Exercise objects
+INSERT INTO ndbbup1.t2 VALUES('trigger1');
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+letter
+a
+ab
+abc
+abcd
+trigger1
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+a	b
+1	1
+3	3
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+40	d
+SELECT * FROM ndbbup1.v1 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+40	d
+SELECT * FROM ndbbup2.v2 ORDER BY a, b;
+a	b
+1	1
+3	3
+SELECT * FROM ndbbup1.p1 ORDER BY c1;
+c1
+1
+2
+3
+4
+SELECT * FROM ndbbup2.p2 ORDER BY a, b;
+a	b
+0	0
+1	1
+2	2
+3	3
+SHOW CREATE TABLE ndbbup1.p1;
+Table	Create Table
+p1	CREATE TABLE `p1` (
+  `c1` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (c1)
+PARTITIONS 5 */
+SHOW CREATE TABLE ndbbup2.p2;
+Table	Create Table
+p2	CREATE TABLE `p2` (
+  `a` int(11) NOT NULL DEFAULT '0',
+  `b` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`a`,`b`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY KEY (b,a)
+PARTITIONS 4 */
+
+# Perform backup
+BACKUP DATABASE ndbbup1, ndbbup2 TO 'ndbbup12.bak';
+backup_id
+#
+# Drop database and perform restore
+DROP DATABASE ndbbup1;
+DROP DATABASE ndbbup2;
+RESTORE FROM 'ndbbup12.bak';
+backup_id
+#
+
+# Exercise objects after restore
+INSERT INTO ndbbup1.t2 VALUES('trigger1');
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+letter
+a
+ab
+abc
+abcd
+trigger1
+trigger1
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+a	b
+1	1
+3	3
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+40	d
+SELECT * FROM ndbbup1.v1 ORDER BY id, a;
+id	a
+1	a
+3	c
+4	d
+40	d
+SELECT * FROM ndbbup2.v2 ORDER BY a, b;
+a	b
+1	1
+3	3
+SELECT * FROM ndbbup1.p1 ORDER BY c1;
+c1
+1
+2
+3
+4
+SELECT * FROM ndbbup2.p2 ORDER BY a, b;
+a	b
+0	0
+1	1
+2	2
+3	3
+SHOW CREATE TABLE ndbbup1.p1;
+Table	Create Table
+p1	CREATE TABLE `p1` (
+  `c1` int(11) DEFAULT NULL
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY HASH (c1)
+PARTITIONS 5 */
+SHOW CREATE TABLE ndbbup2.p2;
+Table	Create Table
+p2	CREATE TABLE `p2` (
+  `a` int(11) NOT NULL DEFAULT '0',
+  `b` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`a`,`b`)
+) ENGINE=ndbcluster DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY KEY (b,a)
+PARTITIONS 4 */
+
+# Verify backup history logs
+SELECT operation, drivers, command FROM mysql.backup_history;
+operation	drivers	command
+backup	Default	BACKUP DATABASE ndbbup1, ndbbup2 TO 'ndbbup12.bak'
+restore	Default	RESTORE FROM 'ndbbup12.bak'
+PURGE BACKUP LOGS;
+
+# Create table with all column types
+CREATE TABLE ndbbup1.t4
+( rint INT NOT NULL PRIMARY KEY, tint TINYINT, sint SMALLINT, bint BIGINT, mint MEDIUMINT, name CHAR(20), city VARCHAR(20), f1 FLOAT(7,4), pers DECIMAL(8,2),
+sal DOUBLE, jobs SET('engineer','architect','qa'), 
+engines ENUM('myisam','innodb','memory'), ts TIMESTAMP DEFAULT 0,
+dt DATETIME NOT NULL, dob DATE, time TIME, y YEAR, b1 BINARY(3),
+b2 VARBINARY(2), bitvalue BIT(64), detail BLOB, region TEXT,
+sum LONGTEXT, queries TINYTEXT, paras MEDIUMTEXT, data MEDIUMBLOB, 
+query2 TINYBLOB, extract LONGBLOB) ENGINE=NDB;
+SELECT column_name, data_type, storage FROM information_schema.columns 
+WHERE table_schema='ndbbup1' AND table_name='t4';
+column_name	data_type	storage
+rint	int	Default
+tint	tinyint	Default
+sint	smallint	Default
+bint	bigint	Default
+mint	mediumint	Default
+name	char	Default
+city	varchar	Default
+f1	float	Default
+pers	decimal	Default
+sal	double	Default
+jobs	set	Default
+engines	enum	Default
+ts	timestamp	Default
+dt	datetime	Default
+dob	date	Default
+time	time	Default
+y	year	Default
+b1	binary	Default
+b2	varbinary	Default
+bitvalue	bit	Default
+detail	blob	Default
+region	text	Default
+sum	longtext	Default
+queries	tinytext	Default
+paras	mediumtext	Default
+data	mediumblob	Default
+query2	tinyblob	Default
+extract	longblob	Default
+INSERT INTO ndbbup1.t4 VALUES
+(240, 126, 1111, 90000, 8976, 'xyzw', 'Norway', 12.9876, 100.25, 900.89, 
+'architect','myisam','2009-05-06 17:18:18', '98/12/31 11*30*45', '1984-09-08','7:05','1984', 0x61, 0x2130, b'000000001', 'Testing mysql database', 
+'Testing mysql backup and ndb', 'nnnnnnnnn', 'kkkkkkkkkkkk', 'oooooooooo',
+'pppppppppppp','ssssssssssss','yyyyyyyyyy');
+SELECT * FROM ndbbup1.t4;
+rint	tint	sint	bint	mint	name	city	f1	pers	sal	jobs	engines	ts	dt	dob	time	y	b1	b2	bitvalue	detail	region	sum	queries	paras	data	query2	extract
+240	126	1111	90000	8976	xyzw	Norway	12.9876	100.25	900.89	architect	myisam	2009-05-06 17:18:18	1998-12-31 11:30:45	1984-09-08	07:05:00	1984	a
+SELECT HEX(b1), HEX(b2), HEX(bitvalue) FROM ndbbup1.t4;
+HEX(b1)	HEX(b2)	HEX(bitvalue)
+610000	2130	1
+
+# Perform backup 
+BACKUP DATABASE ndbbup1 TO 'ndbbup1.bak';
+backup_id
+#
+# Drop database and perform restore
+DROP DATABASE ndbbup1;
+RESTORE FROM 'ndbbup1.bak';
+backup_id
+#
+
+# Check the metadata of t4
+SELECT column_name, data_type, storage FROM information_schema.columns
+WHERE table_schema='ndbbup1' AND table_name='t4';
+column_name	data_type	storage
+rint	int	Default
+tint	tinyint	Default
+sint	smallint	Default
+bint	bigint	Default
+mint	mediumint	Default
+name	char	Default
+city	varchar	Default
+f1	float	Default
+pers	decimal	Default
+sal	double	Default
+jobs	set	Default
+engines	enum	Default
+ts	timestamp	Default
+dt	datetime	Default
+dob	date	Default
+time	time	Default
+y	year	Default
+b1	binary	Default
+b2	varbinary	Default
+bitvalue	bit	Default
+detail	blob	Default
+region	text	Default
+sum	longtext	Default
+queries	tinytext	Default
+paras	mediumtext	Default
+data	mediumblob	Default
+query2	tinyblob	Default
+extract	longblob	Default
+SELECT * FROM ndbbup1.t4;
+rint	tint	sint	bint	mint	name	city	f1	pers	sal	jobs	engines	ts	dt	dob	time	y	b1	b2	bitvalue	detail	region	sum	queries	paras	data	query2	extract
+240	126	1111	90000	8976	xyzw	Norway	12.9876	100.25	900.89	architect	myisam	2009-05-06 17:18:18	1998-12-31 11:30:45	1984-09-08	07:05:00	1984	a
+SELECT HEX(b1), HEX(b2), HEX(bitvalue) FROM ndbbup1.t4;
+HEX(b1)	HEX(b2)	HEX(bitvalue)
+610000	2130	1
+
+# Test cleanup
+DROP DATABASE ndbbup1;
+DROP DATABASE ndbbup2;

=== added file 'mysql-test/suite/ndb/t/ndb_backup.test'
--- a/mysql-test/suite/ndb/t/ndb_backup.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_backup.test	2009-05-07 21:36:16 +0000
@@ -0,0 +1,243 @@
+--source include/not_embedded.inc
+--source include/have_ndb.inc
+--source include/have_partition.inc
+
+--disable_query_log
+set new=on;
+--enable_query_log
+
+--disable_warnings
+DROP DATABASE IF EXISTS ndbbup1;
+DROP DATABASE IF EXISTS ndbbup2;
+
+let $MYSQLD_BACKUPDIR= `select @@backupdir`;
+
+--echo
+--echo # Create database and table
+CREATE DATABASE ndbbup1;
+CREATE DATABASE ndbbup2;
+
+CREATE TABLE ndbbup1.t1 (a INT NOT NULL PRIMARY KEY, b INT) ENGINE=NDBCLUSTER;
+INSERT INTO ndbbup1.t1 VALUES (1,1), (2,2), (3,3);
+
+CREATE TABLE ndbbup1.t2(letter VARCHAR(10))ENGINE=NDBCLUSTER;
+INSERT INTO ndbbup1.t2 VALUES('a'),('ab'),('abc'),('abcd');
+
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+
+--echo
+--echo # Perform backup
+
+PURGE BACKUP LOGS;
+
+--replace_column 1 #
+BACKUP DATABASE ndbbup1 TO 'ndbbup1.bak';
+
+--echo # Drop database and perform restore
+
+DROP DATABASE ndbbup1;
+
+--replace_column 1 #
+RESTORE FROM 'ndbbup1.bak';
+
+--remove_file $MYSQLD_BACKUPDIR/ndbbup1.bak
+
+--echo
+--echo # Check data contents
+
+SHOW CREATE TABLE ndbbup1.t1;
+SHOW CREATE TABLE ndbbup1.t2;
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+
+--echo
+--echo # Verify backup history logs for type of drivers used by backup and
+--echo # restore for ndbcluster storage engine
+--echo
+SELECT operation, drivers, command FROM mysql.backup_history;
+
+--echo # From the above table we can notice that NDBCLUSTER uses DEFAULT
+--echo # drivers for backup and restore. There are 2 bug reports
+--echo # Bug#43604 and Bug#36471 related to Backup and NDB. These bugs 
+--echo # are created as feature request for backup to use consistent
+--echo # snapshot drivers for NDB and NDBCLUSTER storage engines.
+ 
+--echo # Create table using ndb storage engine
+
+CREATE TABLE ndbbup2.t3(id INT NOT NULL, a CHAR(10))ENGINE=NDB;
+INSERT INTO ndbbup2.t3 VALUES(1,'a'),(4,'d'),(3,'c'),(4,'d');
+
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+
+--echo
+--echo # Perform backup
+
+PURGE BACKUP LOGS;
+
+--replace_column 1 #
+BACKUP DATABASE ndbbup2 TO 'ndbbup2.bak';
+
+--echo # Drop database and perform restore
+
+DROP DATABASE ndbbup2;
+
+--replace_column 1 #
+RESTORE FROM 'ndbbup2.bak';
+
+--remove_file $MYSQLD_BACKUPDIR/ndbbup2.bak
+
+--echo
+--echo # Verify data contents
+
+SHOW CREATE TABLE ndbbup2.t3;
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+
+--echo
+--echo # Verify backup history logs for type of drivers used by backup and
+--echo # restore for ndbcluster storage engine
+--echo
+
+SELECT operation, drivers, command FROM mysql.backup_history;
+
+# From the above table we can notice that backup and restore uses default 
+# drivers for ndb storage engine. Once BUG#43604 is fixed, backup will use
+# consistent snapshot drivers.
+
+PURGE BACKUP LOGS;
+
+--echo
+--echo # Create objects that are directly or indirectly influenced by 
+--echo # storage engines and backup (partitions, triggers and views)
+
+CREATE TABLE ndbbup1.p1 (c1 INT) ENGINE= NDB 
+PARTITION BY HASH (c1) PARTITIONS 5;
+CREATE TABLE ndbbup2.p2 (a INT, b INT, PRIMARY KEY(a,b))ENGINE=NDBCLUSTER 
+PARTITION BY KEY(b, a) PARTITIONS 4;
+
+INSERT INTO ndbbup1.p1 VALUES(1),(2),(3),(4);
+INSERT INTO ndbbup2.p2 VALUES(0,0),(1,1),(2,2),(3,3);
+
+CREATE VIEW ndbbup1.v1 AS SELECT * FROM ndbbup2.t3;
+CREATE VIEW ndbbup2.v2 AS SELECT * FROM ndbbup1.t1;
+
+DELIMITER ||;
+CREATE TRIGGER ndbbup1.trg2 AFTER INSERT ON ndbbup1.t2 FOR EACH ROW
+BEGIN 
+   UPDATE ndbbup2.t3 SET id=40 WHERE a='d' LIMIT 1;
+END; ||
+
+CREATE TRIGGER ndbbup2.trg3 AFTER UPDATE ON ndbbup2.t3 FOR EACH ROW
+BEGIN
+   DELETE FROM ndbbup1.t1 WHERE b=2;
+END;||
+
+DELIMITER ;||
+
+--echo # Exercise objects
+
+INSERT INTO ndbbup1.t2 VALUES('trigger1');
+
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+
+SELECT * FROM ndbbup1.v1 ORDER BY id, a;
+SELECT * FROM ndbbup2.v2 ORDER BY a, b;
+
+SELECT * FROM ndbbup1.p1 ORDER BY c1;
+SELECT * FROM ndbbup2.p2 ORDER BY a, b;
+
+SHOW CREATE TABLE ndbbup1.p1;
+SHOW CREATE TABLE ndbbup2.p2;
+
+--echo
+--echo # Perform backup
+--replace_column 1 #
+BACKUP DATABASE ndbbup1, ndbbup2 TO 'ndbbup12.bak';
+
+--echo # Drop database and perform restore
+DROP DATABASE ndbbup1;
+DROP DATABASE ndbbup2;
+
+--replace_column 1 #
+RESTORE FROM 'ndbbup12.bak';
+
+--remove_file $MYSQLD_BACKUPDIR/ndbbup12.bak
+
+--echo
+--echo # Exercise objects after restore
+
+INSERT INTO ndbbup1.t2 VALUES('trigger1');
+
+SELECT * FROM ndbbup1.t2 ORDER BY letter;
+SELECT * FROM ndbbup1.t1 ORDER BY a, b;
+SELECT * FROM ndbbup2.t3 ORDER BY id, a;
+
+SELECT * FROM ndbbup1.v1 ORDER BY id, a;
+SELECT * FROM ndbbup2.v2 ORDER BY a, b;
+
+SELECT * FROM ndbbup1.p1 ORDER BY c1;
+SELECT * FROM ndbbup2.p2 ORDER BY a, b;
+
+SHOW CREATE TABLE ndbbup1.p1;
+SHOW CREATE TABLE ndbbup2.p2;
+
+--echo
+--echo # Verify backup history logs
+
+SELECT operation, drivers, command FROM mysql.backup_history;
+
+PURGE BACKUP LOGS;
+
+--echo
+--echo # Create table with all column types
+
+CREATE TABLE ndbbup1.t4
+( rint INT NOT NULL PRIMARY KEY, tint TINYINT, sint SMALLINT, bint BIGINT, mint MEDIUMINT, name CHAR(20), city VARCHAR(20), f1 FLOAT(7,4), pers DECIMAL(8,2),
+sal DOUBLE, jobs SET('engineer','architect','qa'), 
+engines ENUM('myisam','innodb','memory'), ts TIMESTAMP DEFAULT 0,
+dt DATETIME NOT NULL, dob DATE, time TIME, y YEAR, b1 BINARY(3),
+b2 VARBINARY(2), bitvalue BIT(64), detail BLOB, region TEXT,
+sum LONGTEXT, queries TINYTEXT, paras MEDIUMTEXT, data MEDIUMBLOB, 
+query2 TINYBLOB, extract LONGBLOB) ENGINE=NDB;
+
+SELECT column_name, data_type, storage FROM information_schema.columns 
+WHERE table_schema='ndbbup1' AND table_name='t4';
+
+INSERT INTO ndbbup1.t4 VALUES
+(240, 126, 1111, 90000, 8976, 'xyzw', 'Norway', 12.9876, 100.25, 900.89, 
+'architect','myisam','2009-05-06 17:18:18', '98/12/31 11*30*45', '1984-09-08','7:05','1984', 0x61, 0x2130, b'000000001', 'Testing mysql database', 
+'Testing mysql backup and ndb', 'nnnnnnnnn', 'kkkkkkkkkkkk', 'oooooooooo',
+'pppppppppppp','ssssssssssss','yyyyyyyyyy');
+
+SELECT * FROM ndbbup1.t4;
+SELECT HEX(b1), HEX(b2), HEX(bitvalue) FROM ndbbup1.t4;
+
+--echo
+--echo # Perform backup 
+
+--replace_column 1 #
+BACKUP DATABASE ndbbup1 TO 'ndbbup1.bak';
+
+--echo # Drop database and perform restore
+
+DROP DATABASE ndbbup1;
+
+--replace_column 1 #
+RESTORE FROM 'ndbbup1.bak';
+
+--echo
+--echo # Check the metadata of t4
+
+SELECT column_name, data_type, storage FROM information_schema.columns
+WHERE table_schema='ndbbup1' AND table_name='t4';
+SELECT * FROM ndbbup1.t4;
+SELECT HEX(b1), HEX(b2), HEX(bitvalue) FROM ndbbup1.t4;
+
+--echo
+--echo # Test cleanup
+
+DROP DATABASE ndbbup1;
+DROP DATABASE ndbbup2;
+--remove_file $MYSQLD_BACKUPDIR/ndbbup1.bak

Thread
bzr commit into mysql-6.0-backup branch (hema:2807) Bug#36471 Bug#43604WL#4834Hema Sridharan7 May
  • Re: bzr commit into mysql-6.0-backup branch (hema:2807) Bug#36471Bug#43604 WL#4834Chuck Bell2 Jun