From 38c3fd2099577b932999766df41c77a81429fdc4 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Tue, 30 Sep 2014 12:59:24 +0200 Subject: - Fix MDEV-6802 in a clean way. Add an union in the PARM structure to contain int values Use a cast to ptrdiff_t in MAPFAM/MXPFAM::InitDelete required by some compilers modified: storage/connect/array.cpp storage/connect/filamap.cpp storage/connect/filamtxt.cpp storage/connect/global.h - Suppress some GCC warnings modified: storage/connect/array.cpp storage/connect/filter.cpp storage/connect/tabdos.cpp storage/connect/tabmysql.cpp storage/connect/value.cpp --- storage/connect/array.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'storage/connect/array.cpp') diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 2519191f6e6..a2ee902bc59 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -130,7 +130,7 @@ PARRAY MakeValueArray(PGLOBAL g, PPARM pp) break; case TYPE_VOID: // Integer stored inside pp->Value - par->AddValue(g, (int)(uintptr_t)parmp->Value); + par->AddValue(g, parmp->Intval); break; } // endswitch valtyp @@ -609,13 +609,13 @@ int ARRAY::Convert(PGLOBAL g, int k, PVAL vp) Size = Nval; Nval = 0; - Vblp = Valblk->Allocate(g, Type, Len, 0, Size); + Vblp = Valblk->Allocate(g, Type, Len, prec, Size); if (!Valblk->GetMemp()) // The error message was built by PlgDBalloc return TYPE_ERROR; else - Value = AllocateValue(g, Type, Len, 0, NULL); + Value = AllocateValue(g, Type, Len, prec, NULL); /*********************************************************************/ /* Converting STRING to DATE can be done according to date format. */ -- cgit v1.2.1