diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-09-24 22:06:47 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-09-24 22:06:47 +0200 |
commit | 0585e168b60a114632b69d993f856b353f888e0d (patch) | |
tree | f5372f39a2b4330aac2fff5eeeb875b5a76c52a5 /mysql-5.5-strmov.patch | |
parent | 7a99df977043204c18a085228eafdf2976edf6cc (diff) |
mysql 5.5.6 first work
Diffstat (limited to 'mysql-5.5-strmov.patch')
-rw-r--r-- | mysql-5.5-strmov.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-5.5-strmov.patch b/mysql-5.5-strmov.patch new file mode 100644 index 0000000..6d28154 --- /dev/null +++ b/mysql-5.5-strmov.patch @@ -0,0 +1,32 @@ +Remove overly optimistic definition of strmov() as stpcpy(). + +mysql uses this macro with overlapping source and destination strings, +which is verboten per spec, and fails on some Red Hat platforms. +Deleting the definition is sufficient to make it fall back to a +byte-at-a-time copy loop, which should consistently give the +expected behavior. + +Note: the particular case that prompted this patch is reported and fixed +at http://bugs.mysql.com/bug.php?id=48864. However, my faith in upstream's +ability to detect this type of error is low, and I also see little evidence +of any real performance gain from optimizing these calls. So I'm keeping +this patch. + + +diff -up mysql-5.5.6-rc/include/m_string.h.orig mysql-5.5.6-rc/include/m_string.h +--- mysql-5.5.6-rc/include/m_string.h.orig 2010-09-17 22:48:10.000000000 +0200 ++++ mysql-5.5.6-rc/include/m_string.h 2010-09-24 19:22:01.948542880 +0200 +@@ -76,13 +76,6 @@ extern "C" { + extern void *(*my_str_malloc)(size_t); + extern void (*my_str_free)(void *); + +-#if defined(HAVE_STPCPY) +-#define strmov(A,B) stpcpy((A),(B)) +-#ifndef stpcpy +-extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */ +-#endif +-#endif +- + /* Declared in int2str() */ + extern char _dig_vec_upper[]; + extern char _dig_vec_lower[]; |