Below is the list of changes that have just been committed into a local
5.0 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@stripped, 2006-07-24 18:05:00+02:00, msvensson@neptunus.(none) +5 -0
Bug#20145 perror segfault when call it with error nr
- Add test case(execute perror)
- Check if strerror has returned NULL and set msg to "Unknown Error" in that case
- Thanks to Steven Xie for pointing out how to fix.
extra/perror.c@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none) +4 -1
strerror might return NULL on Solaris 2.8
mysql-test/mysql-test-run.pl@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none)
+8 -0
Add possibility to execute perror from test case
mysql-test/r/have_perror.require@stripped, 2006-07-24 18:04:58+02:00,
msvensson@neptunus.(none) +2 -0
New BitKeeper file ``mysql-test/r/have_perror.require''
mysql-test/r/have_perror.require@stripped, 2006-07-24 18:04:58+02:00,
msvensson@neptunus.(none) +0 -0
mysql-test/r/perror.result@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none) +3
-0
New BitKeeper file ``mysql-test/r/perror.result''
mysql-test/r/perror.result@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none) +0
-0
mysql-test/t/perror.test@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none) +11
-0
New BitKeeper file ``mysql-test/t/perror.test''
mysql-test/t/perror.test@stripped, 2006-07-24 18:04:58+02:00, msvensson@neptunus.(none) +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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/my50-m-bug20145
--- 1.43/extra/perror.c 2006-07-24 18:05:05 +02:00
+++ 1.44/extra/perror.c 2006-07-24 18:05:05 +02:00
@@ -218,8 +218,11 @@ int main(int argc,char *argv[])
On some system, like NETWARE, strerror(unknown_error) returns a
string 'Unknown Error'. To avoid printing it we try to find the
error string by asking for an impossible big error message.
+
+ On Solaris 2.8 it might return NULL
*/
- msg= strerror(10000);
+ if ((msg= strerror(10000)) == NULL)
+ msg= "Unknown Error";
/*
Allocate a buffer for unknown_error since strerror always returns
--- 1.104/mysql-test/mysql-test-run.pl 2006-07-24 18:05:05 +02:00
+++ 1.105/mysql-test/mysql-test-run.pl 2006-07-24 18:05:05 +02:00
@@ -187,6 +187,7 @@ our $exe_mysqltest;
our $exe_slave_mysqld;
our $exe_im;
our $exe_my_print_defaults;
+our $exe_perror;
our $lib_udf_example;
our $exe_libtool;
@@ -1048,6 +1049,8 @@ sub executable_setup () {
$path_charsetsdir= mtr_path_exists("$glob_basedir/share/charsets");
$exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults");
+ $exe_perror=
+ mtr_exe_exists("$path_client_bindir/perror");
}
else
{
@@ -1060,6 +1063,8 @@ sub executable_setup () {
"$glob_basedir/server-tools/instance-manager/mysqlmanager");
$exe_my_print_defaults=
mtr_exe_exists("$glob_basedir/extra/my_print_defaults");
+ $exe_perror=
+ mtr_exe_exists("$glob_basedir/extra/perror");
}
if ( $glob_use_embedded_server )
@@ -1107,6 +1112,8 @@ sub executable_setup () {
"$glob_basedir/scripts/mysql_fix_privilege_tables");
$exe_my_print_defaults=
mtr_exe_exists("$path_client_bindir/my_print_defaults");
+ $exe_perror=
+ mtr_exe_exists("$path_client_bindir/perror");
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
"$glob_basedir/share/english/");
@@ -3103,6 +3110,7 @@ sub run_mysqltest ($) {
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
$ENV{'UDF_EXAMPLE_LIB'}=
($lib_udf_example ? basename($lib_udf_example) : "");
+ $ENV{'MY_PERROR'}= $exe_perror;
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
$ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir;
--- New file ---
+++ mysql-test/r/have_perror.require 06/07/24 18:04:58
have_perror
1
--- New file ---
+++ mysql-test/r/perror.result 06/07/24 18:04:58
MySQL error code 150: Foreign key constraint is incorrectly formed
Is a named type file
Didn't find key on read or update
--- New file ---
+++ mysql-test/t/perror.test 06/07/24 18:04:58
#
# Check if the variable MY_PERROR is set
#
--require r/have_perror.require
disable_query_log;
eval select LENGTH("$MY_PERROR") > 0 as "have_perror";
enable_query_log;
--exec $MY_PERROR 150
--exec $MY_PERROR --silent 120
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2234) BUG#20145 | msvensson | 24 Jul |