#At file:///data0/wl4227/mysql-6.0-backup/
2684 Hema Sridharan 2008-08-19
Modified WL#4227 according to review comments.
modified:
mysql-test/suite/backup/r/backup_functions.result
mysql-test/suite/backup/r/backup_procedures.result
mysql-test/suite/backup/r/backup_triggers.result
mysql-test/suite/backup/t/backup_functions.test
mysql-test/suite/backup/t/backup_procedures.test
mysql-test/suite/backup/t/backup_triggers.test
mysql-test/suite/backup_charsets/r/backup_datatypes.result
mysql-test/suite/backup_charsets/r/backup_functions.result
mysql-test/suite/backup_charsets/r/backup_partitions.result
mysql-test/suite/backup_charsets/r/backup_procedures.result
mysql-test/suite/backup_charsets/r/backup_triggers.result
mysql-test/suite/backup_charsets/t/backup_datatypes.test
mysql-test/suite/backup_charsets/t/backup_partitions.test
=== modified file 'mysql-test/suite/backup/r/backup_functions.result'
--- a/mysql-test/suite/backup/r/backup_functions.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/r/backup_functions.result 2008-08-19 19:30:57 +0000
@@ -168,13 +168,13 @@ Comment
character_set_client #
collation_connection #
Database Collation #
-backup data
+** Backup data **
BACKUP DATABASE bup_sfs TO 'bup_sfs.bak';
backup_id
#
dropping database.
DROP DATABASE bup_sfs;
-Restoring Database
+** Restoring Database **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
@@ -251,7 +251,7 @@ character_set_client #
collation_connection #
Database Collation #
INSERT INTO bup_sfs.players VALUES
-(57,'brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
+(57,'Brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
INSERT INTO bup_sfs.matches VALUES(11,2,6,0,3);
SELECT square_area(12);
square_area(12)
@@ -273,6 +273,7 @@ paymentno amount dollars(amount)
DROP DATABASE bup_sfs;
change SQL_MODE and then perform RESTORE operation
SET SQL_MODE=ANSI;
+** Restore **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
@@ -428,6 +429,7 @@ paymentno amount dollars(amount)
DROP DATABASE bup_sfs;
change SQL_MODE and then perform RESTORE
SET SQL_MODE=' ';
+** Restore **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
=== modified file 'mysql-test/suite/backup/r/backup_procedures.result'
--- a/mysql-test/suite/backup/r/backup_procedures.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/r/backup_procedures.result 2008-08-19 19:30:57 +0000
@@ -76,14 +76,14 @@ Comment
character_set_client #
collation_connection #
Database Collation #
-backup data
+** Backup data **
BACKUP DATABASE bup_sp TO 'bup_sp.bak';
backup_id
#
dropping database.
DROP DATABASE bup_sp;
-
+** Restore **
RESTORE FROM 'bup_sp.bak';
backup_id
#
=== modified file 'mysql-test/suite/backup/r/backup_triggers.result'
--- a/mysql-test/suite/backup/r/backup_triggers.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/r/backup_triggers.result 2008-08-19 19:30:57 +0000
@@ -60,38 +60,38 @@ END;
Creating trigger with event after Update
CREATE TRIGGER trau AFTER UPDATE ON t2 FOR EACH ROW
BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END;
||
Load data in to table
********Inserting Values in tables*********
INSERT INTO bup_ts.cap VALUES
-(1,'IND','chn',87874646468,'deli'),(2,'US','Austin',-6466547,'DC'),
-(3,'Russia','moscow',76487623235682,'moscow'),(4,'IND','bang',-83875477,'deli'),
-(5,'US','sacramento',-388348,'DC'),(6,'IND','jammu',3848488,'deli'),
-(7,'Russia','xx',-373788,'moscow'),(8,'IND','hyd',647747,'deli');
+(1,'IND','CHN',87874646468,'DELI'),(2,'US','AUSTIN',-6466547,'DC'),
+(3,'RUSSIA','MOSCOW',76487623235682,'MOSCOW'),(4,'IND','BANG',-83875477,'DELI'),
+(5,'US','SACREMENTO',-388348,'DC'),(6,'IND','JAMMU',3848488,'DELI'),
+(7,'RUSSIA','XX',-373788,'MOSCOW'),(8,'IND','HYD',647747,'DELI');
INSERT INTO bup_ts.city VALUES
(1,'aa','AD',263768),(2,'bb','PO',8839898),(3,'cc','KL',898778),
(4,'dd','IK',73287328),(5,'ee','YU',89399),(6,'ff','IL',90880),
(7,'gg','TY',345),(8,'hh','WE',9239084);
Updating the table to fire trigger with event update
-UPDATE cap SET capital='Delhi' WHERE country='IND';
-UPDATE cap SET capital='Washington DC' WHERE country='US';
+UPDATE cap SET capital='DELHI' WHERE country='IND';
+UPDATE cap SET capital='WASHINGTON DC' WHERE country='US';
SELECT @country as country, @capital_old as 'old capital',
@capital_new as 'new capital';
country old capital new capital
-US DC Washington DC
+US DC WASHINGTON DC
showing the tables to check the trigger is fired with event insert
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
selecting data from table city
SELECT * FROM bup_ts.city ORDER BY id;
id name ccode population
@@ -148,9 +148,9 @@ O
UPDATE t2 SET a='*' WHERE a='k';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
+O
+K
Show the data and Create statements
showing objects and create statements.
SHOW TRIGGERS;;
@@ -208,7 +208,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -226,18 +226,16 @@ population bigint(20) YES NULL
DESCRIBE t2;
Field Type Null Key Default Extra
a char(4) YES NULL
-backup data
+** Backup data **
BACKUP DATABASE bup_ts TO 'bup_ts.bak';
backup_id
#
dropping database.
DROP DATABASE bup_ts;
-perform restore
+** Restore **
RESTORE FROM 'bup_ts.bak';
backup_id
#
-show data and create statements after Restore
-showing objects and create statements
SHOW TRIGGERS;;
Trigger cap_tri
Event INSERT
@@ -293,7 +291,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -304,18 +302,18 @@ collation_connection #
Database Collation #
Inserting some more values in the table to check the trigger with event insert
INSERT INTO bup_ts.cap VALUES
-(9,'US','houston',-333995876778666565,'texas');
+(9,'US','HOUSTON',-333995876778666565,'TEXAS');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-9 US houston 0 texas
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+9 US HOUSTON 0 TEXAS
Deleting some rows from city to check the trigger with event delete
DELETE FROM city WHERE name='aa';
Checking table city and drop city
@@ -382,12 +380,12 @@ O
UPDATE t2 SET a='y' WHERE a='s1';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
Change sql mode and perform Restore and check the table contents.
SET SQL_MODE=TRADITIONAL;
@@ -449,7 +447,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -475,18 +473,18 @@ city varchar(20) YES NULL
population bigint(20) YES NULL
capital char(20) YES NULL
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(10,'India','Daund',36637782899,'maharashtra');
+INSERT INTO bup_ts.cap VALUES(10,'INDIA','DAUND',36637782899,'MAHARASHTRA');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-10 India Daund 36637782000 maharashtra
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+10 INDIA DAUND 36637782000 MAHARASHTRA
INSERT INTO bup_ts.t2 VALUES('i'),('w');
SELECT * FROM t3;
a
@@ -523,12 +521,12 @@ O
UPDATE t2 SET a='^' WHERE a='w';
SELECT * FROM t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
change of SQL mode
SET SQL_MODE=MAXDB;
@@ -536,18 +534,18 @@ RESTORE FROM 'bup_ts.bak';
backup_id
#
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(11,'UK','Edenburg',-36637782899,'london');
+INSERT INTO bup_ts.cap VALUES(11,'UK','EDENBURG',-36637782899,'LONDON');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-11 UK Edenburg 0 london
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+11 UK EDENBURG 0 LONDON
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h');
SELECT * FROM bup_ts.t3;
a
@@ -589,12 +587,12 @@ O
UPDATE t2 SET a='p' WHERE a='h';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
Chnage SQL mode and then perform Restore.
SET SQL_MODE=ANSI;
@@ -602,18 +600,18 @@ RESTORE FROM 'bup_ts.bak';
backup_id
#
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(12,'India','vooty',789,'Tamilnadu');
+INSERT INTO bup_ts.cap VALUES(12,'INDIA','VOOTY',789,'TAMILNADU');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-12 India vooty 0 Tamilnadu
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+12 INDIA VOOTY 0 TAMILNADU
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h'),('b');
SELECT * FROM bup_ts.t3;
a
@@ -660,12 +658,12 @@ O
UPDATE bup_ts.t2 SET a='#' WHERE a='w';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
*** DROP bup_ts DATABASE ****
=== modified file 'mysql-test/suite/backup/t/backup_functions.test'
--- a/mysql-test/suite/backup/t/backup_functions.test 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/t/backup_functions.test 2008-08-19 19:30:57 +0000
@@ -1,7 +1,7 @@
###########################################################################
# Author: Hema
# Date: 2008-03-11
-# Purpose: To test the metadata consistency of object (stored functions)
+# Purpose: To test the metadata consistency of object (stored functions)
# after backup and Restore.
###############################################################################
--source include/not_embedded.inc
@@ -126,8 +126,7 @@ SELECT fcount();
SELECT paymentno,amount, dollars(amount) FROM penalties;
--echo creating stored functions which is not dependent on table
#BUG#34868 Backup: restore failure if two procedures but this doesn't happen for
-# procedures in database, which has atleast one table
-
+#procedures in database, which has atleast one table
CREATE FUNCTION square_area(side tinyINT)
RETURNS FLOAT
@@ -144,14 +143,14 @@ describe penalties;
--query_vertical SHOW FUNCTION STATUS;
#Backup and restore data.
---echo backup data
+--echo ** Backup data **
--replace_column 1 #
BACKUP DATABASE bup_sfs TO 'bup_sfs.bak';
--echo dropping database.
DROP DATABASE bup_sfs;
---echo Restoring Database
+--echo ** Restoring Database **
# BUG#35118 Backup:Restore fails if previous create Procedure/Function/Trigger
# command fails
@@ -166,11 +165,10 @@ describe matches;
--replace_column 4 # 5 # 6 # 9 # 10 # 11 #
--query_vertical SHOW FUNCTION STATUS;
-#Again calling function to check if Sf are backed up and restored properly or
-# not.
+#Again calling function to check if they are restored properly or not.
INSERT INTO bup_sfs.players VALUES
-(57,'brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
+(57,'Brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
INSERT INTO bup_sfs.matches VALUES(11,2,6,0,3);
SELECT square_area(12);
@@ -179,12 +177,13 @@ SELECT number_of_players1();
SELECT fcount();
SELECT paymentno,amount, dollars(amount) FROM penalties WHERE paymentno<=3;
-#dropping Database again.
+#Dropping Database again.
DROP DATABASE bup_sfs;
--echo change SQL_MODE and then perform RESTORE operation
SET SQL_MODE=ANSI;
+--echo ** Restore **
--replace_column 1 #
RESTORE FROM 'bup_sfs.bak';
@@ -194,8 +193,7 @@ SELECT @@SQL_MODE;
--replace_column 4 # 5 # 6 # 9 # 10 # 11 #
--query_vertical SHOW FUNCTION STATUS;
-#Again calling function to check if Sf are backed up and restored
-#properly or not.
+#Again calling function to check if they are restored properly or not.
SELECT square_area(13);
SELECT number_of_players();
@@ -214,8 +212,7 @@ SELECT @@SQL_MODE;
--replace_column 4 # 5 # 6 # 9 # 10 # 11 #
--query_vertical SHOW FUNCTION STATUS;
-#Again calling function to check if Sf are backed up and restored properly
-#or not.
+#Again calling function to check if they are restored proeprly or not.
SELECT square_area(14);
SELECT number_of_players();
@@ -225,6 +222,7 @@ DROP DATABASE bup_sfs;
--echo change SQL_MODE and then perform RESTORE
SET SQL_MODE=' ';
+--echo ** Restore **
--replace_column 1 #
RESTORE FROM 'bup_sfs.bak';
@@ -236,8 +234,7 @@ describe matches;
--replace_column 4 # 5 # 6 # 9 # 10 # 11 #
--query_vertical SHOW FUNCTION STATUS;
-#Again calling function to check if Sf are backed up and restored properly
-# ornot
+#Again calling function to check if they are restored proeprly or not.
SELECT square_area(20);
SELECT number_of_players();
=== modified file 'mysql-test/suite/backup/t/backup_procedures.test'
--- a/mysql-test/suite/backup/t/backup_procedures.test 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/t/backup_procedures.test 2008-08-19 19:30:57 +0000
@@ -1,7 +1,7 @@
###########################################################################
# Author: Hema
# Date: 2008-03-11
-# Purpose: To test the metadata consistency object stored procedures for all
+# Purpose: To test the metadata consistency object stored procedures for all
# storage engines.
###############################################################################
--source include/not_embedded.inc
@@ -78,7 +78,7 @@ describe country;
#Backup and restore data.
---echo backup data
+--echo ** Backup data **
--echo
--replace_column 1 #
BACKUP DATABASE bup_sp TO 'bup_sp.bak';
@@ -86,7 +86,7 @@ BACKUP DATABASE bup_sp TO 'bup_sp.bak';
DROP DATABASE bup_sp;
#RESTORE FROM bup_sp.bak;
---echo
+--echo ** Restore **
--replace_column 1 #
RESTORE FROM 'bup_sp.bak';
@@ -96,7 +96,7 @@ describe country;
--replace_column 4 # 5 # 6 # 7 # 9 # 10 # 11 #
--query_vertical SHOW PROCEDURE STATUS;
-#Excercise the objects after restore to make sure if objects are backedup and
+#Excercise the objects after restore to make sure objects are
#restored properly.
INSERT INTO bup_sp.country VALUES
=== modified file 'mysql-test/suite/backup/t/backup_triggers.test'
--- a/mysql-test/suite/backup/t/backup_triggers.test 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup/t/backup_triggers.test 2008-08-19 19:30:57 +0000
@@ -99,7 +99,7 @@ CREATE TABLE bup_ts.t4(a CHAR(4));
--echo Creating trigger with event after insert
#BUG#34759 Server crash when backing-up database with after insert trigger with
-# event delete.
+#event delete.
delimiter ||;
@@ -113,7 +113,7 @@ END;
CREATE TRIGGER trau AFTER UPDATE ON t2 FOR EACH ROW
BEGIN
- INSERT INTO t4 VALUES('J'),('O'),('B');
+ INSERT INTO t4 VALUES('O'),('O'),('K');
END;
||
@@ -123,10 +123,10 @@ delimiter ;||
--echo ********Inserting Values in tables*********
INSERT INTO bup_ts.cap VALUES
-(1,'IND','chn',87874646468,'deli'),(2,'US','Austin',-6466547,'DC'),
-(3,'Russia','moscow',76487623235682,'moscow'),(4,'IND','bang',-83875477,'deli'),
-(5,'US','sacramento',-388348,'DC'),(6,'IND','jammu',3848488,'deli'),
-(7,'Russia','xx',-373788,'moscow'),(8,'IND','hyd',647747,'deli');
+(1,'IND','CHN',87874646468,'DELI'),(2,'US','AUSTIN',-6466547,'DC'),
+(3,'RUSSIA','MOSCOW',76487623235682,'MOSCOW'),(4,'IND','BANG',-83875477,'DELI'),
+(5,'US','SACREMENTO',-388348,'DC'),(6,'IND','JAMMU',3848488,'DELI'),
+(7,'RUSSIA','XX',-373788,'MOSCOW'),(8,'IND','HYD',647747,'DELI');
INSERT INTO bup_ts.city VALUES
(1,'aa','AD',263768),(2,'bb','PO',8839898),(3,'cc','KL',898778),
@@ -135,8 +135,8 @@ INSERT INTO bup_ts.city VALUES
--echo Updating the table to fire trigger with event update
-UPDATE cap SET capital='Delhi' WHERE country='IND';
-UPDATE cap SET capital='Washington DC' WHERE country='US';
+UPDATE cap SET capital='DELHI' WHERE country='IND';
+UPDATE cap SET capital='WASHINGTON DC' WHERE country='US';
SELECT @country as country, @capital_old as 'old capital',
@capital_new as 'new capital';
@@ -151,7 +151,7 @@ SELECT * FROM bup_ts.city ORDER BY id;
--echo deleting few rows from table city to fire trigger with event delete.
#*****Bug#35249******
#Here memory storage engine crashes if trigger is created
-# with event delete and executed.
+#with event delete and executed.
DELETE FROM bup_ts.city WHERE name='dd';
DELETE FROM bup_ts.city WHERE name='bb';
@@ -178,7 +178,7 @@ DESCRIBE city;
DESCRIBE t2;
#Backup and restore data.
---echo backup data
+--echo ** Backup data **
--replace_column 1 #
BACKUP DATABASE bup_ts TO 'bup_ts.bak';
@@ -186,19 +186,17 @@ BACKUP DATABASE bup_ts TO 'bup_ts.bak';
--echo dropping database.
DROP DATABASE bup_ts;
---echo perform restore
+--echo ** Restore **
--replace_column 1 #
RESTORE FROM 'bup_ts.bak';
---echo show data and create statements after Restore
---echo showing objects and create statements
--replace_column 9 # 10 # 11 #
--query_vertical SHOW TRIGGERS;
--echo Inserting some more values in the table to check the trigger with event insert
INSERT INTO bup_ts.cap VALUES
-(9,'US','houston',-333995876778666565,'texas');
+(9,'US','HOUSTON',-333995876778666565,'TEXAS');
SELECT * FROM bup_ts.cap ORDER BY id;
@@ -230,7 +228,7 @@ DESCRIBE cap;
--echo Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(10,'India','Daund',36637782899,'maharashtra');
+INSERT INTO bup_ts.cap VALUES(10,'INDIA','DAUND',36637782899,'MAHARASHTRA');
SELECT * FROM bup_ts.cap ORDER BY id;
INSERT INTO bup_ts.t2 VALUES('i'),('w');
SELECT * FROM t3;
@@ -247,7 +245,7 @@ RESTORE FROM 'bup_ts.bak';
--echo Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(11,'UK','Edenburg',-36637782899,'london');
+INSERT INTO bup_ts.cap VALUES(11,'UK','EDENBURG',-36637782899,'LONDON');
SELECT * FROM bup_ts.cap ORDER BY id;
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h');
SELECT * FROM bup_ts.t3;
@@ -264,7 +262,7 @@ RESTORE FROM 'bup_ts.bak';
--echo Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(12,'India','vooty',789,'Tamilnadu');
+INSERT INTO bup_ts.cap VALUES(12,'INDIA','VOOTY',789,'TAMILNADU');
SELECT * FROM bup_ts.cap ORDER BY id;
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h'),('b');
=== modified file 'mysql-test/suite/backup_charsets/r/backup_datatypes.result'
--- a/mysql-test/suite/backup_charsets/r/backup_datatypes.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/r/backup_datatypes.result 2008-08-19 19:30:57 +0000
@@ -95,7 +95,7 @@ queries tinytext YES NULL
query2 tinyblob YES NULL
extract longblob YES NULL
paras mediumtext YES NULL
-**backup data**
+** Backup data **
BACKUP DATABASE bup_datatype TO 'bup_datatype.bak';
backup_id
=== modified file 'mysql-test/suite/backup_charsets/r/backup_functions.result'
--- a/mysql-test/suite/backup_charsets/r/backup_functions.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/r/backup_functions.result 2008-08-19 19:30:57 +0000
@@ -175,13 +175,13 @@ Comment
character_set_client #
collation_connection #
Database Collation #
-backup data
+** Backup data **
BACKUP DATABASE bup_sfs TO 'bup_sfs.bak';
backup_id
#
dropping database.
DROP DATABASE bup_sfs;
-Restoring Database
+** Restoring Database **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
@@ -258,7 +258,7 @@ character_set_client #
collation_connection #
Database Collation #
INSERT INTO bup_sfs.players VALUES
-(57,'brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
+(57,'Brown','1971-08-17','M','1985'),(95,'Miller','1963-05-14','M','1972');
INSERT INTO bup_sfs.matches VALUES(11,2,6,0,3);
SELECT square_area(12);
square_area(12)
@@ -280,6 +280,7 @@ paymentno amount dollars(amount)
DROP DATABASE bup_sfs;
change SQL_MODE and then perform RESTORE operation
SET SQL_MODE=ANSI;
+** Restore **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
@@ -435,6 +436,7 @@ paymentno amount dollars(amount)
DROP DATABASE bup_sfs;
change SQL_MODE and then perform RESTORE
SET SQL_MODE=' ';
+** Restore **
RESTORE FROM 'bup_sfs.bak';
backup_id
#
=== modified file 'mysql-test/suite/backup_charsets/r/backup_partitions.result'
--- a/mysql-test/suite/backup_charsets/r/backup_partitions.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/r/backup_partitions.result 2008-08-19 19:30:57 +0000
@@ -11,6 +11,7 @@ collation_database #
starting the test for backup
DROP DATABASE IF EXISTS partitions;
+*** The following defects were noticed while executing WL#4227 ***
Bug #34391 Character sets: crash if char(), utf32, innodb
Bug #33566 Backup: crash with partitions and Falcon
Bug #37551 Junk detected in data contents sometimes when utf8mb3
@@ -18,7 +19,7 @@ character set is used.
Bug #37554 Use of character set and collate as 'filename' shows
unusual behaviour.
Bug #35499 View when created with swe7 character set fails.
-Bug#38784 Mysql server crash if table is altered by partition changes.
+Bug #38784 Mysql server crash if table is altered by partition changes.
SET NAMES cset;
CREATE DATABASE partitions;
USE partitions;
=== modified file 'mysql-test/suite/backup_charsets/r/backup_procedures.result'
--- a/mysql-test/suite/backup_charsets/r/backup_procedures.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/r/backup_procedures.result 2008-08-19 19:30:57 +0000
@@ -83,14 +83,14 @@ Comment
character_set_client #
collation_connection #
Database Collation #
-backup data
+** Backup data **
BACKUP DATABASE bup_sp TO 'bup_sp.bak';
backup_id
#
dropping database.
DROP DATABASE bup_sp;
-
+** Restore **
RESTORE FROM 'bup_sp.bak';
backup_id
#
=== modified file 'mysql-test/suite/backup_charsets/r/backup_triggers.result'
--- a/mysql-test/suite/backup_charsets/r/backup_triggers.result 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/r/backup_triggers.result 2008-08-19 19:30:57 +0000
@@ -67,38 +67,38 @@ END;
Creating trigger with event after Update
CREATE TRIGGER trau AFTER UPDATE ON t2 FOR EACH ROW
BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END;
||
Load data in to table
********Inserting Values in tables*********
INSERT INTO bup_ts.cap VALUES
-(1,'IND','chn',87874646468,'deli'),(2,'US','Austin',-6466547,'DC'),
-(3,'Russia','moscow',76487623235682,'moscow'),(4,'IND','bang',-83875477,'deli'),
-(5,'US','sacramento',-388348,'DC'),(6,'IND','jammu',3848488,'deli'),
-(7,'Russia','xx',-373788,'moscow'),(8,'IND','hyd',647747,'deli');
+(1,'IND','CHN',87874646468,'DELI'),(2,'US','AUSTIN',-6466547,'DC'),
+(3,'RUSSIA','MOSCOW',76487623235682,'MOSCOW'),(4,'IND','BANG',-83875477,'DELI'),
+(5,'US','SACREMENTO',-388348,'DC'),(6,'IND','JAMMU',3848488,'DELI'),
+(7,'RUSSIA','XX',-373788,'MOSCOW'),(8,'IND','HYD',647747,'DELI');
INSERT INTO bup_ts.city VALUES
(1,'aa','AD',263768),(2,'bb','PO',8839898),(3,'cc','KL',898778),
(4,'dd','IK',73287328),(5,'ee','YU',89399),(6,'ff','IL',90880),
(7,'gg','TY',345),(8,'hh','WE',9239084);
Updating the table to fire trigger with event update
-UPDATE cap SET capital='Delhi' WHERE country='IND';
-UPDATE cap SET capital='Washington DC' WHERE country='US';
+UPDATE cap SET capital='DELHI' WHERE country='IND';
+UPDATE cap SET capital='WASHINGTON DC' WHERE country='US';
SELECT @country as country, @capital_old as 'old capital',
@capital_new as 'new capital';
country old capital new capital
-US DC Washington DC
+US DC WASHINGTON DC
showing the tables to check the trigger is fired with event insert
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
selecting data from table city
SELECT * FROM bup_ts.city ORDER BY id;
id name ccode population
@@ -155,9 +155,9 @@ O
UPDATE t2 SET a='*' WHERE a='k';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
+O
+K
Show the data and Create statements
showing objects and create statements.
SHOW TRIGGERS;;
@@ -215,7 +215,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -233,18 +233,16 @@ population bigint(20) YES NULL
DESCRIBE t2;
Field Type Null Key Default Extra
a char(4) YES NULL
-backup data
+** Backup data **
BACKUP DATABASE bup_ts TO 'bup_ts.bak';
backup_id
#
dropping database.
DROP DATABASE bup_ts;
-perform restore
+** Restore **
RESTORE FROM 'bup_ts.bak';
backup_id
#
-show data and create statements after Restore
-showing objects and create statements
SHOW TRIGGERS;;
Trigger cap_tri
Event INSERT
@@ -300,7 +298,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -311,18 +309,18 @@ collation_connection #
Database Collation #
Inserting some more values in the table to check the trigger with event insert
INSERT INTO bup_ts.cap VALUES
-(9,'US','houston',-333995876778666565,'texas');
+(9,'US','HOUSTON',-333995876778666565,'TEXAS');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-9 US houston 0 texas
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+9 US HOUSTON 0 TEXAS
Deleting some rows from city to check the trigger with event delete
DELETE FROM city WHERE name='aa';
Checking table city and drop city
@@ -389,12 +387,12 @@ O
UPDATE t2 SET a='y' WHERE a='s1';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
Change sql mode and perform Restore and check the table contents.
SET SQL_MODE=TRADITIONAL;
@@ -456,7 +454,7 @@ Trigger trau
Event UPDATE
Table t2
Statement BEGIN
-INSERT INTO t4 VALUES('J'),('O'),('B');
+INSERT INTO t4 VALUES('O'),('O'),('K');
END
Timing AFTER
Created NULL
@@ -482,18 +480,18 @@ city varchar(20) YES NULL
population bigint(20) YES NULL
capital char(20) YES NULL
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(10,'India','Daund',36637782899,'maharashtra');
+INSERT INTO bup_ts.cap VALUES(10,'INDIA','DAUND',36637782899,'MAHARASHTRA');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-10 India Daund 36637782000 maharashtra
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+10 INDIA DAUND 36637782000 MAHARASHTRA
INSERT INTO bup_ts.t2 VALUES('i'),('w');
SELECT * FROM t3;
a
@@ -530,12 +528,12 @@ O
UPDATE t2 SET a='^' WHERE a='w';
SELECT * FROM t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
change of SQL mode
SET SQL_MODE=MAXDB;
@@ -543,18 +541,18 @@ RESTORE FROM 'bup_ts.bak';
backup_id
#
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(11,'UK','Edenburg',-36637782899,'london');
+INSERT INTO bup_ts.cap VALUES(11,'UK','EDENBURG',-36637782899,'LONDON');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-11 UK Edenburg 0 london
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+11 UK EDENBURG 0 LONDON
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h');
SELECT * FROM bup_ts.t3;
a
@@ -596,12 +594,12 @@ O
UPDATE t2 SET a='p' WHERE a='h';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
DROP DATABASE bup_ts;
Chnage SQL mode and then perform Restore.
SET SQL_MODE=ANSI;
@@ -609,18 +607,18 @@ RESTORE FROM 'bup_ts.bak';
backup_id
#
Check contents after Restore and change of SQL mode
-INSERT INTO bup_ts.cap VALUES(12,'India','vooty',789,'Tamilnadu');
+INSERT INTO bup_ts.cap VALUES(12,'INDIA','VOOTY',789,'TAMILNADU');
SELECT * FROM bup_ts.cap ORDER BY id;
id country city population capital
-1 IND chn 87874646000 Delhi
-2 US Austin 0 Washington DC
-3 Russia moscow 76487623235000 moscow
-4 IND bang 0 Delhi
-5 US sacramento 0 Washington DC
-6 IND jammu 3848000 Delhi
-7 Russia xx 0 moscow
-8 IND hyd 647000 Delhi
-12 India vooty 0 Tamilnadu
+1 IND CHN 87874646000 DELHI
+2 US AUSTIN 0 WASHINGTON DC
+3 RUSSIA MOSCOW 76487623235000 MOSCOW
+4 IND BANG 0 DELHI
+5 US SACREMENTO 0 WASHINGTON DC
+6 IND JAMMU 3848000 DELHI
+7 RUSSIA XX 0 MOSCOW
+8 IND HYD 647000 DELHI
+12 INDIA VOOTY 0 TAMILNADU
INSERT INTO bup_ts.t2 VALUES('i'),('w'),('h'),('b');
SELECT * FROM bup_ts.t3;
a
@@ -667,12 +665,12 @@ O
UPDATE bup_ts.t2 SET a='#' WHERE a='w';
SELECT * FROM bup_ts.t4;
a
-J
O
-B
-J
O
-B
+K
+O
+O
+K
*** DROP bup_ts DATABASE ****
=== modified file 'mysql-test/suite/backup_charsets/t/backup_datatypes.test'
--- a/mysql-test/suite/backup_charsets/t/backup_datatypes.test 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/t/backup_datatypes.test 2008-08-19 19:30:57 +0000
@@ -37,7 +37,7 @@ USE bup_datatype;
--replace_result $coll coll
if(`SELECT '$coll'='latin2_czech_cs'`)
{
- skip "This test does'nt support latin2_czech_cs collation BUG#37854" ;
+ skip "This test doesn't support latin2_czech_cs collation BUG#37854" ;
}
#Create table and load with data.
@@ -88,7 +88,7 @@ SELECT * FROM d2;
DESCRIBE d1;
DESCRIBE d2;
---echo **backup data**
+--echo ** Backup data **
--echo
--replace_column 1 #
BACKUP DATABASE bup_datatype TO 'bup_datatype.bak';
=== modified file 'mysql-test/suite/backup_charsets/t/backup_partitions.test'
--- a/mysql-test/suite/backup_charsets/t/backup_partitions.test 2008-08-15 22:15:12 +0000
+++ b/mysql-test/suite/backup_charsets/t/backup_partitions.test 2008-08-19 19:30:57 +0000
@@ -2,7 +2,7 @@
# Author: Hema
# Date: 2008-06-28
# Purpose: To test the backup and Restore of different partitions using
-# Reserved words as identifiers for all Character sets, coll and SE
+# Reserved words as identifiers for all Character sets, coll and SE
###############################################################################
--source include/not_embedded.inc
--source include/have_debug.inc
@@ -27,6 +27,8 @@ connect (breakpoints,localhost,root,,);
DROP DATABASE IF EXISTS partitions;
--enable_warnings
+--echo *** The following defects were noticed while executing WL#4227 ***
+
--echo Bug #34391 Character sets: crash if char(), utf32, innodb
--echo Bug #33566 Backup: crash with partitions and Falcon
--echo Bug #37551 Junk detected in data contents sometimes when utf8mb3
@@ -34,14 +36,14 @@ DROP DATABASE IF EXISTS partitions;
--echo Bug #37554 Use of character set and collate as 'filename' shows
--echo unusual behaviour.
--echo Bug #35499 View when created with swe7 character set fails.
---echo Bug#38784 Mysql server crash if table is altered by partition changes.
+--echo Bug #38784 Mysql server crash if table is altered by partition changes.
#Bug #33566 Backup: crash with partitions and Falcon.
#Remove this condition once the bug#33566 is fixed.
--replace_result $ENGINE ENGINE
if(`SELECT '$ENGINE'='falcon'`)
{
- skip "This test does'nt support falcon engine BUG#33566" ;
+ skip "This test doesn't support falcon engine BUG#33566" ;
}
--replace_result $cset cset
@@ -188,7 +190,7 @@ ALTER TABLE `range` PARTITION BY KEY(DOB
#All the maintenence operations of partitions like ANALYZE, OPTIMIZE
#REPAIR are currently disabled in 6.0 and 5.0.
#Bug#20129
-# We can include these operations in the test case once this bug is fixed.
+#We can include these operations in the test case once this bug is fixed.
#Bug#38784 Mysql server crash if table is altered with partition changes.
#This happens only in Windows OS. The # can be removed once the bug#38784
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (hema:2684) WL#4227 | Hema Sridharan | 19 Aug |