1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

Merge pull request #1 from mariadb-corporation/master

merge upstream
This commit is contained in:
Justin Swanhart
2016-05-29 13:49:46 -04:00
8 changed files with 43 additions and 107 deletions

View File

@ -256,7 +256,7 @@ cout << "Create table allocOIDs got the stating oid " << fStartingColOID << endl
errorMsg = "Error in getting objectid from oidmanager.";
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(1)Create table failed due to ");
args.add(errorMsg);
message.format(args);
result.message = message;
@ -347,7 +347,7 @@ cout << "create table got unknown exception" << endl;
result.result =(ResultCode) rc;
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(2)Create table failed due to ");
args.add(errorMsg);
message.format( args );
result.message = message;
@ -450,7 +450,7 @@ cout << "create table got unknown exception" << endl;
result.result =(ResultCode) rc;
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(3)Create table failed due to ");
args.add(errorMsg);
message.format( args );
result.message = message;
@ -555,7 +555,7 @@ cout << "create table got unknown exception" << endl;
result.result =(ResultCode) rc;
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(4)Create table failed due to ");
args.add(ex.what());
message.format( args );
result.message = message;
@ -649,7 +649,7 @@ cout << "Create table We_SVR_WRITE_CREATETABLEFILES: " << errorMsg << endl;
result.result = CREATE_ERROR;
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(5)Create table failed due to ");
args.add(ex.what());
message.format( args );
result.message = message;
@ -663,7 +663,7 @@ cout << "Create table We_SVR_WRITE_CREATETABLEFILES: " << errorMsg << endl;
result.result = CREATE_ERROR;
Message::Args args;
Message message(9);
args.add("Create table failed due to ");
args.add("(6)Create table failed due to ");
args.add(errorMsg);
message.format( args );
result.message = message;
@ -678,7 +678,7 @@ void CreateTableProcessor::rollBackCreateTable(const string& error, BRM::TxnID t
Message::Args args;
Message message(1);
args.add("Create table Failed: ");
args.add("(7)Create table Failed: ");
args.add(error);
args.add("");
args.add("");

View File

@ -1133,14 +1133,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
if (( compressionType > 0 ) && !(idbCompress.isCompressionAvail( compressionType )))
{
rc = 1;
#ifdef SKIP_IDB_COMPRESSION
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1457,14 +1450,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
if (( compressionType > 0 ) && !(idbCompress.isCompressionAvail( compressionType )))
{
rc = 1;
#ifdef SKIP_IDB_COMPRESSION
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -1598,14 +1584,7 @@ int ProcessDDLStatement(string& ddlStatement, string& schema, const string& tabl
if (( compressionType > 0 ) && !(idbCompress.isCompressionAvail( compressionType )))
{
rc = 1;
#ifdef SKIP_IDB_COMPRESSION
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
ci->alterTableState = cal_connection_info::NOT_ALTER;
ci->isAlter = false;
return rc;
@ -2067,14 +2046,7 @@ int ha_calpont_impl_create_(const char *name, TABLE *table_arg, HA_CREATE_INFO *
if ( ( compressiontype > 0 ) && !(idbCompress.isCompressionAvail( compressiontype )) )
{
rc = 1;
#ifdef SKIP_IDB_COMPRESSION
Message::Args args;
thd->get_stmt_da()->set_overwrite_status(true);
args.add("The compression type");
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)).c_str());
#else
thd->raise_error_printf(ER_INTERNAL_ERROR, (IDBErrorInfo::instance()->errorMsg(ERR_INVALID_COMPRESSION_TYPE)).c_str());
#endif
ci.alterTableState = cal_connection_info::NOT_ALTER;
ci.isAlter = false;
return rc;

View File

@ -135,11 +135,7 @@ namespace
}
}
// Enterprise View
#ifndef SKIP_VIEW
#include "ha_view.h"
#endif
namespace cal_impl_if {
@ -4580,17 +4576,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
string viewName = getViewName(table_ptr);
// Enterprise View
#ifdef SKIP_VIEW
if (table_ptr->view)
{
Message::Args args;
args.add("View");
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)), gwi);
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
// @todo process from subquery
if (table_ptr->derived)
{
@ -4621,7 +4606,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
gwi.tableMap[tan] = make_pair(0, table_ptr);
gwi.thd->infinidb_vtable.isUnion = true; //by-pass the 2nd pass of rnd_init
}
#ifndef SKIP_VIEW
else if (table_ptr->view)
{
View *view = new View(table_ptr->view->select_lex, &gwi);
@ -4630,7 +4614,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
gwi.viewList.push_back(view);
view->transform();
}
#endif
else
{
// check foreign engine tables

View File

@ -1114,9 +1114,9 @@ uint32_t doUpdateDelete(THD *thd)
roPair = csc->tableRID( aTableName );
}
catch (IDBExcept &ie) {
setError(thd, ER_UNKNOWN_TABLE,
ie.what());
return ER_UNKNOWN_TABLE;
// setError(thd, ER_UNKNOWN_TABLE, ie.what());
setError(thd, ER_INTERNAL_ERROR, ie.what());
return ER_INTERNAL_ERROR;
}
catch (std::exception&ex) {
setError(thd, ER_INTERNAL_ERROR,
@ -2393,16 +2393,6 @@ int ha_calpont_impl_rnd_init(TABLE* table)
return ER_INTERNAL_ERROR;
}
#ifdef SKIP_INSERT_SELECT
if (thd->infinidb_vtable.isInsertSelect)
{
Message::Args args;
args.add("Insert with Select");
setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
// mysql reads table twice for order by
if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_REDO_PHASE1 ||
thd->infinidb_vtable.vtable_state == THD::INFINIDB_ORDER_BY)
@ -3361,7 +3351,10 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
colrids = csc->columnRIDs(tableName);
}
catch (IDBExcept &ie) {
setError(thd, ER_UNKNOWN_TABLE, ie.what());
// TODO Can't use ERR_UNKNOWN_TABLE because it needs two
// arguments to format. Update setError to take vararg.
// setError(thd, ER_UNKNOWN_TABLE, ie.what());
setError(thd, ER_INTERNAL_ERROR, ie.what());
ci->rc = 5;
ci->singleInsert = true;
return;
@ -3759,8 +3752,8 @@ void ha_calpont_impl_start_bulk_insert(ha_rows rows, TABLE* table)
ci->tableOid = roPair.objnum;
}
catch (IDBExcept &ie) {
setError(thd, ER_UNKNOWN_TABLE,
ie.what());
setError(thd, ER_INTERNAL_ERROR, ie.what());
// setError(thd, ER_UNKNOWN_TABLE, ie.what());
}
catch (std::exception& ex) {
setError(thd, ER_INTERNAL_ERROR,
@ -4221,16 +4214,6 @@ int ha_calpont_impl_external_lock(THD *thd, TABLE* table, int lock_type)
if ( thd->infinidb_vtable.vtable_state == THD::INFINIDB_INIT )
return 0;
#ifdef SKIP_INSERT_SELECT
if (thd->infinidb_vtable.isInsertSelect)
{
Message::Args args;
args.add("Insert with Select");
setError(thd, ER_CHECK_NOT_IMPLEMENTED, (IDBErrorInfo::instance()->errorMsg(ERR_ENTERPRISE_ONLY, args)));
return ER_CHECK_NOT_IMPLEMENTED;
}
#endif
if (!thd->infinidb_vtable.cal_conn_info)
thd->infinidb_vtable.cal_conn_info = (void*)(new cal_connection_info());
cal_connection_info* ci = reinterpret_cast<cal_connection_info*>(thd->infinidb_vtable.cal_conn_info);