MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Hema Sridharan Date:February 4 2009 6:07pm
Subject:bzr commit into mysql-6.0-backup branch (hema:2757) Bug#38363
View as plain text  
#At file:///export/home2/tmp/bug-38363/mysql-6.0-backup/ based on revid:jorgen.loland@stripped01tklb3cxfm

 2757 Hema Sridharan	2009-02-04
      BUG#38363
added:
  mysql-test/suite/backup/r/backup_accented.result
  mysql-test/suite/backup/r/backup_special_characters.result
  mysql-test/suite/backup/t/backup_accented.test
  mysql-test/suite/backup/t/backup_special_characters.test

=== added file 'mysql-test/suite/backup/r/backup_accented.result'
--- a/mysql-test/suite/backup/r/backup_accented.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/r/backup_accented.result	2009-02-04 18:06:32 +0000
@@ -0,0 +1,2117 @@
+
+starting the test for backup
+
+DROP DATABASE IF EXISTS acc1;
+DROP DATABASE IF EXISTS acc2;
+SET NAMES utf8;
+SET CHARACTER_SET_SERVER=utf8;
+CREATE DATABASE acc1 CHARACTER SET utf8;
+CREATE DATABASE acc2 CHARACTER SET utf8;
+USE acc1;
+
+Creating table
+CREATE TABLE `фывапр`(`ë` char(20) CHARACTER SET utf8);
+CREATE TABLE acc2.t1(a char(20)CHARACTER SET utf8);
+INSERT INTO  `фывапр` VALUES
+('á'),( 'Ë'),('Ö'),('Ä'),('ÿáúëêà'),('ë'),('ï'),('ö'),('ü'),('ÿ'),('Ã'),('Ñ'),
+('Õ'),('ã'),('ñ'),('õ'),('ñ'),('ô'),('û'),('Æ'),('æ'),('Þ'),('þ'),('Ø'),('ø'),(''÷'),('Œ'),('œ'),('Ÿ'),('©'),('®'),('§'),
+('¶'),('П'),('Ф'),('щҖ'),('βϋ');
+**Creating Views in database acc1 **
+
+CREATE VIEW `ÿáúëêà` AS SELECT * FROM `фывапр`;
+CREATE VIEW v2 AS SELECT * FROM `ÿting Views in database acc2 **
+CREATE VIEW acc2.v1 AS SELECT * FROM acc1.`ÿáúëêà`;
+CREATE VIEW acc2.v4 AS SELECT * FROM acc1.v2;
+CREATE TRIGGER acc2.trai AFTER INSERT ON acc2.t1 FOR EACH ROW
+BEGIN
+INSERT INTO acc1.v2 VALUES('ÆæÞþØ'),('áÏËÖÄ'),('£¢µ±');
+END;
+||
+**Creating procedures**
+CREATE TABLE acc1.t1 (a CHAR(16) NOT NULL DEFAULT '', data INT NOT NULL)||
+CREATE PROCEDURE acc1.p1(x char(16), y int)
+BEGIN
+DECLARE z INT;
+SET @z = y, z = 666;
+INSERT INTO acc1.t1 VALUES (x, z);
+END||
+CALL acc1.p1("æÞþ", 19)||
+SELECT a,data,@z FROM t1||
+a	data	@z
+æÞþ	666	19
+SELECT * FROM acc1.t1||
+a	data
+æÞþ	666
+**creating functions**
+CREATE FUNCTION append(s1 char(10), s2 char(10)) RETURNS CHAR(20)
+RETURN concat(s1, s2);
+SELECT append("œŸ","€¥");
+append("œŸ","€¥")
+œŸ€¥
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+53
+INSERT INTO acc2.t1 VALUES('÷'),('Œ'),('œ');
+SELECT * FROM acc2.t1;
+a
+÷
+Œ
+œ
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+62
+SELECT * FROM acc1.v3;
+ë
+á
+Ë
+Ö
+Ä
+ÿáúëêà
+ë
+ï
+ö
+
+ê
+î
+ô
+û
+Æ
+æ
+Þ
+þ
+Ø
+ø
+€
+¥
+£
+¢
+µ
+±
+¬
+°
+÷
+Œ
+œ
+Ÿ
+©
+®
+§
+¶
+П
+Ф
+щҖ
+βϋ
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+SELECT COUNT(*) FROM acc2.v4;
+COUNT(*)
+62
+SELECT * FROM `фывапр`;
+ë
+á
+Ë
+Ö
+Ä
+ÿáúëêà
+ë
+ï
+ö
+ü
+ÿ
+Ã
+Ñ
+Õ
+ã
+ñ
+õ
+ñ
+Â
+Ê
+Î
+Ô
+Û
+â
+ê
+î
+ô
+û
+Æ
+æ
+Þ
+þ
+Ø
+ø
+€
+¥
+£
+¢
+µ
+±
+¬
+°
+÷
+Œ
+œ
+Ÿ
+©
+®
+§
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+SELECT COUNT(*) FROM  `фывапр`;
+COUNT(*)
+62
+SELECT COUNT(*) FROM `ÿáúëêà`;
+COUNT(*)
+62
+SELECT COUNT(*) FROM acc2.v1;
+COUNT(*)
+62
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+ÿáúëêv3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+utf8
+SELECT @@character_set_results;
+@@character_set_results
+utf8
+SELECT @@character_set_connection;
+@@character_set_connection
+utf8
+BACKUP DATABASE acc1, acc2 to 'acc.bak';
+backup_id
+#
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+ÿáúëêà	VIEW
+фывапр	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('ÆæÞþØ'),('áÏËÖÄ'),('£¢µ±');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("µ", 20);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+æÞcc1.append("ëï", "ø")
+ëïø
+SELECT * FROM acc1.t1;
+a	data
+æÞþ	666
+µ	666
+SELECT * FROM acc1.`фывапр`;
+ë
+á
+Ë
+Ö
+Ä
+ÿáúëêà
+ë
+ï
+ö
+ü
+ÿ
+Ã
+Ñ
+Õ
+ã
+ñ
+õ
+ñ
+Â
+Ê
+Î
+Ô
+Û
+â
+ê
+î
+ô
+û
+Æ
+æ
+Þ
+þ
+Ø
+ø
+€
+¥
+£
+¢
+µ
+±
+¬
+°
+÷
+Œ
+œ
+Ÿ
+©
+®
+§
+¶
+П
+Ф
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+SELECT COUNT(*) FROM acc2.v1;
+COUNT(*)
+62
+SELECT COUNT(*) FROM acc1.`фывапр`;
+COUNT(*)
+62
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+62
+INSERT INTO acc2.t1 VALUES('Ώ'),('β'),('βЊ');
+SELECT * FROM acc2.t1;
+a
+÷
+Œ
+œ
+Ώ
+β
+βЊ
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+71
+SELECT * FROM acc1.v3;
+ë
+á
+Ë
+Ö
+Ä
+ÿ
+Â
+Ê
+Î
+Ô
+Û
+â
+ê
+î
+ô
+û
+Æ
+æ
+Þ
+þ
+Ø
+ø
+€
+¥
+£
+¢
+µ
+±
+¬
+°
+÷
+Œ
+œ
+Ÿ
+©
+®
+§
+¶
+П
+Ф
+щҖ
+βϋ
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþ
+ÆæÞþØ
+áÏËÖÄ
+£¢µ±
+ÆæÞþØ
+áÏËÖ+**change character set and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES latin5;
+SET CHARACTER_SET_SERVER=latin5;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+���VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+latin5
+SELECT @@character_set_results;
+@@character_set_results
+latin5
+SELECT @@character_set_connection;
+@@character_set_connection
+latin5
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('�??�),('��'),('����');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 10);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+ "ActivityŒœ");
+acc1.append("TestingŸ®", "ActivityŒœ")
+TestingŸ�ctivityŒ
+SELECT * FROM acc1.t1;
+a	data
+�	666
+§¶	666
+SELECT count(*) FROM acc2.v1;
+count(*)
+62
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+62
+INSERT INTO acc2.t1 VALUES('p');
+SELECT * FROM acc2.t1;
+a
+�
+?
+p
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+65
+SELECT * FROM acc1.v3;
+���+�+�+���+���
+�
+�+�+�+��
+�
+�+�+�+�+����
+�+�?
+?
+�+�+�
+�
+�
+�
+�
+�
+�
+�
+?
+?
+�
+�
+�
+�
+?
+?
+??
+??
+��
+SELECT COUNT(*) FROM acc2.v4;
+COUNT(*)
+65
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES latin7;
+SET CHARACTER_SET_SERVER=latin7;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+latin7
+SELECT @@character_set_results;
+@@character_set_results
+latin7
+SELECT @@character_set_connection;
+@@character_set_connection
+latin7
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('��??�'),('???�'),('eneral_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+ FROM acc1.t1;
+a	data
+�??	666
+§¶	666
+SELECT count(*) FROM acc2.v1;
+count(*)
+62
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+62
+INSERT INTO acc2.t1 VALUES('œ'),('CT COUNT(*) FROM acc1.v2;
+COUNT(*)
+68
+SELECT * FROM acc1.v3;
+?
+?
+?
+�+�+??????
+?
+?
+�
+?
+?
+?
+�+?
+?
+�
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+�
+�
+?
+?
+�
+�
+?
+?
+�
+�
+�
+�
+�
+�
+�
+?
+?
+�
+�
+�
+�
+?
+?
+??
+??
+��??�
+???�
+M acc2.v4;
+COUNT(*)
+68
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES swe7;
+SET CHARACTER_SET_SERVER=swe7;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+swe7
+SELECT @@character_set_results;
+@@character_set_results
+swe7
+SELECT @@character_set_connection;
+@@character_set_connection
+swe7
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('???\['),('????');
+END	AFTER	NULL		root?localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root?localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root?localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+????	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "A????")
+TestA????
+SELECT count(*) FROM acc2.v1;
+count(*)
+62
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+62
+INSERT INTO acc2.t1 VALUES('
+SELECT COUNT(*) FROM acc1.v2;
+COUNT(*)
+68
+SELECT * FROM acc1.v3;
+?
+?
+?
+\
+[
+??????
+?
+?
+|
+~
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+?
+??
+??
+?????
+???\[
+????
+?????
+???\[
+????
+?????
+???\[
+????
+?????
+???\[
+????
+?????
+???\[
+????
+SELECT COUNT(*) FROM acc2.v4;
+COUNT(*)
+68
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES big5;
+SET CHARACTER_SET_SERVER=big5;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+����� TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+big5
+SELECT @@character_set_results;
+@@character_set_results
+big5
+SELECT @@character_set_connection;
+@@character_set_connection
+big5
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('�G�F?��);
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "A??")
+TestA??
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES euckr;
+SET CHARACTER_SET_SERVER=euckr;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+���ӬѬ�	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+euckr
+SELECT @@character_set_results;
+@@character_set_results
+euckr
+SELECT @@character_set_connection;
+@@character_set_connection
+euckr
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('����������'),('?????'),('???��');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+�Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES armscii8;
+SET CHARACTER_SET_SERVER=armscii8;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+armscii8
+SELECT @@character_set_results;
+@@character_set_results
+armscii8
+SELECT @@character_set_connection;
+@@character_set_connection
+armscii8
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????��oot@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ"�
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES dec8;
+SET CHARACTER_SET_SERVER=dec8;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+�	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+dec8
+SELECT @@character_set_results;
+@@character_set_results
+dec8
+SELECT @@character_set_connection;
+@@character_set_connection
+dec8
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('�??�),('��'),('����');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+�	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+SELECT * FROM acc1.t1;
+a	data
+�	666
+§¶	666
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES cp850;
+SET CHARACTER_SET_SERVER=cp850;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+������	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+cp850
+SELECT @@character_set_results;
+@@character_set_results
+cp850
+SELECT @@character_set_connection;
+@@character_set_connection
+cp850
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('���'),('����'),('���);
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§�666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES hp8;
+SET CHARACTER_SET_SERVER=hp8;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+���VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+hp8
+SELECT @@character_set_results;
+@@character_set_results
+hp8
+SELECT @@character_set_connection;
+@@character_set_connection
+hp8
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('��),('ħ��'),('���;
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+��6	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES koi8r;
+SET CHARACTER_SET_SERVER=koi8r;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+���	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+koi8r
+SELECT @@character_set_results;
+@@character_set_results
+koi8r
+SELECT @@character_set_connection;
+@@character_set_connection
+koi8r
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('????');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+SELECT * FROM acc1.t1;
+a	data
+???	666
+§¶	666
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES ujis;
+SET CHARACTER_SET_SERVER=ujis;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+��󏫡��⏫�SE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+ujis
+SELECT @@character_set_results;
+@@character_set_results
+ujis
+SELECT @@character_set_connection;
+@@character_set_connection
+ujis
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('����������Џ��'),('����LL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 109);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+��������666	109
+§¶	666	109
+SELECT acc1.append("Test", "done");
+acc1.append("Test", "done")
+Testdone
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES sjis;
+SET CHARACTER_SET_SERVER=sjis;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+�����r�pHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('����?�}');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 120);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	120
+§¶	666	120
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒ�)
+TestAŒ�+SELECT * FROM acc1.t1;
+a	data
+???	666
+§¶	666
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES hebrew;
+SET CHARACTER_SET_SERVER=hebrew;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('����');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 200);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	200
+?�?�	666	200
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "A?�?�")
+TestA?�?�
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES cp866;
+SET CHARACTER_SET_SERVER=cp866;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+����ASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+cp866
+SELECT @@character_set_results;
+@@character_set_results
+cp866
+SELECT @@character_set_connection;
+@@character_set_connection
+cp866
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('????');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 200);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	200
+§¶	666	200
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES keybcs2;
+SET CHARACTER_SET_SERVER=keybcs2;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+?��???	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+keybcs2
+SELECT @@character_set_results;
+@@character_set_results
+keybcs2
+SELECT @@character_set_connection;
+@@character_set_connection
+keybcs2
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('�??��'),('??�);
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("test", 240);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	240
+test	666	240
+SELECT acc1.append("backup", "AŒœ");
+acc1.append("backup", "AŒœ")
+backupAŒœ
+SELECT * FROM acc1.t1;
+a	data
+???	666
+test	666
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES geostd8;
+SET CHARACTER_SET_SERVER=geostd8;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+geostd8
+SELECT @@character_set_results;
+@@character_set_results
+geostd8
+SELECT @@character_set_connection;
+@@character_set_connection
+geostd8
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('����');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES cp1256;
+SET CHARACTER_SET_SERVER=cp1256;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+???�	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+cp1256
+SELECT @@character_set_results;
+@@character_set_results
+cp1256
+SELECT @@character_set_connection;
+@@character_set_connection
+cp1256
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('?????'),('eneral_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+???	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒharacter sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES cp1257;
+SET CHARACTER_SET_SERVER=cp1257;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+??????	VIEW
+??????	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+cp1257
+SELECT @@character_set_results;
+@@character_set_results
+cp1257
+SELECT @@character_set_connection;
+@@character_set_connection
+cp1257
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('��??�'),('???�'),('��_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+�??	666	100
+§¶	666	100
+SELECT acc1.append("Test", "AŒœ");
+acc1.append("Test", "AŒœ")
+TestAŒœ
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES gbk;
+SET CHARACTER_SET_SERVER=gbk;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+?����?����	VIEW
+���ӧѧ�	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+gbk
+SELECT @@character_set_results;
+@@character_set_results
+gbk
+SELECT @@character_set_connection;
+@@character_set_connection
+gbk
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('?????'),('��????'),('???��);
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("ñ??	666	300
+ñÂÊ	666	300
+SELECT acc1.append("Ïœ±Ïœ")
+Ïœ±Ïœ±ååAŒœ
+SELECT * FROM acc1.t1;
+a	data
+???	666
+ñÂÊ	666
+**change character sets and again perform restore**
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+SET NAMES eucjpms;
+SET CHARACTER_SET_SERVER=eucjpms;
+RESTORE FROM 'acc.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW FULL TABLES FROM acc1;
+Tables_in_acc1	Table_type
+��󏫡��⏫�������	VIEW
+���ӧѧ�	BASE TABLE
+t1	BASE TABLE
+v2	VIEW
+v3	VIEW
+SHOW FULL TABLES FROM acc2;
+Tables_in_acc2	Table_type
+t1	BASE TABLE
+v1	VIEW
+v4	VIEW
+SELECT @@character_set_client;
+@@character_set_client
+eucjpms
+SELECT @@character_set_results;
+@@character_set_results
+eucjpms
+SELECT @@character_set_connection;
+@@character_set_connection
+eucjpms
+SHOW TRIGGERS FROM acc2;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	t1	BEGIN
+INSERT INTO acc1.v2 VALUES('��calhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;;
+Db	acc1
+Name	p1
+Type	PROCEDURE
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+SHOW FUNCTION STATUS;;
+Db	acc1
+Name	append
+Type	FUNCTION
+Definer	root@localhost
+Modified	#
+Created	#
+Security_type	#
+Comment	
+character_set_client	utf8
+collation_connection	utf8_general_ci
+Database Collation	utf8_general_ci
+CALL acc1.p1("ñÂÊ", 300);
+SELECT a,data,@z FROM acc1.t1;
+a	data	@z
+��������666	300
+ñ???	666	300
+SELECT acc1.append("Ïœ±Ïœ±åå", "attach");
+acc1.append("????±????±åå", "attach")
+????±????±attach
+SELECT * FROM acc1.t1;
+a	data
+��������666
+ñ???	666
+
+***  DROP bup_accented DATABASE ****
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;

=== added file 'mysql-test/suite/backup/r/backup_special_characters.result'
--- a/mysql-test/suite/backup/r/backup_special_characters.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/r/backup_special_characters.result	2009-02-04 18:06:32 +0000
@@ -0,0 +1,301 @@
+
+starting the test for backup
+
+DROP DATABASE IF EXISTS `sp!`;
+DROP DATABASE IF EXISTS `sp@`;
+SET NAMES utf8;
+SET CHARACTER_SET_SERVER=utf8;
+CREATE DATABASE `sp!` CHARACTER SET utf8;
+CREATE DATABASE `sp@` CHARACTER SET utf8;
+
+Creating table
+CREATE TABLE `sp!`.`####`(`$$` char(5));
+CREATE TABLE `sp@`.`%%`(`^^` char(20));
+INSERT INTO `sp!`.`####` VALUES 
+('!'),('@'),('#'),('$'),('%'),('^'),('&'),('*'),('('),(')'),
+('-'),('_'),('+'),('='),('|'),('\\'),('`'),('~'),('<'),('>'),
+(','),('.'),('?'),('/'),(';'),(':'),('"'),('['),(']'),('{'),
+('}');
+**Creating Views in database sp! **
+
+CREATE VIEW `sp!`.`v****` AS SELECT * FROM `sp!`.`####`;
+CREATE VIEW `sp!`.`v2%&` AS SELECT * FROM `sp!`.`v****`;
+CREATE VIEW `sp!`.`v3~~` AS SELECT * FROM `sp!`.`v2%&`;
+** Creating Views in database `sp@` **
+CREATE VIEW `sp@`.`v1@` AS SELECT * FROM `sp!`.`v****`;
+CREATE VIEW `sp@`.`v4&$` AS SELECT * FROM `sp!`.`v2%&`;
+CREATE TRIGGER `sp@`.trai AFTER INSERT ON `sp@`.`%%` FOR EACH ROW
+BEGIN
+INSERT INTO `sp!`.`v2%&` VALUES('(((('),('))))');
+END;
+||
+** Creating procedure**
+CREATE TABLE `sp!`.`^^`( special_character char(16) not null default '', data int not null);
+CREATE PROCEDURE `sp!`.`p*&`() INSERT INTO `^^` VALUES('%%%%', 100);
+CALL `sp!`.`p*&`();
+SELECT * FROM `sp!`.`^^`;
+special_character	data
+%%%%	100
+creating function
+INSERT INTO `sp!`.`^^` VALUES('&&&', 1),('***',10),('$$$',40),('@@@',100);
+CREATE FUNCTION `sp!`.`f@@`() RETURNS INT
+RETURN (SELECT DATA FROM `^^` WHERE DATA <= (SELECT SUM(DATA) FROM `^^`) ORDER BY DATA LIMIT 1);
+SELECT `sp!`.`f@@`();
+`sp!`.`f@@`()
+1
+SELECT special_character, `sp!`.`f@@`() FROM `sp!`.`^^` ORDER BY special_character;
+special_character	`sp!`.`f@@`()
+$$$	1
+%%%%	1
+&&&	1
+***	1
+@@@	1
+CREATE FUNCTION `sp!`.`@fun&`() returns INTEGER
+RETURN (SELECT COUNT(*) FROM `sp@`.`v4&$`);
+SELECT `sp!`.`@fun&`();
+`sp!`.`@fun&`()
+31
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+COUNT(*)
+31
+INSERT INTO `sp@`.`%%` VALUES('&&'),('**');
+SELECT * FROM `sp@`.`%%`;
+^^
+&&
+**
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+COUNT(*)
+35
+SELECT * FROM `sp!`.`v3~~`;
+$$
+!
+@
+#
+$
+%
+^
+&
+*
+(
+)
+-
+_
++
+=
+|
+\
+`
+~
+<
+>
+,
+.
+?
+/
+;
+:
+"
+[
+]
+{
+}
+((((
+))))
+((((
+))))
+SELECT COUNT(*) FROM `sp@`.`v4&$`;
+COUNT(*)
+35
+BACKUP DATABASE `sp!`, `sp@` to 'sp.bak';
+backup_id
+#
+DROP DATABASE `sp!`;
+DROP DATABASE `sp@`;
+RESTORE FROM 'sp.bak';
+backup_id
+#
+
+**Results after Restore**
+
+SHOW DATABASES;
+Database
+information_schema
+mysql
+sp!
+sp@
+test
+SHOW FULL TABLES FROM `sp!`;
+Tables_in_sp!	Table_type
+####	BASE TABLE
+^^	BASE TABLE
+v2%&	VIEW
+v3~~	VIEW
+v****	VIEW
+SHOW FULL TABLES FROM `sp@`;
+Tables_in_sp@	Table_type
+%%	BASE TABLE
+v1@	VIEW
+v4&$	VIEW
+SHOW TRIGGERS FROM `sp@`;
+Trigger	Event	Table	Statement	Timing	Created	sql_mode	Definer	character_set_client	collation_connection	Database Collation
+trai	INSERT	%%	BEGIN
+INSERT INTO `sp!`.`v2%&` VALUES('(((('),('))))');
+END	AFTER	NULL		root@localhost	utf8	utf8_general_ci	utf8_general_ci
+SHOW PROCEDURE STATUS;
+Db	Name	Type	Definer	Modified	Created	Security_type	Comment	character_set_client	collation_connection	Database Collation
+sp!	p*&	PROCEDURE	root@localhost	#	#	#		utf8	utf8_general_ci	utf8_general_ci
+SHOW FUNCTION STATUS;
+Db	Name	Type	Definer	Modified	Created	Security_type	Comment	character_set_client	collation_connection	Database Collation
+sp!	@fun&	FUNCTION	root@localhost	#	#	#		utf8	utf8_general_ci	utf8_general_ci
+sp!	f@@	FUNCTION	root@localhost	#	#	#		utf8	utf8_general_ci	utf8_general_ci
+**call procedures**
+CALL `sp!`.`p*&`();
+SELECT * FROM `sp!`.`^^`;
+special_character	data
+%%%%	100
+&&&	1
+***	10
+$$$	40
+@@@	100
+%%%%	100
+SELECT `sp!`.`@fun&`();
+`sp!`.`@fun&`()
+35
+SELECT * FROM `sp!`.`####`;
+$$
+!
+@
+#
+$
+%
+^
+&
+*
+(
+)
+-
+_
++
+=
+|
+\
+`
+~
+<
+>
+,
+.
+?
+/
+;
+:
+"
+[
+]
+{
+}
+((((
+))))
+((((
+))))
+SELECT COUNT(*) FROM `sp@`.`v1@`;
+COUNT(*)
+35
+SELECT COUNT(*) FROM `sp!`.`####`;
+COUNT(*)
+35
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+COUNT(*)
+35
+INSERT INTO `sp@`.`%%` VALUES('*'),('^');
+SELECT * FROM `sp@`.`%%`;
+^^
+&&
+**
+*
+^
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+COUNT(*)
+39
+SELECT * FROM `sp!`.`v3~~`;
+$$
+!
+@
+#
+$
+%
+^
+&
+*
+(
+)
+-
+_
++
+=
+|
+\
+`
+~
+<
+>
+,
+.
+?
+/
+;
+:
+"
+[
+]
+{
+}
+((((
+))))
+((((
+))))
+((((
+))))
+((((
+))))
+SELECT COUNT(*) FROM `sp@`.`v4&$`;
+COUNT(*)
+39
+change character set and perform restore again.
+SET NAMES latin5;
+RESTORE FROM 'sp.bak' OVERWRITE;
+backup_id
+#
+SHOW DATABASES;
+Database
+information_schema
+mysql
+sp!
+sp@
+test
+SHOW FULL TABLES FROM `sp!`;
+Tables_in_sp!	Table_type
+####	BASE TABLE
+^^	BASE TABLE
+v2%&	VIEW
+v3~~	VIEW
+v****	VIEW
+SHOW FULL TABLES FROM `sp@`;
+Tables_in_sp@	Table_type
+%%	BASE TABLE
+v1@	VIEW
+v4&$	VIEW
+SELECT@@character_set_client;
+@@character_set_client
+latin5
+SELECT@@character_set_connection;
+@@character_set_connection
+latin5
+SELECT@@character_set_results;
+@@character_set_results
+latin5
+
+***  DROP sp! and sp@ DATABASE ****
+
+DROP DATABASE `sp!`;
+DROP DATABASE `sp@`;

=== added file 'mysql-test/suite/backup/t/backup_accented.test'
--- a/mysql-test/suite/backup/t/backup_accented.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/t/backup_accented.test	2009-02-04 18:06:32 +0000
@@ -0,0 +1,799 @@
+###########################################################################
+# Author: Hema
+# Date: 2008-12-11
+# Purpose: use accented characters to define the objects and check for their
+# Backup and Restore.
+###############################################################################
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+connect (backup,localhost,root,,);
+connect (breakpoints,localhost,root,,);
+
+##############################################################
+--echo
+--echo starting the test for backup
+--echo
+##############################################################
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/master-data/acc.bak
+#Create Database.
+
+--disable_warnings
+DROP DATABASE IF EXISTS acc1;
+DROP DATABASE IF EXISTS acc2;
+--enable_warnings
+
+SET NAMES utf8;
+SET CHARACTER_SET_SERVER=utf8;
+CREATE DATABASE acc1 CHARACTER SET utf8;
+CREATE DATABASE acc2 CHARACTER SET utf8;
+USE acc1;
+
+####################################
+#CREATE TABLE WITH ACCENTED LETTERS#
+####################################
+
+--echo
+--echo Creating table
+
+CREATE TABLE `фывапр`(`ë` char(20) CHARACTER SET utf8);
+CREATE TABLE acc2.t1(a char(20)CHARACTER SET utf8);
+
+disable_warnings;
+INSERT INTO  `фывапр` VALUES
+('á'),( 'Ë'),('Ö'),('Ä'),('ÿáúëêà'),('ë'),('ñ'),('õ'),('ñ'),('Â'),('Ê'),('Î'),('Ô'),('Û'),('þ'),('Ø'),('ø'),('€'),('¥'),('£'),
+('¢'),('µ'),('±'),('¬'),('°'),('÷'),('Œ'),('œ'),('Ÿ'),('©'),('®'),('§'),
+('¶'),('П'),('Ф'),('щҖ'),('βϋ');
+
+--echo **Creating Views in database acc1 **
+--echo
+
+CREATE VIEW `ÿáúëêà` AS SELECT * FROM `фывапр`;
+CREATE VIEW v2 AS SELECT * FROM `ÿáúëêà`;
+CREATE VIEW v3 AS SELECT * FROM v2;
+
+--echo ** Creating Views in database acc2 **
+
+CREATE VIEW acc2.v1 AS SELECT * FROM acc1.`ÿáúëêà`;
+CREATE VIEW acc2.v4 AS SELECT * FROM acc1.v2;
+
+delimiter ||;
+
+CREATE TRIGGER acc2.trai AFTER INSERT ON acc2.t1 FOR EACH ROW
+BEGIN
+INSERT INTO acc1.v2 VALUES('ÆæÞþØ'),('áÏËÖÄ'),('£¢µTABLE acc1.t1 (a CHAR(16) NOT NULL DEFAULT '', data INT NOT NULL)||
+
+CREATE PROCEDURE acc1.p1(x char(16), y int)
+BEGIN
+  DECLARE z INT;
+  SET @z = y, z = 666;
+  INSERT INTO acc1.t1 VALUES (x, z);
+END||
+CALL acc1.p1("æÞþ", 19)||
+SELECT a,data,@z FROM t1||
+SELECT * FROM acc1.t1||
+
+delimiter ;||
+
+--echo **creating functions**
+
+CREATE FUNCTION append(s1 char(10), s2 char(10)) RETURNS CHAR(20)
+RETURN concat(s1, s2);
+
+SELECT append("œO acc2.t1 VALUES('÷'),('Œ'),('œ');
+SELECT * FROM acc2.t1;
+SELECT COUNT(*) FROM acc1.v2;
+SELECT * FROM acc1.v3;
+SELECT COUNT(*) FROM acc2.v4;
+
+SELECT * FROM `фыCOUNT(*) FROM `ÿáúëêà`;
+SELECT COUNT(*) FROM acc2.v1;
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+
+--replace_column 1 #
+BACKUP DATABASE acc1, acc2 to 'acc.bak';
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("µ", 20);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("ë`фывапр`;
+SELECT COUNT(*) FROM acc2.v1;
+SELECT COUNT(*) FROM acc1.`фывапр`;
+
+SELECT COUNT(*) FROM acc1.v2;
+INSERT INTO acc2.t1 VALUES('Ώ'),('β'),('βЊ');
+SELECT * FROM acc2.t1;
+SELECT COUNT(*) FROM acc1.v2;
+SELECT * FROM acc1.v3;
+SELECT COUNT(*) FROM acc2.v4;
+
+--echo **change character set and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES latin5;
+SET CHARACTER_SET_SERVER=latin5;
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 10);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("TestingŸ®", "ActivityŒœ");
+SELECT * FROM acc1.t1;
+
+SELECT count(*) FROM acc2.v1;
+SELECT COUNT(*) FROM acc1.v2;
+INSERT INTO acc2.t1 VALUES('p');
+SELECT * FROM acc2.t1;
+SELECT COUNT(*) FROM acc1.v2;
+SELECT * FROM acc1.v3;
+SELECT COUNT(*) FROM acc2.v4;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES latin7;
+SET CHARACTER_SET_SERVER=latin7;
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+SELECT * FROM acc1.t1;
+
+SELECT count(*) FROM acc2.v1;
+SELECT COUNT(*) FROM acc1.v2;
+INSERT INTO acc2.t1 VALUES('œ'),('œž');
+SELECT * FROM acc2.t1;
+SELECT COUNT(*) FROM acc1.v2;
+SELECT * FROM acc1.v3;
+SELECT COUNT(*) FROM acc2.v4;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES swe7;
+SET CHARACTER_SET_SERVER=swe7;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+SELECT count(*) FROM acc2.v1;
+SELECT COUNT(*) FROM acc1.v2;
+INSERT INTO acc2.t1 VALUES('Ÿ'),('Ÿ@');
+SELECT * FROM acc2.t1;
+SELECT COUNT(*) FROM acc1.v2;
+SELECT * FROM acc1.v3;
+SELECT COUNT(*) FROM acc2.v4;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES big5;
+SET CHARACTER_SET_SERVER=big5;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES euckr;
+SET CHARACTER_SET_SERVER=euckr;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES armscii8;
+SET CHARACTER_SET_SERVER=armscii8;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES dec8;
+SET CHARACTER_SET_SERVER=dec8;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+SELECT * FROM acc1.t1;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES cp850;
+SET CHARACTER_SET_SERVER=cp850;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES hp8;
+SET CHARACTER_SET_SERVER=hp8;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES koi8r;
+SET CHARACTER_SET_SERVER=koi8r;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+SELECT * FROM acc1.t1;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES ujis;
+SET CHARACTER_SET_SERVER=ujis;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 109);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "done");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES sjis;
+SET CHARACTER_SET_SERVER=sjis;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 120);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+SELECT * FROM acc1.t1;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES hebrew;
+SET CHARACTER_SET_SERVER=hebrew;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 200);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES cp866;
+SET CHARACTER_SET_SERVER=cp866;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 200);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES keybcs2;
+SET CHARACTER_SET_SERVER=keybcs2;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("test", 240);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("backup", "AŒœ");
+SELECT * FROM acc1.t1;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES geostd8;
+SET CHARACTER_SET_SERVER=geostd8;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES cp1256;
+SET CHARACTER_SET_SERVER=cp1256;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES cp1257;
+SET CHARACTER_SET_SERVER=cp1257;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("§¶", 100);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append("Test", "AŒœ");
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES gbk;
+SET CHARACTER_SET_SERVER=gbk;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("ñÂpend("Ïœ±Ïœ±åå", "AŒœ");
+SELECT * FROM acc1.t1;
+
+--echo **change character sets and again perform restore**
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+SET NAMES eucjpms;
+SET CHARACTER_SET_SERVER=eucjpms;
+
+--replace_column 1 #
+RESTORE FROM 'acc.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+
+SHOW FULL TABLES FROM acc1;
+SHOW FULL TABLES FROM acc2;
+SELECT @@character_set_client;
+SELECT @@character_set_results;
+SELECT @@character_set_connection;
+SHOW TRIGGERS FROM acc2;
+
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+--query_vertical SHOW FUNCTION STATUS;
+
+CALL acc1.p1("ñÂÊ", 300);
+SELECT a,data,@z FROM acc1.t1;
+SELECT acc1.append(" Test cleanup section
+
+--echo
+--echo ***  DROP bup_accented DATABASE ****
+--echo
+
+DROP DATABASE acc1;
+DROP DATABASE acc2;
+
+--remove_file $MYSQLTEST_VARDIR/master-data/acc.bak
+

=== added file 'mysql-test/suite/backup/t/backup_special_characters.test'
--- a/mysql-test/suite/backup/t/backup_special_characters.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/backup/t/backup_special_characters.test	2009-02-04 18:06:32 +0000
@@ -0,0 +1,159 @@
+###########################################################################
+# Author: Hema
+# Date: 2008-12-11
+# Purpose: use special characters as identifiers to define the objects and check# for their Backup and Restore.
+###############################################################################
+--source include/have_innodb.inc
+--source include/not_embedded.inc
+
+connect (backup,localhost,root,,);
+connect (breakpoints,localhost,root,,);
+
+##############################################################
+--echo
+--echo starting the test for backup
+--echo
+##############################################################
+
+--error 0,1
+--remove_file $MYSQLTEST_VARDIR/master-data/sp.bak
+
+#Create Database.
+
+--disable_warnings
+DROP DATABASE IF EXISTS `sp!`;
+DROP DATABASE IF EXISTS `sp@`;
+--enable_warnings
+
+SET NAMES utf8;
+SET CHARACTER_SET_SERVER=utf8;
+CREATE DATABASE `sp!` CHARACTER SET utf8;
+CREATE DATABASE `sp@` CHARACTER SET utf8;
+
+#####################################
+#CREATE TABLE WITH SPECIAL CHARACTERS#
+#####################################
+
+--echo
+--echo Creating table
+
+CREATE TABLE `sp!`.`####`(`$$` char(5));
+CREATE TABLE `sp@`.`%%`(`^^` char(20));
+INSERT INTO `sp!`.`####` VALUES 
+('!'),('@'),('#'),('$'),('%'),('^'),('&'),('*'),('('),(')'),
+('-'),('_'),('+'),('='),('|'),('\\'),('`'),('~'),('<'),('>'),
+(','),('.'),('?'),('/'),(';'),(':'),('"'),('['),(']'),('{'),
+('}');
+
+--echo **Creating Views in database sp! **
+--echo
+
+CREATE VIEW `sp!`.`v****` AS SELECT * FROM `sp!`.`####`;
+CREATE VIEW `sp!`.`v2%&` AS SELECT * FROM `sp!`.`v****`;
+CREATE VIEW `sp!`.`v3~~` AS SELECT * FROM `sp!`.`v2%&`;
+
+--echo ** Creating Views in database `sp@` **
+
+CREATE VIEW `sp@`.`v1@` AS SELECT * FROM `sp!`.`v****`;
+CREATE VIEW `sp@`.`v4&$` AS SELECT * FROM `sp!`.`v2%&`;
+
+delimiter ||;
+
+CREATE TRIGGER `sp@`.trai AFTER INSERT ON `sp@`.`%%` FOR EACH ROW
+BEGIN
+INSERT INTO `sp!`.`v2%&` VALUES('(((('),('))))');
+END;
+||
+delimiter ;||
+
+--echo ** Creating procedure**
+
+CREATE TABLE `sp!`.`^^`( special_character char(16) not null default '', data int not null);
+CREATE PROCEDURE `sp!`.`p*&`() INSERT INTO `^^` VALUES('%%%%', 100);
+
+CALL `sp!`.`p*&`();
+SELECT * FROM `sp!`.`^^`;
+
+--echo creating function
+# Bug #38294 Server crash for Backup, if function with orderby clause & 
+#sum groupby operator
+INSERT INTO `sp!`.`^^` VALUES('&&&', 1),('***',10),('$$$',40),('@@@',100);
+CREATE FUNCTION `sp!`.`f@@`() RETURNS INT
+RETURN (SELECT DATA FROM `^^` WHERE DATA <= (SELECT SUM(DATA) FROM `^^`) ORDER BY DATA LIMIT 1);
+SELECT `sp!`.`f@@`();
+SELECT special_character, `sp!`.`f@@`() FROM `sp!`.`^^` ORDER BY special_character;
+
+CREATE FUNCTION `sp!`.`@fun&`() returns INTEGER
+RETURN (SELECT COUNT(*) FROM `sp@`.`v4&$`);
+SELECT `sp!`.`@fun&`();
+
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+INSERT INTO `sp@`.`%%` VALUES('&&'),('**');
+SELECT * FROM `sp@`.`%%`;
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+SELECT * FROM `sp!`.`v3~~`;
+SELECT COUNT(*) FROM `sp@`.`v4&$`;
+
+--replace_column 1 #
+BACKUP DATABASE `sp!`, `sp@` to 'sp.bak';
+DROP DATABASE `sp!`;
+DROP DATABASE `sp@`;
+
+--replace_column 1 #
+RESTORE FROM 'sp.bak';
+
+--echo
+--echo **Results after Restore**
+--echo
+
+SHOW DATABASES;
+SHOW FULL TABLES FROM `sp!`;
+SHOW FULL TABLES FROM `sp@`;
+SHOW TRIGGERS FROM `sp@`;
+--replace_column 5 # 6 # 7 #
+SHOW PROCEDURE STATUS;
+--replace_column 5 # 6 # 7 #
+SHOW FUNCTION STATUS;
+
+--echo **call procedures**
+CALL `sp!`.`p*&`();
+SELECT * FROM `sp!`.`^^`;
+
+SELECT `sp!`.`@fun&`();
+SELECT * FROM `sp!`.`####`;
+SELECT COUNT(*) FROM `sp@`.`v1@`;
+SELECT COUNT(*) FROM `sp!`.`####`;
+
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+INSERT INTO `sp@`.`%%` VALUES('*'),('^');
+SELECT * FROM `sp@`.`%%`;
+SELECT COUNT(*) FROM `sp!`.`v2%&`;
+SELECT * FROM `sp!`.`v3~~`;
+SELECT COUNT(*) FROM `sp@`.`v4&$`;
+
+--echo change character set and perform restore again.
+SET NAMES latin5;
+--replace_column 1 #
+RESTORE FROM 'sp.bak' OVERWRITE;
+SHOW DATABASES;
+SHOW FULL TABLES FROM `sp!`;
+SHOW FULL TABLES FROM `sp@`;
+
+#checking character set
+SELECT@@character_set_client;
+SELECT@@character_set_connection;
+SELECT@@character_set_results;
+
+# Test cleanup section
+
+--echo
+--echo ***  DROP sp! and sp@ DATABASE ****
+--echo
+
+DROP DATABASE `sp!`;
+DROP DATABASE `sp@`;
+
+--remove_file $MYSQLTEST_VARDIR/master-data/sp.bak
+
+
+

Thread
bzr commit into mysql-6.0-backup branch (hema:2757) Bug#38363Hema Sridharan4 Feb