From 3c8a296f28b20e039994d6308c5fdbf181160929 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2005 17:24:39 +0200 Subject: [PATCH] bug#12950 ndb backup with charsets and simultanious updates make sure that backup _dont_ read xfrm data ndb/src/kernel/blocks/backup/Backup.cpp: Backup can do dirty read ndb/src/kernel/blocks/dbtup/Dbtup.hpp: Fix so that backup dont read xfrm data ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp: Fix so that backup dont read xfrm data --- ndb/src/kernel/blocks/backup/Backup.cpp | 1 + ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 3 ++- ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp | 12 +++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp index ec5c7a5d588..56af24c5cf0 100644 --- a/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/ndb/src/kernel/blocks/backup/Backup.cpp @@ -3265,6 +3265,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal) req->requestInfo = 0; req->savePointId = 0; req->tableId = table.tableId; + ScanFragReq::setReadCommittedFlag(req->requestInfo, 1); ScanFragReq::setLockMode(req->requestInfo, 0); ScanFragReq::setHoldLockFlag(req->requestInfo, 0); ScanFragReq::setKeyinfoFlag(req->requestInfo, 0); diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index dffafc1ab66..1cb3bd89997 100644 --- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -1737,7 +1737,8 @@ private: Uint32* const mainBuffer, Uint32& noMainWords, Uint32* const copyBuffer, - Uint32& noCopyWords); + Uint32& noCopyWords, + bool xfrm); void sendTrigAttrInfo(Signal* signal, Uint32* data, diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp index 0acfd390360..59a31475617 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp @@ -622,7 +622,8 @@ void Dbtup::executeTrigger(Signal* signal, mainBuffer, noMainWords, copyBuffer, - noCopyWords)) { + noCopyWords, + (ref == BACKUP ? false : true))) { ljam(); return; }//if @@ -727,7 +728,8 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, Uint32* const mainBuffer, Uint32& noMainWords, Uint32* const copyBuffer, - Uint32& noCopyWords) + Uint32& noCopyWords, + bool xfrm) { noCopyWords = 0; noMainWords = 0; @@ -757,7 +759,7 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, regTabPtr->noOfKeyAttr, keyBuffer, ZATTR_BUFFER_SIZE, - true); + xfrm); ndbrequire(ret != -1); noPrimKey= ret; @@ -800,7 +802,7 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, numAttrsToRead, mainBuffer, ZATTR_BUFFER_SIZE, - true); + xfrm); ndbrequire(ret != -1); noMainWords= ret; } else { @@ -826,7 +828,7 @@ bool Dbtup::readTriggerInfo(TupTriggerData* const trigPtr, numAttrsToRead, copyBuffer, ZATTR_BUFFER_SIZE, - true); + xfrm); ndbrequire(ret != -1); noCopyWords = ret;