integ/database/mariadb/centos/files/mariadb-strmov.patch
Scott Little 32e03b2cdd Relocate mariadb to stx-integ/database/mariadb
Move content from stx-gplv2 into stx-integ

Packages will be relocated to

stx-integ:
    base/
        bash
        cgcs-users
        cluster-resource-agents
        dpkg
        haproxy
        libfdt
        netpbm
        rpm

    database/
        mariadb

    filesystem/
        iscsi-initiator-utils

    filesystem/drbd/
        drbd-tools

    kernel/kernel-modules/
        drbd
        integrity
        intel-e1000e
        intel-i40e
        intel-i40evf
        intel-ixgbe
        intel-ixgbevf
        qat17
        tpmdd

    ldap/
        ldapscripts

    networking/
        iptables
        net-tools

Change-Id: Ibc2ad09bef7a7f40e337513a1694a22f38d7f4e9
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:31:55 -04:00

41 lines
1.3 KiB
Diff

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.
---
include/m_string.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/m_string.h b/include/m_string.h
index 7437ea8..bb3ab57 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -73,14 +73,6 @@
extern void *(*my_str_realloc)(void *, size_t);
extern void (*my_str_free)(void *);
-#ifdef DBUG_OFF
-#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
-#define strmov(A,B) __builtin_stpcpy((A),(B))
-#elif defined(HAVE_STPCPY)
-#define strmov(A,B) stpcpy((A),(B))
-#endif
-#endif
-
/* Declared in int2str() */
extern const char _dig_vec_upper[];
extern const char _dig_vec_lower[];
--
1.9.1