Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson 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.2466 06/05/11 14:13:14 msvensson@neptunus.(none) +6 -0
Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
- Check that length of value is longer than 1 before decrementing length by 2.
- Backport from 5.0, make it possible to use my_print_defaults in tests
mysql-test/std_data/bug15328.cnf
1.1 06/05/11 14:13:11 msvensson@neptunus.(none) +2 -0
New BitKeeper file ``mysql-test/std_data/bug15328.cnf''
mysql-test/std_data/bug15328.cnf
1.0 06/05/11 14:13:11 msvensson@neptunus.(none) +0 -0
BitKeeper file /home/msvensson/mysql/bug15328/my41-bug15328/mysql-test/std_data/bug15328.cnf
mysys/default.c
1.50 06/05/11 14:13:10 msvensson@neptunus.(none) +3 -1
Check that length of value is longer than 1 before deciding to decrement its length by 2.
mysql-test/t/mysqldump.test
1.42 06/05/11 14:13:10 msvensson@neptunus.(none) +8 -0
Test that my_print default don't segfault when encountering an option without closing "
mysql-test/r/mysqldump.result
1.51 06/05/11 14:13:10 msvensson@neptunus.(none) +1 -0
Update result
mysql-test/mysql-test-run.sh
1.265 06/05/11 14:13:10 msvensson@neptunus.(none) +3 -1
Backport from 5.0, make it possible to use my_print_defaults from tests
mysql-test/mysql-test-run.pl
1.65 06/05/11 14:13:10 msvensson@neptunus.(none) +8 -0
Backport from 5.0, make it possible to use my_print_defaults from tests
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug15328/my41-bug15328
--- 1.264/mysql-test/mysql-test-run.sh 2006-04-07 19:42:42 +02:00
+++ 1.265/mysql-test/mysql-test-run.sh 2006-05-11 14:13:10 +02:00
@@ -601,6 +601,7 @@
CLIENT_BINDIR="$BASEDIR/client"
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
WAIT_PID="$BASEDIR/extra/mysql_waitpid"
+ MYSQL_MY_PRINT_DEFAULTS="$BASEDIR/extra/my_print_defaults"
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqlmanagerc"
MYSQL_MANAGER="$BASEDIR/tools/mysqlmanager"
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqlmanager-pwgen"
@@ -661,6 +662,7 @@
MYSQL_BINLOG="$CLIENT_BINDIR/mysqlbinlog"
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
WAIT_PID="$CLIENT_BINDIR/mysql_waitpid"
+ MYSQL_MY_PRINT_DEFAULTS="$CLIENT_BINDIR/my_print_defaults"
MYSQL_MANAGER="$CLIENT_BINDIR/mysqlmanager"
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqlmanagerc"
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqlmanager-pwgen"
@@ -742,7 +744,7 @@
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_IMPORT MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
-export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
+export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR MYSQL_MY_PRINT_DEFAULTS
export NDB_TOOLS_DIR
export NDB_MGM
export NDB_BACKUP_DIR
--- 1.49/mysys/default.c 2005-05-02 17:11:31 +02:00
+++ 1.50/mysys/default.c 2006-05-11 14:13:10 +02:00
@@ -579,7 +579,9 @@
value_end=value;
/* remove quotes around argument */
- if ((*value == '\"' || *value == '\'') && *value == value_end[-1])
+ if ((*value == '\"' || *value == '\'') && /* First char is quote */
+ (value + 1 < value_end ) && /* String is longer than 1 */
+ *value == value_end[-1] ) /* First char is equal to last char */
{
value++;
value_end--;
--- 1.64/mysql-test/mysql-test-run.pl 2006-04-24 15:33:44 +02:00
+++ 1.65/mysql-test/mysql-test-run.pl 2006-05-11 14:13:10 +02:00
@@ -179,6 +179,7 @@
our $exe_mysql_fix_system_tables;
our $exe_mysqltest;
our $exe_slave_mysqld;
+our $exe_my_print_defaults;
our $opt_bench= 0;
our $opt_small_bench= 0;
@@ -893,6 +894,8 @@
"$path_client_bindir/mysqld-max");
$path_language= mtr_path_exists("$glob_basedir/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets");
+ $exe_my_print_defaults=
+ mtr_exe_exists("$path_client_bindir/my_print_defaults");
}
else
{
@@ -900,6 +903,8 @@
$exe_mysqld= mtr_exe_exists ("$glob_basedir/sql/mysqld");
$path_language= mtr_path_exists("$glob_basedir/sql/share/english/");
$path_charsetsdir= mtr_path_exists("$glob_basedir/sql/share/charsets");
+ $exe_my_print_defaults=
+ mtr_exe_exists("$glob_basedir/extra/my_print_defaults");
}
if ( $glob_use_embedded_server )
@@ -952,6 +957,8 @@
$exe_mysql_fix_system_tables=
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
"$glob_basedir/scripts/mysql_fix_privilege_tables");
+ $exe_my_print_defaults=
+ mtr_exe_exists("$path_client_bindir/my_print_defaults");
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
"$glob_basedir/share/english/");
@@ -2303,6 +2310,7 @@
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
+ $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
$ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok;
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
--- New file ---
+++ mysql-test/std_data/bug15328.cnf 06/05/11 14:13:11
[mysqldump]
fields-optionally-enclosed-by="
--- 1.50/mysql-test/r/mysqldump.result 2005-10-25 23:49:54 +02:00
+++ 1.51/mysql-test/r/mysqldump.result 2006-05-11 14:13:10 +02:00
@@ -1503,3 +1503,4 @@
a b
drop table t1;
+--fields-optionally-enclosed-by="
--- 1.41/mysql-test/t/mysqldump.test 2005-10-25 23:49:54 +02:00
+++ 1.42/mysql-test/t/mysqldump.test 2006-05-11 14:13:10 +02:00
@@ -647,4 +647,12 @@
select * from t1;
drop table t1;
+
+#
+# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
+#
+
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
+
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2466) BUG#15328 | msvensson | 11 May |