/* Copyright (c) 2003-2007 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include #define DBLQH_C #include "Dblqh.hpp" #include #define DEBUG(x) { ndbout << "LQH::" << x << endl; } void Dblqh::initData() { caddfragrecFileSize = ZADDFRAGREC_FILE_SIZE; cattrinbufFileSize = ZATTRINBUF_FILE_SIZE; c_no_attrinbuf_recs= ZATTRINBUF_FILE_SIZE; cdatabufFileSize = ZDATABUF_FILE_SIZE; cgcprecFileSize = ZGCPREC_FILE_SIZE; chostFileSize = MAX_NDB_NODES; clcpFileSize = ZNO_CONCURRENT_LCP; clfoFileSize = 0; clogFileFileSize = 0; clogPartFileSize = ZLOG_PART_FILE_SIZE; cpageRefFileSize = ZPAGE_REF_FILE_SIZE; cscanrecFileSize = 0; ctabrecFileSize = 0; ctcConnectrecFileSize = 0; ctcNodeFailrecFileSize = MAX_NDB_NODES; addFragRecord = 0; attrbuf = 0; databuf = 0; gcpRecord = 0; hostRecord = 0; lcpRecord = 0; logPartRecord = 0; logFileRecord = 0; logFileOperationRecord = 0; logPageRecord = 0; logPageRecordUnaligned= 0; pageRefRecord = 0; tablerec = 0; tcConnectionrec = 0; tcNodeFailRecord = 0; // Records with constant sizes cLqhTimeOutCount = 0; cLqhTimeOutCheckCount = 0; cbookedAccOps = 0; m_backup_ptr = RNIL; clogFileSize = 16; cmaxLogFilesInPageZero = 40; }//Dblqh::initData() void Dblqh::initRecords() { // Records with dynamic sizes addFragRecord = (AddFragRecord*)allocRecord("AddFragRecord", sizeof(AddFragRecord), caddfragrecFileSize); attrbuf = (Attrbuf*)allocRecord("Attrbuf", sizeof(Attrbuf), cattrinbufFileSize); databuf = (Databuf*)allocRecord("Databuf", sizeof(Databuf), cdatabufFileSize); gcpRecord = (GcpRecord*)allocRecord("GcpRecord", sizeof(GcpRecord), cgcprecFileSize); hostRecord = (HostRecord*)allocRecord("HostRecord", sizeof(HostRecord), chostFileSize); lcpRecord = (LcpRecord*)allocRecord("LcpRecord", sizeof(LcpRecord), clcpFileSize); for(Uint32 i = 0; i