From c896a50a5db3147bf3afd116d9c896aabd7f39a6 Mon Sep 17 00:00:00 2001 From: Alexey Antipovsky Date: Wed, 11 Nov 2020 16:19:07 +0300 Subject: [PATCH] Add copy assign operator (-Wdeprecated-copy) --- dbcon/execplan/calpontsystemcatalog.cpp | 20 ++++++++++++++++++++ dbcon/execplan/calpontsystemcatalog.h | 1 + 2 files changed, 21 insertions(+) diff --git a/dbcon/execplan/calpontsystemcatalog.cpp b/dbcon/execplan/calpontsystemcatalog.cpp index 15033b9bc..042abcc04 100644 --- a/dbcon/execplan/calpontsystemcatalog.cpp +++ b/dbcon/execplan/calpontsystemcatalog.cpp @@ -6121,6 +6121,26 @@ CalpontSystemCatalog::ColType::ColType(const ColType& rhs) cs = rhs.cs; } +CalpontSystemCatalog::ColType& CalpontSystemCatalog::ColType::operator=(const ColType& rhs) +{ + colWidth = rhs.colWidth; + constraintType = rhs.constraintType; + colDataType = rhs.colDataType; + ddn = rhs.ddn; + defaultValue = rhs.defaultValue; + colPosition = rhs.colPosition; + scale = rhs.scale; + precision = rhs.precision; + compressionType = rhs.compressionType; + columnOID = rhs.columnOID; + autoincrement = rhs.autoincrement; + nextvalue = rhs.nextvalue; + charsetNumber = rhs.charsetNumber; + cs = rhs.cs; + + return *this; +} + CHARSET_INFO* CalpontSystemCatalog::ColType::getCharset() { if (!cs) diff --git a/dbcon/execplan/calpontsystemcatalog.h b/dbcon/execplan/calpontsystemcatalog.h index fca5d717e..e59663375 100644 --- a/dbcon/execplan/calpontsystemcatalog.h +++ b/dbcon/execplan/calpontsystemcatalog.h @@ -301,6 +301,7 @@ public: const CHARSET_INFO* cs; ColType(const ColType& rhs); + ColType& operator=(const ColType& rhs); CHARSET_INFO* getCharset(); // for F&E use. only serialize necessary info for now