|
Mysql5Patches
Patches for MySQL 5
IntroductionThe code has been changed to make MySQL more manageable, available and scalable. Many problems remain to be solved to improve SMP performance. This is a good start. The v3 patch and all future patches will be published with a BSD license which applies to code we have added and changed. Original MySQL sources has a GPL license. These have the same functionality as the MySQL 4 patches. There are several patch sets:
SmpPerformance has results for a variety of MySQL versions on 4, 8 and 16 core servers. Feedback, Problems and CommentsUse the google-mysql-tools group DisclaimerWe have changed a lot of code. Not all of the changes are described here and some of the changes to default behavior from new my.cnf variables can break your applications. Unless your name rhymes with Domas, it might be better to take pieces of the patch rather than try to use all of it. The code has been tested on 32-bit and 64-bit Linux x86. We may have broken the build for other platforms. The embedded server, --with-embedded-server, cannot be built with these changes. We have broken the build for it. Many of the Makefile.in and Makefile.am files have been changed in the big patch because we changed InnoDB to use the top-level configure. If you try to install the big patch, treat it like installing from a source tree. AuthorsA lot of people have contributed to this:
The v2 patchThis has many new features and a few non-features. Embedded MySQL will not work with this patch.
The v3 patchThis has many new features and a few non-features. Embedded MySQL will not work with this patch. Also, I generated the patch after running 'make distclean' so there are some files that must be regenerated after this patch is applied, including sql_yacc.cc and sql_yacc.h. By doing this, the patch diff is smaller but maybe a bit confusing. Also, I did not update any of the files in libmysqld/ that are copied from sql/. The v4 patchThis makes InnoDB much faster on IO bound workloads and fixes bugs in new features. Not yet released
|
Sign in to add a comment
Wondering what the status is of getting the MySQL 4 patches to MySQL 5? I run a fairly large hosting company (Bluehost.com and Hostmonster.com). We host together about 500,000 domains. I REALLY need the feature that allows seeing the breakdown of queries by user. Is this something that is happening soon? If not, is there something I can do to speed it along. Perhaps a cash $$$ prize for the person that does it or something? I am VERY eager to get it added.
Thanks, Matt Heaton
All of the features are there. The description on this page was out of date.
Hi, any chance that the semi-sync replication could work on a Solaris SPARC version?
Patch was tried on 5.0.37, Fedora Core 6 with no concluding results except this error at make: slave.cc:3777: error: ‘LOCK_stats’ was not declared in this scope slave.cc:4060: error: ‘LOCK_stats’ was not declared in this scope
same error LOCK_stats
Until the next release of the patch, a version that compiles on old and new x86 platforms is at https://code.launchpad.net/~mdcallag/mysql-patch/mysql-5.0
I had a quick hack around in the source last night, and came up with a fix for the build errors in the 5.0.37 patch: http://notcoding.blogspot.com/2008/08/google-mysql-tools-fix-for-5037.html
Success/failure feedback is very welcome :-)
You say above: "We have changed a lot of code. Not all of the changes are described here and some of the changes to default behavior can break your applications. It is better to take pieces of the patch rather than try to use all of it."
I'm all for that, but can you make it easier on us and post the individual patch files?
Individual patches wouldn't be much of an improvement over the huge patch as they would be a diff against a heavily modified branch of 5.0.37. I am willing to work with anyone who wants to try to extract patches for some of the features. The SMP changes will have a separate patch that can apply to 5.0 and 5.1 latest. Eventually I will move some of the patches one at a time into a bzr branch and eventually MySQL will incorporate some of these.
I think I'm going to lift the innodb freeze patch out and apply it to 5.0.67 and create an isolated patch (assuming I don't get distracted).
I'll upload it when available.
Kevin (spinn3r.com)
5.0.37 V2 Patch configure options
Hi, I'm trying to compile v2 patched 5.0.37. I've noticed, that there are bunch of new configuration options: --with-perftools-dir=... --enable-perftools-tcmalloc --enable-perftools-atomic
I didn't see any visible effect on compilation using them. Are they real? Also, any idea if enable-perftools-atomic somehow related to smpfix patch?
I ended up statically compiling in tcmalloc, using: export CC=gcc export CXXFLAGS="-mtune=native -march=native -O3 -m64 -fno-implicit-templates -fno-exceptions -fno-rtti -felide-constructors -fomit-frame-pointer" export CFLAGS="-mtune=native -march=native -O3 -m64 -fomit-frame-pointer"
And applying
--with-mysqld-ldflags="-all-static -Wl,-L/usr/local/lib -ltcmalloc_minimal -lstdc++"
It works fine, not sure how safe it is, and also if -fomit-frame-pointer can cause any issues on Gnu/Linux x86_64 (I'm on Fedora 9 x86_64).
I also noticed --with-fast-mutexes configure option, any relation to the smpfix patch? Can someone share experience using these options in a real setup, is it safe? Any chance of getting V2 patch including smpfix for 5.0.67 or 5.1.?
Thanks Alex
Questions posted here linger until I stumble upon them. It is much better to post them to the mailing list. --with-perftools-dir, --enable-perftools-tcmalloc and --enable-perftools-atomic can be used to link with tcmalloc. We didn't have enough experience with it at the time to recommend its use to others.
The smpfix patch and the backport for --with-fast-mutexes are not related. The --with-fast-mutexes option enables useful stats for the SHOW GLOBAL MUTEX STATUS command. That output is useful for people who want to hack on mutex hot spots. It doesn't help much otherwise.
I think we build with --fno-omit-frame-pointer. Maybe you are on the bleeding edge with some of these things. The OurDelta? and Percona patches have a wider user base and we are trying to push our patches there and elsewhere.
There will probably be a v3 or v4 patch early next year based on 5.0.67.
Is anyone using any of these patches MySQL 5.1.xx running on x86_64?
Percona has many similar changes in XtraDB which is based on 5.1. The 1.0.3 InnoDB plugin has the faster rw-mutex changes. And MySQL 5.4 has the SMP patches and some IO patches, but that code is not yet beta. So you may have an easier time getting some of the functionality elsewhere.
Hi Mark,
i want userstats.patch to work with 5.1.35 .. can you please help out ?
I cannot but Percona can -- http://percona.com