Bug #44832 Patches to MySQL 5.0.75 for Stratus OpenVOS port
Submitted: 12 May 2009 19:28 Modified: 13 Jun 2013 23:33
Reporter: Paul Green (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.0.75 OS:Other (OpenVOS)
Assigned to:
Tags: Contribution
Triage: Triaged: D4 (Minor)

[12 May 2009 19:28] Paul Green
Stratus Technologies has successfully ported MySQL Community Server, Release 5.0.75 to its Stratus OpenVOS Operating System, Release 17.0.1aq.

OpenVOS is a proprietary, fault-tolerant, 32-bit operating
system that runs on Intel Xeon(tm) processors.  OpenVOS data is
stored in Big-Endian format, and this is implemented by the
compilers.  Our binaries have a mandatory executable suffix.
Our file system enforces more restrictive object naming rules
that Unix or Linux.

A long description of this effort is available at http://lists.mysql.com/internals/36641

As this was a large effort and covered many different issues,
and since many of the issues were due to variations in the
OpenVOS implementation from de-facto industry standards, I don't
feel it is appropriate to request that the bulk of these changes
be applied to the source code base.  Instead, I will simply
single out a few key changes that I think you might find useful.

I will be happy to work with you to extract diffs for just these
changes if you wish to pursue them.  I welcome a dialogue; it is
hard for me to know which changes you might find useful.

It is possible that we may need or want to someday port a newer
version of MySQL, so Stratus would be delighted if at least the
following changes can be accepted.

     1.   Recognizing the OpenVOS platform.
     2.   Separating the build tree from the source tree.
     3.   Correcting 32-bit vs. 64-bit issues.
     4.   Not mangling pathnames that contain % characters.
     5.   Support for a big-endian Intel implementation.
     6.   Consistent treatment of executable suffixes.

Unified Differences Files

Please fetch the following text files to view the changes that
we made.  Here is a brief explanation of each file.  The files
are located in the following directory.  I will leave them here



     -- This file.


     -- Every change we made to the files in


     -- Every Makefile* change we made.  Most of these changes
        simply neutered the rules that rebuilt Makefile.in from
        Makefile.am, etc.


     -- Every non-Makefile* change we made.  This file, together
        with the mysql.vos.makefile.patch.txt file, contains all
        of the patches found in the mysql.vos.all.patch.txt


     -- A listing of the files we changed and the reasons why we
        changed each one, where I could remember.

If you have any questions, please feel free to contact me.

How to repeat:
Reproduction instructions aren't applicable.
[12 May 2009 21:24] Miguel Solorzano
Thank you for the bug report.
[14 May 2009 16:35] Sergei Golubchik
SCA is on the file.
[14 May 2009 21:52] Paul Green
I modified the following files to resolve the mangling of pathnames containing percent characters.  See the diff files for the precise changes.

mysql/mysql-test/lib/mtr_process.pl (see note below)
mysql/mysql-test/mysql-test-run.pl (see note below)

Note: These files were also changed for other reasons. I think the diff is pretty clear as to why each change was made.
[16 May 2009 12:57] Paul Green
I modified the following files to correct the inconsistent treatment of executable suffixes.

mysql/mysql-test/mysql-test-run-shell.sh (see note 1)
mysql/dbug/Makefile.am (see note 2)

Note 1: This file was modified for multiple reasons. Use care to take only the relevant changes:

@@ -61,9 +65,9 @@
     for dir in $PATH
-      if test -f $dir/$file
+      if test -f $dir/$file@EXEEXT@
-        echo "$dir/$file"
+        echo "$dir/$file@EXEEXT@"
         continue 2

Note 2: Similar to note 1. The other reason Makefile.am was modified was so that it would work in an environment where the build dir != source dir.
[16 May 2009 13:26] Paul Green
I modified the following files to resolve 32-bit versus 64-bit issues. Generally, these changes eliminated scary GCC/G++ warning messages.  Whenever possible, I tried to modify the code using techniques that I thought were general and appropriate to both platforms.  However, some of the changes were made near the end of the project (when we were running out of time) and may only be appropriate for a 32-bit environment).  Moreover, I did NOT take the time to test any of these changes on a 64-bit platform.  You should review them carefully before applying any of them to your source code.

mysql/innobase/configure.in (calculate SIZEOF_OFF_T)
mysql/innobase/ib_config.h.in (same)
mysql/innobase/os/os0file.c (use SIZEOF_OFF_T; see note 1)
mysql/sql/item_create.cc (note 2)
mysql/sql/mysqld.cc (notes 2 and 3)
mysql/sql/sql_class.cc (note 2)
mysql/sql/sql_show.cc (use SIZEOF_OFF_T; note 1)

Note 1: The method used in the unmodified code produces compilation errors on a 32-bit platform. By switching to compile-time macros, the compilation errors go away. Also, the new code is faster and (IMHO) easier to read.

Note 2: If I had audited code where a colleague of mine had depended upon the numeric constant -1 getting transformed into (say) ULONG_MAX, I would have not have approved this usage. I consider this usage to be an error-prone coding trick.

Note 3: This file was modified for multiple reasons. The 32-bit / 64-bit issues are in the huge initialization statement around line 6113.
[27 May 2009 22:42] Paul Green
I have ported the patches I made to mysql-5.0.75 forward to mysql-5.1.33.  I have also tried to cut down the set of changes to the bare minimum needed to get mysql-5.1.33 to build and execute on OpenVOS.  Some of the changes I had to make to 5.0.75 were already present in 5.1.33 and so those changes went away.  Of course, a few new changes showed up.  I've tried hard to make the changes in a way that is platform-independent, and mostly succeeded.

I touched 229 files in the patch set for 5.0.75.  I touched 26 files in the patch set for 5.1.75.

Much of the reduction comes from eliminating the Makefile changes and the test case changes.  I realize that these changes were of interest only to me.

I hope this greatly-reduced set of changes is easier to understand.

I am not quite done porting changes from 5.0.75 to 5.1.33 (for example, I have not ported the changes to get rid of gcc warnings), but I am making the diffs available now, and if I get some more time, will update the diff files and update this bug report.  I wanted to publish this work as soon as possible, in case I get pulled off onto another project.

One new, minor, gripe: version 5.1.33 adds a number of files that have a number-sign (aka sharp sign or #) in their name.  These new files appear below the mysql-test/std_data subdirectory.  This character is not in the POSIX portable character set, and as it happens, OpenVOS does not allow it in a file name.

See http://ftp.stratus.com/pub/vos/posix/source/mysql-5.1.33/mysql.html

[13 Jun 2013 23:33] Matt Lord
Thank you for your interest in MySQL, and for your interest in making MySQL an even better product!

I'm closing this Feature Request at this time, because OpenVOS is not a supported platform, and MySQL 5.0 is now in "sustaining support" mode, so no new releases will be made.


Thank you again!