Below is the list of changes that have just been committed into a local
4.1 repository of patg. When patg 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
1.2453 05/10/25 14:50:08 patg@stripped +5 -0
BUG# 12123
Made change to mysqlimport to set character_set_database to binary to
make importing various charsets/columns work correctly.
mysql-test/t/mysqldump.test
1.41 05/10/25 14:49:54 patg@stripped +12 -0
BUG #12123
Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
show that this fix handles dumping and reloading of non-latin1 charsets
in table with different charset columns (mixing of charsets, also can be a
UTF table with latin1 tables). Note the select before and after dump and
restore - should be exact. (results of this)
mysql-test/r/mysqldump.result
1.50 05/10/25 14:49:54 patg@stripped +10 -0
BUG #12123
Added dumping and reloading (using mysql, mysqldump, and mysqlimport) to
show that this fix handles dumping and reloading of non-latin1 charsets
in table with different charset columns (mixing of charsets, also can be a
UTF table with latin1 tables). Note the select before and after dump and
restore - should be exact.
mysql-test/mysql-test-run.sh
1.256 05/10/25 14:49:54 patg@stripped +8 -1
BUG #12123
Added $MYSQL_IMPORT in order to test mysqlimport bug.
mysql-test/mysql-test-run.pl
1.49 05/10/25 14:49:54 patg@stripped +11 -0
BUG #12123
Added $MYSQL_IMPORT in order to test mysqlimport bug.
client/mysqlimport.c
1.52 05/10/25 14:49:54 patg@stripped +7 -0
BUG# 12123
Added 'set @@character_set_database=binary' to make loading of tables with
mixed charset types and non-latin characters load.
# 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: patg
# Host: krsna.patg.net
# Root: /home/patg/mysql-build/mysql-4.1
--- 1.51/client/mysqlimport.c 2005-09-07 15:49:57 -07:00
+++ 1.52/client/mysqlimport.c 2005-10-25 14:49:54 -07:00
@@ -517,6 +517,13 @@
free_defaults(argv_to_free);
return(1); /* purecov: deadcode */
}
+
+ if (mysql_query(sock, "set @@character_set_database=binary;"))
+ {
+ db_error(sock); /* We shall countinue here, if --force was given */
+ return(1);
+ }
+
if (lock_tables)
lock_table(sock, argc, argv);
for (; *argv != NULL; argv++)
--- 1.255/mysql-test/mysql-test-run.sh 2005-07-15 08:51:38 -07:00
+++ 1.256/mysql-test/mysql-test-run.sh 2005-10-25 14:49:54 -07:00
@@ -546,6 +546,11 @@
else
MYSQL_DUMP="$BASEDIR/client/mysqldump"
fi
+ if [ -f "$BASEDIR/client/.libs/mysqlimport" ] ; then
+ MYSQL_IMPORT="$BASEDIR/client/.libs/mysqlimport"
+ else
+ MYSQL_IMPORT="$BASEDIR/client/mysqlimport"
+ fi
if [ -f "$BASEDIR/client/.libs/mysqlbinlog" ] ; then
MYSQL_BINLOG="$BASEDIR/client/.libs/mysqlbinlog"
else
@@ -614,6 +619,7 @@
fi
MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
MYSQL_DUMP="$CLIENT_BINDIR/mysqldump"
+ MYSQL_IMPORT="$CLIENT_BINDIR/mysqlimport"
MYSQL_BINLOG="$CLIENT_BINDIR/mysqlbinlog"
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
WAIT_PID="$CLIENT_BINDIR/mysql_waitpid"
@@ -693,10 +699,11 @@
MYSQL_DUMP_DIR="$MYSQL_DUMP"
export MYSQL_DUMP_DIR
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD
$EXTRA_MYSQLDUMP_OPT"
+MYSQL_IMPORT="$MYSQL_IMPORT -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD
$EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR
$EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost
--port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD
--basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT
--socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
-export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
+export MYSQL MYSQL_DUMP MYSQL_IMPORT MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
export NDB_TOOLS_DIR
export NDB_MGM
--- 1.48/mysql-test/mysql-test-run.pl 2005-09-29 15:49:04 -07:00
+++ 1.49/mysql-test/mysql-test-run.pl 2005-10-25 14:49:54 -07:00
@@ -172,6 +172,7 @@
our $exe_mysql_client_test;
our $exe_mysqld;
our $exe_mysqldump; # Called from test case
+our $exe_mysqlimport; # Called from test case
our $exe_mysqlshow; # Called from test case
our $exe_mysql_fix_system_tables;
our $exe_mysqltest;
@@ -861,6 +862,7 @@
"/usr/bin/false");
}
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
+ $exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
@@ -2076,6 +2078,14 @@
$cmdline_mysqldump .=
" --debug=d:t:A,$opt_vardir/log/mysqldump.trace";
}
+ my $cmdline_mysqlimport= "$exe_mysqlimport -uroot " .
+ "--port=$master->[0]->{'path_myport'} " .
+ "--socket=$master->[0]->{'path_mysock'} --password=";
+ if ( $opt_debug )
+ {
+ $cmdline_mysqlimport .=
+ " --debug=d:t:A,$opt_vardir/log/mysqlimport.trace";
+ }
my $cmdline_mysqlshow= "$exe_mysqlshow -uroot " .
"--port=$master->[0]->{'path_myport'} " .
@@ -2126,6 +2136,7 @@
$ENV{'MYSQL'}= $cmdline_mysql;
$ENV{'MYSQL_DUMP'}= $cmdline_mysqldump;
+ $ENV{'MYSQL_IMPORT'}= $cmdline_mysqlimport;
$ENV{'MYSQL_SHOW'}= $cmdline_mysqlshow;
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
--- 1.49/mysql-test/r/mysqldump.result 2005-06-22 11:37:12 -07:00
+++ 1.50/mysql-test/r/mysqldump.result 2005-10-25 14:49:54 -07:00
@@ -1493,3 +1493,13 @@
</database>
</mysqldump>
drop table t1, t2;
+create table t1 (a text character set utf8, b text character set latin1);
+insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
+select * from t1;
+a b
+Osnabrück Köln
+test.t1: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
+select * from t1;
+a b
+Osnabrück Köln
+drop table t1;
--- 1.40/mysql-test/t/mysqldump.test 2005-09-29 10:23:12 -07:00
+++ 1.41/mysql-test/t/mysqldump.test 2005-10-25 14:49:54 -07:00
@@ -635,4 +635,16 @@
--exec $MYSQL_DUMP --skip-comments --xml --no-create-info test
drop table t1, t2;
+#
+# BUG #12123
+#
+create table t1 (a text character set utf8, b text character set latin1);
+insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
+select * from t1;
+--exec $MYSQL_DUMP --tab=$MYSQL_TEST_DIR/var/tmp/ test
+--exec $MYSQL test < $MYSQL_TEST_DIR/var/tmp/t1.sql
+--exec $MYSQL_IMPORT test $MYSQL_TEST_DIR/var/tmp/t1.txt
+select * from t1;
+
+drop table t1;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (patg:1.2453) BUG#12123 | Patrick Galbraith | 25 Oct |