2009-09-01 03:35:23 +00:00
|
|
|
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.
|
|
|
|
|
2010-01-02 01:44:16 +00:00
|
|
|
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.
|
|
|
|
|
2009-09-01 03:35:23 +00:00
|
|
|
|
2013-10-09 15:55:08 +00:00
|
|
|
diff -up mysql-5.6.10/include/m_string.h.orig mysql-5.6.10/include/m_string.h
|
|
|
|
--- mysql-5.6.10/include/m_string.h.orig 2013-01-22 17:54:49.000000000 +0100
|
|
|
|
+++ mysql-5.6.10/include/m_string.h 2013-02-19 14:12:58.866241727 +0100
|
|
|
|
@@ -65,15 +65,6 @@ extern void *(*my_str_malloc)(size_t);
|
|
|
|
extern void *(*my_str_realloc)(void *, size_t);
|
2009-09-01 03:35:23 +00:00
|
|
|
extern void (*my_str_free)(void *);
|
|
|
|
|
2010-12-24 03:54:59 +00:00
|
|
|
-#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
|
|
|
-#define strmov(A,B) __builtin_stpcpy((A),(B))
|
|
|
|
-#elif defined(HAVE_STPCPY)
|
2009-09-01 03:35:23 +00:00
|
|
|
-#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() */
|
2010-12-24 03:54:59 +00:00
|
|
|
extern char _dig_vec_upper[];
|
|
|
|
extern char _dig_vec_lower[];
|