Commit c69efab3 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix MDEV-16167 Cannot insert unsigned values into a VEC table

  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/tabvct.cpp

_ Typo
    modified:   storage/connect/CMakeLists.txt
parent 0138220f
...@@ -346,23 +346,6 @@ IF(WIN32) ...@@ -346,23 +346,6 @@ IF(WIN32)
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine) DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF(WIN32) ENDIF(WIN32)
IF(NOT TARGET connect)
RETURN()
ENDIF()
# Install some extra files that belong to connect engine
IF(WIN32)
# install ha_connect.lib
GET_TARGET_PROPERTY(CONNECT_LOCATION connect LOCATION)
STRING(REPLACE "dll" "lib" CONNECT_LIB ${CONNECT_LOCATION})
IF(CMAKE_CONFIGURATION_TYPES)
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
CONNECT_LIB ${CONNECT_LIB})
ENDIF()
INSTALL(FILES ${CONNECT_LIB}
DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF(WIN32)
IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND) IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
# TODO: Find how to compile and install the java wrapper classes # TODO: Find how to compile and install the java wrapper classes
# Find required libraries and include directories # Find required libraries and include directories
......
...@@ -515,7 +515,8 @@ bool VCTFAM::AllocateBuffer(PGLOBAL g) ...@@ -515,7 +515,8 @@ bool VCTFAM::AllocateBuffer(PGLOBAL g)
for (; cp; cp = (PVCTCOL)cp->Next) for (; cp; cp = (PVCTCOL)cp->Next)
cp->Blk = AllocValBlock(g, NewBlock + Nrec * cp->Deplac, cp->Blk = AllocValBlock(g, NewBlock + Nrec * cp->Deplac,
cp->Buf_Type, Nrec, cp->Format.Length, cp->Buf_Type, Nrec, cp->Format.Length,
cp->Format.Prec, chk); cp->Format.Prec, chk, true,
cp->IsUnsigned());
return InitInsert(g); // Initialize inserting return InitInsert(g); // Initialize inserting
} else { } else {
...@@ -549,7 +550,8 @@ bool VCTFAM::AllocateBuffer(PGLOBAL g) ...@@ -549,7 +550,8 @@ bool VCTFAM::AllocateBuffer(PGLOBAL g)
for (; cp; cp = (PVCTCOL)cp->Next) for (; cp; cp = (PVCTCOL)cp->Next)
if (!cp->IsSpecial()) // Not a pseudo column if (!cp->IsSpecial()) // Not a pseudo column
cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec, cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec,
cp->Format.Length, cp->Format.Prec); cp->Format.Length, cp->Format.Prec,
true, true, cp->IsUnsigned());
} //endif mode } //endif mode
...@@ -1516,7 +1518,8 @@ bool VCMFAM::AllocateBuffer(PGLOBAL g) ...@@ -1516,7 +1518,8 @@ bool VCMFAM::AllocateBuffer(PGLOBAL g)
for (cp = (PVCTCOL)Tdbp->GetColumns(); cp; cp = (PVCTCOL)cp->Next) for (cp = (PVCTCOL)Tdbp->GetColumns(); cp; cp = (PVCTCOL)cp->Next)
if (!cp->IsSpecial()) { // Not a pseudo column if (!cp->IsSpecial()) { // Not a pseudo column
cp->Blk = AllocValBlock(g, (void*)1, cp->Buf_Type, Nrec, cp->Blk = AllocValBlock(g, (void*)1, cp->Buf_Type, Nrec,
cp->Format.Length, cp->Format.Prec); cp->Format.Length, cp->Format.Prec,
true, true, cp->IsUnsigned());
cp->AddStatus(BUF_MAPPED); cp->AddStatus(BUF_MAPPED);
} // endif IsSpecial } // endif IsSpecial
...@@ -2067,7 +2070,7 @@ bool VECFAM::AllocateBuffer(PGLOBAL g) ...@@ -2067,7 +2070,7 @@ bool VECFAM::AllocateBuffer(PGLOBAL g)
for (cp = (PVCTCOL)tdbp->Columns; cp; cp = (PVCTCOL)cp->Next) for (cp = (PVCTCOL)tdbp->Columns; cp; cp = (PVCTCOL)cp->Next)
cp->Blk = AllocValBlock(g, To_Bufs[cp->Index - 1], cp->Blk = AllocValBlock(g, To_Bufs[cp->Index - 1],
cp->Buf_Type, Nrec, cp->Format.Length, cp->Buf_Type, Nrec, cp->Format.Length,
cp->Format.Prec, chk); cp->Format.Prec, chk, true, cp->IsUnsigned());
return InitInsert(g); return InitInsert(g);
} else { } else {
...@@ -2116,7 +2119,8 @@ bool VECFAM::AllocateBuffer(PGLOBAL g) ...@@ -2116,7 +2119,8 @@ bool VECFAM::AllocateBuffer(PGLOBAL g)
for (cp = (PVCTCOL)tdbp->Columns; cp; cp = (PVCTCOL)cp->Next) for (cp = (PVCTCOL)tdbp->Columns; cp; cp = (PVCTCOL)cp->Next)
if (!cp->IsSpecial()) // Not a pseudo column if (!cp->IsSpecial()) // Not a pseudo column
cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec, cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec,
cp->Format.Length, cp->Format.Prec); cp->Format.Length, cp->Format.Prec,
true, true, cp->IsUnsigned());
} // endif mode } // endif mode
...@@ -2887,7 +2891,8 @@ bool VMPFAM::AllocateBuffer(PGLOBAL g) ...@@ -2887,7 +2891,8 @@ bool VMPFAM::AllocateBuffer(PGLOBAL g)
for (cp = (PVCTCOL)Tdbp->GetColumns(); cp; cp = (PVCTCOL)cp->Next) for (cp = (PVCTCOL)Tdbp->GetColumns(); cp; cp = (PVCTCOL)cp->Next)
if (!cp->IsSpecial()) { // Not a pseudo column if (!cp->IsSpecial()) { // Not a pseudo column
cp->Blk = AllocValBlock(g, (void*)1, cp->Buf_Type, Nrec, cp->Blk = AllocValBlock(g, (void*)1, cp->Buf_Type, Nrec,
cp->Format.Length, cp->Format.Prec); cp->Format.Length, cp->Format.Prec,
true, true, cp->IsUnsigned());
cp->AddStatus(BUF_MAPPED); cp->AddStatus(BUF_MAPPED);
} // endif IsSpecial } // endif IsSpecial
...@@ -3669,7 +3674,7 @@ bool BGVFAM::AllocateBuffer(PGLOBAL g) ...@@ -3669,7 +3674,7 @@ bool BGVFAM::AllocateBuffer(PGLOBAL g)
for (; cp; cp = (PVCTCOL)cp->Next) for (; cp; cp = (PVCTCOL)cp->Next)
cp->Blk = AllocValBlock(g, NewBlock + Nrec * cp->Deplac, cp->Blk = AllocValBlock(g, NewBlock + Nrec * cp->Deplac,
cp->Buf_Type, Nrec, cp->Format.Length, cp->Buf_Type, Nrec, cp->Format.Length,
cp->Format.Prec, chk); cp->Format.Prec, chk, true, cp->IsUnsigned());
InitInsert(g); // Initialize inserting InitInsert(g); // Initialize inserting
...@@ -3717,7 +3722,8 @@ bool BGVFAM::AllocateBuffer(PGLOBAL g) ...@@ -3717,7 +3722,8 @@ bool BGVFAM::AllocateBuffer(PGLOBAL g)
for (; cp; cp = (PVCTCOL)cp->Next) for (; cp; cp = (PVCTCOL)cp->Next)
if (!cp->IsSpecial()) // Not a pseudo column if (!cp->IsSpecial()) // Not a pseudo column
cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec, cp->Blk = AllocValBlock(g, NULL, cp->Buf_Type, Nrec,
cp->Format.Length, cp->Format.Prec); cp->Format.Length, cp->Format.Prec,
true, true, cp->IsUnsigned());
} //endif mode } //endif mode
......
...@@ -456,13 +456,11 @@ bool VCTCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check) ...@@ -456,13 +456,11 @@ bool VCTCOL::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
if (tdbp->Txfp->GetAmType() == TYPE_AM_VMP && ok) { if (tdbp->Txfp->GetAmType() == TYPE_AM_VMP && ok) {
Blk = AllocValBlock(g, (void*)1, Buf_Type, tdbp->Txfp->Nrec, Blk = AllocValBlock(g, (void*)1, Buf_Type, tdbp->Txfp->Nrec,
Format.Length, Format.Length, Format.Prec, check, true, Unsigned);
Format.Prec, check);
Status |= BUF_MAPPED; // Will point into mapped file Status |= BUF_MAPPED; // Will point into mapped file
} else } else
Blk = AllocValBlock(g, NULL, Buf_Type, tdbp->Txfp->Nrec, Blk = AllocValBlock(g, NULL, Buf_Type, tdbp->Txfp->Nrec,
Format.Length, Format.Length, Format.Prec, check, true, Unsigned);
Format.Prec, check);
} // endif Mode } // endif Mode
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment