Blame SOURCES/mysql-strmov.patch

80384c
Remove overly optimistic definition of strmov() as stpcpy().
80384c
80384c
mysql uses this macro with overlapping source and destination strings,
80384c
which is verboten per spec, and fails on some Red Hat platforms.
80384c
Deleting the definition is sufficient to make it fall back to a
80384c
byte-at-a-time copy loop, which should consistently give the
80384c
expected behavior.
80384c
80384c
Note: the particular case that prompted this patch is reported and fixed
80384c
at http://bugs.mysql.com/bug.php?id=48864.  However, my faith in upstream's
80384c
ability to detect this type of error is low, and I also see little evidence
80384c
of any real performance gain from optimizing these calls.  So I'm keeping
80384c
this patch.
80384c
80384c
80384c
diff -up mysql-5.6.10/include/m_string.h.orig mysql-5.6.10/include/m_string.h
80384c
--- mysql-5.6.10/include/m_string.h.orig	2013-01-22 17:54:49.000000000 +0100
80384c
+++ mysql-5.6.10/include/m_string.h	2013-02-19 14:12:58.866241727 +0100
80384c
@@ -65,15 +65,6 @@ extern void *(*my_str_malloc)(size_t);
80384c
 extern void *(*my_str_realloc)(void *, size_t);
80384c
 extern void (*my_str_free)(void *);
80384c
 
80384c
-#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
80384c
-#define strmov(A,B) __builtin_stpcpy((A),(B))
80384c
-#elif defined(HAVE_STPCPY)
80384c
-#define strmov(A,B) stpcpy((A),(B))
80384c
-#ifndef stpcpy
80384c
-extern char *stpcpy(char *, const char *);	/* For AIX with gcc 2.95.3 */
80384c
-#endif
80384c
-#endif
80384c
-
80384c
 /* Declared in int2str() */
80384c
 extern char _dig_vec_upper[];
80384c
 extern char _dig_vec_lower[];