1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-66 - Make the DDL and DML parsers re-entrant.

Serialize all DDL because the VVS can't handle modifying the same block simultaneously
Fix the CTRL+C logic in DML that caused COMMIT issues.
This commit is contained in:
David Hall
2016-07-20 10:13:28 -05:00
parent 3f16e1f4b1
commit 6d11ce030d
28 changed files with 1561 additions and 1027 deletions

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2014 InfiniDB, Inc.
Copyright (C) 2016 MariaDB Corporation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -159,8 +160,8 @@ uint8_t WE_DDLCommandProc::writeSystable(ByteStream& bs, std::string &err)
getColumnsForTable(sessionID, tableName.schema,tableName.table, columns);
column_iterator = columns.begin();
std::string tmpStr("");
column_iterator = columns.begin();
std::string tmpStr("");
while (column_iterator != columns.end())
{
@ -278,13 +279,17 @@ uint8_t WE_DDLCommandProc::writeSystable(ByteStream& bs, std::string &err)
++column_iterator;
}
//fWriteEngine.setDebugLevel(WriteEngine::DEBUG_3);
//fWEWrapper.setDebugLevel(WriteEngine::DEBUG_3);
fWEWrapper.setTransId(txnID);
fWEWrapper.setIsInsert(true);
fWEWrapper.setBulkFlag(false);
fWEWrapper.startTransaction(txnID);
if (0 != colStructs.size())
{
// MCOL-66 The DBRM can't handle concurrent transactions to sys tables
// TODO: This may be redundant
static boost::mutex dbrmMutex;
boost::mutex::scoped_lock lk(dbrmMutex);
error = fWEWrapper.insertColumnRec_SYS(txnID, colStructs, colValuesList,
dctnryStructList, dctnryValueList, SYSCOLUMN_BASE);
@ -683,7 +688,7 @@ uint8_t WE_DDLCommandProc::writeCreateSyscolumn(ByteStream& bs, std::string &err
colValuesList.push_back(colList[n]);
dctnryValueList.push_back(dctColList[n]);
}
//fWriteEngine.setDebugLevel(WriteEngine::DEBUG_3);
//fWEWrapper.setDebugLevel(WriteEngine::DEBUG_3);
error = fWEWrapper.insertColumnRec_SYS(txnID, colStructs, colValuesList,
dctnryStructList, dctnryValueList, SYSCOLUMN_BASE);
@ -1042,7 +1047,7 @@ uint8_t WE_DDLCommandProc::writeSyscolumn(ByteStream& bs, std::string & err)
colValuesList.push_back(colList[n]);
dctnryValueList.push_back(dctColList[n]);
}
//fWriteEngine.setDebugLevel(WriteEngine::DEBUG_3);
//fWEWrapper.setDebugLevel(WriteEngine::DEBUG_3);
fWEWrapper.setTransId(txnID);
fWEWrapper.setIsInsert(true);
fWEWrapper.setBulkFlag(false);

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2014 InfiniDB, Inc.
Copyright (C) 2016 MariaDB Corporation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -3068,10 +3069,10 @@ uint8_t WE_DMLCommandProc::processBulkRollback(messageqcpp::ByteStream& bs,
// but it shouldn't hurt to keep in here.
std::cout << "processBulkRollback";
bs >> tableLockID;
std::cout << ": tableLock-"<< tableLockID;
//std::cout << ": tableLock-"<< tableLockID;
bs >> tableOID;
std::cout << "; tableOID-" << tableOID;
//std::cout << "; tableOID-" << tableOID;
bs >> tableName;
if (tableName.length() == 0)