From 23cf2e3edce5b1b8a1b884be23554e2e1f376d32 Mon Sep 17 00:00:00 2001 From: David Hall Date: Tue, 6 Sep 2016 12:04:28 -0500 Subject: [PATCH] Remove #define SKIP_AUTOI. This is no longer used --- dbcon/mysql/ha_calpont_ddl.cpp | 66 ++----------------------------- writeengine/xml/we_xmlgenproc.cpp | 2 - 2 files changed, 4 insertions(+), 64 deletions(-) diff --git a/dbcon/mysql/ha_calpont_ddl.cpp b/dbcon/mysql/ha_calpont_ddl.cpp index 19c6f20db..6133778e5 100755 --- a/dbcon/mysql/ha_calpont_ddl.cpp +++ b/dbcon/mysql/ha_calpont_ddl.cpp @@ -99,9 +99,7 @@ typedef CalpontSelectExecutionPlan::ColumnMap::value_type CMVT_; ResourceManager rm; bool useHdfs = rm.useHdfs(); -#ifndef SKIP_AUTOI #include "ha_autoi.cpp" -#endif //convenience fcn inline uint32_t tid2sid(const uint32_t tid) @@ -805,21 +803,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl } try { -#ifndef SKIP_AUTOI - autoIncre = parseAutoincrementColumnComment(comment, startValue); -#else - algorithm::to_upper(comment); - if ( comment.find("AUTOINCREMENT") != string::npos ) - { - int rc = 1; - thd->get_stmt_da()->set_overwrite_status(true); - thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str()); - ci->alterTableState = cal_connection_info::NOT_ALTER; - ci->isAlter = false; - return rc; - } -#endif - + autoIncre = parseAutoincrementColumnComment(comment, startValue); if (autoIncre) { //Check whether there is a column with autoincrement already @@ -1155,21 +1139,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl } try { -#ifndef SKIP_AUTOI - autoIncre = parseAutoincrementColumnComment(comment, startValue); -#else - algorithm::to_upper(comment); - if ( comment.find("AUTOINCREMENT") != string::npos ) - { - int rc = 1; - thd->get_stmt_da()->set_overwrite_status(true); - thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str()); - ci->alterTableState = cal_connection_info::NOT_ALTER; - ci->isAlter = false; - return rc; - } -#endif - + autoIncre = parseAutoincrementColumnComment(comment, startValue); } catch (runtime_error& ex) { @@ -1473,21 +1443,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl try { -#ifndef SKIP_AUTOI - autoIncre = parseAutoincrementColumnComment(comment, startValue); -#else - algorithm::to_upper(comment); - if ( comment.find("AUTOINCREMENT") != string::npos ) - { - int rc = 1; - thd->get_stmt_da()->set_overwrite_status(true); - thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str()); - ci->alterTableState = cal_connection_info::NOT_ALTER; - ci->isAlter = false; - return rc; - } -#endif - + autoIncre = parseAutoincrementColumnComment(comment, startValue); } catch (runtime_error& ex) { @@ -1611,21 +1567,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl if ( comment.length() > 0 ) { try { -#ifndef SKIP_AUTOI - autoIncre = parseAutoincrementColumnComment(comment, startValue); -#else - algorithm::to_upper(comment); - if ( comment.find("AUTOINCREMENT") != string::npos ) - { - int rc = 1; - thd->get_stmt_da()->set_overwrite_status(true); - thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_CREATE_AUTOINCREMENT_NOT_SUPPORT)).c_str()); - ci->alterTableState = cal_connection_info::NOT_ALTER; - ci->isAlter = false; - return rc; - } -#endif - + autoIncre = parseAutoincrementColumnComment(comment, startValue); } catch (runtime_error& ex) { diff --git a/writeengine/xml/we_xmlgenproc.cpp b/writeengine/xml/we_xmlgenproc.cpp index 9e89e0395..4af528efa 100644 --- a/writeengine/xml/we_xmlgenproc.cpp +++ b/writeengine/xml/we_xmlgenproc.cpp @@ -312,14 +312,12 @@ bool XMLGenProc::makeColumnData(const CalpontSystemCatalog::TableName& table) xmlTextWriterWriteFormatAttribute(fWriter, BAD_CAST xmlTagTable[TAG_WIDTH], "%d", col->colType.colWidth); -#ifndef SKIP_AUTOI if (col->colType.autoincrement) { int autoInc = 1; xmlTextWriterWriteFormatAttribute(fWriter, BAD_CAST xmlTagTable[TAG_AUTOINCREMENT_FLAG], "%d",autoInc); } -#endif //need dictionary and decimal stuff if (col->colType.ddn.dictOID > 0)