~michaeleguo/ubuntu/trusty/percona-xtradb-cluster-5.5/arm64fix

« back to all changes in this revision

Viewing changes to packaging/rpm-uln/mysql-strmov.patch

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-10 14:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20140210144423-f2134l2gxuvq2m6l
Tags: upstream-5.5.34-25.9+dfsg
ImportĀ upstreamĀ versionĀ 5.5.34-25.9+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Remove overly optimistic definition of strmov() as stpcpy().
 
2
 
 
3
mysql uses this macro with overlapping source and destination strings,
 
4
which is verboten per spec, and fails on some Red Hat platforms.
 
5
Deleting the definition is sufficient to make it fall back to a
 
6
byte-at-a-time copy loop, which should consistently give the
 
7
expected behavior.
 
8
 
 
9
Note: the particular case that prompted this patch is reported and fixed
 
10
at http://bugs.mysql.com/bug.php?id=48864.  However, my faith in upstream's
 
11
ability to detect this type of error is low, and I also see little evidence
 
12
of any real performance gain from optimizing these calls.  So I'm keeping
 
13
this patch.
 
14
 
 
15
 
 
16
diff -Naur mysql-5.1.37.orig/include/m_string.h mysql-5.1.37/include/m_string.h
 
17
--- mysql-5.1.37.orig/include/m_string.h        2009-07-13 19:08:50.000000000 -0400
 
18
+++ mysql-5.1.37/include/m_string.h     2009-08-31 21:49:49.000000000 -0400
 
19
@@ -81,13 +81,6 @@
 
20
 extern void *(*my_str_malloc)(size_t);
 
21
 extern void (*my_str_free)(void *);
 
22
 
 
23
-#if defined(HAVE_STPCPY)
 
24
-#define strmov(A,B) stpcpy((A),(B))
 
25
-#ifndef stpcpy
 
26
-extern char *stpcpy(char *, const char *);     /* For AIX with gcc 2.95.3 */
 
27
-#endif
 
28
-#endif
 
29
-
 
30
 /* Declared in int2str() */
 
31
 extern char NEAR _dig_vec_upper[];
 
32
 extern char NEAR _dig_vec_lower[];