You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-27 21:01:50 +03:00
MCOL-129 INSERT/UPDATE strict mode support
This changes the warning for truncation to the correct MariaDB error code (1264). In addition it passes the strict mode up into the DML class to roll back correctly. It also sets the abort_on_warning flag for updates as this isn't set on the rnd_init phase but is needed for strict mode to work.
This commit is contained in:
@ -654,6 +654,14 @@ uint8_t WE_DMLCommandProc::processSingleInsert(messageqcpp::ByteStream& bs, std:
|
||||
}
|
||||
args.add(cols);
|
||||
err = IDBErrorInfo::instance()->errorMsg(WARN_DATA_TRUNC,args);
|
||||
// Strict mode enabled, so rollback on warning
|
||||
if (insertPkg.get_isWarnToError())
|
||||
{
|
||||
string applName ("SingleInsert");
|
||||
fWEWrapper.bulkRollback(tblOid,txnid.id,tableName.toString(),
|
||||
applName, false, err);
|
||||
BulkRollbackMgr::deleteMetaFile( tblOid );
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
@ -1243,7 +1251,15 @@ End-Disable use of MetaFile for bulk rollback support
|
||||
}
|
||||
args.add(cols);
|
||||
err = IDBErrorInfo::instance()->errorMsg(WARN_DATA_TRUNC,args);
|
||||
|
||||
|
||||
// Strict mode enabled, so rollback on warning
|
||||
if (insertPkg.get_isWarnToError())
|
||||
{
|
||||
string applName ("BatchInsert");
|
||||
fWEWrapper.bulkRollback(tblOid,txnid.id,tableName.toString(),
|
||||
applName, false, err);
|
||||
BulkRollbackMgr::deleteMetaFile( tblOid );
|
||||
}
|
||||
}
|
||||
//cout << "Batch insert return code " << rc << endl;
|
||||
return rc;
|
||||
|
Reference in New Issue
Block a user