diff options
author | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2021-10-15 17:06:17 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2021-10-19 16:08:51 +0300 |
commit | a33c1082dab7ab4b08acf957d6364be95e4c6a9f (patch) | |
tree | fdb41b170bd0806d64f09bf0a20c28b8bc641eff /sql/sql_repl.cc | |
parent | f502ccbcb5dfce29067434885a23db8d1bd5f134 (diff) | |
download | mariadb-git-a33c1082dab7ab4b08acf957d6364be95e4c6a9f.tar.gz |
Fix MIPS build failure: Handle unaligned buffers in connect's TYPBLK class
On MIPS platforms (and probably others) unaligned memory access results in a
bus error. In the connect storage engine, block data for some data formats is
stored packed in memory and the TYPBLK class is used to read values from it.
Since TYPBLK does not have special handling for this packed memory, it can
quite easily result in unaligned memory accesses.
The simple way to fix this is to perform all accesses to the main buffer
through memcpy. With GCC and optimizations turned on, this call to memcpy is
completely optimized away on architectures where unaligned accesses are ok
(like x86).
Contributors:
James Cowgill <jcowgill@debian.org>
Diffstat (limited to 'sql/sql_repl.cc')
0 files changed, 0 insertions, 0 deletions