From: Date: December 13 2006 9:40pm Subject: bk commit into 5.1 tree (jmiller:1.2377) BUG#15126 List-Archive: http://lists.mysql.com/commits/16915 X-Bug: 15126 Message-Id: <200612132040.kBDKe0QJ020471@ndb08.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of ndbdev. When ndbdev does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-12-13 21:39:50+01:00, jmiller@stripped +2 -0 rpl_collation_db.test, rpl_collation_db.result: Test Case for bug#15126. I was not able to reproduce the issue listed in the bug report, but I am wondering about the show database for Test #1. It shows to be 40100 DEFAULT CHARACTER SET latin1 eventhough both collation_database & character_set_database is set to utf8 mysql-test/r/rpl_collation_db.result@stripped, 2006-12-13 21:39:42+01:00, jmiller@stripped +393 -0 Test Case for bug#15126. I was not able to reproduce the issue listed in the bug report, but I am wondering about the show database for Test #1. It shows to be 40100 DEFAULT CHARACTER SET latin1 eventhough both collation_database & character_set_database is set to utf8 mysql-test/r/rpl_collation_db.result@stripped, 2006-12-13 21:39:42+01:00, jmiller@stripped +0 -0 mysql-test/t/rpl_collation_db.test@stripped, 2006-12-13 21:39:28+01:00, jmiller@stripped +326 -0 Test Case for bug#15126. I was not able to reproduce the issue listed in the bug report, but I am wondering about the show database for Test #1. It shows to be 40100 DEFAULT CHARACTER SET latin1 eventhough both collation_database & character_set_database is set to utf8 mysql-test/t/rpl_collation_db.test@stripped, 2006-12-13 21:39:28+01:00, jmiller@stripped +0 -0 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jmiller # Host: ndb08.mysql.com # Root: /data2/mysql-5.1-new-rpl --- New file --- +++ mysql-test/r/rpl_collation_db.result 06/12/13 21:39:42 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; DROP TABLE IF EXISTS foo.t1, foo.t2, foo.t3; Warnings: Note 1051 Unknown table 't1' Note 1051 Unknown table 't2' Note 1051 Unknown table 't3' DROP DATABASE IF EXISTS foo; Warnings: Note 1008 Can't drop database 'foo'; database doesn't exist "TEST #1: Set variables to utf8" SET collation_database=utf8_unicode_ci; SET character_set_database=utf8; SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database utf8_general_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database utf8 "** Create and show database Test 1 **" CREATE DATABASE foo; SHOW CREATE DATABASE foo; Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ "** Create Table test 1 **" CREATE TABLE foo.t1 (a text character set latin1, b text character set latin1); CREATE TABLE foo.t3 (a text character set utf8, b text character set latin1); CREATE TABLE foo.t2 (a text character set utf8, b text character set utf8); "** Insert Test 1 **" INSERT INTO foo.t1 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); INSERT INTO foo.t2 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); Warnings: Warning 1366 Incorrect string value: '\xF6ln' for column 'b' at row 1 INSERT INTO foo.t3 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); INSERT INTO foo.t1 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); INSERT INTO foo.t2 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); INSERT INTO foo.t3 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); "** Select on Master **" SELECT hex(a),hex(b) FROM foo.t1; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t2; hex(a) hex(b) 4F736E616272C3BC636B 4B 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t3; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load "** Dump Database and restore **" foo.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t3: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 "** Select on Master **" SELECT hex(a),hex(b) FROM foo.t1; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t2; hex(a) hex(b) 4F736E616272C3BC636B 4B 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t3; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load "** Sync slave Test 1 **" "** Show vars on Slave Test 1 **" SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database utf8_general_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database utf8 "** Select from Slave Test 1 **" SELECT hex(a),hex(b) FROM foo.t1; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t2; hex(a) hex(b) 4F736E616272C3BC636B 4B 02035F74657374696E67 D1915F6C6F6164 SELECT hex(a),hex(b) FROM foo.t3; hex(a) hex(b) 4F736E616272C3BC636B 4BF66C6E 02035F74657374696E67 D1915F6C6F6164 SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load "** Cleanup Test 1 **" " -- Test 2: Set back to latin1 and create utf8 database --" "** Reset vars **" SET collation_database=latin1_swedish_ci; SET character_set_database=latin1; "** Create database using utf8 **" CREATE DATABASE foo CHARACTER SET utf8 COLLATE utf8_general_ci; SHOW CREATE DATABASE foo; Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET utf8 */ "Restore tables in Test 2 **" foo.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t3: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 "** Select from Master Test 2 **" SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load "** Sync Slave Test 2 **" "** Show slave vars Test 2 **" SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database latin1_swedish_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database latin1 "** Select on Slave Test 2 **" SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load "** Cleanup for Test 2 **" ** Test 3: Create database with defaults ** SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database latin1_swedish_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database latin1 ** Create database Test 3 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ ** Restore Tables Test 3 ** foo.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t3: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 ** Select on Master Test 3 ** SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load ** Sync Slave Test 3 ** SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database latin1_swedish_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database latin1 ** Select on Slave Test 3 ** SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load ** Cleanup Test 3 ** ** Test 4: Create database and tables with defaults ** SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database latin1_swedish_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database latin1 ** Create Database Test 4 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ ** Create Table Test 4 *** create table foo.t1 (a text, b text); ** Restore data Test 4 ** LOAD DATA INFILE '/data2/mysql-5.1-new-rpl/mysql-test/var/tmp/t1.txt' INTO TABLE foo.t1; ** Select on Master Test 4 ** select * from foo.t1; a b Osnabrück Köln _testing Ñ‘_load ** Sync Slave Test 4 ** SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database latin1_swedish_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database latin1 ** Select on Slave Test 4 ** select * from foo.t1; a b Osnabrück Köln _testing Ñ‘_load ** Cleanup Test 4 ** ** Test 5: ucs2 testing ** SET collation_database=ucs2_unicode_ci; SET character_set_database=ucs2; SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database ucs2_general_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database ucs2 ** Create database Test 5 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; Database Create Database foo CREATE DATABASE `foo` /*!40100 DEFAULT CHARACTER SET latin1 */ ** Restore tables Test 5 ** foo.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 foo.t3: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0 ** Select on Master Test 5 ** SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load ** Sync Slave Test 5 ** SHOW VARIABLES LIKE "collation_database"; Variable_name Value collation_database ucs2_general_ci SHOW VARIABLES LIKE "character_set_database"; Variable_name Value character_set_database ucs2 ** Select on Slave Test 5 ** SELECT * FROM foo.t1; a b Osnabrück Köln _testing Ñ‘_load SELECT * FROM foo.t2; a b Osnabrück K _testing ?_load SELECT * FROM foo.t3; a b Osnabrück Köln _testing Ñ‘_load ** End of Testing Cleanup ** --- New file --- +++ mysql-test/t/rpl_collation_db.test 06/12/13 21:39:28 ################################################ # Author: Jeb # Date: 12-12-2006 # Purpose: Test case for Bug #15126 character_set_database # is not replicated (LOAD DATA INFILE need it) ################################################ --disable_warnings --disable_query_log source include/master-slave.inc; DROP TABLE IF EXISTS foo.t1, foo.t2, foo.t3; DROP DATABASE IF EXISTS foo; --enable_query_log --enable_warnings ### TEST #1: Set variables to utf8 --echo "TEST #1: Set variables to utf8" --echo SET collation_database=utf8_unicode_ci; SET character_set_database=utf8; SHOW VARIABLES LIKE "collation_database"; SHOW VARIABLES LIKE "character_set_database"; --echo --echo "** Create and show database Test 1 **" CREATE DATABASE foo; SHOW CREATE DATABASE foo; --echo --echo "** Create Table test 1 **" CREATE TABLE foo.t1 (a text character set latin1, b text character set latin1); CREATE TABLE foo.t3 (a text character set utf8, b text character set latin1); CREATE TABLE foo.t2 (a text character set utf8, b text character set utf8); --echo --echo "** Insert Test 1 **" INSERT INTO foo.t1 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); INSERT INTO foo.t2 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); INSERT INTO foo.t3 VALUES (0x4F736E616272C3BC636B, 0x4BF66C6E); INSERT INTO foo.t1 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); INSERT INTO foo.t2 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); INSERT INTO foo.t3 VALUES (concat(0x0203,'_testing'), 0xD1915F6C6F6164); --echo --echo "** Select on Master **" SELECT hex(a),hex(b) FROM foo.t1; --echo SELECT hex(a),hex(b) FROM foo.t2; --echo SELECT hex(a),hex(b) FROM foo.t3; --echo SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo "** Dump Database and restore **" --exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ foo --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t1.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t2.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t3.sql --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t1.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t2.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t3.txt --echo --echo "** Select on Master **" SELECT hex(a),hex(b) FROM foo.t1; --echo SELECT hex(a),hex(b) FROM foo.t2; --echo SELECT hex(a),hex(b) FROM foo.t3; --echo SELECT * FROM foo.t1; --echo --echo SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo "** Sync slave Test 1 **" --snyc_slave_with_master --echo "** Show vars on Slave Test 1 **" SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo "** Select from Slave Test 1 **" SELECT hex(a),hex(b) FROM foo.t1; --echo SELECT hex(a),hex(b) FROM foo.t2; --echo SELECT hex(a),hex(b) FROM foo.t3; --echo SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo "** Cleanup Test 1 **" --disable_query_log connection master; DROP TABLE foo.t1, foo.t2, foo.t3; DROP DATABASE foo; --snyc_slave_with_master --enable_query_log --echo # Test #2: Set back to latin1 and create utf8 database --echo " -- Test 2: Set back to latin1 and create utf8 database --" --echo connection master; --echo "** Reset vars **" SET collation_database=latin1_swedish_ci; SET character_set_database=latin1; --echo --echo "** Create database using utf8 **" CREATE DATABASE foo CHARACTER SET utf8 COLLATE utf8_general_ci; SHOW CREATE DATABASE foo; --echo --echo "Restore tables in Test 2 **" --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t1.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t2.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t3.sql --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t1.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t2.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t3.txt --echo --echo "** Select from Master Test 2 **" SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo "** Sync Slave Test 2 **" --snyc_slave_with_master --echo "** Show slave vars Test 2 **" SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo "** Select on Slave Test 2 **" SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo "** Cleanup for Test 2 **" --disable_query_log connection master; DROP TABLE foo.t1, foo.t2, foo.t3; DROP DATABASE foo; --snyc_slave_with_master --enable_query_log --echo # Test #3: Create database with defaults --echo ** Test 3: Create database with defaults ** connection master; SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Create database Test 3 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; --echo --echo ** Restore Tables Test 3 ** --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t1.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t2.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t3.sql --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t1.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t2.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t3.txt --echo --echo ** Select on Master Test 3 ** SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo ** Sync Slave Test 3 ** --snyc_slave_with_master SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Select on Slave Test 3 ** SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo ** Cleanup Test 3 ** --disable_query_log connection master; DROP TABLE foo.t1, foo.t2, foo.t3; DROP DATABASE foo; --snyc_slave_with_master --enable_query_log --echo --echo # Test #4: Create database and tables with defaults --echo ** Test 4: Create database and tables with defaults ** connection master; SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Create Database Test 4 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; --echo --echo ** Create Table Test 4 *** create table foo.t1 (a text, b text); --echo --echo ** Restore data Test 4 ** eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE foo.t1; --echo --echo ** Select on Master Test 4 ** select * from foo.t1; --echo --echo ** Sync Slave Test 4 ** --snyc_slave_with_master SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Select on Slave Test 4 ** select * from foo.t1; --echo --echo ** Cleanup Test 4 ** --disable_query_log connection master; DROP TABLE foo.t1; DROP DATABASE foo; --snyc_slave_with_master --enable_query_log --echo # Test #5: ucs2 testing --echo ** Test 5: ucs2 testing ** SET collation_database=ucs2_unicode_ci; SET character_set_database=ucs2; SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Create database Test 5 ** CREATE DATABASE foo; SHOW CREATE DATABASE foo; --echo --echo ** Restore tables Test 5 ** --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t1.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t2.sql --exec $MYSQL foo < $MYSQLTEST_VARDIR/tmp/t3.sql --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t1.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t2.txt --exec $MYSQL_IMPORT foo $MYSQLTEST_VARDIR/tmp/t3.txt --echo --echo ** Select on Master Test 5 ** SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo ** Sync Slave Test 5 ** --snyc_slave_with_master SHOW VARIABLES LIKE "collation_database"; --echo SHOW VARIABLES LIKE "character_set_database"; --echo --echo ** Select on Slave Test 5 ** SELECT * FROM foo.t1; --echo SELECT * FROM foo.t2; --echo SELECT * FROM foo.t3; --echo --echo ** End of Testing Cleanup ** --disable_query_log connection master; DROP TABLE foo.t1, foo.t2, foo.t3; DROP DATABASE foo; --snyc_slave_with_master --enable_query_log # End of 5.1 test case