summaryrefslogtreecommitdiff
path: root/storage/connect/tabfix.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2016-12-02 23:03:43 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2016-12-02 23:03:43 +0100
commit599d8cc2deee615526838ddc962778e51cd3a15a (patch)
tree03b377d18bb107521fb5327ff8015f7452517c0d /storage/connect/tabfix.cpp
parent2d78b25c49407fb3f17fd4e44b551e8b43ffa4b5 (diff)
downloadmariadb-git-599d8cc2deee615526838ddc962778e51cd3a15a.tar.gz
- MDEV-11366 SIGBUS errors in Connect Storage Engine for ArmHF and MIPS.
Fix includes launchpad fix plus more to cover writing BIN tables. modified: storage/connect/tabfix.cpp modified: storage/connect/value.cpp modified: storage/connect/value.h - Typo: Change the name of filamzip to filamgz to prepare future ZIP tables. modified: storage/connect/CMakeLists.txt added: storage/connect/filamgz.cpp added: storage/connect/filamgz.h deleted: storage/connect/filamzip.cpp deleted: storage/connect/filamzip.h modified: storage/connect/plgdbsem.h modified: storage/connect/reldef.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabdos.h modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp
Diffstat (limited to 'storage/connect/tabfix.cpp')
-rw-r--r--storage/connect/tabfix.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp
index 55c254f41ea..d99f7800f26 100644
--- a/storage/connect/tabfix.cpp
+++ b/storage/connect/tabfix.cpp
@@ -1,11 +1,11 @@
/************* TabFix C++ Program Source Code File (.CPP) **************/
/* PROGRAM NAME: TABFIX */
/* ------------- */
-/* Version 4.9 */
+/* Version 4.9.1 */
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
+/* (C) Copyright to the author Olivier BERTRAND 1998-2016 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -589,9 +589,10 @@ void BINCOL::WriteColumn(PGLOBAL g)
switch (Fmt) {
case 'X':
// Standard not converted values
- if (Eds && IsTypeChar(Buf_Type))
- *(longlong *)p = Value->GetBigintValue();
- else if (Value->GetBinValue(p, Long, Status)) {
+ if (Eds && IsTypeChar(Buf_Type)) {
+ if (Status)
+ Value->GetValueNonAligned<longlong>(p, Value->GetBigintValue());
+ } else if (Value->GetBinValue(p, Long, Status)) {
sprintf(g->Message, MSG(BIN_F_TOO_LONG),
Name, Value->GetSize(), Long);
longjmp(g->jumper[g->jump_level], 31);
@@ -605,7 +606,7 @@ void BINCOL::WriteColumn(PGLOBAL g)
sprintf(g->Message, MSG(VALUE_TOO_BIG), n, Name);
longjmp(g->jumper[g->jump_level], 31);
} else if (Status)
- *(short *)p = (short)n;
+ Value->GetValueNonAligned<short>(p, (short)n);
break;
case 'T': // Tiny integer
@@ -625,7 +626,7 @@ void BINCOL::WriteColumn(PGLOBAL g)
sprintf(g->Message, MSG(VALUE_TOO_BIG), n, Name);
longjmp(g->jumper[g->jump_level], 31);
} else if (Status)
- *(int *)p = Value->GetIntValue();
+ Value->GetValueNonAligned<int>(p, (int)n);
break;
case 'G': // Large (great) integer
@@ -636,12 +637,12 @@ void BINCOL::WriteColumn(PGLOBAL g)
case 'F': // Float
case 'R': // Real
if (Status)
- *(float *)p = (float)Value->GetFloatValue();
+ Value->GetValueNonAligned<float>(p, (float)Value->GetFloatValue());
break;
case 'D': // Double
if (Status)
- *(double *)p = Value->GetFloatValue();
+ Value->GetValueNonAligned<double>(p, Value->GetFloatValue());
break;
case 'C': // Characters