// ServerTableManager.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "UtilErr.h"				// For FFThrowMiscUnknown.
#include "UtilStdLib.h"				// For m2_for.
#include "UtilVirtualTable.h"		// For FCTableName.
#include "File32.h"					// For FCFile32.
// 06.03.10 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
#include "CRCFileTmpl.h"			// For FCCRCFileTmpl32.
#include "VirtualWriteTable.h"		// For FCVirtualWriteTable.
#include "DbServer.h"				// For FCDbServer;
#include "ServerTableManager.h"		// This header.

// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmMiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
static const BYTE UNDO_CMD_NONE				= 0;	// _xZkqqHx_jGlDiMpIiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
static const BYTE UNDO_CMD_DELETE_DIRECTORY	= 1;	// _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoNiPjMiBeC_xHqqkZx_
static const BYTE UNDO_CMD_CREATE_DIRECTORY	= 2;	// _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoMjAkMiBeC_xHqqkZx_
static const BYTE UNDO_CMD_DELETE_FILE		= 3;	// _xZkqqHx_iDhEiDeAiDeDiDiLiNoNiPjMiBeC_xHqqkZx_
static const BYTE UNDO_CMD_CREATE_FILE		= 4;	// _xZkqqHx_iDhEiDeAiDeDiDiLiNoMjAkMiBeC_xHqqkZx_
static const BYTE UNDO_CMD_MODIFY_FILE		= 5;	// _xZkqqHx_iDhEiDeAiDeDiDiLiPeDjAlDiBeC_xHqqkZx_

// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmMiPeJjCfLiBeC_xHqqkZx_
#define FD_RECOVER_END_CODE ("?End*Of*File?")
#define FD_RECOVER_END_CODE_LEN (sizeof(FD_RECOVER_END_CODE) - 1)

// _xZkqqHx_iDhEiDeAiDeDiDiLiDiNiDgCiDeOiCkKiOlIjEhDiClFiClNiPoKiNiHiBeBiDgHiDiJiDeDiCnMiCmFiCmMiDeDiDjDiDfOiBfLiDgPiDiLiBeC_xHqqkZx_
#define FD_INTERVAL_FILE_LOCK_MILLISEC	500

// _xZkqqHx_iDhEiDeAiDeDiDiLiDfEiDeDiDfJiCmMiNmFjBoFjCgMiBgJiDgPiDeDiDgHjAjEiBgKiBeC_xHqqkZx_
#define FD_TABLE_FILE_SIZE_MAX	flint(2100000000)

/////////////////////////////////////////////////////////////////////////////
//
//  _xZkqqHx_iDgFiBfLiDhFiDiLiCmGiDeDiDjDiDgGiDgCiDeOiDfIiCmMiNfMjBkCiBeC_xHqqkZx_
//
//           _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Record 0 _xZkqqHx_iEjPiEjPiEjPiEjPiEkJiEjPiEjP_xHqqkZx_ Record 1 _xZkqqHx_iEjPiEjPiEkJiEjPiEjPiEjP_xHqqkZx_ Record 2 _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_    _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Record N _xZkqqHx_iEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//           _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgDiBgDiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
//     Table _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_                  _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_
//           _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgDiBgDiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
//           _xZkqqHx_iBkK_xHqqkZx_                        _xZkqqHx_iBkK_xHqqkZx_                  _xZkqqHx_iBkK_xHqqkZx_                            _xZkqqHx_iBkK_xHqqkZx_                              _xZkqqHx_iBkK_xHqqkZx_
//           _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_                  _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_                              _xZkqqHx_iEkA_xHqqkZx_
//           _xZkqqHx_iEkEiEjPiEkC_xHqqkZx_                    _xZkqqHx_iEkEiEkC_xHqqkZx_                _xZkqqHx_iEkEiEjPiEjPiEkC_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkBiEkD_xHqqkZx_
//               _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_
//           _xZkqqHx_iEkBiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiBgDiBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkC_xHqqkZx_
//     Index _xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_
//           _xZkqqHx_iEkEiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiBgDiBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkD_xHqqkZx_
//           _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_
//           _xZkqqHx_iEkF_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJiBgDiBgDiEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkH_xHqqkZx_
//                   _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_
//                   _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Record 0 _xZkqqHx_iEjPiEjPiEjPiEkJiEjPiEjPiEjP_xHqqkZx_ Record 1 _xZkqqHx_iEjPiEjPiEjPiEkJiEjPiEjPiEjP_xHqqkZx_ Record 2 _xZkqqHx_iEjPiEjPiEjPiEkH_xHqqkZx_    _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Record N _xZkqqHx_iEjPiEjPiEjPiEkH_xHqqkZx_
//
//
/////////////////////////////////////////////////////////////////////////////
//
//  _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmMiNfMjBkCiBeC_xHqqkZx_
//
//  _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmNiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiDgGiDeCiDiMiDeOiDgHiDiKiCmMiJlKiCmM_xHqqkZx_ .rcv _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKjCiGiCmJ_xHqqkZx_
//  _xZkqqHx_iNoMjAkMiClDiCoKiCoJiBeCiDhEiDiJiDgCiDfGiDiFjDhCjCiGiCmFiInJiPoNiPeJjHlJiClFiClNiPoKiNiHiBeBiClBiCmMiDhEiDeAiDeDiDiLiCpAiOgHiCmBiCmEiBeB_xHqqkZx_
//  _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiMlDiCmMiPpDjBnEiCmJjGnPiClHiClBiCmGiCkKiPgPjHiIiCoJiBeC_xHqqkZx_
//
//
//  _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmMjBfDjBmMiNfMjBkCiBeC_xHqqkZx_
// _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
// _xZkqqHx_iEkAiDfCiDhNiDjDiDgIiCfAiEkAiDfCiDhNiDjDiDgIiCfBiEkA_xHqqkZx_      _xZkqqHx_iEkAiDfCiDhNiDjDiDgIiCgNiEkA_xHqqkZx_CRC _xZkqqHx_iEkAiPeJjCfLiOkPjFmKjFlGiOjKjHpBiEkA_xHqqkZx_
// _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
//                                             _xZkqqHx_iEkFiEjPiEjPiEkH_xHqqkZx_
//                                               WORD
//
//  _xZkqqHx_iKgFiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//
//  _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoNiPjMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
//    _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
//  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
//    _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
//    _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
//    _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//
//
//  _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoMjAkMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
//    _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
//  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
//    _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
//    _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
//    _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//
//
//  _xZkqqHx_iDhEiDeAiDeDiDiLiNoNiPjMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
//    _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
//  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
//    _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
//    _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
//    _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//
//
//  _xZkqqHx_iDhEiDeAiDeDiDiLiNoMjAkMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
//    _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
//  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
//    _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
//    _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
//    _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//
//
//  _xZkqqHx_iDhEiDeAiDeDiDiLiPeDjAlDiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
//  _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
//    _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDhEiDeAiDeDiDiLiDfEiDeDiDfJiEkAiPeDjAlDiKeKiOgOiImKjChFiEkAiPeDjAlDjBePiDgGiBfLiDfOiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
//  _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
//    _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkJiEjP_xHqqkZx_ flint -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_ _xZkqqHx_iJmCjFmPjClH_xHqqkZx_ _xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
//    _xZkqqHx_iEkA_xHqqkZx_                                                                              _xZkqqHx_iEkA_xHqqkZx_
//    _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
//
//
// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpB_xHqqkZx_ _xZkqqHx_iCmNiBeB_xHqqkZx_UNICODE_xZkqqHx_iCmMiDhGiDiNiDfHiDeGiDeOiDgHiDhAiDfIiCkJiCoHiCmMjBiKjBmOiNmAjFfHiBeC_xHqqkZx_
// _xZkqqHx_jAoGjDkKiCmJ_xHqqkZx_'\'_xZkqqHx_iCkKjFhEiCkCiCmEiCkCiCoJiBeC_xHqqkZx_
// _xZkqqHx_jHoBiBeG_xHqqkZx_"\0\1.ddix"
//
// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBjClHiCmNiBeB_xHqqkZx_UNICODE_xZkqqHx_iCmMjFlGiOjKjHpBjClHiBeCiDgPiDeDiDgHjClHiCmFiCmNiCmIiCkCiBeC_xHqqkZx_
//
/////////////////////////////////////////////////////////////////////////////
// FCVirtualWriteTableForFlush

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCVirtualWriteTableForFlush
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgHiDiJiDjDiDfFiDeOiDfGiDiHiDjDiCmMiDfCiDhNiDjDiDgIiOmAiNhDiCkJiCoHiNoMjAkMiClDiCoKiCoJiJlMjBhKiDgFiBfLiDhFiDiLiCmM_xHqqkZx_
 *			_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
 *			_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmNiBeBiDgHiDiJiDjDiDfFiDeOiDfGiDiHiDjDiDfCiDhNiDjDiDgIiCmJiCoGiCmBiCmEiNoMjAkMiClDiCoKiBeB_xHqqkZx_
 *			_xZkqqHx_iDhEiDiJiDgCiDfGiDiFiCmJiCoGiCmBiCmEjDoAjHgFiCpAiDhEiDeAiDeDiDiLiCmJiPjBiCkLiPgPiClDiCoKiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDhEiDiJiDgCiDfGiDiFiPeJjHlJiMoDiCmNiKkOjBfDiCmJiNoNiPjMiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCVirtualWriteTableForFlush : public FCVirtualWriteTable
{
public:
	FCVirtualWriteTableForFlush ();

friend class FCServerTableManager;
protected:
	virtual DWORD	GetRealRecordEnd () const;
	// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiPeJjCfLiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
	virtual flint	CalcVirtualTableFileSize () const;

protected:
	DWORD	m_dwRealRecordEndIndex;					// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
	flint	m_fliVirtualTableRecordBeginPosition;	// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
}; // class FCVirtualWriteTableForFlush.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualWriteTableForFlush::FCVirtualWriteTableForFlush
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCVirtualWriteTableForFlush::FCVirtualWriteTableForFlush ()
							:m_dwRealRecordEndIndex(DWORD(-1)),			// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
							 m_fliVirtualTableRecordBeginPosition(-1)	// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
{
} // FCVirtualWriteTableForFlush::FCVirtualWriteTableForFlush.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualWriteTableForFlush::GetRealRecordEnd
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiBgJjFkIjHjNiDhEiDeAiDeDiDiLiBgKiCmMiDiMiDfCiBfLiDgIjAjEiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIjAjEiCmNjHfMiCnPjBlMiCmMiKnGjAjEiCmJiCoGiCmBiCmEjAnNjCoIiClDiCoKiCmEiCkCiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCVirtualWriteTableForFlush::GetRealRecordEnd () const
{
	// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
	return m_dwRealRecordEndIndex;
} // FCVirtualWriteTableForFlush::GetRealRecordEnd.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCVirtualWriteTableForFlush::CalcVirtualTableFileSize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiPeJjCfLiDhEiDeAiDeDiDiLiImKjChFiCpAiMhGiOfKiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiPeJjCfLiDhEiDeAiDeDiDiLiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	m_fliVirtualTableRecordBeginPosition _xZkqqHx_iCkKiMhGiOfKiNmPiCnNiCmFiCmIiCkPiCoKiCmO_xHqqkZx_
 *			_xZkqqHx_iCmIiCoHiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmJiJlMjBhKiDgFiBfLiDhFiDiLiCpAiDhEiDiJiDgCiDfGiDiFiClFiClNiMoDiCmMiBeB_xHqqkZx_
 *			_xZkqqHx_jAfGiClFiCkCiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCpAjFnEiClHiBgJiJlKjAhNiCmJiCkIiCkPiCoJiCgCiBgKiBeC_xHqqkZx_
 *
 *                                               _xZkqqHx_iCgA_xHqqkZx_
 *                                     _xZkqqHx_iCgB_xHqqkZx_        _xZkqqHx_iEkA_xHqqkZx_
 *                                     _xZkqqHx_iEkA_xHqqkZx_   _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
 *                                     _xZkqqHx_iBkL_xHqqkZx_        _xZkqqHx_iBkL_xHqqkZx_
 *                       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
 *           _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiEkA_xHqqkZx_            _xZkqqHx_iBeG_xHqqkZx_        _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iCgC_xHqqkZx_
 *                       _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkD_xHqqkZx_      _xZkqqHx_iBkL_xHqqkZx_
 *                       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
 *           _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiEkA_xHqqkZx_            _xZkqqHx_iEkAiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiEkA_xHqqkZx_
 *                       _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
 *                                     _xZkqqHx_iBkK_xHqqkZx_                _xZkqqHx_iBkK_xHqqkZx_
 *                              _xZkqqHx_iJlMjBhKiDiMiDfCiBfLiDgIiKeKiOgO_xHqqkZx_   _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
flint FCVirtualWriteTableForFlush::CalcVirtualTableFileSize () const
{
	// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiCkKjGkCjAnNjCoIiCmMiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
	if (m_fliVirtualTableRecordBeginPosition == -1)
		FFThrowMiscUnknown();

	// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDhEiDeAiDeDiDiLiDfEiDeDiDfJiBeC_xHqqkZx_
	flint fliVirtualTableFileSize = m_fliVirtualTableRecordBeginPosition;
	vector<FCVirtualRecord>::const_iterator iRec;
	//----- WRITE_xZkqqHx_iDeMiDiDiDgCiDfGiDiFiCmMiDiMiDfCiBfLiDgIiDgGiBfLiDfOiCpAiDiLiBfLiDhG_xHqqkZx_ -----
	for (iRec = m_vVirtualWriteTable.begin();
		 iRec != m_vVirtualWriteTable.end(); iRec++)
		fliVirtualTableFileSize += iRec->m_dwSize;
	// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCpAjFnEiClHiBeC_xHqqkZx_
	return fliVirtualTableFileSize;
} // FCVirtualWriteTableForFlush::CalcVirtualTableFileSize.

/////////////////////////////////////////////////////////////////////////////
// static.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	<<
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhEiDeAiDeDiDiLiCmJ_xHqqkZx_ _xZkqqHx_jFlGiOjKjHpB_xHqqkZx_ WString_xZkqqHx_iMfOiCmMjFmPjAjEiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	file	:_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wstr	:_xZkqqHx_jFlGiOjKjHpBiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDgGiDhEiDeIiDiLiDgHiCmM_xHqqkZx_ << _xZkqqHx_iDeJiDhJiDiMiBfLiDfOiBfLiCmFiCmNiBeBjFlGiOjKjHpBiCmNiCkEiCnMiCkNiLeMjIfOiCmFiCkLiCmIiCkCiBeC_xHqqkZx_
 *			short_xZkqqHx_iMfOiCmFjFlGiOjKjHpBiDfEiDeDiDfJiCpAiLeMjIfOiClFiBeBiClLiCmMiMoDiCmJjFlGiOjKjHpBiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void operator << (FCFileBase& file, const WString wstr)
{
	const short nLen = wstr.GetLength();
	file.Write64(&nLen, sizeof(nLen));
	file.Write64(wstr.c_str(), sizeof(wchar_t) * nLen);
} // template<class T> void operator <<.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myWriteCmdDeleteDirectory
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDgGiDeCiDiMiDeOiDgHiDiKiNoNiPjMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iOhHjCoIiClDiCoKiClNiDgGiDeCiDiMiDeOiDgHiDiKiCmMiDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iCmFiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vOldDirPath		:_xZkqqHx_iNoMjAkMiClDiCoKiClNiBeBiDgGiDeCiDiMiDeOiDgHiDiKiDfCiDhDiBfLiCmMiDhAiDfIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *			fileRecover		:_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpTopDirPath	:_xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpDirPath		:_xZkqqHx_iNoNiPjMiClHiCnHiCkLiDgGiDeCiDiMiDeOiDgHiDiKiCpAiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiCkJiCoHiCmM_xHqqkZx_
 *							 _xZkqqHx_jBiKjBmOiDhAiDfIiCmFiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClFiBeBiNoNiPjMiClHiCnHiCkLiDgGiDeCiDiMiDeOiDgHiDiKiCmM_xHqqkZx_
 *			_xZkqqHx_iDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iKgHjCkDiOhBiCpAjCmHiJmBiClFiCmEiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *			wcpDirPath = "abc" _xZkqqHx_iCmMiPoKiNiHiBeB_xHqqkZx_"abc.old"_xZkqqHx_iCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 *			_xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoNiPjMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
 *          _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
 *            _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
 *          _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
 *            _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
 *            _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
 *            _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myWriteCmdDeleteDirectory (	WStringVector& vOldDirPath,
										FCFile32& fileRecover,
										const wchar_t* wcpTopDirPath,
										const wchar_t* wcpDirPath)
{
	// _xZkqqHx_iMlLiNnNiCmMiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	const flint fliPosition = fileRecover.GetPosition64();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << UNDO_CMD_DELETE_DIRECTORY;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << WString(wcpDirPath);
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCmMiDfEiDeDiDfJiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << flint(fileRecover.GetPosition64() - fliPosition);
	// _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiClCiCmGiDfCiDhDiBfLiBeC_xHqqkZx_
	const WString wstrDirPath = WString(wcpTopDirPath) + wcpDirPath;
	FFCopyDirectory(wstrDirPath, wstrDirPath + L".old");
	vOldDirPath.push_back(wstrDirPath + L".old");
} // myWriteCmdDeleteDirectory.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myWriteCmdCreateDirectory
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDgGiDeCiDiMiDeOiDgHiDiKiNoMjAkMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fileRecover		:_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpTopDirPath	:_xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpDirPath		:_xZkqqHx_iNoMjAkMiClDiCoKiCoJiDgGiDeCiDiMiDeOiDgHiDiKiCpAiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiCkJiCoHiCmM_xHqqkZx_
 *							 _xZkqqHx_jBiKjBmOiDhAiDfIiCmFiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 *			_xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiNoMjAkMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
 *          _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
 *            _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
 *          _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
 *            _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
 *            _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
 *            _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myWriteCmdCreateDirectory (	FCFile32& fileRecover,
										const wchar_t* wcpTopDirPath,
										const wchar_t* wcpDirPath)
{
	// _xZkqqHx_iMlLiNnNiCmMiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	const flint fliPosition = fileRecover.GetPosition64();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << UNDO_CMD_CREATE_DIRECTORY;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << WString(wcpDirPath);
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCmMiDfEiDeDiDfJiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << flint(fileRecover.GetPosition64() - fliPosition);
} // myWriteCmdCreateDirectory.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myWriteCmdDeleteFile
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiNoNiPjMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iOhHjCoIiClDiCoKiClNiDhEiDeAiDeDiDiLiCmMiDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iCmFiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vOldFilePath	:_xZkqqHx_iNoMjAkMiClDiCoKiClNiBeBiDhEiDeAiDeDiDiLiDfCiDhDiBfLiCmMiDhAiDfIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *			fileRecover		:_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpTopDirPath	:_xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpFilePath		:_xZkqqHx_iNoNiPjMiClHiCnHiCkLiDhEiDeAiDeDiDiLiCpAiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiCkJiCoHiCmM_xHqqkZx_
 *							 _xZkqqHx_jBiKjBmOiDhAiDfIiCmFiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClFiBeBiNoNiPjMiClHiCnHiCkLiDhEiDeAiDeDiDiLiCmM_xHqqkZx_
 *			_xZkqqHx_iDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iKgHjCkDiOhBiCpAjCmHiJmBiClFiCmEiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *			wcpDirPath = "abc.ddx" _xZkqqHx_iCmMiPoKiNiHiBeB_xHqqkZx_"abc.ddx.old"_xZkqqHx_iCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 *			_xZkqqHx_iDhEiDeAiDeDiDiLiNoNiPjMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
 *          _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
 *            _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
 *          _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
 *            _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
 *            _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
 *            _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myWriteCmdDeleteFile (	WStringVector& vOldFilePath,
									FCFile32& fileRecover,
									const wchar_t* wcpTopDirPath,
									const wchar_t* wcpFilePath)
{
	// _xZkqqHx_iMlLiNnNiCmMiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	const flint fliPosition = fileRecover.GetPosition64();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << UNDO_CMD_DELETE_FILE;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << WString(wcpFilePath);
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCmMiDfEiDeDiDfJiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << flint(fileRecover.GetPosition64() - fliPosition);
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCpAiDfCiDhDiBfLiBeC_xHqqkZx_
	const WString wstrFilePath = WString(wcpTopDirPath) + wcpFilePath;
	FFCopyFile(wstrFilePath, wstrFilePath + L".old", TRUE);
	vOldFilePath.push_back(wstrFilePath + L".old");
} // myWriteCmdDeleteFile.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myWriteCmdCreateFile
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiNoMjAkMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fileRecover		:_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpTopDirPath	:_xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpFilePath		:_xZkqqHx_iNoMjAkMiClDiCoKiCoJiDhEiDeAiDeDiDiLiCpAiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiCkJiCoHiCmM_xHqqkZx_
 *							 _xZkqqHx_jBiKjBmOiDhAiDfIiCmFiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 *			_xZkqqHx_iDhEiDeAiDeDiDiLiNoMjAkMiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
 *          _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
 *            _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
 *          _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
 *            _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
 *            _xZkqqHx_iEkA_xHqqkZx_                                  _xZkqqHx_iEkA_xHqqkZx_
 *            _xZkqqHx_iEkFiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myWriteCmdCreateFile (	FCFile32& fileRecover,
									const wchar_t* wcpTopDirPath,
									const wchar_t* wcpFilePath)
{
	// _xZkqqHx_iMlLiNnNiCmMiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	const flint fliPosition = fileRecover.GetPosition64();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << UNDO_CMD_CREATE_FILE;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << WString(wcpFilePath);
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCmMiDfEiDeDiDfJiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << flint(fileRecover.GetPosition64() - fliPosition);
} // myWriteCmdCreateFile.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myWriteCmdModifyFile
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiPeDjAlDiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	fileRecover		:_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpTopDirPath	:_xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiCmMiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wcpFilePath		:_xZkqqHx_iPeDjAlDiClDiCoKiCoJiDhEiDeAiDeDiDiLiCpAiBeBiDgHiDgCiDhGiDePiDiLiBfLiDhGiCkJiCoHiCmM_xHqqkZx_
 *							 _xZkqqHx_jBiKjBmOiDhAiDfIiCmFiOhHjCoIiBeC_xHqqkZx_
 *			fliModifyStartPosition
							:_xZkqqHx_iPeDjAlDiCmMiKeKiOgOiImKjChFiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDhEiDeAiDeDiDiLiCmMiPeDjAlDiCmNiBeBiIpIjAjEiCmFiOhHjCoIiClDiCoKiClNiImKjChFiCkJiCoHiNmFiMoDiCnMiCmFiCpAjAfGiClFiCkC_xHqqkZx_
 *			_xZkqqHx_iDgGiBfLiDfOiCmFjChFiCkLiKlHiCkGiCoJiMgAiCmGiCmIiCoJiBeCiClBiCmMiClNiCnPiBeBjChFiKlHiClDiCoKiCoJiNmFiPiJiCmMiImKjChFiCmG_xHqqkZx_
 *			_xZkqqHx_jChFiKlHjBePiCmMiDhEiDeAiDeDiDiLiDfEiDeDiDfJiBeBjChFiKlHjBePiCmMiDgGiBfLiDfOiCkKiLeMjIfOiClDiCoKiCmEiCkCiCoKiCmO_xHqqkZx_
 *			_xZkqqHx_jChFiKlHjBePiCmMiPpDjBnEiCmJjGnPiClHiClBiCmGiCkKiPgPjHiIiCoJiBeC_xHqqkZx_
 *
 *			_xZkqqHx_iDhEiDeAiDeDiDiLiPeDjAlDiDfCiDhNiDjDiDgIiCmMiNfMjBkCiBeC_xHqqkZx_
 *          _xZkqqHx_iBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgD_xHqqkZx_
 *            _xZkqqHx_iEkAiDfCiBfLiDgIiEkAjFlGiOjKjHpBjClHiEkAiDhEiDeAiDeDiDiLjGlMjFlGiOjKjHpBiEkAiDhEiDeAiDeDiDiLiDfEiDeDiDfJiEkAiPeDjAlDiKeKiOgOiImKjChFiEkAiPeDjAlDjBePiDgGiBfLiDfOiEkAiDfCiDhNiDjDiDgIiDfEiDeDiDfJiEkA_xHqqkZx_
 *          _xZkqqHx_iBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgD_xHqqkZx_
 *            _xZkqqHx_iEkF_xHqqkZx_ BYTE _xZkqqHx_iEkJ_xHqqkZx_ short -_xZkqqHx_iEkJiEjP_xHqqkZx_- _xZkqqHx_jFlGiOjKjHpBjClH_xHqqkZx_ -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkJiEjP_xHqqkZx_ flint -_xZkqqHx_iEjPiEkJiEjP_xHqqkZx_ _xZkqqHx_iJmCjFmPjClH_xHqqkZx_ _xZkqqHx_iEjPiEkJiEjP_xHqqkZx_- flint _xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
 *            _xZkqqHx_iEkA_xHqqkZx_                                                                              _xZkqqHx_iEkA_xHqqkZx_
 *            _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjP_xHqqkZx_ _xZkqqHx_iDfCiDhNiDjDiDgIiDfEiDeDiDfJ_xHqqkZx_ _xZkqqHx_iEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkH_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myWriteCmdModifyFile (	FCFile32& fileRecover,
									const wchar_t* wcpTopDirPath,
									const wchar_t* wcpFilePath,
									flint fliModifyStartPosition)
{
	const WString wstrFilePath = WString(wcpTopDirPath) + wcpFilePath;
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
	FCFile32 file;
	if (!file.Open(wstrFilePath, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING))
		FFThrowMiscUnknown();
	// _xZkqqHx_iMlLiNnNiCmMiImKjChFiCpAiLeMjIfOiBeC_xHqqkZx_
	const flint fliPosition = fileRecover.GetPosition64();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << UNDO_CMD_MODIFY_FILE;
	// _xZkqqHx_iDhEiDeAiDeDiDiLjGlMiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << WString(wcpFilePath);
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCmMiDfEiDeDiDfJiBeC_xHqqkZx_
	fileRecover << file.GetLength64();
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCmMiPeDjAlDiKeKiOgOiImKjChFiBeC_xHqqkZx_
	fileRecover << fliModifyStartPosition;
	// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmFiPoDiPjBiCkLiClDiCoKiCoJiDfEiDeDiDfJiCpAiOfKiPgPiBeC_xHqqkZx_
	const flint fliDataSize = (file.GetLength64() - fliModifyStartPosition);
	if (fliDataSize != 0)
	//----- _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmFiPoDiPjBiCkLiClDiCoKiCoJjHmMiIoGiCkKiCkAiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iDfCiDhDiBfLiMlDiCnGiInKjDkOiBeC_xHqqkZx_
		file.Seek64(fliModifyStartPosition, FILE_BEGIN);
		// _xZkqqHx_iPoDiPjBiCkLiClDiCoKiCoJjHmMiIoGiCpAiDgPiDgCiDeOiDeBiDgCiDhGiBeC_xHqqkZx_
		FFCopy(fileRecover, file, fliDataSize);
	}
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCpAjFmCiClGiCoJiBeC_xHqqkZx_
	file.Close();
	// _xZkqqHx_iDfCiDhNiDjDiDgIiCmMiDfEiDeDiDfJiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << flint(fileRecover.GetPosition64() - fliPosition);
} // myWriteCmdModifyFile.

/////////////////////////////////////////////////////////////////////////////
// FCServerTableManager

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::FCServerTableManager
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDbServer		:_xZkqqHx_iDfEiBfLiDgPiBfLiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			hstrTopDirPath	:_xZkqqHx_iClBiCmMiDeJiDhFiDfHiDeGiDeOiDgHiCmFiKmHjHjNiClHiCoJiDgHiDgCiDhGiDePiDiLiBfLiDhGiCmM_xHqqkZx_
 *							 _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiDhAiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCServerTableManager::FCServerTableManager (FCDbServer* pDbServer, const HString& hstrTopDirPath)
					:	BASE_CLASS(hstrTopDirPath),
						m_pDbServer(pDbServer)
{
} // FCServerTableManager::FCServerTableManager.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::FlushAll
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmJiLeMjIfOiClDiCoKiClNiPoOjFpBiCpAiBeBiOmAiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmJjElNiJgGiClDiClJiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vDeletedTableName	:_xZkqqHx_iNoNiPjMiClDiCoKiClNiDgFiBfLiDhFiDiLiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.08 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::FlushAll (vector<FCTableName>& vDeletedTableName)
{
	// _xZkqqHx_iDfIiDiMiDgCiDgIiCmNiDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmFjFnLiMoMiClDiCoKiCmEiCkCiCoJiBeC_xHqqkZx_
	// _xZkqqHx_iClBiCmMjEmNiImNiCmJiCkAiCoJiPoKiNiHiCmNiBeBiDeOiDiJiDeDiDeBiDjDiDgHiCkJiCoHiCmM_xHqqkZx_
	// _xZkqqHx_iDiNiDgCiDeOiBeFiDeBiDjDiDiNiDgCiDeOiCpAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_

	// _xZkqqHx_iPiJiKpKiOjOiCmJ_xHqqkZx_SHARED_xZkqqHx_iCmFiDiNiDgCiDeOiNmPiCnNiClOiCmBiClNiDgFiBfLiDhFiDiLiCmMiPfHiNiHiBeC_xHqqkZx_
	vector<FCTableName> vShareLocked;
	// _xZkqqHx_iClBiCmMiKnGjAjEjCiGiCmF_xHqqkZx_EXCLUSIVE_xZkqqHx_iCmFiDiNiDgCiDeOiClDiCoKiClNiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
	vector<FCTableName> vExclusiveLocked;

	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPoOjFpBiCpAiMhGiOfKiClFiCmEiCkIiCkNiBeC_xHqqkZx_
	// m_dwRealRecordEndIndex
	// _xZkqqHx_iBgJjFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBgK_xHqqkZx_
	// m_fliVirtualTableRecordBeginPosition
	// _xZkqqHx_iBgJjFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBgK_xHqqkZx_
	// _xZkqqHx_iCkKiBeBiDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiMlDiCmJjAnNjCoIiClDiCoKiCoJiBeC_xHqqkZx_
	CalcRecordInfoGroup(m_pGroupRecTop, FCTableIds());
	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDeJiDhJiDiMiBfLiDfGiDiHiDjDiCpAiMhGiOfKiBeC_xHqqkZx_
	// m_recordOperation(_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIjBiAiNoM_xHqqkZx_)_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
	CalcRecordOperationGroup(m_pGroupRecTop);
	// _xZkqqHx_jAfGiLeLiNoMjAkMiBeBjFmPiNfIiCmMiCkAiCmBiClNiDgFiBfLiDhFiDiLiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	vector<FCTableName> vCreatedModifiedTableName;
	GetModifiedTable(	vDeletedTableName,
						vCreatedModifiedTableName,
						m_pGroupRecTop,
						FCTableIds());

//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	//----- _xZkqqHx_iDhEiDeAiDeDiDiLiDfEiDeDiDfJiCkKiDeJiBfLiDgPiBfLiClFiCmIiCkCiCkJjClCiCnHiCoJ_xHqqkZx_ -----
	mdef_const_iterator(vector<FCTableName>, iTn);
	m1_for (iTn, vCreatedModifiedTableName)
	//----- _xZkqqHx_iPeDjAlDiClDiCoKiClNiDgFiBfLiDhFiDiLiCpAiDiLiBfLiDhG_xHqqkZx_ -----
	{
		// _xZkqqHx_iDgFiBfLiDhFiDiLiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOoGjDlOiBeC_xHqqkZx_
		const FCVirtualWriteTableForFlush* pVirtualTable = (FCVirtualWriteTableForFlush*)(GetTableRec(iTn->GetTableIds())->m_pVirtualTable);
		// _xZkqqHx_iDhEiDiJiDgCiDfGiDiFiMoDiCmMiDgGiBfLiDfOiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCpAiMhGiOfKiBeC_xHqqkZx_
		const flint fliVirtualTableFileSize = pVirtualTable->CalcVirtualTableFileSize();
		if (FD_TABLE_FILE_SIZE_MAX < fliVirtualTableFileSize)
		//----- _xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCmMiMmAjDhIiCpAjClEiCkGiCoJiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDhEiDeAiDeDiDiLiDfEiDeDiDfJiCkKjBoFiCkLiClHiCkMiCnMiClHiBeC_xHqqkZx_
			m_pDbServer->SetFlushError(IDS_DYSR_ERR_FILE_SIZE_TOO_LARGE);
			// _xZkqqHx_iPiIjHjNiCpAjCiGjCgGiClFiCmEjFjMiLeBiBeC_xHqqkZx_
			return;
		}
	}
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	//----- _xZkqqHx_jFmPiNfIiCmMiCkAiCmBiClNiDgFiBfLiDhFiDiLiCmMiCkEiClPiBeB_xHqqkZx_SHARED_xZkqqHx_iCmF_xHqqkZx_
	//		_xZkqqHx_iDiNiDgCiDeOiNmPiCnNiCmMiDgFiBfLiDhFiDiLiCmMiDiNiDgCiDeOiCpAiJpAiPjMiClHiCoJ_xHqqkZx_ -----

// 06.03.10 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	mdef_const_iterator(vector<FCTableName>, iTn);
	m2_for (iTn, vDeletedTableName, vCreatedModifiedTableName)
	{
		while (m_pDbServer->IsReadLocked(*iTn))
		//----- _xZkqqHx_iDiNiDgCiDeOiClDiCoKiCmEiCkCiCoJiKnEiCmNiDiLiBfLiDhG_xHqqkZx_ -----
		{
			// _xZkqqHx_iDiNiDgCiDeOiNmPiCnNiCmJjCmHiJmBiBeCiDiNiDgCiDeOiDeKiDeFiDjDiDgHiCkKjBlNiCkCiPoKiNiHiCmN_xHqqkZx_
			// _xZkqqHx_jDkPiClGiDgFiBfLiDhFiDiLiCkKiJlNjDhIiCoAjDgPjIfOiClDiCoKiCoJiBeC_xHqqkZx_
			vShareLocked.push_back(*iTn);
			// _xZkqqHx_iDiNiDgCiDeOiCpAiJpAiPjMiClHiCoJiBeC_xHqqkZx_
			m_pDbServer->ReadUnlock(*iTn);
		}
	}

do {
	for (;;)
	{
		// _xZkqqHx_iDiNiDgCiDeOiCmJjAkMiMpHiClFiClNiCkJiBeI_xHqqkZx_
		BOOL bLockSucceed = TRUE;
		//----- _xZkqqHx_jFmPiNfIiCmMiCkAiCmBiClNiDgFiBfLiDhFiDiLiCpA_xHqqkZx_ READ & EXCLUSIVE _xZkqqHx_iCmFiDiNiDgCiDeO_xHqqkZx_ -----
		// LOCK_READ/LOCK_EXCLUSIVE _xZkqqHx_iCmFiDiNiDgCiDeOiCpAiOiOiCnNiCoJiBeC_xHqqkZx_
		// EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiCmJiOlIjEhDiClFiCmEiCoAiBeBiJpAjFpKjHhGiLiBiCkKjEkNiNhDiClDiCoKiCoJiCmMiCmF_xHqqkZx_
		// _xZkqqHx_jBfDiCmEiCmMiDiNiDgCiDeOiCpAiOiOiCnNiCoJiBeC_xHqqkZx_
		m2_for (iTn, vDeletedTableName, vCreatedModifiedTableName)
		{
			// _xZkqqHx_iDgFiBfLiDhFiDiLiCpA_xHqqkZx_EXCLUSIVE_xZkqqHx_iCmFiDiNiDgCiDeOiBeCiDiNiDgCiDeOiOlIjEhDiCmMiPoKiNiHiCmNiJpAjFpKjHhGiLiBiCpAjEkNiNhDiBeC_xHqqkZx_
			const DsErr dsErrCode = m_pDbServer->TryExclusiveReadLock(*iTn);
			if (dsErrCode == 0)
			//----- _xZkqqHx_iDiNiDgCiDeOjAkMiMpHiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// EXCLUSIVE_xZkqqHx_iCmFiDiNiDgCiDeOiNmPiCnNiCmMiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
				vExclusiveLocked.push_back(*iTn);
			} else
			//----- _xZkqqHx_iDiNiDgCiDeOiOlIjEhDiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iDiNiDgCiDeOiCmJjAkMiMpHiClFiClNiCkJiBeI_xHqqkZx_
				bLockSucceed = FALSE;
				// IDS_DYSR_ERR_FILE_LOCKED_BY_OTHERS = _xZkqqHx_iBhFiDhEiDeAiDeDiDiLiCmNiKpJiCmJjBlMiCmMiDiGiBfLiDfFiBfLiCmJiCoGiCmBiCmEiDiNiDgCiDeOiClDiCoKiCmEiCkCiCnMiClHiBhG_xHqqkZx_
				if (dsErrCode != IDS_DYSR_ERR_FILE_LOCKED_BY_OTHERS)
				//----- _xZkqqHx_jBlMiDiGiBfLiDfFiBfLiCmMiDiNiDgCiDeOiImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
				{
					// _xZkqqHx_iDiNiDgCiDeOiOjOiCmMiDeHiDiJiBfLiCpAiDhEiDiJiDgCiDfGiDiFiCmMiDeHiDiJiBfLiCmGiClFiCmEjAnNjCoIiBeC_xHqqkZx_
					m_pDbServer->SetFlushError(dsErrCode);
					// _xZkqqHx_iDiNiDgCiDeOiPiIjHjNiCpAjCiGjCgGiClFiCmEiDiLiBfLiDhGiCpAjElCiCkPiCoJiBeC_xHqqkZx_
					break;
				}
			}
		}

		// _xZkqqHx_iDiNiDgCiDeOiCmJjAkMiMpHiClFiClNiPoKiNiHiCmNiDiLiBfLiDhGiCpAjElCiCkPiCoJiBeC_xHqqkZx_
		if (bLockSucceed) break;

		//----- _xZkqqHx_iDiNiDgCiDeOiCmJiOlIjEhDiClFiClNiPoKiNiH_xHqqkZx_ -----

		// _xZkqqHx_iDeHiDiJiBfLjEkNjAlGiCmMiPoKiNiHiCmNiBeBiDiLiBfLiDhGiCpAjElCiCkPiCoJiBeC_xHqqkZx_
		if (m_pDbServer->GetFlushErrorCode() != 0)
			break;

		// _xZkqqHx_iDeHiDiJiBfLiCmFiCmIiCkCiPoKiNiHiCmNiBeB_xHqqkZx_EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiCpAiJpAiPjMiClFiCmEiBeB_xHqqkZx_
		// _xZkqqHx_iPkNiClFiMoDiCmJiNmEiCnB_xHqqkZx_EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiCpAiOiOiCnNiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iDiNiDgCiDeOiCpAiJpAiPjMiClHiCoJiBeC_xHqqkZx_
		m1_for (iTn, vExclusiveLocked)
			m_pDbServer->ReadUnlock(*iTn);
		// _xZkqqHx_iDiNiDgCiDeOjFmPjAjEiCpAiDeOiDiKiDeBiBeC_xHqqkZx_
		vExclusiveLocked.clear();

		// _xZkqqHx_jBePiJpBiDiNiDgCiDeOiCmJiOlIjEhDiClFiCmEiCkCiCoJiPoKiNiHiBgJjBkGiClPiCfBiJpBjGnKiDiLiBfLiDhGiImIiNhOiBgKiCmNiPkNiClFjBnCiClPiOjOiKnEiCpAiCmGiCoJiBeC_xHqqkZx_
		// _xZkqqHx_jBlMiDeBiDhGiDiKiCmGiCmMiJpAiPjMjHhGiLiBiCpAiMpAiKlHiClHiCoJiOjOiKnEiCpAiOjNiClNiClJiCoJiClNiCnPiBeC_xHqqkZx_
		Sleep(FD_INTERVAL_FILE_LOCK_MILLISEC);
	}

	// _xZkqqHx_jEkNiNhDjCiGiCmMiJpAjFpKjHhGiLiBiCpAjBfDiCmEiJpAiPjMiBeC_xHqqkZx_
	m2_for (iTn, vDeletedTableName, vCreatedModifiedTableName)
		m_pDbServer->RemoveUnlockRequest(*iTn);

	// _xZkqqHx_iDeHiDiJiBfLjEkNjAlGiCmMiPoKiNiHiCmNiBeBiMlLiPpDiJpBjFjMiClFiCmEiPiIjHjNiCpAiPeJjHlJiBeC_xHqqkZx_
	if (m_pDbServer->GetFlushErrorCode() != 0)
		break;

	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCkKjBlGiNnNiClHiCoJiCkJiDgAiDeGiDgCiDeOiBeCiDiNiDgCiDeOjBePiCmJiDgAiDeGiDgCiDeOiClHiCoJiCmG_xHqqkZx_
	// _xZkqqHx_iDiNiDgCiDeOiPiIjHjNjCiGiCmJiJpBjFjMiDhEiDeAiDeDiDiLiCkKiNoMjAkMiClDiCoKiCoJiJmCjEfMjAkLiCkKiCkAiCoJiClNiCnPiBeB_xHqqkZx_
	// _xZkqqHx_jBfDiCmEiCmMiDiNiDgCiDeOiCkKjAkMiMpHiClFiClNiMoDiCmJiDgAiDeGiDgCiDeOiClHiCoJiBeC_xHqqkZx_
	if (m_pDbServer->IsRecoveryRequired(WString(m_hstrTopDirPath)))
	//----- _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCkKjBlGiNnNiClHiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// IDS_DYSR_ERR_FILE_RECOVERY_REQUIRED = _xZkqqHx_iBhFiJpBjFjMiCkKjFeLjHhGiCmIiDgFiBfLiDhFiDiLiCkKiCkAiCoIiCnMiClHiBeCiBhG_xHqqkZx_
		m_pDbServer->SetFlushError(IDS_DYSR_ERR_FILE_RECOVERY_REQUIRED);
		// _xZkqqHx_iDeHiDiJiBfLjEkNjAlGiCmMiPoKiNiHiCmNiBeBiMlLiPpDiJpBjFjMiClFiCmEiPiIjHjNiCpAiPeJjHlJiBeC_xHqqkZx_
		break;
	}

	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLjHhAiDgGiDeCiDiMiDeOiDgHiDiKiCpAiNoMjAkMiBeC_xHqqkZx_
	const WString wstrRecoverDir = WString(m_hstrTopDirPath) + L'\\' + FDTBL_RECOVER_DIR_NAME;
	FFCreateDirectory(wstrRecoverDir, NULL);

	WString wstrRecoverFilePath;
// 06.03.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	FCFile32 fileRecover;
	FCCRCFileTmpl32<FCFile32> fileRecover;
	long lC;
	for (lC = 0; lC != 10; lC++)
	{
		// _xZkqqHx_iDiGiDgKiBfLiDeOiCmIjGlMjBePiCpAiMjPiNpFiBeC_xHqqkZx_
		FFMakeUniqFileName(wstrRecoverFilePath, wstrRecoverDir + L'\\' + FDTBL_RECOVER_FILE_EXT);
		// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
		if (fileRecover.Open(wstrRecoverFilePath, GENERIC_READ|GENERIC_WRITE, 0, CREATE_NEW))
			break;
	}
	if (!fileRecover.IsFileOpened())
	//----- 10_xZkqqHx_iJpBiDgHiDiJiDeDiClFiCmEiCoAiJpBjFjMiDhEiDeAiDeDiDiLiCpAiKeKiCkPiCmIiCkJiCmBiClNiPoKiNiH_xHqqkZx_ -----
	{
		// IDS_DYSR_ERR_FILE_ACCESS_DENIED = _xZkqqHx_iBhFiDhEiDeAiDeDiDiLiCnGiCmMiDeBiDeOiDfKiDfIiCkKiLjBjEnLiClDiCoKiCnMiClFiClNiBeCiDhEiDeAiDeDiDiLiBeBiDgGiDeCiDiMiDeOiDgHiDiKiCmMiDeBiDeOiDfKiDfIiMkAiCpAiKgNjEeGiClFiCmEiCkNiClOiClDiCkCiBeCiBhG_xHqqkZx_
		m_pDbServer->SetFlushError(IDS_DYSR_ERR_FILE_ACCESS_DENIED);
		// _xZkqqHx_iDeHiDiJiBfLjEkNjAlGiCmMiPoKiNiHiCmNiBeBiMlLiPpDiJpBjFjMiClFiCmEiPiIjHjNiCpAiPeJjHlJiBeC_xHqqkZx_
		break;
	}
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmM_xHqqkZx_CRC_xZkqqHx_iMhGiOfKiCpAiKeKiOgOiBeC_xHqqkZx_
	fileRecover.StartCRC();
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCpAiNoMjAkMiBeC_xHqqkZx_
	WStringVector vOldDirPath;
	WStringVector vOldFilePath;
	MakeRecoveryGroup(vOldDirPath, vOldFilePath, fileRecover, m_pGroupRecTop, FCTableIds());
//----- 06.03.10 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmJiDfCiDhNiDjDiDgIiPeJjCfLiCpAiLeMjIfOiBeC_xHqqkZx_
//	fileRecover << UNDO_CMD_NONE;
//----- 06.03.10 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmM_xHqqkZx_CRC_xZkqqHx_iCpAiOoGjDlOiBeC_xHqqkZx_
	const WORD wCRC = fileRecover.StopCRC();
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmJ_xHqqkZx_CRC_xZkqqHx_iCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover << wCRC;
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_iDhEiDeAiDeDiDiLiPeJjCfLiDfCiBfLiDgIiCpAiLeMjIfOiBeC_xHqqkZx_
	fileRecover.Write64(FD_RECOVER_END_CODE, FD_RECOVER_END_CODE_LEN);
	// _xZkqqHx_iDhEiDeAiDeDiDiLiCpAiDhEiDiJiDgCiDfGiDiFiBeC_xHqqkZx_
	fileRecover.Flush();
	// _xZkqqHx_iDeMiDiDiDgCiDfGiDiFiDhEiDeAiDeDiDiLiCmMiDhEiDiJiDgCiDfGiDiFiBeC_xHqqkZx_
	WriteGroup(m_pGroupRecTop, FCTableIds());
//----- 06.04.13 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDgFiDfIiDgHiBeC_xHqqkZx_
//	FFThrowMiscUnknown();
//----- 06.04.13 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_iDiNiDgCiDeOiCmMiNfIjAfGiBeCiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmJiDgFiBfLiDhFiDiLiCkJiCoH_xHqqkZx_
	// _xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iBeBjCmHiJmBiBeFiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAjFkBiOmKiClHiCoJiBeC_xHqqkZx_
	UpdateGroupLockIdentifier(m_pGroupRecTop, FCTableIds());
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmMjClHiClDiCpAiCePiCmJiBeC_xHqqkZx_
	fileRecover.SetLength64(0);
	fileRecover.Flush();
	fileRecover.Close();
	// _xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCpAiNoNiPjMiBeC_xHqqkZx_
	FFDeleteFile(wstrRecoverFilePath);
	// .old_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiNoNiPjMiBeC_xHqqkZx_
	WStringVector::const_iterator iName;
	for (iName = vOldDirPath.begin(); iName != vOldDirPath.end(); iName++)
		FFRecursiveRemoveDirectory(*iName);
	for (iName = vOldFilePath.begin(); iName != vOldFilePath.end(); iName++)
		FFDeleteFile(*iName);
} while (FALSE);

	// _xZkqqHx_iClBiCmMiKnGjAjEiCmFiOmAiNhDiClFiClN_xHqqkZx_EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiCpAiJpAiPjMiClHiCoJiBeC_xHqqkZx_
	m1_for (iTn, vExclusiveLocked)
		m_pDbServer->ReadUnlock(*iTn);

	// _xZkqqHx_iMlDiBfI_xHqqkZx_ SHARED_xZkqqHx_iCmFiDiNiDgCiDeOiClDiCoKiCmEiCkCiClNiDgFiBfLiDhFiDiLiCpAiDiNiDgCiDeOiClFiCmIiCkIiClHiBeC_xHqqkZx_
	m1_for (iTn, vShareLocked)
	{
		// SHARED_xZkqqHx_iCmFiDiNiDgCiDeOiClFiCmIiCkIiClHiBeC_xHqqkZx_
		// WRITE_xZkqqHx_iDiNiDgCiDeOiClDiCoKiCmEiCkCiCoJiCmMiCmFiBeB_xHqqkZx_SHARED_xZkqqHx_iDiNiDgCiDeOiCkK_xHqqkZx_
		// _xZkqqHx_iOlIjEhDiClHiCoJiClBiCmGiCmNiCmIiCkCiCmNiClIiBeC_xHqqkZx_
		GUID guidTmp;
		DWORD dwTmpIdentifier;
		while (m_pDbServer->TryReadLock(guidTmp,
										dwTmpIdentifier,
										dwTmpIdentifier,
										*iTn) != 0)
		{
			// _xZkqqHx_iDgFiBfLiDhFiDiLiCmN_xHqqkZx_Write_xZkqqHx_iDiNiDgCiDeOiClDiCoKiCmEiCoJiCmMiCmF_xHqqkZx_ Shared_xZkqqHx_iCmF_xHqqkZx_Read_xZkqqHx_iDiNiDgCiDeO_xHqqkZx_
			// _xZkqqHx_iClHiCoJiCmMiCmJiOlIjEhDiClHiCoJiClBiCmGiCmNjHeMiCoIjDlOiCmIiCkCiCmMiClOiCkKiBeBjEePiCmMiClNiCnPiCmJ_xHqqkZx_
			// _xZkqqHx_jBnCiClPiOjOiKnEiCpAjDpMiCoKiCmEiNmEjDhIiDgHiDiJiDeDiClDiClJiCoJiBeC_xHqqkZx_
			Sleep(FD_INTERVAL_FILE_LOCK_MILLISEC);
		}
	}
} // FCServerTableManager::FlushAll.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::FlushAll2
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmJiLeMjIfOiClDiCoKiClNiPoOjFpBiCpAiBeBiOmAiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmJjElNiJgGiClDiClJiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vDeletedTableName	:_xZkqqHx_iNoNiPjMiClDiCoKiClNiDgFiBfLiDhFiDiLiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	FlushAll_xZkqqHx_iKnGjAjEiCmJjBmOiClFiCmEiBeBiImIiJlKiCmMiIoBiCkCiCkKiCkAiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iBeF_xHqqkZx_EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiCpAjAkHiMoEiClFiCmIiCkCiBeC_xHqqkZx_
 *			_xZkqqHx_iBeFiJpAjFpKjHhGiLiBiCpAjEkNiNhDiClFiCmIiCkCiBeC_xHqqkZx_
 *			_xZkqqHx_iBeFiJpBjFjMiDhEiDeAiDeDiDiLiCpAiNoMjAkMiClFiCmIiCkCiBeC_xHqqkZx_
 *			_xZkqqHx_iDiNiDgCiDeOiCmMjAkHiMoEiCmNiClFiCmIiCkCiCkKiBeBiDhEiDiJiDgCiDfGiDiFjBmOiPnLiCmMiDgFiBfLiDhFiDiLiCmN_xHqqkZx_
 *			READ&SHARED_xZkqqHx_iDiNiDgCiDeOiCmG_xHqqkZx_WRITE&EXCLUSIVE_xZkqqHx_iDiNiDgCiDeOiClDiCoKiCmEiCkCiCoJjFeLjHhGiCkKiCkAiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::FlushAll2 (vector<FCTableName>& vDeletedTableName)
{
	// _xZkqqHx_iDfIiDiMiDgCiDgIiCmNiDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmFjFnLiMoMiClDiCoKiCmEiCkCiCoJiBeC_xHqqkZx_
	// _xZkqqHx_iClBiCmMjEmNiImNiCmJiCkAiCoJiPoKiNiHiCmNiBeBiDeOiDiJiDeDiDeBiDjDiDgHiCkJiCoHiCmM_xHqqkZx_
	// _xZkqqHx_iDiNiDgCiDeOiBeFiDeBiDjDiDiNiDgCiDeOiCpAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_

	// _xZkqqHx_iPiJiKpKiOjOiCmJ_xHqqkZx_SHARED_xZkqqHx_iCmFiDiNiDgCiDeOiNmPiCnNiClOiCmBiClNiDgFiBfLiDhFiDiLiCmMiPfHiNiHiBeC_xHqqkZx_
	vector<FCTableName> vShareLocked;
	// _xZkqqHx_iClBiCmMiKnGjAjEjCiGiCmF_xHqqkZx_EXCLUSIVE_xZkqqHx_iCmFiDiNiDgCiDeOiClDiCoKiClNiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
	vector<FCTableName> vExclusiveLocked;

	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPoOjFpBiCpAiMhGiOfKiClFiCmEiCkIiCkNiBeC_xHqqkZx_
	// m_dwRealRecordEndIndex
	// _xZkqqHx_iBgJjFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBgK_xHqqkZx_
	// m_fliVirtualTableRecordBeginPosition
	// _xZkqqHx_iBgJjFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBgK_xHqqkZx_
	// _xZkqqHx_iCkKiBeBiDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiMlDiCmJjAnNjCoIiClDiCoKiCoJiBeC_xHqqkZx_
	CalcRecordInfoGroup(m_pGroupRecTop, FCTableIds());
	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDeJiDhJiDiMiBfLiDfGiDiHiDjDiCpAiMhGiOfKiBeC_xHqqkZx_
	// m_recordOperation(_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIjBiAiNoM_xHqqkZx_)_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
	CalcRecordOperationGroup(m_pGroupRecTop);
	// _xZkqqHx_jAfGiLeLiNoMjAkMiBeBjFmPiNfIiCmMiCkAiCmBiClNiDgFiBfLiDhFiDiLiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	vector<FCTableName> vCreatedModifiedTableName;
	GetModifiedTable(	vDeletedTableName,
						vCreatedModifiedTableName,
						m_pGroupRecTop,
						FCTableIds());

//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	//----- _xZkqqHx_iDhEiDeAiDeDiDiLiDfEiDeDiDfJiCkKiDeJiBfLiDgPiBfLiClFiCmIiCkCiCkJjClCiCnHiCoJ_xHqqkZx_ -----
	mdef_const_iterator(vector<FCTableName>, iTn);
	m1_for (iTn, vCreatedModifiedTableName)
	//----- _xZkqqHx_iPeDjAlDiClDiCoKiClNiDgFiBfLiDhFiDiLiCpAiDiLiBfLiDhG_xHqqkZx_ -----
	{
		// _xZkqqHx_iDgFiBfLiDhFiDiLiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOoGjDlOiBeC_xHqqkZx_
		const FCVirtualWriteTableForFlush* pVirtualTable = (FCVirtualWriteTableForFlush*)(GetTableRec(iTn->GetTableIds())->m_pVirtualTable);
		// _xZkqqHx_iDhEiDiJiDgCiDfGiDiFiMoDiCmMiDgGiBfLiDfOiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCpAiMhGiOfKiBeC_xHqqkZx_
		const flint fliVirtualTableFileSize = pVirtualTable->CalcVirtualTableFileSize();
		if (FD_TABLE_FILE_SIZE_MAX < fliVirtualTableFileSize)
		//----- _xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiDfEiDeDiDfJiCmMiMmAjDhIiCpAjClEiCkGiCoJiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDhEiDeAiDeDiDiLiDfEiDeDiDfJiCkKjBoFiCkLiClHiCkMiCnMiClHiBeC_xHqqkZx_
			m_pDbServer->SetFlushError(IDS_DYSR_ERR_FILE_SIZE_TOO_LARGE);
			// _xZkqqHx_iPiIjHjNiCpAjCiGjCgGiClFiCmEjFjMiLeBiBeC_xHqqkZx_
			return;
		}
	}
//----- 06.03.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_iDeMiDiDiDgCiDfGiDiFiDhEiDeAiDeDiDiLiCmMiDhEiDiJiDgCiDfGiDiFiBeC_xHqqkZx_
	WriteGroup(m_pGroupRecTop, FCTableIds());
	// _xZkqqHx_iDiNiDgCiDeOiCmMiNfIjAfGiBeCiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmJiDgFiBfLiDhFiDiLiCkJiCoH_xHqqkZx_
	// _xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iBeBjCmHiJmBiBeFiNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAjFkBiOmKiClHiCoJiBeC_xHqqkZx_
	UpdateGroupLockIdentifier(m_pGroupRecTop, FCTableIds());
} // FCServerTableManager::FlushAll2.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::DoTransCommand
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iCfAiCmCiCmMiDgHiDiJiDjDiDfFiDeOiDfGiDiHiDjDiDfCiDhNiDjDiDgIiCpAiPiIjHjNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	byCommand	:_xZkqqHx_iDgHiDiJiDjDiDfFiDeOiDfGiDiHiDjDiDfCiDhNiDjDiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pTransaction:_xZkqqHx_iDgHiDiJiDjDiDfFiDeOiDfGiDiHiDjDiDgGiBfLiDfOiCpAiOhHjCoIiBeCiPiIjHjNiMoDiCmMiImKjChFiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.01 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::DoTransCommand (BYTE byCommand, const BYTE*& pTransaction)
{
	switch (byCommand)
	{
	case CMD_COPY_RECORD:
		// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjFkBiOmKiBeC_xHqqkZx_
		// _xZkqqHx_iClBiCmMiDfCiDhNiDjDiDgIiCmNiBeBjFkBiOmKjAoGiDgFiBfLiDhFiDiLiBgJiCgAiBgKiCmJjFkBiOmKiMlDiDgFiBfLiDhFiDiLiBgJiCgBiBgKiCmM_xHqqkZx_
		// _xZkqqHx_iOhHjCoIjEmNiImNiCmMiDiMiDfCiBfLiDgIiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iDgFiBfLiDhFiDiLiCkJiCoHiDgFiBfLiDhFiDiLiCnGiCmMiDfCiDhDiBfLiCmMiPoKiNiHiBeB_xHqqkZx_CMD_APPEND_RECORD _xZkqqHx_iCpAiOgHiCkEiCmG_xHqqkZx_
		// _xZkqqHx_iDiMiDfCiBfLiDgIjAjEiClOiCkPiDfCiDhNiDjDiDgIiCpAjEkNiNhDiClHiCoJjFeLjHhGiCkKiCkAiCoJiCkKiBeB_xHqqkZx_CMD_COPY_RECORD _xZkqqHx_iCpA_xHqqkZx_
		// _xZkqqHx_iOgHiCkGiCmOiPkMiClDiCkCiDfCiDhNiDjDiDgIiCpAiCfAiCmCjEkNiNhDiClHiCoJiClOiCkPiCmFiNmPiCnOiBeC_xHqqkZx_
		// _xZkqqHx_iCmIiCkIiBeBiDeOiDiJiDeDiDeBiDjDiDgHjBkEiCmFiCmNiPiIjHjNjFpLjGeAiCkKiInJiCmIiCoJiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
	  {
		// _xZkqqHx_jFkBiOmKjAoGiDgFiBfLiDhFiDiLiCpAiOoGjDlOiBeC_xHqqkZx_
		FCTableIds vTableIds;
		FFReadData(vTableIds, pTransaction);
		// _xZkqqHx_jFkBiOmKiMlDiDgFiBfLiDhFiDiLiCpAiOoGjDlOiBeC_xHqqkZx_
		FCTableName tableNameFrom;
		FFReadData(tableNameFrom, pTransaction);
		// _xZkqqHx_jFkBiOmKiDiMiDfCiBfLiDgIiCmMiKeKiOgOiImKjChFiCpAiOoGjDlOiBeC_xHqqkZx_
		DWORD dwIndexBegin;
		FFReadData(dwIndexBegin, pTransaction);
		// _xZkqqHx_jFkBiOmKiDiMiDfCiBfLiDgIiCmMiPeJjHlJiImKjChFiCpAiOoGjDlOiBeC_xHqqkZx_
		DWORD dwIndexEnd;
		FFReadData(dwIndexEnd, pTransaction);

		// tableNameFrom _xZkqqHx_iCmNiBeB_xHqqkZx_FCDbServer::FlushThreadProc()_xZkqqHx_jCiGiCmF_xHqqkZx_ READ_xZkqqHx_iDiNiDgCiDeOiNmPiCnN_xHqqkZx_
		// _xZkqqHx_iCmIiCmMiCmFiBeBiCmGiCkNiCmJiClBiClBiCmFiDiNiDgCiDeOiClHiCoJjFeLjHhGiCmNiCmIiCkCiBeC_xHqqkZx_

		// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiOoGjDlOiBeC_xHqqkZx_
		FCTableRec* pTableRec = UpdateVirtualTable(vTableIds);

		// _xZkqqHx_iDgFiBfLiDhFiDiLjDmHiCnNiPgPiClFiCmMiDfIiDgFiDgCiDhGiBeC_xHqqkZx_
		//                                     _xZkqqHx_iCgA_xHqqkZx_                  _xZkqqHx_iCgB_xHqqkZx_                            _xZkqqHx_iCgC_xHqqkZx_
		//           _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Dt Record 0 -_xZkqqHx_iEjPiEjPiEkJiEjPiEjP_xHqqkZx_ Dt Record 1 -_xZkqqHx_iEkJiEjPiEjPiEjP_xHqqkZx_ Dt Record 2 -_xZkqqHx_iEjPiEjPiEjPiEjPiEkH_xHqqkZx_    _xZkqqHx_iEkFiEjPiEjPiEjP_xHqqkZx_ Dt Record N -_xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
		//           _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkGiBgDiBgDiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
		//      Data _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_                  _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_
		//           _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkIiBgDiBgDiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
		//           _xZkqqHx_iBkK_xHqqkZx_                        _xZkqqHx_iBkK_xHqqkZx_                  _xZkqqHx_iBkK_xHqqkZx_                            _xZkqqHx_iBkK_xHqqkZx_                              _xZkqqHx_iBkK_xHqqkZx_
		//           _xZkqqHx_iEkA_xHqqkZx_                        _xZkqqHx_iEkA_xHqqkZx_                  _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_                              _xZkqqHx_iEkA_xHqqkZx_
		//           _xZkqqHx_iEkEiEjPiEkC_xHqqkZx_                    _xZkqqHx_iEkEiEkC_xHqqkZx_                _xZkqqHx_iEkEiEjPiEjPiEkC_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkBiEkD_xHqqkZx_
		//               _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                            _xZkqqHx_iEkA_xHqqkZx_
		//           _xZkqqHx_iEkBiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiBgDiBgDiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEkC_xHqqkZx_
		//     Index _xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_PrimId_xZkqqHx_iEkA_xHqqkZx_Identi_xZkqqHx_iEkA_xHqqkZx_Addres_xZkqqHx_iEkA_xHqqkZx_
		//           _xZkqqHx_iEkEiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiBgDiBgDiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEkD_xHqqkZx_
		//           _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_      _xZkqqHx_iEkA_xHqqkZx_
		//           _xZkqqHx_iEkF_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkJiBgDiBgDiEkJ_xHqqkZx_flint-_xZkqqHx_iEkJ_xHqqkZx_DWORD-_xZkqqHx_iEkJ_xHqqkZx_flint-_xZkqqHx_iEkH_xHqqkZx_
		//                   _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_
		//                   _xZkqqHx_iEkFiEjPiEjP_xHqqkZx_ Ix Record 0 -_xZkqqHx_iEjPiEjPiEkJiEjPiEjP_xHqqkZx_ Ix Record 1 -_xZkqqHx_iEjPiEjPiEkJiEjPiEjP_xHqqkZx_ Ix Record 2 -_xZkqqHx_iEjPiEjPiEkH_xHqqkZx_    _xZkqqHx_iEkFiEjPiEjP_xHqqkZx_ Ix Record N -_xZkqqHx_iEjPiEjPiEkH_xHqqkZx_
		//                                           _xZkqqHx_iCgJ_xHqqkZx_                      _xZkqqHx_iCgK_xHqqkZx_                      _xZkqqHx_iCgL_xHqqkZx_
		//
		// dwIndexBegin = 1, dwIndexEnd = 3 _xZkqqHx_iCmMiPoKiNiHiCpAiNgMiCkGiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iHeA_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCkJiCoHiImKjChFiCgAiCpAiOoGjDlOiBeC_xHqqkZx_
		// _xZkqqHx_iHeB_xHqqkZx_ _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiCpAiImKjChFiCgAiCmJiInKjDkOiBeC_xHqqkZx_
		// _xZkqqHx_iHeC_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiImKjChFiCgJiCmJiInKjDkOiBeC_xHqqkZx_
		// _xZkqqHx_iHeD_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCkJiCoHiDiMiDfCiBfLiDgIiPoOjFpBiBgJ_xHqqkZx_Ix Record 1_xZkqqHx_iBgKiCpAjDmHiCnNiPgPiClHiBeC_xHqqkZx_
		// _xZkqqHx_iHeE_xHqqkZx_ _xZkqqHx_iHeDiCmFjDmHiCnNiPgPiClFiClNiImKjChFiCgBiCkJiCoHiImKjChFiCgAiCpAiIpIiCkCiCmEiBeBiDgGiBfLiDfOiDfEiDeDiDfJiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iCmMiDfEiDeDiDfJiBgKiCpAiOfKiPgPiBeC_xHqqkZx_
		// _xZkqqHx_iHeF_xHqqkZx_ _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiCkJiCoHiHeEiCmFiOfKiPgPiClFiClNiDfEiDeDiDfJjFkKiDgGiBfLiDfOiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iBgKiCpAjDmHiCnNiPgPiClHiBeC_xHqqkZx_
		// _xZkqqHx_iHeG_xHqqkZx_ _xZkqqHx_jDmHiCnNiPgPiClFiClNiDgGiBfLiDfOiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iBgKiCpAiBeBiJlMjBhKiDhEiDeAiDeDiDiLiCmMiPjBiCkLiNjOiCnNiDiMiDfCiBfLiDgIiCmJjCmHiJmBiBeC_xHqqkZx_
		// _xZkqqHx_iHeH_xHqqkZx_ _xZkqqHx_iHeDiCmJjGnPiCoJiBeCiDeDiDjDiDgGiDgCiDeOiDfIiImKjChFiCkK_xHqqkZx_ 3 _xZkqqHx_iCmJiOiKiCoJiCnMiCmFiDiLiBfLiDhGiClHiCoJiBeC_xHqqkZx_

		// _xZkqqHx_iDgGiBfLiDfOiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCpA_xHqqkZx_Read Shared_xZkqqHx_iCmFiKeKiCkNiBeC_xHqqkZx_
		const WString wstrDataTablePath = FFGetFilePath(tableNameFrom) + FDTBL_DATA_FILE_EXT;
		FCFile32 fileDataTable;
		if (!fileDataTable.Open(wstrDataTablePath, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING))
			FFThrowMiscUnknown();
		FCIndexFile indexFile(tableNameFrom);
		// _xZkqqHx_jDmHiCnNiPgPiClHiDeDiDjDiDgGiDgCiDeOiDfIiPeJjCfLiCmJ_xHqqkZx_DWORD(-1)_xZkqqHx_iCkKiOhHjCoIiClDiCoKiCmEiCkCiCoJiPoKiNiHiCmNiBeBiNmFiMoDiCmMiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
		if (dwIndexEnd == DWORD(-1))
			dwIndexEnd = indexFile.GetRecordCount();
		// _xZkqqHx_iHeA_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCkJiCoHiImKjChFiCgAiCpAiOoGjDlOiBeC_xHqqkZx_
		flint fliDataFilePositionHead = indexFile.GetDataFilePosition(dwIndexBegin);
		// _xZkqqHx_iHeB_xHqqkZx_ _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiCpAiImKjChFiCgAiCmJiInKjDkOiBeC_xHqqkZx_
		fileDataTable.Seek64(fliDataFilePositionHead, FILE_BEGIN);
		// _xZkqqHx_iHeC_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiImKjChFiCgJiCmJiInKjDkOiBeC_xHqqkZx_
		indexFile.SeekToIndex(dwIndexBegin);

		// _xZkqqHx_iNmFiPiJiCmM_xHqqkZx_AppendWriteRecord_xZkqqHx_iCkJiBeI_xHqqkZx_
		BOOL bIsFirstOfMulti = TRUE;
		// _xZkqqHx_iDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCmMjDmHiCnNiPgPiClFjHhAiDgPiDgCiDhEiDeAiBeC_xHqqkZx_
		BYTEVector vTableRecord;
		while (indexFile.GetCurrentIndex() != dwIndexEnd)
		//----- _xZkqqHx_iHeH_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiImKjChFiCkK_xHqqkZx_ 3 _xZkqqHx_iCmJiOiKiCoJiCnMiCmFiDiLiBfLiDhG_xHqqkZx_ -----
		{
			// _xZkqqHx_iHeD_xHqqkZx_ _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCkJiCoHiDiMiDfCiBfLiDgIiPoOjFpBiBgJ_xHqqkZx_Ix Record 1_xZkqqHx_iBgKiCpAjDmHiCnNiPgPiClHiBeC_xHqqkZx_
			// fliDataFilePositionTail _xZkqqHx_iCmNiBeBiDgGiBfLiDfOiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiImKjChFiCmM_xHqqkZx_
			// _xZkqqHx_iPeJjCfLiCkKiOoGjDlOiClDiCoKiCoJiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
			flint fliPrimaryId;
			DWORD dwAppendIdentifier;
			flint fliDataFilePositionTail;
			indexFile.Read(fliPrimaryId, dwAppendIdentifier, fliDataFilePositionTail);
			// _xZkqqHx_iHeE_xHqqkZx_ _xZkqqHx_iHeDiCmFjDmHiCnNiPgPiClFiClNiImKjChFiCgBiCkJiCoHiImKjChFiCgAiCpAiIpIiCkCiCmEiBeBiDgGiBfLiDfOiDfEiDeDiDfJiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iCmMiDfEiDeDiDfJiBgKiCpAiOfKiPgPiBeC_xHqqkZx_
			const flint fliDataSize = fliDataFilePositionTail - fliDataFilePositionHead;
			// _xZkqqHx_iDiMiDfCiBfLiDgIiDgPiDgCiDhEiDeAiCpAiKgNjFnLiBeC_xHqqkZx_
			vTableRecord.resize(fliDataSize);
			// _xZkqqHx_iHeF_xHqqkZx_ _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiCkJiCoHiHeEiCmFiOfKiPgPiClFiClNiDfEiDeDiDfJjFkKiDgGiBfLiDfOiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iBgKiCpAjDmHiCnNiPgPiClHiBeC_xHqqkZx_
			if (fileDataTable.Read64(&vTableRecord[0], vTableRecord.size()) != vTableRecord.size())
				FFThrowMiscUnknown();
			// _xZkqqHx_iHeG_xHqqkZx_ _xZkqqHx_jDmHiCnNiPgPiClFiClNiDgGiBfLiDfOiBgJ_xHqqkZx_Dt Record 1_xZkqqHx_iBgKiCpAiBeBiJlMjBhKiDhEiDeAiDeDiDiLiCmMiPjBiCkLiNjOiCnNiDiMiDfCiBfLiDgIiCmJjCmHiJmBiBeC_xHqqkZx_

			// bIsFirstOfMulti_xZkqqHx_iCmFiNmFiPiJiCmMiIoKiJpBiClOiCkP_xHqqkZx_AppendIdentifier_xZkqqHx_iCkKiJmBiOfKiClDiCoKiCoJiCoGiCkE_xHqqkZx_
			// _xZkqqHx_jClCjAkOiClHiCoJiBeCiClBiCkEiClFiCmIiCkCiCmGiBeBiDeOiDiJiDeDiDeBiDjDiDgHiCmMiJlMjBhKiDgFiBfLiDhFiDiLiCmG_xHqqkZx_
			// AppendIdentifier_xZkqqHx_iCkKiIoKjChGiClFiCmIiCkNiCmIiCoJiBeC_xHqqkZx_
			// _xZkqqHx_iBgJiDeOiDiJiDeDiDeBiDjDiDgHjBkEiCmFiCmN_xHqqkZx_ _xZkqqHx_iPeJjCfLiDiMiDfCiBfLiDgIiCkKiCfAiNhDiClOiCkPjCmHiJmBiClDiCoKiCoJiClNiCnPiBgK_xHqqkZx_
			pTableRec->m_pVirtualTable->AppendWriteRecord(	bIsFirstOfMulti,
															fliPrimaryId,
															&vTableRecord[0],
															vTableRecord.size());
			bIsFirstOfMulti = FALSE;
			// _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiDhMiDeDiDjDiDfOiCpAiOjPiCnGiInKjDkOiBeC_xHqqkZx_
			fliDataFilePositionHead = fliDataFilePositionTail;
		}
		// _xZkqqHx_iDgGiBfLiDfOiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCpAjFmCiClGiCoJiBeC_xHqqkZx_
		fileDataTable.Close();
		break;
	  }
	default:
		BASE_CLASS::DoTransCommand(byCommand, pTransaction);
	}
} // FCServerTableManager::DoTransCommand.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::CalcRecordInfoGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiDePiDiLiBfLiDhGiCmMiJlKiCmJiCkAiCoJjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPoOjFpBiCpAiMhGiOfKiClFiBeB_xHqqkZx_
 *			_xZkqqHx_iDiBiDjDiDgPiBfLjFmPjAjEiCmJiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pGroupRec	:_xZkqqHx_iDePiDiLiBfLiDhGiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vGroupIds	:_xZkqqHx_iDePiDiLiBfLiDhGiCmM_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCmJjBmOiClFiCmEiBeBiNmEiLeBjDeJiCmJiDiMiDfCiBfLiDgIiPoOjFpBiCpA_xHqqkZx_
 *			_xZkqqHx_iLeMjIfOiClHiCoJiBeC_xHqqkZx_CalcRecordInfoTable_xZkqqHx_iKnGjAjEiCmMiJpAjAoAiCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::CalcRecordInfoGroup (FCGroupRec* pGroupRec, const FCTableIds& vGroupIds)
{
	// CalcRecordInfoGroup_xZkqqHx_iCmNiBeBiDePiDiLiBfLiDhGiBeBiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPeDjAlDiPoOjFpBiCmMiOfKiPgPiCpAiNmEiLeBjDeJiCmJiNhDiCkEiBeC_xHqqkZx_
	// _xZkqqHx_iNhDiCkLiCkKiCkPiCmJiBeBiDePiDiLiBfLiDhGiCkKiNoNiPjMiClDiCoKiClNiPoKiNiHiBeBiClLiCoKiCoGiCoIiJlKiCmMiDgFiBfLiDhFiDiLiCoC_xHqqkZx_
	// _xZkqqHx_iDePiDiLiBfLiDhGiCmMiPiIjHjNiCmNiClFiCmIiCkCiBeC_xHqqkZx_

	switch (pGroupRec->GetOperationFlag())
	{
	case FD_GROUP_OPE_DELETE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoNiPjMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		break;
	  }
	case FD_GROUP_OPE_CREATE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_GROUP_OPE_NONE:		// _xZkqqHx_iDePiDiLiBfLiDhGiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
	  {
		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCmJjBmOiClFiCmEiBeBiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vTableIds(vGroupIds);
		vTableIds.PushBack(0);
		map<DWORD, FCTableRec*>::iterator iTrec;
		for (iTrec = pGroupRec->m_mpTableIdToRec.begin();
			 iTrec != pGroupRec->m_mpTableIdToRec.end(); iTrec++)
		{
			vTableIds.SetLast(iTrec->first);
			CalcRecordInfoTable(iTrec->second, vTableIds);
		}

		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDePiDiLiBfLiDhGiCmJjBmOiClFiCmEiBeBiNmEiLeBjDeJiCmJiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vSubGroupIds(vGroupIds);
		vSubGroupIds.PushBack(0);
		map<DWORD, FCGroupRec*>::iterator iGrec;
		for (iGrec = pGroupRec->m_mpGroupIdToRec.begin();
			 iGrec != pGroupRec->m_mpGroupIdToRec.end(); iGrec++)
		{
			vSubGroupIds.SetLast(iGrec->first);
			CalcRecordInfoGroup(iGrec->second, vSubGroupIds);
		}
		break;
	  }
	default:
		FFThrowMiscUnknown();
	}
} // FCServerTableManager::CalcRecordInfoGroup.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::CalcRecordInfoTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiPoOjFpBiCpAiMhGiOfKiClFiBeBiDiBiDjDiDgPiBfLjFmPjAjEiCmJ_xHqqkZx_
 *			_xZkqqHx_iLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pTableRec	:_xZkqqHx_iDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vTableIds	:_xZkqqHx_iDgFiBfLiDhFiDiLiCmM_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	CalcRecordInfoGroup_xZkqqHx_iKnGjAjEiCkJiCoHiNmEiLeBjDeJiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iClBiCmMiKnGjAjEiCmFiCmNiBeBiDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCmJiDeBiDeOiDfKiDfIiClFiCmEiImIiJlKiCmMiCfBiCmCiCmM_xHqqkZx_
 *			_xZkqqHx_jFmPjAjEiCpAiOfKiPgPiClFiBeBiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			m_dwRealRecordEndIndex
 *				_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiBeBiPeDjAlDjBePiCmMiDiMiDfCiBfLiDgIjAjEiCpAiLeMjIfOiBeC_xHqqkZx_
 *				_xZkqqHx_iJlKjAhNiCmJiCkIiCkPiCoJiCgAiCnMiCmFiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
 *			m_fliVirtualTableRecordBeginPosition
 *				_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmJiCkIiCkPiCoJiBeBiJlMjBhKiDiMiDfCiBfLiDgIiCmM_xHqqkZx_
 *				_xZkqqHx_iKeKiOgOiImKjChFiCpAiDhEiDeAiDeDiDiLiDhMiDfHiDfGiDiHiDjDiCmFiLeMjIfOiBeC_xHqqkZx_
 *				_xZkqqHx_iJlKjAhNiCmJiCkIiCkPiCoJiCgBiCmMiDhEiDeAiDeDiDiLiDhMiDfHiDfGiDiHiDjDiBeC_xHqqkZx_
 *
 *                                               _xZkqqHx_iCgA_xHqqkZx_
 *                                     _xZkqqHx_iCgB_xHqqkZx_        _xZkqqHx_iEkA_xHqqkZx_
 *                                     _xZkqqHx_iEkA_xHqqkZx_   _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
 *                                     _xZkqqHx_iBkL_xHqqkZx_        _xZkqqHx_iBkL_xHqqkZx_
 *                       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
 *           _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiEkA_xHqqkZx_            _xZkqqHx_iBeG_xHqqkZx_        _xZkqqHx_iEkA_xHqqkZx_
 *                       _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
 *                       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
 *           _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiEkA_xHqqkZx_            _xZkqqHx_iEkAiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiEkA_xHqqkZx_
 *                       _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
 *                                     _xZkqqHx_iBkK_xHqqkZx_                _xZkqqHx_iBkK_xHqqkZx_
 *                              _xZkqqHx_iJlMjBhKiDiMiDfCiBfLiDgIiKeKiOgO_xHqqkZx_   _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
 *
 *			_xZkqqHx_iClBiCoKiCoHiCmMjCgMiCpAjFmPjAjEiCmJiLeMjIfOiClHiCoJiClBiCmGiCmFiBeBiImIiMoDiCmMiPiIjHjNiCmJiCkIiCkCiCmE_xHqqkZx_
 *			_xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCmJiDeBiDeOiDfKiDfIiClJiClIiCmJiNmPiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::CalcRecordInfoTable (FCTableRec* pTableRec, const FCTableIds& vTableIds)
{
	const FCTableName tableName(m_hstrTopDirPath, vTableIds);
	FCVirtualWriteTableForFlush* pVirtualTable = (FCVirtualWriteTableForFlush*)pTableRec->m_pVirtualTable;

	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_CREATE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCkKiNoMjAkMiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCkKiNoNiPjM_xHqqkZx_->_xZkqqHx_iNoMjAkMiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		if (!m_pDbServer->IsWriteLocked(tableName))
			FFThrowMiscUnknown();
		if (pVirtualTable != NULL)
		//----- _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDeJiDhFiDfHiDeGiDeOiDgHiCkKjBlGiNnNiClHiCoJiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
			pVirtualTable->m_dwRealRecordEndIndex = 0;
			// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
			pVirtualTable->m_fliVirtualTableRecordBeginPosition = 0;
		}
		break;
	  }
	case FD_TABLE_OPE_NONE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmNiClLiCmMiCnMiCnMiCmMiPoKiNiHiBeC_xHqqkZx_
	  {
		//--------------------------------------------------
		//  _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCkJiCoHiDiMiDfCiBfLiDgIiCpAiNoNiPjMiClFiClNiMoDiCmJjCmHiJmBiCmMiPoKiNiH_xHqqkZx_
		//
		//                                 _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
		//                                      _xZkqqHx_iBkL_xHqqkZx_
		//              _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
		//  _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiEkA_xHqqkZx_                      _xZkqqHx_iEkA_xHqqkZx_
		//              _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
		//              _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkGiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_
		//  _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiEkA_xHqqkZx_            _xZkqqHx_iEkAiBkBiBkBiBkBiBkBiBkBiBkBiBkBiBkBiEkA_xHqqkZx_
		//              _xZkqqHx_iEkEiEjPiEjPiEjPiEjPiEjPiEjPiEkIiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEjPiEkD_xHqqkZx_
		//                            _xZkqqHx_iBkK_xHqqkZx_                _xZkqqHx_iBkK_xHqqkZx_
		//                     _xZkqqHx_iJlMjBhKiDiMiDfCiBfLiDgIiKeKiOgO_xHqqkZx_   _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_
		//--------------------------------------------------

		// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_ = pVirtualTable->m_dwRealRecordEndIndex
		// _xZkqqHx_iJlMjBhKiDiMiDfCiBfLiDgIiKeKiOgOiImKjChF_xHqqkZx_ = pVirtualTable->GetWriteRecordBegin()
		// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiPeJjCfL_xHqqkZx_ = pVirtualTable->GetWriteRecordEnd()

		FCIndexFile indexFile(tableName);
		// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeC_xHqqkZx_
		pVirtualTable->m_dwRealRecordEndIndex = indexFile.GetRecordCount();
		// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMjAfGiLeLiDiMiDfCiBfLiDgIiKeKiOgOiDhEiDeAiDeDiDiLiImKjChFiBeC_xHqqkZx_
		pVirtualTable->m_fliVirtualTableRecordBeginPosition = indexFile.GetDataFilePosition(pVirtualTable->GetWriteRecordBegin());
		break;
	  }
	}
} // FCServerTableManager::CalcRecordInfoTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::MakeRecoveryGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDePiDiLiBfLiDhGiJlKiCmMiBeBjFmPiNfIiClDiCoKiClNjBfDiCmEiCmMiDePiDiLiBfLiDhGiBeFiDgFiBfLiDhFiDiLiCmJ_xHqqkZx_
 *			_xZkqqHx_iKnGiClHiCoJiJpBjFjMiPoOjFpBiCpAiJpBjFjMiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiBeBiDhEiDeAiDeDiDiLiCpAiNoNiPjMiClHiCoJiPoKiNiHiCmNiBeBiDfCiDhDiBfLiCpAiDgPiDgCiDeOiDeBiDgCiDhG_xHqqkZx_
 *			_xZkqqHx_iCmGiClFiCmEiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vOldDirPath	:_xZkqqHx_iDgPiDgCiDeOiDeBiDgCiDhGiCmGiClFiCmEiNoMjAkMiClDiCoKiClNiDgGiDeCiDiMiDeOiDgHiDiKiCmMiDhAiDfIiCpA_xHqqkZx_
 *						 _xZkqqHx_jFnEiClHiBeC_xHqqkZx_
 *			vOldFilePath:_xZkqqHx_iDgPiDgCiDeOiDeBiDgCiDhGiCmGiClFiCmEiNoMjAkMiClDiCoKiClNiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAjFnEiClHiBeC_xHqqkZx_
 *			fileRecover	:_xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pGroupRec	:_xZkqqHx_iJpBjFjMiPoOjFpBiCpAiLeMjIfOiClHiCoJiDePiDiLiBfLiDhGiCmMiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vGroupIds	:pGroupRec_xZkqqHx_iCmMiDePiDiLiBfLiDhG_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCmMiNfMjBkCiCmNiBeBjFlGjDkKiCmMjAoAjGlOiCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::MakeRecoveryGroup (	WStringVector& vOldDirPath,
												WStringVector& vOldFilePath,
												FCFile32& fileRecover,
												FCGroupRec* pGroupRec,
												const FCTableIds& vGroupIds)
{
	// MakeRecoveryGroup_xZkqqHx_iCmNiBeBiDePiDiLiBfLiDhGiBeBiDgFiBfLiDhFiDiLiCmMiDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiNoMjAkMiCpA_xHqqkZx_
	// _xZkqqHx_iNmEiLeBjDeJiCmJiNhDiCkEiBeC_xHqqkZx_
	// _xZkqqHx_iNhDiCkLiCkKiCkPiCmJiBeBiDePiDiLiBfLiDhGiCkKiNoNiPjMiClDiCoKiClNiPoKiNiHiBeBiClLiCoKiCoGiCoIiJlKiCmMiDgFiBfLiDhFiDiLiCoC_xHqqkZx_
	// _xZkqqHx_iDePiDiLiBfLiDhGiCmMiPiIjHjNiCmNiClFiCmIiCkCiBeCiClLiCmMiDePiDiLiBfLiDhGiClCiCmG_xHqqkZx_ .old _xZkqqHx_iDhEiDeIiDiLiDfPiCmJ_xHqqkZx_
	// _xZkqqHx_iDfCiDhDiBfLiClHiCoJiBeC_xHqqkZx_

	// _xZkqqHx_iDgGiDeCiDiMiDeOiDgHiDiKiDhAiDfIiCpAiBeB_xHqqkZx_m_hstrTopDirPath _xZkqqHx_iCkJiCoHiCmMjBiKjBmOiDhAiDfIiCmFiNoMjAkMiBeC_xHqqkZx_
	const WString wstrDirPath = FFGetFilePath(vGroupIds);
	switch (pGroupRec->GetOperationFlag())
	{
	case FD_GROUP_OPE_DELETE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoNiPjMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDgGiDeCiDiMiDeOiDgHiDiKiNoNiPjMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iOhHjCoIiClDiCoKiClNiDgGiDeCiDiMiDeOiDgHiDiKiCmMiDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iCmFiNoMjAkMiClHiCoJiBeC_xHqqkZx_
		myWriteCmdDeleteDirectory(	vOldDirPath, fileRecover,
									WString(m_hstrTopDirPath), wstrDirPath);
		break;
	  }
	case FD_GROUP_OPE_CREATE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDgGiDeCiDiMiDeOiDgHiDiKiNoMjAkMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
		myWriteCmdCreateDirectory(fileRecover, WString(m_hstrTopDirPath), wstrDirPath);
		break;
	  }
	case FD_GROUP_OPE_NONE:		// _xZkqqHx_iDePiDiLiBfLiDhGiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
	  {
		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCmJjBmOiClFiCmEiBeBiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vTableIds(vGroupIds);
		vTableIds.PushBack(0);
		map<DWORD, FCTableRec*>::iterator iTrec;
		for (iTrec = pGroupRec->m_mpTableIdToRec.begin();
			 iTrec != pGroupRec->m_mpTableIdToRec.end(); iTrec++)
		{
			vTableIds.SetLast(iTrec->first);
			MakeRecoveryTable(vOldFilePath, fileRecover, iTrec->second, vTableIds);
		}

		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDePiDiLiBfLiDhGiCmJjBmOiClFiCmEiBeBiNmEiLeBjDeJiCmJiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vSubGroupIds(vGroupIds);
		vSubGroupIds.PushBack(0);
		map<DWORD, FCGroupRec*>::iterator iGrec;
		for (iGrec = pGroupRec->m_mpGroupIdToRec.begin();
			 iGrec != pGroupRec->m_mpGroupIdToRec.end(); iGrec++)
		{
			vSubGroupIds.SetLast(iGrec->first);
			MakeRecoveryGroup(vOldDirPath, vOldFilePath, fileRecover, iGrec->second, vSubGroupIds);
		}
		break;
	  }
	default:
		FFThrowMiscUnknown();
	}
} // FCServerTableManager::MakeRecoveryGroup.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::MakeRecoveryTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDgFiBfLiDhFiDiLiCmMiJpBjFjMiPoOjFpBiCpAiJpBjFjMiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiNoNiPjMiClHiCoJiPoKiNiHiCmNiBeBiDfCiDhDiBfLiCpAiDgPiDgCiDeOiDeBiDgCiDhGiCmGiClFiCmEiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vOldFilePath:_xZkqqHx_iDgPiDgCiDeOiDeBiDgCiDhGiCmGiClFiCmEiNoMjAkMiClDiCoKiClNiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAjFnEiClHiBeC_xHqqkZx_
 *			fileRecover	:_xZkqqHx_iJpBjFjMiDhEiDeAiDeDiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pTableRec	:_xZkqqHx_iJpBjFjMiPoOjFpBiCpAiLeMjIfOiClHiCoJiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vTableIds	:pTableRec_xZkqqHx_iCmMiDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::MakeRecoveryTable (	WStringVector& vOldFilePath,
												FCFile32& fileRecover,
												FCTableRec* pTableRec,
												const FCTableIds& vTableIds)
{
	const FCTableName tableName(m_hstrTopDirPath, vTableIds);
	FCVirtualWriteTableForFlush* pVirtualTable = (FCVirtualWriteTableForFlush*)pTableRec->m_pVirtualTable;

	// _xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAjBiKjBmOiDhAiDfIiCmFiNoMjAkMiBeC_xHqqkZx_
	const WString wstrTablePath = FFGetFilePath(vTableIds) + FDTBL_DATA_FILE_EXT;
	// _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCmMiDhAiDfIiCpAjBiKjBmOiDhAiDfIiCmFiNoMjAkMiBeC_xHqqkZx_
	const WString wstrIndexPath = FFGetFilePath(vTableIds) + FDTBL_INDEX_FILE_EXT;
	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_DELETE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_ -> _xZkqqHx_iNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		if (!m_pDbServer->IsWriteLocked(tableName))
			FFThrowMiscUnknown();
		// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiNoNiPjMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iOhHjCoIiClDiCoKiClNiDhEiDeAiDeDiDiLiCmMiDfCiDhDiBfLiCpA_xHqqkZx_ .old _xZkqqHx_iCmFiNoMjAkMiClHiCoJiBeC_xHqqkZx_
		// Undo_xZkqqHx_iNoMjAkMiCmGjDkPiOjOiCmJiBeBiDhEiDeAiDeDiDiLiCmMjFkBiOmKiCpAiClHiCoJiBgJ_xHqqkZx_ .old _xZkqqHx_iCnGiBgK_xHqqkZx_
		// _xZkqqHx_iClLiCkEiClFiCmIiCkCiCmGiBeB_xHqqkZx_Undo_xZkqqHx_iDhEiDeAiDeDiDiLiNoMjAkMjClMiMoDiCmJjHiOiClPiClNiPoKiNiHiBeB_xHqqkZx_
		// Undo_xZkqqHx_iCpAjDeLjHhAiClHiCoJiCmG_xHqqkZx_ DELETE_AND_CREATE _xZkqqHx_iCkK_xHqqkZx_ _xZkqqHx_iDeJiDiKiDfHiDgJiDiLiCpA_xHqqkZx_
		// _xZkqqHx_iNoNiPjMiClFiCmEiClFiCnMiCkEiJmCjEfMjAkLiCkKiCkAiCoJiClNiCnPiBeC_xHqqkZx_
		myWriteCmdDeleteFile(vOldFilePath, fileRecover, WString(m_hstrTopDirPath), wstrTablePath);
		myWriteCmdDeleteFile(vOldFilePath, fileRecover, WString(m_hstrTopDirPath), wstrIndexPath);
		break;
	  }
	}
	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_CREATE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_ -> _xZkqqHx_iNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		if (!m_pDbServer->IsWriteLocked(tableName))
			FFThrowMiscUnknown();
		// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiNoMjAkMiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
		myWriteCmdCreateFile(fileRecover, WString(m_hstrTopDirPath), wstrTablePath);
		myWriteCmdCreateFile(fileRecover, WString(m_hstrTopDirPath), wstrIndexPath);
		break;
	  }
	case FD_TABLE_OPE_NONE:					// _xZkqqHx_iDgFiBfLiDhFiDiLiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
	  {
		// _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCmJjBmOiClHiCoJiJlMjBhKiDgFiBfLiDhFiDiLiCmMiDeJiDhJiDiMiBfLiDfGiDiHiDjDiBeC_xHqqkZx_
		switch (pVirtualTable->m_recordOperation)
		{
		case FD_RECORD_OPE_NOT_CHANGE:		// _xZkqqHx_iHeA_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
			break;
		case FD_RECORD_OPE_ADD:				// _xZkqqHx_iHeB_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCmJjCmHiJmBiCmMiCnNiCmMiPoKiNiHiBeC_xHqqkZx_
		case FD_RECORD_OPE_DEL:				// _xZkqqHx_iHeC_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCkJiCoHiNoNiPjMiCmMiCnNiCmMiPoKiNiHiBeC_xHqqkZx_
		case FD_RECORD_OPE_DEL_AND_ADD:		// _xZkqqHx_iHeD_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCkJiCoHiNoNiPjMiClFiClNiMoDiCmJjCmHiJmBiCmMiPoKiNiHiBeC_xHqqkZx_
		  {
			// _xZkqqHx_iDiKiDeKiDgPiDiKiBfLiDhEiDeAiDeDiDiLiCmJiDhEiDeAiDeDiDiLiPeDjAlDiDfCiDhNiDjDiDgIiCpAiLeMjIfOiClHiCoJiBeC_xHqqkZx_
			myWriteCmdModifyFile(	fileRecover,
									WString(m_hstrTopDirPath),
									wstrTablePath,
									pVirtualTable->m_fliVirtualTableRecordBeginPosition);
			myWriteCmdModifyFile(	fileRecover,
									WString(m_hstrTopDirPath),
									wstrIndexPath,
									FCIndexFile::GetIndexFilePosition(pVirtualTable->GetWriteRecordBegin()));
			break;
		  }
		default:
			FFThrowMiscUnknown();
		}
		break;
	  }
	}
} // FCServerTableManager::MakeRecoveryTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::WriteGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDePiDiLiBfLiDhGiImIiJlKiCmMiBeBiDeMiDiDiDgCiDfGiDiFiClDiCoKiClNiJlMjBhKiDgFiBfLiDhFiDiLiCmM_xHqqkZx_
 *			_xZkqqHx_iDiMiDfCiBfLiDgIiCpAiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pGroupRec	:_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiLeMjIfOiClHiCoJiDePiDiLiBfLiDhGiCmMiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vGroupIds	:pGroupRec_xZkqqHx_iCmMiDePiDiLiBfLiDhG_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::WriteGroup (FCGroupRec* pGroupRec, const FCTableIds& vGroupIds)
{
	const WString wstrDirPath = FFGetFilePath(FCTableName(m_hstrTopDirPath, vGroupIds));
	switch (pGroupRec->GetOperationFlag())
	{
	case FD_GROUP_OPE_DELETE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoNiPjMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		// _xZkqqHx_iClBiCmMiDgGiDeCiDiMiDeOiDgHiDiKiImIiJlKiCmMjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCkKiDiNiDgCiDeOiClDiCoKiCmEiCkCiCoJjFeLjHhGiCkKiCkAiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iDiNiDgCiDeOiCmNiKgNjEeGiClFiCmIiCkCiBeC_xHqqkZx_
		// _xZkqqHx_iDePiDiLiBfLiDhGiCmMiDgGiDeCiDiMiDeOiDgHiDiKiImIiJlKiCpAjBfDiCmEiNoNiPjMiBeC_xHqqkZx_
		FFRecursiveRemoveDirectory(wstrDirPath);
		break;
	  }
	case FD_GROUP_OPE_CREATE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		// _xZkqqHx_iDePiDiLiBfLiDhGiCmMiDgGiDeCiDiMiDeOiDgHiDiKiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
		FFCreateDirectory(wstrDirPath, NULL);
		break;
	  }
	}

	switch (pGroupRec->GetOperationFlag())
	{
	case FD_GROUP_OPE_CREATE:	// _xZkqqHx_iDePiDiLiBfLiDhGiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_GROUP_OPE_NONE:		// _xZkqqHx_iDePiDiLiBfLiDhGiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
	  {
		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDgFiBfLiDhFiDiLiCmJiPjBiCkLiNjOiCnNiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vTableIds(vGroupIds);
		vTableIds.PushBack(0);
		map<DWORD, FCTableRec*>::iterator iTrec;
		for (iTrec = pGroupRec->m_mpTableIdToRec.begin();
			 iTrec != pGroupRec->m_mpTableIdToRec.end(); iTrec++)
		{
			vTableIds.SetLast(iTrec->first);
			WriteTable(iTrec->second, vTableIds);
		}

		//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlKiCmMjBfDiCmEiCmMiDePiDiLiBfLiDhGiCmJiNmEiLeBjDeJiCmJiPjBiCkLiNjOiCnNiPiIjHjNiCpAiOmAiNhD_xHqqkZx_ -----
		FCTableIds vSubGroupIds(vGroupIds);
		vSubGroupIds.PushBack(0);
		map<DWORD, FCGroupRec*>::iterator iGrec;
		for (iGrec = pGroupRec->m_mpGroupIdToRec.begin();
			 iGrec != pGroupRec->m_mpGroupIdToRec.end(); iGrec++)
		{
			vSubGroupIds.SetLast(iGrec->first);
			WriteGroup(iGrec->second, vSubGroupIds);
		}
		break;
	  }
	case FD_GROUP_OPE_DELETE:
		// _xZkqqHx_iPoDiCmFiDePiDiLiBfLiDhGiDgGiDeCiDiMiDeOiDgHiDiKiCpAiNoNiPjMiClFiCmEiCkCiCoJiCmMiCmFiBeB_xHqqkZx_
		// _xZkqqHx_iDePiDiLiBfLiDhGiImIiJlKiCmMiNmEiLeBjDeJiCmIiPiIjHjNiCmNjAgJiCnPiCmIiCkCiBeC_xHqqkZx_
		break;
	default:
		FFThrowMiscUnknown();
	}
} // FCServerTableManager::WriteGroup.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::WriteTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDgFiBfLiDhFiDiLiCmMiBeBiDeMiDiDiDgCiDfGiDiFiClDiCoKiClNiJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpA_xHqqkZx_
 *			_xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pTableRec	:_xZkqqHx_iDhEiDeAiDeDiDiLiCpAiLeMjIfOiClHiCoJiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			vTableIds	:pTableRec_xZkqqHx_iCmMiDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::WriteTable (FCTableRec* pTableRec, const FCTableIds& vTableIds)
{
	const FCTableName tableName(m_hstrTopDirPath, vTableIds);
	const WString wstrTablePath = FFGetFilePath(tableName) + FDTBL_DATA_FILE_EXT;
	const WString wstrIndexPath = FFGetFilePath(tableName) + FDTBL_INDEX_FILE_EXT;
	FCVirtualWriteTableForFlush* pVirtualTable = (FCVirtualWriteTableForFlush*)pTableRec->m_pVirtualTable;

	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_DELETE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_ -> _xZkqqHx_iNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		if (!m_pDbServer->IsWriteLocked(tableName))
			FFThrowMiscUnknown();
		// _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiBeBiDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiNoNiPjMiBeC_xHqqkZx_
		FFDeleteFile(wstrTablePath);
		FFDeleteFile(wstrIndexPath);
		break;
	  }
	}
	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_CREATE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_ -> _xZkqqHx_iNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	  {
		if (!m_pDbServer->IsWriteLocked(tableName))
			FFThrowMiscUnknown();
		// _xZkqqHx_iDgGiBfLiDfOiDhEiDeAiDeDiDiLiCpAiNoMjAkMiBeC_xHqqkZx_
		FCFile32 fileTable(wstrTablePath, 0, 0, CREATE_NEW);
		fileTable.Flush();
		fileTable.Close();
		// _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiNoMjAkMiBeC_xHqqkZx_
		FCFile32 fileIndex;
		if (!fileIndex.Open(wstrIndexPath, GENERIC_WRITE, 0, CREATE_NEW))
			FFThrowMiscUnknown();
		// _xZkqqHx_iNmFiPiJiCmMiImKjChFiClOiCkPiLeMjIfOiBeC_xHqqkZx_
		const flint fli0 = 0;
		fileIndex.Write64(&fli0, sizeof(fli0));
		fileIndex.Flush();
		fileIndex.Close();
		break;
	  }
	}

	switch (pTableRec->GetOperationFlag())
	{
	case FD_TABLE_OPE_CREATE:				// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_DELETE_AND_CREATE:	// _xZkqqHx_iDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_ -> _xZkqqHx_iNoMjAkMiClFiClNiPoKiNiHiBeC_xHqqkZx_
	case FD_TABLE_OPE_NONE:					// _xZkqqHx_iDgFiBfLiDhFiDiLiCmJjFmPiNfIiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
	  {
		if (pVirtualTable != NULL &&
			pVirtualTable->m_recordOperation != FD_RECORD_OPE_NOT_CHANGE)
		//----- _xZkqqHx_iHeA_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCmJjFmPiNfIiCmIiCkC_xHqqkZx_ _xZkqqHx_iImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
			FCFile32 fileTable;
			if (!fileTable.Open(wstrTablePath, GENERIC_WRITE, 0, OPEN_EXISTING))
				FFThrowMiscUnknown();
			// _xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAiKeKiCkNiBeC_xHqqkZx_
			FCFile32 fileIndex;
			if (!fileIndex.Open(wstrIndexPath, GENERIC_WRITE, 0, OPEN_EXISTING))
				FFThrowMiscUnknown();

			switch (pVirtualTable->m_recordOperation)
			{
			case FD_RECORD_OPE_DEL_AND_ADD:		// _xZkqqHx_iHeD_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCkJiCoHiNoNiPjMiClFiClNiMoDiCmJjCmHiJmBiCmMiPoKiNiHiBeC_xHqqkZx_
			case FD_RECORD_OPE_DEL:				// _xZkqqHx_iHeC_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCkJiCoHiNoNiPjMiCmMiCnNiCmMiPoKiNiHiBeC_xHqqkZx_
				fileTable.SetLength64(pVirtualTable->m_fliVirtualTableRecordBeginPosition);
				fileIndex.SetLength64(FCIndexFile::GetIndexFilePosition(pVirtualTable->GetWriteRecordBegin()));
				break;
			}

			FCServerLockRec* pLockRec = m_pDbServer->GetLockRec(tableName);
			switch (pVirtualTable->m_recordOperation)
			{
			case FD_RECORD_OPE_ADD:				// _xZkqqHx_iHeB_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCmJjCmHiJmBiCmMiCnNiCmMiPoKiNiHiBeC_xHqqkZx_
			case FD_RECORD_OPE_DEL_AND_ADD:		// _xZkqqHx_iHeD_xHqqkZx_ _xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiCkJiCoHiNoNiPjMiClFiClNiMoDiCmJjCmHiJmBiCmMiPoKiNiHiBeC_xHqqkZx_
			  {
				// _xZkqqHx_iDhEiDeAiDeDiDiLiPeJjCfLiCmJiDhMiDeDiDjDiDfOiCpAiInKjDkOiBeC_xHqqkZx_
				fileTable.Seek64(0, FILE_END);
				fileIndex.Seek64(0, FILE_END);
				//----- _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIiCpAjFkIjHjNiDhEiDeAiDeDiDiLiCnGiDfCiDhDiBfL_xHqqkZx_ -----
				BYTEVector vIndexData;
				DWORD dwIndex;
				for (dwIndex = pVirtualTable->GetWriteRecordBegin();
					 dwIndex != pVirtualTable->GetWriteRecordEnd(); dwIndex++)
				{
					DWORD dwAppendIdentifier;
					flint fliPrimaryId;
					BYTEVector vRecordData;
					pVirtualTable->GetWriteRecord(dwAppendIdentifier, fliPrimaryId, vRecordData, dwIndex);
					fileTable.Write64(&vRecordData[0], vRecordData.size());
					vIndexData << fliPrimaryId;
					vIndexData << dwAppendIdentifier;
					vIndexData << fileTable.GetPosition64();
				}
				fileIndex.Write64(&vIndexData[0], vIndexData.size());
				break;
			  }
			}
			// _xZkqqHx_iDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiBeBiDeDiDjDiDgGiDgCiDeOiDfIiDhEiDeAiDeDiDiLiCpAjFmCiClGiCoJiBeC_xHqqkZx_
			fileTable.Flush();
			fileIndex.Flush();
			fileTable.Close();
			fileIndex.Close();
		}
		break;
	  }
	}
} // FCServerTableManager::WriteTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::CreateVirtualTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDeJiDhFiDfHiDeGiDeOiDgHiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiDeJiDhFiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDfEiBfLiDgPiBfLiDfEiDeDiDgIiCmGiDeOiDiJiDeDiDeBiDjDiDgHiDfEiDeDiDgIiCmFiBeBiOgHiCoNiCoKiCoJiJlMjBhKiDgFiBfLiDhFiDiLiCmN_xHqqkZx_
 *			_xZkqqHx_iInJiCmIiCoJiBeCiClBiCmMiClNiCnPiBeBiClBiCmMiKnGjAjEiCpAiDeJiBfLiDgPiBfLiDiJiDeDiDgIiClFiCmEjAnIiCoIjFkKiCkPiCmEiCkCiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCVirtualWriteTable* FCServerTableManager::CreateVirtualTable ()
{
	return new FCVirtualWriteTableForFlush();
} // FCServerTableManager::CreateVirtualTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::UpdateVirtualTable
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCmMiJlMjBhKiDgFiBfLiDhFiDiLiCpAjHhAiInDiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vTableIds	:_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDgFiBfLiDhFiDiLiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDgFiBfLiDhFiDiLiCmMjAfGiLeLiNoMjAkMiOjOiCmFiCmIiCkPiCoKiCmOiBeBiKpJjBlGiDgFiBfLiDhFiDiLiCmMiPoOjFpBiCmN_xHqqkZx_
 *			_xZkqqHx_jFkIjHjNiDgFiBfLiDhFiDiLiDhEiDeAiDeDiDiLiCmGiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClDiCoKiCmEiCkCiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCpAjHhAiInDiClHiCoJiPoKiNiHiBeBiClBiCoKiCoHiCmMiPoOjFpBiCpAiJlMjBhKiDgFiBfLiDhFiDiLiCmJ_xHqqkZx_
 *			_xZkqqHx_jFkBiOmKiClFiCmEiJlMjBhKiDgFiBfLiDhFiDiLiCpAiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCTableRec* FCServerTableManager::UpdateVirtualTable (const FCTableIds& vTableIds)
{
	FCTableRec* pTableRec = QueryTableRec(vTableIds);
	// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiNoMjAkMiCkJiBeI_xHqqkZx_
	BOOL bIsCreateVirtualTable = FALSE;
	if (pTableRec->m_pVirtualTable == NULL)
	{
		// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiNoMjAkMiCkJiBeI_xHqqkZx_
		bIsCreateVirtualTable = TRUE;
		pTableRec->m_pVirtualTable = CreateVirtualTable();
	}

	// pTableRec_xZkqqHx_iCkKjAfGiLeLiNoMjAkMiCmMiPoKiNiHiCmNiBeBiDgFiBfLiDhFiDiLiCmMiDeMiDiDiDgCiDfGiDiFiCpAjDmHiCnNiNjOiCnMiCmIiCkCiBeC_xHqqkZx_
	if (pTableRec->m_tableOperation == FD_TABLE_OPE_NONE)
	//----- _xZkqqHx_iDgFiBfLiDhFiDiLiCmMjAfGiLeLiNoMjAkMjDjJiCkKjAnNjCoIiClDiCoKiCmEiCkCiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		if (bIsCreateVirtualTable)
		//----- _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiNoMjAkMiOjOiCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDgFiBfLiDhFiDiLiCkKjAfGiLeLiNoMjAkMiCmFiCmNiCmIiCkCiPoKiNiHiBeBiDgFiBfLiDhFiDiLiCmM_xHqqkZx_GUID_xZkqqHx_iBeF_xHqqkZx_
			// Identifier_xZkqqHx_iCmMiPoOjFpBiCmNiBeB_xHqqkZx_
			// _xZkqqHx_iDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiL_xHqqkZx_ -> _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiL_xHqqkZx_
			// _xZkqqHx_iCmMjFpLiMpMiCmFjFkBiOmKiClHiCoJiBeC_xHqqkZx_
			// _xZkqqHx_iDgFiBfLiDhFiDiLiCkKjAfGiLeLiNoMjAkMiCmMiPoKiNiHiBeBiDgFiBfLiDhFiDiLiCmM_xHqqkZx_GUID_xZkqqHx_iBeF_xHqqkZx_
			// Identifier_xZkqqHx_iCmMiPoOjFpBiCmNiBeB_xHqqkZx_
			// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiL_xHqqkZx_ -> _xZkqqHx_iDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiL_xHqqkZx_
			// _xZkqqHx_iCmMjFpLiMpMiCmFjFkBiOmKiClHiCoJiBeC_xHqqkZx_
			// _xZkqqHx_jAfGiLeLiNoMjAkMiOjOiCmJiLhEjFpLiMpMiCmIiCmMiCmNiBeBiDgFiBfLiDhFiDiLiCpAiNoNiPjM_xHqqkZx_->_xZkqqHx_iNoMjAkM_xHqqkZx_ _xZkqqHx_iCmMiPoKiNiHiCpA_xHqqkZx_
			// _xZkqqHx_iNgMjHlGiClHiCoJiCmGiBeBiDhEiDiJiDgCiDfGiDiFiOjOiCmJiDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmM_xHqqkZx_GUID_xZkqqHx_jDjJiCpA_xHqqkZx_
			// _xZkqqHx_jFmPiNfIiClFiClNjFpLiCkKjHmHiCkCiCmGjElLjCgGiBeC_xHqqkZx_

			// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiDiNiDgCiDeOiPoOjFpBiCpAiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCkJiCoHiOoGjDlOiBeC_xHqqkZx_
			GUID guidTable;
			DWORD dwDeleteIdentifier;
			DWORD dwAppendIdentifier;
			GetReadLockInfo(guidTable,
							dwDeleteIdentifier,
							dwAppendIdentifier,
							vTableIds);
			// _xZkqqHx_iDgFiBfLiDhFiDiLiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOoGjDlOiBeC_xHqqkZx_
			FCIndexFile indexFile(FCTableName(m_hstrTopDirPath, vTableIds));
			// _xZkqqHx_iJlMjBhKiDgFiBfLiDhFiDiLiCmJiBeBiDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iBeBjFkIjHjNiDgFiBfLiDhFiDiLiCmMiDiMiDfCiBfLiDgIjAjEiBeB_xHqqkZx_
			// _xZkqqHx_iNoNiPjMiBeFjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
			pTableRec->m_pVirtualTable->SetTableGuid(guidTable);
			pTableRec->m_pVirtualTable->ResetWriteRecordCache(	indexFile.GetRecordCount(),
																dwDeleteIdentifier,
																dwAppendIdentifier);
		}
	}
	return pTableRec;
} // FCServerTableManager::UpdateVirtualTable.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::GetReadLockInfo
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCkJiCoHiBeBiDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iBeBiNoNiPjMiBeFjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpA_xHqqkZx_
 *			_xZkqqHx_iOoGjDlOiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	guidTable			;_xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *			dwDeleteIdentifier	:_xZkqqHx_iNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *			dwAppendIdentifier	:_xZkqqHx_jCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *			vTableIds			:_xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::GetReadLockInfo (GUID& guidTable,
											DWORD& dwDeleteIdentifier,
											DWORD& dwAppendIdentifier,
											const FCTableIds& vTableIds) const
{
	m_pDbServer->GetReadLockInfo(guidTable,
								dwDeleteIdentifier,
								dwAppendIdentifier,
								FCTableName(m_hstrTopDirPath, vTableIds));
} // FCServerTableManager::GetReadLockInfo.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::SetLockGuidAndIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmJiBeBiDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iBeBiNoNiPjMiBeFjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpA_xHqqkZx_
 *			_xZkqqHx_jAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vTableIds			:_xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			guidTable			;_xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_GUID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwDeleteIdentifier	:_xZkqqHx_iNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwAppendIdentifier	:_xZkqqHx_jCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::SetLockGuidAndIdentifier (	const FCTableIds& vTableIds,
														const GUID& guidTable,
														DWORD dwDeleteIdentifier,
														DWORD dwAppendIdentifier)
{
	// _xZkqqHx_iDgFiBfLiDhFiDiLiCmMiNoMjAkMiOjOiCmNiBeBiDiNiDgCiDeOiDhEiDeAiDeDiDiLiCpAiDiKiDfKiDgCiDgHiClHiCoJjFeLjHhGiCkKiCkAiCoJiBeC_xHqqkZx_
	FCServerLockRec* pLockRec = m_pDbServer->GetLockRec(FCTableName(m_hstrTopDirPath, vTableIds));
	pLockRec->m_autoReadLock.SetTableGuid(guidTable);
	pLockRec->m_autoReadLock.SetDeleteIdentifier(dwDeleteIdentifier);
	pLockRec->m_autoReadLock.SetAppendIdentifier(dwAppendIdentifier);
	pLockRec->m_autoWriteLock.WriteOwnFile(	guidTable,
											dwDeleteIdentifier,
											dwAppendIdentifier);
} // FCServerTableManager::SetLockGuidAndIdentifier.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCServerTableManager::SetLockIdentifier
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiNiDgCiDeOiPiKjHeMiMkAiDhEiDeAiDeDiDiLiCmJiBeBiNoNiPjMiBeFjCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpA_xHqqkZx_
 *			_xZkqqHx_jAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	vTableIds			:_xZkqqHx_iDgFiBfLiDhFiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwDeleteIdentifier	:_xZkqqHx_iNoNiPjM_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwAppendIdentifier	:_xZkqqHx_jCmHiJmB_xHqqkZx_Identifier_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCServerTableManager::SetLockIdentifier (	const FCTableIds& vTableIds,
												DWORD dwDeleteIdentifier,
												DWORD dwAppendIdentifier)
{
	FCServerLockRec* pLockRec = m_pDbServer->GetLockRec(FCTableName(m_hstrTopDirPath, vTableIds));
	pLockRec->m_autoReadLock.SetDeleteIdentifier(dwDeleteIdentifier);
	pLockRec->m_autoReadLock.SetAppendIdentifier(dwAppendIdentifier);
	pLockRec->m_autoWriteLock.WriteOwnFile(	dwDeleteIdentifier,
											dwAppendIdentifier);
} // FCServerTableManager::SetLockIdentifier.

