mirror of
https://github.com/MariaDB/server.git
synced 2026-05-01 20:55:32 +02:00
10.0-connect
This commit is contained in:
commit
87b75b7719
71 changed files with 4577 additions and 3482 deletions
|
|
@ -23,15 +23,15 @@ array.cpp blkfil.cpp colblk.cpp csort.cpp
|
|||
filamap.cpp filamdbf.cpp filamfix.cpp filamtxt.cpp filamvct.cpp filamzip.cpp
|
||||
filter.cpp maputil.cpp myutil.cpp plgdbutl.cpp reldef.cpp tabcol.cpp
|
||||
tabdos.cpp tabfix.cpp tabfmt.cpp table.cpp tabmul.cpp taboccur.cpp
|
||||
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabxcl.cpp
|
||||
valblk.cpp value.cpp xindex.cpp xobject.cpp
|
||||
tabpivot.cpp tabsys.cpp tabtbl.cpp tabutil.cpp tabvct.cpp tabvir.cpp
|
||||
tabxcl.cpp valblk.cpp value.cpp xindex.cpp xobject.cpp
|
||||
|
||||
array.h blkfil.h block.h catalog.h checklvl.h colblk.h connect.h csort.h
|
||||
engmsg.h filamap.h filamdbf.h filamfix.h filamtxt.h filamvct.h filamzip.h
|
||||
filter.h global.h ha_connect.h inihandl.h maputil.h msgid.h mycat.h myutil.h
|
||||
os.h osutil.h plgcnx.h plgdbsem.h preparse.h reldef.h resource.h tabcol.h
|
||||
tabdos.h tabfix.h tabfmt.h tabmul.h taboccur.h tabpivot.h tabsys.h
|
||||
tabtbl.h tabutil.h tabvct.h tabxcl.h user_connect.h valblk.h value.h
|
||||
tabtbl.h tabutil.h tabvct.h tabvir.h tabxcl.h user_connect.h valblk.h value.h
|
||||
xindex.h xobject.h xtable.h)
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -51,11 +51,6 @@
|
|||
#define ASSERT(B)
|
||||
#endif
|
||||
|
||||
/***********************************************************************/
|
||||
/* Static variables. */
|
||||
/***********************************************************************/
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* DB static external variables. */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -39,11 +39,6 @@
|
|||
#include "array.h" // ARRAY classes dcls
|
||||
#include "blkfil.h" // Block Filter classes dcls
|
||||
|
||||
/***********************************************************************/
|
||||
/* Static variables. */
|
||||
/***********************************************************************/
|
||||
extern "C" int trace;
|
||||
|
||||
/* ------------------------ Class BLOCKFILTER ------------------------ */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
#include "xindex.h"
|
||||
#include "xtable.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* COLBLK protected constructor. */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -48,11 +48,6 @@
|
|||
#define my_strlwr(p) my_casedn_str(default_charset_info, (p));
|
||||
#define my_stricmp(a, b) my_strcasecmp(default_charset_info, (a), (b))
|
||||
|
||||
/***********************************************************************/
|
||||
/* DB static variables. */
|
||||
/***********************************************************************/
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Routines called internally by semantic routines. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -281,16 +276,13 @@ bool CntOpenTable(PGLOBAL g, PTDB tdbp, MODE mode, char *c1, char *c2,
|
|||
if (trace)
|
||||
printf("Allocating column %s\n", p);
|
||||
|
||||
// if (*p == '*') {
|
||||
// // This is a special column
|
||||
// cp= new(g) COLUMN(p + 1);
|
||||
// cp->SetTo_Table(tdbp->GetTable());
|
||||
// colp= ((PTDBASE)tdbp)->InsertSpcBlk(g, cp);
|
||||
// } else
|
||||
colp= tdbp->ColDB(g, p, 0);
|
||||
g->Message[0] = 0; // To check whether ColDB made an error message
|
||||
colp= tdbp->ColDB(g, p, 0);
|
||||
|
||||
if (!colp && !(mode == MODE_INSERT && tdbp->IsSpecial(p))) {
|
||||
if (g->Message[0] == 0)
|
||||
sprintf(g->Message, MSG(COL_ISNOT_TABLE), p, tdbp->GetName());
|
||||
|
||||
if (!colp) {
|
||||
sprintf(g->Message, "Column %s not found in %s", p, tdbp->GetName());
|
||||
goto err;
|
||||
} // endif colp
|
||||
|
||||
|
|
@ -421,14 +413,14 @@ RCODE EvalColumns(PGLOBAL g, PTDB tdbp, bool mrr)
|
|||
|
||||
for (colp= tdbp->GetColumns(); rc == RC_OK && colp;
|
||||
colp= colp->GetNext()) {
|
||||
colp->Reset();
|
||||
colp->Reset();
|
||||
|
||||
// Virtual columns are computed by MariaDB
|
||||
if (!colp->GetColUse(U_VIRTUAL) && (!mrr || colp->GetKcol()))
|
||||
if (colp->Eval(g))
|
||||
rc= RC_FX;
|
||||
// Virtual columns are computed by MariaDB
|
||||
if (!colp->GetColUse(U_VIRTUAL) && (!mrr || colp->GetKcol()))
|
||||
if (colp->Eval(g))
|
||||
rc= RC_FX;
|
||||
|
||||
} // endfor colp
|
||||
} // endfor colp
|
||||
|
||||
err:
|
||||
g->jump_level--;
|
||||
|
|
@ -659,8 +651,10 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
|
|||
if (!ptdb)
|
||||
return -1;
|
||||
else if (!((PTDBASE)ptdb)->GetDef()->Indexable()) {
|
||||
sprintf(g->Message, "CntIndexInit: Table %s is not indexable", ptdb->GetName());
|
||||
sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
|
||||
return 0;
|
||||
} else if (((PTDBASE)ptdb)->GetDef()->Indexable() == 3) {
|
||||
return 1;
|
||||
} else
|
||||
tdbp= (PTDBDOX)ptdb;
|
||||
|
||||
|
|
@ -730,13 +724,21 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
|
|||
x= ((PTDBASE)ptdb)->GetDef()->Indexable();
|
||||
|
||||
if (!x) {
|
||||
sprintf(g->Message, "CntIndexRead: Table %s is not indexable", ptdb->GetName());
|
||||
sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
|
||||
return RC_FX;
|
||||
} else if (x == 2) {
|
||||
// Remote index
|
||||
if (ptdb->ReadKey(g, op, key, len))
|
||||
return RC_FX;
|
||||
|
||||
goto rnd;
|
||||
} else if (x == 3) {
|
||||
if (key)
|
||||
((PTDBASE)ptdb)->SetRecpos(g, *(int*)key);
|
||||
|
||||
if (op == OP_SAME)
|
||||
return RC_NF;
|
||||
|
||||
goto rnd;
|
||||
} else
|
||||
tdbp= (PTDBDOX)ptdb;
|
||||
|
|
@ -836,12 +838,21 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len,
|
|||
x= ((PTDBASE)ptdb)->GetDef()->Indexable();
|
||||
|
||||
if (!x) {
|
||||
sprintf(g->Message, "CntIndexRange: Table %s is not indexable", ptdb->GetName());
|
||||
sprintf(g->Message, MSG(TABLE_NO_INDEX), ptdb->GetName());
|
||||
DBUG_PRINT("Range", ("%s", g->Message));
|
||||
return -1;
|
||||
} else if (x == 2) {
|
||||
// Remote index
|
||||
return 2;
|
||||
} else if (x == 3) {
|
||||
// Virtual index
|
||||
for (i= 0; i < 2; i++)
|
||||
if (key[i])
|
||||
k[i] = *(int*)key[i] + (incl[i] ? 0 : 1 - 2 * i);
|
||||
else
|
||||
k[i] = (i) ? ptdb->Cardinality(g) : 1;
|
||||
|
||||
return k[1] - k[0] + 1;
|
||||
} else
|
||||
tdbp= (PTDBDOX)ptdb;
|
||||
|
||||
|
|
|
|||
320
storage/connect/encas.h
Normal file
320
storage/connect/encas.h
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
case MSG_ACCESS_VIOLATN: p = "Access violation"; break;
|
||||
case MSG_ADD_BAD_TYPE: p = "Array add value type mismatch (%s -> %s)"; break;
|
||||
case MSG_ALLOC_ERROR: p = "Error allocating %s"; break;
|
||||
case MSG_ANSWER_TYPE: p = "Answer of type"; break;
|
||||
case MSG_API_CONF_ERROR: p = "SQL Error: API_CONFORMANCE"; break;
|
||||
case MSG_APPL_NOT_INIT: p = "Application not initialized"; break;
|
||||
case MSG_ARRAY_BNDS_EXCD: p = "Array bounds exceeded"; break;
|
||||
case MSG_BAD_ARRAY_OPER: p = "Arrays must be used with the IN operator"; break;
|
||||
case MSG_BAD_ARRAY_TYPE: p = "Illegal array type %d"; break;
|
||||
case MSG_BAD_ARRAY_VAL: p = "Arrays must have the same number of values"; break;
|
||||
case MSG_BAD_BIN_FMT: p = "Invalid format %c for the %s BIN column"; break;
|
||||
case MSG_BAD_BLK_ESTIM: p = "Number of blocks exceeds estimate"; break;
|
||||
case MSG_BAD_BLK_SIZE: p = "No match in block %d size"; break;
|
||||
case MSG_BAD_BYTE_NUM: p = "bad number of bytes written"; break;
|
||||
case MSG_BAD_BYTE_READ: p = "bad number of bytes read"; break;
|
||||
case MSG_BAD_COL_TYPE: p = "Invalid type %s for column %s"; break;
|
||||
case MSG_BAD_COL_XPATH: p = "Invalid Xpath in column %s for HTML table %s"; break;
|
||||
case MSG_BAD_CONST_TYPE: p = "Bad constant type=%d"; break;
|
||||
case MSG_BAD_CONV_TYPE: p = "Invalid convert type %d"; break;
|
||||
case MSG_BAD_DATETIME: p = "Invalid datetime value"; break;
|
||||
case MSG_BAD_DBF_FILE: p = "DBF file %s is corrupted"; break;
|
||||
case MSG_BAD_DBF_REC: p = "DBF file %s corrupted at record %d"; break;
|
||||
case MSG_BAD_DBF_TYPE: p = "Unsupported DBF type %c for column %s"; break;
|
||||
case MSG_BAD_DIRECTORY: p = "Bad directory %s: %s"; break;
|
||||
case MSG_BAD_FIELD_RANK: p = "Invalid field rank %d for column %s"; break;
|
||||
case MSG_BAD_FIELD_TYPE: p = "Bad type field %s"; break;
|
||||
case MSG_BAD_FILE_HANDLE: p = "Invalid File Handle: %s"; break;
|
||||
case MSG_BAD_FILTER: p = "Bad filter: Opc=%d B_T=%d %d Type=%d %d"; break;
|
||||
case MSG_BAD_FILTER_CONV: p = "Bad filter conversion, B_T=%d,%d"; break;
|
||||
case MSG_BAD_FILTER_OP: p = "Invalid filter operator %d"; break;
|
||||
case MSG_BAD_FLD_FORMAT: p = "Bad format for field %d of %s"; break;
|
||||
case MSG_BAD_FLD_LENGTH: p = "Field %s too long (%s --> %d) line %d of %s"; break;
|
||||
case MSG_BAD_FREQ_SET: p = "Bad frequency setting for column %s"; break;
|
||||
case MSG_BAD_FUNC_MODE: p = "%s: invalid mode %d"; break;
|
||||
case MSG_BAD_HANDLE_VAL: p = "Invalid handle value"; break;
|
||||
case MSG_BAD_HEADER: p = "File %s: Header corrupted"; break;
|
||||
case MSG_BAD_HEAD_END: p = "Can't read end of header"; break;
|
||||
case MSG_BAD_INDEX_FILE: p = "Wrong index file %s"; break;
|
||||
case MSG_BAD_LINEFLD_FMT: p = "Bad format line %d field %d of %s"; break;
|
||||
case MSG_BAD_LINE_LEN: p = "Line length not equal to Lrecl"; break;
|
||||
case MSG_BAD_LRECL: p = "Table/File lrecl mismatch (%d,%hd)"; break;
|
||||
case MSG_BAD_NODE_TYPE: p = "Bad type %d for table node"; break;
|
||||
case MSG_BAD_OFFSET_VAL: p = "Invalid null offset value for a CSV table"; break;
|
||||
case MSG_BAD_OPEN_MODE: p = "Invalid open mode %d"; break;
|
||||
case MSG_BAD_PARAM_TYPE: p = "%.8s: Bad parameter type=%d"; break;
|
||||
case MSG_BAD_PARM_COUNT: p = "Parameter count mismatch"; break;
|
||||
case MSG_BAD_QUOTE_FIELD: p = "Missing ending quote in %s field %d line %d"; break;
|
||||
case MSG_BAD_READ_NUMBER: p = "Wrong number %d of values read from %s"; break;
|
||||
case MSG_BAD_RECFM: p = "Invalid recfm type %d for DOSCOL"; break;
|
||||
case MSG_BAD_RECFM_VAL: p = "Bad Recfm value %d"; break;
|
||||
case MSG_BAD_SET_CASE: p = "Cannot set sensitive an insensitive array"; break;
|
||||
case MSG_BAD_SET_STRING: p = "Invalid SetValue from string"; break;
|
||||
case MSG_BAD_SPECIAL_COL: p = "Bad special column %s"; break;
|
||||
case MSG_BAD_SPEC_COLUMN: p = "Special column invalid for this table type"; break;
|
||||
case MSG_BAD_TABLE_TYPE: p = "Bad type %s for table %s"; break;
|
||||
case MSG_BAD_TYPE_LIKE: p = "Bad operand(%d) type=%d for LIKE"; break;
|
||||
case MSG_BAD_VALBLK_INDX: p = "Out of range valblock index value"; break;
|
||||
case MSG_BAD_VALBLK_TYPE: p = "Invalid value block type %d"; break;
|
||||
case MSG_BAD_VALNODE: p = "Bad type %d for column %s value node"; break;
|
||||
case MSG_BAD_VALUE_TYPE: p = "Invalid value type %d"; break;
|
||||
case MSG_BAD_VAL_UPDATE: p = "Don't know which %s value to update"; break;
|
||||
case MSG_BAS_NS_LIST: p = "Invalid namespaces list format"; break;
|
||||
case MSG_BIN_F_TOO_LONG: p = "Value too long for field %s (%d --> %d)"; break;
|
||||
case MSG_BIN_MODE_FAIL: p = "Set binary mode failed: %s"; break;
|
||||
case MSG_BLKTYPLEN_MISM: p = "Non matching block types/lengths in SetValue"; break;
|
||||
case MSG_BLK_IS_NULL: p = "Blk is NULL"; break;
|
||||
case MSG_BREAKPOINT: p = "Breakpoint"; break;
|
||||
case MSG_BUILD_INDEX: p = "Building index %s on %s"; break;
|
||||
case MSG_CANNOT_OPEN: p = "Cannot open %s"; break;
|
||||
case MSG_CHSIZE_ERROR: p = "chsize error: %s"; break;
|
||||
case MSG_COL_ALLOC_ERR: p = "Cannot allocate column node"; break;
|
||||
case MSG_COL_ISNOT_TABLE: p = "Column %s is not in table %s"; break;
|
||||
case MSG_COL_NOT_SORTED: p = "Column %s of table %s is not sorted"; break;
|
||||
case MSG_COL_NUM_MISM: p = "Number of columns mismatch"; break;
|
||||
case MSG_COM_ERROR: p = "Com error"; break;
|
||||
case MSG_CONCAT_SUBNODE: p = "Cannot concatenate sub-nodes"; break;
|
||||
case MSG_CONNECT_CANCEL: p = "Connection cancelled by user"; break;
|
||||
case MSG_CONTROL_C_EXIT: p = "Control C exit"; break;
|
||||
case MSG_DATABASE_LOADED: p = "Database %s loaded"; break;
|
||||
case MSG_DATA_MISALIGN: p = "Datatype misalignment"; break;
|
||||
case MSG_DBASE_FILE: p = "dBASE dbf file: "; break;
|
||||
case MSG_DEF_ALLOC_ERROR: p = "Error allocating %s DEF class"; break;
|
||||
case MSG_DEL_FILE_ERR: p = "Error deleting %s"; break;
|
||||
case MSG_DEL_READ_ERROR: p = "Delete: read error req=%d len=%d"; break;
|
||||
case MSG_DEL_WRITE_ERROR: p = "Delete: write error: %s"; break;
|
||||
case MSG_DEPREC_FLAG: p = "Deprecated option Flag, use Coltype"; break;
|
||||
case MSG_DLL_LOAD_ERROR: p = "Error %d loading module %s"; break;
|
||||
case MSG_DOM_NOT_SUPP: p = "MS-DOM not supported by this version"; break;
|
||||
case MSG_DVAL_NOTIN_LIST: p = "Value %s not found in distinct values list of column %s"; break;
|
||||
case MSG_EMPTY_DOC: p = "Empty document"; break;
|
||||
case MSG_EMPTY_FILE: p = "%s empty file %s: "; break;
|
||||
case MSG_EOF_AFTER_LINE: p = "EOF after line %d"; break;
|
||||
case MSG_EOF_INDEX_FILE: p = "EOF while reading index file"; break;
|
||||
case MSG_ERROR_IN_LSK: p = "Error %d in lseek64"; break;
|
||||
case MSG_ERROR_IN_SFP: p = "Error %d in SetFilePointer"; break;
|
||||
case MSG_ERR_READING_REC: p = "Error reading record %d of %s"; break;
|
||||
case MSG_FAIL_ADD_NODE: p = "Failed to add %s table node"; break;
|
||||
case MSG_FETCH_NO_RES: p = "Fetch: No Result Set"; break;
|
||||
case MSG_FIELD_TOO_LONG: p = "Value too long for field %d line %d"; break;
|
||||
case MSG_FILELEN_ERROR: p = "Error in %s for %s"; break;
|
||||
case MSG_FILE_IS_EMPTY: p = "File %s is empty"; break;
|
||||
case MSG_FILE_MAP_ERR: p = "File mapping error"; break;
|
||||
case MSG_FILE_MAP_ERROR: p = "CreateFileMapping %s error rc=%d"; break;
|
||||
case MSG_FILE_OPEN_YET: p = "File %s already open"; break;
|
||||
case MSG_FILE_UNFOUND: p = "File %s not found"; break;
|
||||
case MSG_FLD_TOO_LNG_FOR: p = "Field %d too long for %s line %d of %s"; break;
|
||||
case MSG_FLT_BAD_RESULT: p = "Float inexact result"; break;
|
||||
case MSG_FLT_DENORMAL_OP: p = "Float denormal operand"; break;
|
||||
case MSG_FLT_INVALID_OP: p = "Float invalid operation"; break;
|
||||
case MSG_FLT_OVERFLOW: p = "Float overflow"; break;
|
||||
case MSG_FLT_STACK_CHECK: p = "Float stack check"; break;
|
||||
case MSG_FLT_UNDERFLOW: p = "Float underflow"; break;
|
||||
case MSG_FLT_ZERO_DIVIDE: p = "Float divide by zero"; break;
|
||||
case MSG_FMT_WRITE_NIY: p = "Writing %s files is not implemented yet"; break;
|
||||
case MSG_FOXPRO_FILE: p = "FoxPro file: "; break;
|
||||
case MSG_FPUTS_ERROR: p = "fputs error: %s"; break;
|
||||
case MSG_FSEEK_ERROR: p = "fseek error: %s"; break;
|
||||
case MSG_FSETPOS_ERROR: p = "fseek error for i=%d"; break;
|
||||
case MSG_FTELL_ERROR: p = "ftell error for recd=%d: %s"; break;
|
||||
case MSG_FUNCTION_ERROR: p = "%s error: %d"; break;
|
||||
case MSG_FUNC_ERRNO: p = "Error %d in %s"; break;
|
||||
case MSG_FUNC_ERROR: p = "Error in %s"; break;
|
||||
case MSG_FUNC_ERR_S: p = "%s error: %s"; break;
|
||||
case MSG_FWRITE_ERROR: p = "fwrite error: %s"; break;
|
||||
case MSG_GET_DIST_VALS: p = "Retrieving distinct values from "; break;
|
||||
case MSG_GET_FUNC_ERR: p = "Error getting function %s: %s"; break;
|
||||
case MSG_GLOBAL_ERROR: p = "Cannot allocate Global (size=%d)\n"; break;
|
||||
case MSG_GUARD_PAGE: p = "Guard page violation"; break;
|
||||
case MSG_GZOPEN_ERROR: p = "gzopen %s error %d on %s"; break;
|
||||
case MSG_ILLEGAL_INSTR: p = "Illegal instruction"; break;
|
||||
case MSG_ILL_FILTER_CONV: p = "Filtering implies an illegal conversion"; break;
|
||||
case MSG_INDEX_NOT_UNIQ: p = "Index is not unique"; break;
|
||||
case MSG_INDEX_YET_ON: p = "Index %s already exists on %s"; break;
|
||||
case MSG_INDX_COL_NOTIN: p = "Index column %s is not in table %s"; break;
|
||||
case MSG_INDX_EXIST_YET: p = "Index entry already exists"; break;
|
||||
case MSG_INIT_FAILED: p = "Failed to initialize %s processing"; break;
|
||||
case MSG_INT_COL_ERROR: p = "Internal error for index column %s"; break;
|
||||
case MSG_INT_OVERFLOW: p = "Integer overflow"; break;
|
||||
case MSG_INT_ZERO_DIVIDE: p = "Integer divide by zero"; break;
|
||||
case MSG_INVALID_DISP: p = "Invalid disposition"; break;
|
||||
case MSG_INVALID_FTYPE: p = "SBV: invalid Ftype %d"; break;
|
||||
case MSG_INVALID_HANDLE: p = "Invalid handle"; break;
|
||||
case MSG_INVALID_OPER: p = "Invalid operator %d for %s"; break;
|
||||
case MSG_INV_COLUMN_TYPE: p = "Invalid type %d for column %s"; break;
|
||||
case MSG_INV_COL_TYPE: p = "Invalid column type %s"; break;
|
||||
case MSG_INV_DEF_READ: p = "Invalid deferred Read rc=%d"; break;
|
||||
case MSG_INV_DIRCOL_OFST: p = "Invalid DIRCOL offset %d"; break;
|
||||
case MSG_INV_MAP_POS: p = "Invalid map position"; break;
|
||||
case MSG_INV_RAND_ACC: p = "Invalid random access to non optimized table"; break;
|
||||
case MSG_INV_REC_POS: p = "Invalid record position"; break;
|
||||
case MSG_INV_RESULT_TYPE: p = "Invalid result type %s"; break;
|
||||
case MSG_INV_UPDT_TABLE: p = "Table %s invalid for update"; break;
|
||||
case MSG_IN_WITHOUT_SUB: p = "IN or EXISTS without array or subquery"; break;
|
||||
case MSG_KEY_ALLOC_ERR: p = "Error allocating Key offset block"; break;
|
||||
case MSG_KEY_ALLOC_ERROR: p = "Memory allocation error, Klen=%d n=%d"; break;
|
||||
case MSG_LINE_TOO_LONG: p = "New line is too long"; break;
|
||||
case MSG_LIST: p = "--List--"; break;
|
||||
case MSG_LOADING_FAILED: p = "Loading of %s failed"; break;
|
||||
case MSG_LRECL_TOO_SMALL: p = "Lrecl too small (headlen = %d)"; break;
|
||||
case MSG_MAKE_EMPTY_FILE: p = "Making empty file %s: %s"; break;
|
||||
case MSG_MAKING: p = "Making"; break;
|
||||
case MSG_MALLOC_ERROR: p = "Memory allocation failed: %s returned Null"; break;
|
||||
case MSG_MAP_VIEW_ERROR: p = "MapViewOfFile %s error rc=%d"; break;
|
||||
case MSG_MAXSIZE_ERROR: p = "Cannot calculate max size on open table"; break;
|
||||
case MSG_MEM_ALLOC_ERR: p = "Memory allocation error, %s size=%d"; break;
|
||||
case MSG_MEM_ALLOC_ERROR: p = "Memory allocation error"; break;
|
||||
case MSG_MISPLACED_QUOTE: p = "Misplaced quote in line %d"; break;
|
||||
case MSG_MISSING_ARG: p = "Missing argument for operator %d"; break;
|
||||
case MSG_MISSING_FIELD: p = "Missing field %d in %s line %d"; break;
|
||||
case MSG_MISSING_FNAME: p = "Missing file name"; break;
|
||||
case MSG_MISSING_NODE: p = "Missing %s node in %s"; break;
|
||||
case MSG_MISSING_ROWNODE: p = "Can't find RowNode for row %d"; break;
|
||||
case MSG_MIS_TAG_LIST: p = "Missing column tag list"; break;
|
||||
case MSG_MUL_MAKECOL_ERR: p = "Tabmul MakeCol logical error"; break;
|
||||
case MSG_NAME_CONV_ERR: p = "Error converting node name"; break;
|
||||
case MSG_NEW_DOC_FAILED: p = "Cannot create new document"; break;
|
||||
case MSG_NEW_RETURN_NULL: p = "New returned Null in PlugEvalLike"; break;
|
||||
case MSG_NEXT_FILE_ERROR: p = "Couldn't find next file. rc=%d"; break;
|
||||
case MSG_NONCONT_EXCEPT: p = "Noncontinuable exception"; break;
|
||||
case MSG_NOP_ZLIB_INDEX: p = "Cannot do indexing on non optimized zlib table"; break;
|
||||
case MSG_NOT_A_DBF_FILE: p = "Not a dBASE dbf file "; break;
|
||||
case MSG_NOT_FIXED_LEN: p = "File %s is not fixed length, len=%d lrecl=%d"; break;
|
||||
case MSG_NO_0DH_HEAD: p = "No 0Dh at end of header (dbc=%d)"; break;
|
||||
case MSG_NO_ACTIVE_DB: p = "No active database"; break;
|
||||
case MSG_NO_CHAR_FROM: p = "Cannot return char value from type %d"; break;
|
||||
case MSG_NO_DATE_FMT: p = "No date format for valblock of type %d"; break;
|
||||
case MSG_NO_DEF_FNCCOL: p = "Cannot find default function column"; break;
|
||||
case MSG_NO_DEF_PIVOTCOL: p = "Cannot find default pivot column"; break;
|
||||
case MSG_NO_DIR_INDX_RD: p = "No direct access of %s tables"; break;
|
||||
case MSG_NO_FEAT_SUPPORT: p = "No %s support in this version"; break;
|
||||
case MSG_NO_FLD_FORMAT: p = "Missing format for field %d of %s"; break;
|
||||
case MSG_NO_FORMAT_COL: p = "Cannot format the type COLUMN"; break;
|
||||
case MSG_NO_FORMAT_TYPE: p = "Cannot set format from type %d"; break;
|
||||
case MSG_NO_INDEX_READ: p = "No indexed read for multiple tables"; break;
|
||||
case MSG_NO_KEY_COL: p = "No key columns found"; break;
|
||||
case MSG_NO_KEY_UPDATE: p = "Cannot update key names"; break;
|
||||
case MSG_NO_MAP_INSERT: p = "MAP incompatible with Insert"; break;
|
||||
case MSG_NO_MATCHING_COL: p = "No matching column %s in %s"; break;
|
||||
case MSG_NO_MATCH_COL: p = "Cannot find matching column"; break;
|
||||
case MSG_NO_MEMORY: p = "No memory"; break;
|
||||
case MSG_NO_MODE_PADDED: p = "Mode not supported for padded files"; break;
|
||||
case MSG_NO_MUL_VCT: p = "VCT tables cannot be multiple"; break;
|
||||
case MSG_NO_ODBC_DELETE: p = "Delete should not be called for ODBC tables"; break;
|
||||
case MSG_NO_ODBC_DIRECT: p = "Direct access of ODBC tables not implemented yet"; break;
|
||||
case MSG_NO_ODBC_MUL: p = "Multiple(2) not supported for ODBC tables"; break;
|
||||
case MSG_NO_ODBC_SPECOL: p = "No ODBC special columns"; break;
|
||||
case MSG_NO_PART_DEL: p = "No partial delete of %s files"; break;
|
||||
case MSG_NO_PART_MAP: p = "Partial mapping not implemented for this OS"; break;
|
||||
case MSG_NO_PAR_BLK_INS: p = "Cannot insert partial block yet"; break;
|
||||
case MSG_NO_PIV_DIR_ACC: p = "No direct access to PIVOT tables"; break;
|
||||
case MSG_NO_READ_32: p = "Can't read 32 bytes"; break;
|
||||
case MSG_NO_RECOV_SPACE: p = "Cannot recover space in index file"; break;
|
||||
case MSG_NO_ROWID_FOR_AM: p = "Can't get RowID in direct access for tables of type %s"; break;
|
||||
case MSG_NO_ROW_NODE: p = "Row node name is not defined"; break;
|
||||
case MSG_NO_SECTION_NAME: p = "Missing section name"; break;
|
||||
case MSG_NO_SEC_UPDATE: p = "Cannot update section names"; break;
|
||||
case MSG_NO_SETPOS_YET: p = "%s SetPos not implemented yet"; break;
|
||||
case MSG_NO_SPEC_COL: p = "No MySQL special columns"; break;
|
||||
case MSG_NO_SUB_VAL: p = "No sub value for array of type %d"; break;
|
||||
case MSG_NO_TABCOL_DATA: p = "No data found for table %s column %s"; break;
|
||||
case MSG_NO_TABLE_DEL: p = "Delete not enabled for %s tables "; break;
|
||||
case MSG_NO_TAB_DATA: p = "No data found for table %s"; break;
|
||||
case MSG_NO_VCT_DELETE: p = "Partial delete not yet implemented for VCT files"; break;
|
||||
case MSG_NO_ZIP_DELETE: p = "Delete Zip files not implemented yet"; break;
|
||||
case MSG_OPENING: p = "Opening"; break;
|
||||
case MSG_OPEN_EMPTY_FILE: p = "Opening empty file %s: %s"; break;
|
||||
case MSG_OPEN_ERROR: p = "Open error %d in mode %d on %s: "; break;
|
||||
case MSG_OPEN_ERROR_IS: p = "Open error on %s: %s"; break;
|
||||
case MSG_OPEN_MODE_ERROR: p = "Open(%s) error %d on %s"; break;
|
||||
case MSG_OPEN_STRERROR: p = "open error: %s"; break;
|
||||
case MSG_OPTBLK_RD_ERR: p = "Error reading opt block values: %s"; break;
|
||||
case MSG_OPTBLK_WR_ERR: p = "Error writing opt block values: %s"; break;
|
||||
case MSG_OPTIMIZING: p = "Optimizing "; break;
|
||||
case MSG_OPT_BMAP_RD_ERR: p = "Error reading opt bitmaps: %s"; break;
|
||||
case MSG_OPT_BMAP_WR_ERR: p = "Error writing opt bitmaps: %s"; break;
|
||||
case MSG_OPT_CANCELLED: p = "Optimize cancelled by User"; break;
|
||||
case MSG_OPT_DVAL_RD_ERR: p = "Error reading distinct values: %s"; break;
|
||||
case MSG_OPT_DVAL_WR_ERR: p = "Error writing distinct values: %s"; break;
|
||||
case MSG_OPT_HEAD_RD_ERR: p = "Error reading opt file header: %s"; break;
|
||||
case MSG_OPT_HEAD_WR_ERR: p = "Error writing opt file header: %s"; break;
|
||||
case MSG_OPT_LOGIC_ERR: p = "Logical error in SetBitmap, i=%d"; break;
|
||||
case MSG_OPT_MAX_RD_ERR: p = "Error reading opt max values: %s"; break;
|
||||
case MSG_OPT_MAX_WR_ERR: p = "Error writing opt max values: %s"; break;
|
||||
case MSG_OPT_MIN_RD_ERR: p = "Error reading opt min values: %s"; break;
|
||||
case MSG_OPT_MIN_WR_ERR: p = "Error writing opt min values: %s"; break;
|
||||
case MSG_OPT_NOT_MATCH: p = "Non-matching opt file %s"; break;
|
||||
case MSG_PAGE_ERROR: p = "In page error"; break;
|
||||
case MSG_PARM_CNT_MISS: p = "Parameter count mismatch"; break;
|
||||
case MSG_PREC_VBLP_NULL: p = "ARRAY SetPrecision: Vblp is NULL"; break;
|
||||
case MSG_PRIV_INSTR: p = "Privileged instruction"; break;
|
||||
case MSG_PROCADD_ERROR: p = "Error %d getting address of %s"; break;
|
||||
case MSG_QUERY_CANCELLED: p = "Query Cancelled by User"; break;
|
||||
case MSG_RANGE_NO_JOIN: p = "Range is not meant for join index"; break;
|
||||
case MSG_RC_READING: p = "rc=%d reading table %s"; break;
|
||||
case MSG_READY: p = "Ready"; break;
|
||||
case MSG_READ_ERROR: p = "Error reading %s: %s"; break;
|
||||
case MSG_READ_ONLY: p = "Cannot modify this read/only protected table"; break;
|
||||
case MSG_READ_SEEK_ERROR: p = "Read seek error: %s"; break;
|
||||
case MSG_REGISTER_ERR: p = "Unable to register NS with prefix='%s' and href='%s'"; break;
|
||||
case MSG_REMOVE_ERROR: p = "Error removing %s: %s"; break;
|
||||
case MSG_RENAME_ERROR: p = "Error renaming %s to %s: %s"; break;
|
||||
case MSG_ROWID_NOT_IMPL: p = "RowNumber not implemented for tables of type %s"; break;
|
||||
case MSG_SEC_KEY_FIRST: p = "Section and key names must come first on Insert"; break;
|
||||
case MSG_SEC_NAME_FIRST: p = "Section name must come first on Insert"; break;
|
||||
case MSG_SEP_IN_FIELD: p = "Field %d contains the separator character"; break;
|
||||
case MSG_SEQUENCE_ERROR: p = "Sequence error on statement allocation"; break;
|
||||
case MSG_SETEOF_ERROR: p = "Error %d in SetEndOfFile"; break;
|
||||
case MSG_SETRECPOS_NIY: p = "SetRecpos not implemented for this table type"; break;
|
||||
case MSG_SET_STR_TRUNC: p = "SetValue: String would be truncated"; break;
|
||||
case MSG_SFP_ERROR: p = "SetFilePointer error: %s"; break;
|
||||
case MSG_SHARED_LIB_ERR: p = "Error loading shared library %s: %s"; break;
|
||||
case MSG_SINGLE_STEP: p = "Single step"; break;
|
||||
case MSG_SORTING_VAL: p = "Sorting %d values"; break;
|
||||
case MSG_SPCOL_READONLY: p = "Special column %s is Read Only"; break;
|
||||
case MSG_SQL_CONF_ERROR: p = "SQL Error: SQL_CONFORMANCE"; break;
|
||||
case MSG_SRCH_CLOSE_ERR: p = "Couldn't close search handle"; break;
|
||||
case MSG_SRC_TABLE_UNDEF: p = "Source table is not defined"; break;
|
||||
case MSG_STACK_OVERFLOW: p = "Stack overflow"; break;
|
||||
case MSG_TABDIR_READONLY: p = "DIR tables are read/only"; break;
|
||||
case MSG_TABLE_NOT_OPT: p = "Not an optimizable table"; break;
|
||||
case MSG_TABLE_NO_INDEX: p = "Table %s is not indexable"; break;
|
||||
case MSG_TABLE_READ_ONLY: p = "%s tables are read only "; break;
|
||||
case MSG_TABMUL_READONLY: p = "Multiple tables are read/only"; break;
|
||||
case MSG_TOO_MANY_FIELDS: p = "Too many fields line %d of %s"; break;
|
||||
case MSG_TOO_MANY_JUMPS: p = "Too many jump levels"; break;
|
||||
case MSG_TOO_MANY_KEYS: p = "Too many keys (%d)"; break;
|
||||
case MSG_TO_BLK_IS_NULL: p = "To Blk is NULL"; break;
|
||||
case MSG_TRUNCATE_ERROR: p = "truncate error: %s"; break;
|
||||
case MSG_TRUNC_BY_ESTIM: p = "truncated by Estimate"; break;
|
||||
case MSG_TYPE_MISMATCH: p = "Key and source are not of the same type"; break;
|
||||
case MSG_TYPE_VALUE_ERR: p = "Column %s type(%s)/value(%s) mismatch"; break;
|
||||
case MSG_UNBALANCE_QUOTE: p = "Unbalanced quote in line %d"; break;
|
||||
case MSG_UNDEFINED_AM: p = "COLBLK %s: undefined Access Method"; break;
|
||||
case MSG_UNKNOWN_EXCPT: p = "Unknown exception"; break;
|
||||
case MSG_UNMATCH_FIL_ARG: p = "Unmatched filter argument"; break;
|
||||
case MSG_UPDATE_ERROR: p = "Error updating %s"; break;
|
||||
case MSG_UPD_ZIP_NOT_IMP: p = "Updating ZDOS tables not implemented yet"; break;
|
||||
case MSG_VALSTR_TOO_LONG: p = "Value %s too long for string of length %d"; break;
|
||||
case MSG_VALTYPE_NOMATCH: p = "Non matching Value types"; break;
|
||||
case MSG_VALUE_ERROR: p = "Column %s: value is null"; break;
|
||||
case MSG_VALUE_TOO_BIG: p = "Value %lld too big for column %s"; break;
|
||||
case MSG_VALUE_TOO_LONG: p = "Value %s too long for column %s of length %d"; break;
|
||||
case MSG_VAL_ALLOC_ERR: p = "Cannot allocate value node"; break;
|
||||
case MSG_VIR_NO_DELETE: p = "Delete not allowed for %s tables"; break;
|
||||
case MSG_VIR_READ_ONLY: p = "Virtual %s tables are read only"; break;
|
||||
case MSG_VOID_FIRST_ARG: p = "First argument should not be void"; break;
|
||||
case MSG_WORK_AREA: p = "Work area: %s"; break;
|
||||
case MSG_WRITE_SEEK_ERR: p = "Write seek error: %s"; break;
|
||||
case MSG_WRITE_STRERROR: p = "Error writing %s: %s"; break;
|
||||
case MSG_WRITING: p = "Writing"; break;
|
||||
case MSG_WRITING_ERROR: p = "Error writing to %s: %s"; break;
|
||||
case MSG_WS_CONV_ERR: p = "Error converting %s to WS"; break;
|
||||
case MSG_XCOL_MISMATCH: p = "Column %s mismatch in index"; break;
|
||||
case MSG_XFILE_READERR: p = "Error %d reading index file"; break;
|
||||
case MSG_XFILE_WRITERR: p = "Error writing index file: %s"; break;
|
||||
case MSG_XMLTAB_INIT_ERR: p = "Error initializing XML table"; break;
|
||||
case MSG_XML_INIT_ERROR: p = "Error initializing new XML file"; break;
|
||||
case MSG_XPATH_CNTX_ERR: p = "Unable to create new XPath context"; break;
|
||||
case MSG_XPATH_EVAL_ERR: p = "Unable to evaluate xpath location '%s'"; break;
|
||||
case MSG_XPATH_NOT_SUPP: p = "Unsupported Xpath for column %s"; break;
|
||||
366
storage/connect/english.msg
Normal file
366
storage/connect/english.msg
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
100 IDS_TABLES "Table Headers"
|
||||
101 IDS_TAB_01 "Table_Cat"
|
||||
102 IDS_TAB_02 "Table_Schema"
|
||||
103 IDS_TAB_03 "Table_Name"
|
||||
104 IDS_TAB_04 "Table_Type"
|
||||
105 IDS_TAB_05 "Remark"
|
||||
106 IDS_COLUMNS "Column Headers"
|
||||
107 IDS_COL_01 "Table_Cat"
|
||||
108 IDS_COL_02 "Table_Schema"
|
||||
109 IDS_COL_03 "Table_Name"
|
||||
110 IDS_COL_04 "Column_Name"
|
||||
111 IDS_COL_05 "Data_Type"
|
||||
112 IDS_COL_06 "Type_Name"
|
||||
113 IDS_COL_07 "Column_Size"
|
||||
114 IDS_COL_08 "Buffer_Length"
|
||||
115 IDS_COL_09 "Decimal_Digits"
|
||||
116 IDS_COL_10 "Radix"
|
||||
117 IDS_COL_11 "Nullable"
|
||||
118 IDS_COL_12 "Remarks"
|
||||
119 IDS_PKEY "Key Headers"
|
||||
120 IDS_PKY_01 "Table_Catalog"
|
||||
121 IDS_PKY_02 "Table_Schema"
|
||||
122 IDS_PKY_03 "Table_Name"
|
||||
123 IDS_PKY_04 "Column_Name"
|
||||
124 IDS_PKY_05 "Key_Seq"
|
||||
125 IDS_PKY_06 "Pk_Name"
|
||||
126 IDS_STAT "Stat Headers"
|
||||
127 IDS_STA_01 "Table_Catalog"
|
||||
128 IDS_STA_02 "Table_Schema"
|
||||
129 IDS_STA_03 "Table_Name"
|
||||
130 IDS_STA_04 "Non_Unique"
|
||||
131 IDS_STA_05 "Index_Qualifier"
|
||||
132 IDS_STA_06 "Index_Name"
|
||||
133 IDS_STA_07 "Type"
|
||||
134 IDS_STA_08 "Seq_in_Index"
|
||||
135 IDS_STA_09 "Column_Name"
|
||||
136 IDS_STA_10 "Collation"
|
||||
137 IDS_STA_11 "Cardinality"
|
||||
138 IDS_STA_12 "Pages"
|
||||
139 IDS_STA_13 "Filter_Condition"
|
||||
140 IDS_DRIVER "Driver Headers"
|
||||
141 IDS_DRV_01 "Description"
|
||||
142 IDS_DRV_02 "Attributes"
|
||||
143 IDS_DSRC "DataSrc Headers"
|
||||
144 IDS_DSC_01 "Name"
|
||||
145 IDS_DSC_02 "Description"
|
||||
200 ACCESS_VIOLATN "Access violation"
|
||||
201 ADD_BAD_TYPE "Array add value type mismatch (%s -> %s)"
|
||||
202 ALLOC_ERROR "Error allocating %s"
|
||||
203 ANSWER_TYPE "Answer of type"
|
||||
204 API_CONF_ERROR "SQL Error: API_CONFORMANCE"
|
||||
205 APPL_NOT_INIT "Application not initialized"
|
||||
206 ARRAY_BNDS_EXCD "Array bounds exceeded"
|
||||
207 BAD_ARRAY_OPER "Arrays must be used with the IN operator"
|
||||
208 BAD_ARRAY_TYPE "Illegal array type %d"
|
||||
209 BAD_ARRAY_VAL "Arrays must have the same number of values"
|
||||
210 BAD_BIN_FMT "Invalid format %c for the %s BIN column"
|
||||
211 BAD_BLK_ESTIM "Number of blocks exceeds estimate"
|
||||
212 BAD_BLK_SIZE "No match in block %d size"
|
||||
213 BAD_BYTE_NUM "bad number of bytes written"
|
||||
214 BAD_BYTE_READ "bad number of bytes read"
|
||||
215 BAD_COL_TYPE "Invalid type %s for column %s"
|
||||
216 BAD_COL_XPATH "Invalid Xpath in column %s for HTML table %s"
|
||||
217 BAD_CONST_TYPE "Bad constant type=%d"
|
||||
218 BAD_CONV_TYPE "Invalid convert type %d"
|
||||
219 BAD_DATETIME "Invalid datetime value"
|
||||
220 BAD_DBF_FILE "DBF file %s is corrupted"
|
||||
221 BAD_DBF_REC "DBF file %s corrupted at record %d"
|
||||
222 BAD_DBF_TYPE "Unsupported DBF type %c for column %s"
|
||||
223 BAD_DIRECTORY "Bad directory %s: %s"
|
||||
224 BAD_FIELD_RANK "Invalid field rank %d for column %s"
|
||||
225 BAD_FIELD_TYPE "Bad type field %s"
|
||||
226 BAD_FILE_HANDLE "Invalid File Handle: %s"
|
||||
227 BAD_FILTER "Bad filter: Opc=%d B_T=%d %d Type=%d %d"
|
||||
228 BAD_FILTER_CONV "Bad filter conversion, B_T=%d,%d"
|
||||
229 BAD_FILTER_OP "Invalid filter operator %d"
|
||||
230 BAD_FLD_FORMAT "Bad format for field %d of %s"
|
||||
231 BAD_FLD_LENGTH "Field %s too long (%s --> %d) line %d of %s"
|
||||
232 BAD_FREQ_SET "Bad frequency setting for column %s"
|
||||
233 BAD_FUNC_MODE "%s: invalid mode %d"
|
||||
234 BAD_HANDLE_VAL "Invalid handle value"
|
||||
235 BAD_HEADER "File %s: Header corrupted"
|
||||
236 BAD_HEAD_END "Can't read end of header"
|
||||
237 BAD_INDEX_FILE "Wrong index file %s"
|
||||
238 BAD_LINEFLD_FMT "Bad format line %d field %d of %s"
|
||||
239 BAD_LINE_LEN "Line length not equal to Lrecl"
|
||||
240 BAD_LRECL "Table/File lrecl mismatch (%d,%hd)"
|
||||
241 BAD_NODE_TYPE "Bad type %d for table node"
|
||||
242 BAD_OFFSET_VAL "Invalid null offset value for a CSV table"
|
||||
243 BAD_OPEN_MODE "Invalid open mode %d"
|
||||
244 BAD_PARAM_TYPE "%.8s: Bad parameter type=%d"
|
||||
245 BAD_PARM_COUNT "Parameter count mismatch"
|
||||
246 BAD_QUOTE_FIELD "Missing ending quote in %s field %d line %d"
|
||||
247 BAD_READ_NUMBER "Wrong number %d of values read from %s"
|
||||
248 BAD_RECFM "Invalid recfm type %d for DOSCOL"
|
||||
249 BAD_RECFM_VAL "Bad Recfm value %d"
|
||||
250 BAD_SET_CASE "Cannot set sensitive an insensitive array"
|
||||
251 BAD_SET_STRING "Invalid SetValue from string"
|
||||
252 BAD_SPECIAL_COL "Bad special column %s"
|
||||
253 BAD_SPEC_COLUMN "Special column invalid for this table type"
|
||||
254 BAD_TABLE_TYPE "Bad type %s for table %s"
|
||||
255 BAD_TYPE_LIKE "Bad operand(%d) type=%d for LIKE"
|
||||
256 BAD_VALBLK_INDX "Out of range valblock index value"
|
||||
257 BAD_VALBLK_TYPE "Invalid value block type %d"
|
||||
258 BAD_VALNODE "Bad type %d for column %s value node"
|
||||
259 BAD_VALUE_TYPE "Invalid value type %d"
|
||||
260 BAD_VAL_UPDATE "Don't know which %s value to update"
|
||||
261 BAS_NS_LIST "Invalid namespaces list format"
|
||||
262 BIN_F_TOO_LONG "Value too long for field %s (%d --> %d)"
|
||||
263 BIN_MODE_FAIL "Set binary mode failed: %s"
|
||||
264 BLKTYPLEN_MISM "Non matching block types/lengths in SetValue"
|
||||
265 BLK_IS_NULL "Blk is NULL"
|
||||
266 BREAKPOINT "Breakpoint"
|
||||
267 BUILD_INDEX "Building index %s on %s"
|
||||
268 CANNOT_OPEN "Cannot open %s"
|
||||
269 CHSIZE_ERROR "chsize error: %s"
|
||||
270 COL_ALLOC_ERR "Cannot allocate column node"
|
||||
271 COL_ISNOT_TABLE "Column %s is not in table %s"
|
||||
272 COL_NOT_SORTED "Column %s of table %s is not sorted"
|
||||
273 COL_NUM_MISM "Number of columns mismatch"
|
||||
274 COM_ERROR "Com error"
|
||||
275 CONCAT_SUBNODE "Cannot concatenate sub-nodes"
|
||||
276 CONNECT_CANCEL "Connection cancelled by user"
|
||||
277 CONTROL_C_EXIT "Control C exit"
|
||||
278 DATABASE_LOADED "Database %s loaded"
|
||||
279 DATA_MISALIGN "Datatype misalignment"
|
||||
280 DBASE_FILE "dBASE dbf file: "
|
||||
281 DEF_ALLOC_ERROR "Error allocating %s DEF class"
|
||||
282 DEL_FILE_ERR "Error deleting %s"
|
||||
283 DEL_READ_ERROR "Delete: read error req=%d len=%d"
|
||||
284 DEL_WRITE_ERROR "Delete: write error: %s"
|
||||
285 DEPREC_FLAG "Deprecated option Flag, use Coltype"
|
||||
286 DLL_LOAD_ERROR "Error %d loading module %s"
|
||||
287 DOM_NOT_SUPP "MS-DOM not supported by this version"
|
||||
288 DVAL_NOTIN_LIST "Value %s not found in distinct values list of column %s"
|
||||
289 EMPTY_DOC "Empty document"
|
||||
290 EMPTY_FILE "%s empty file %s: "
|
||||
291 EOF_AFTER_LINE "EOF after line %d"
|
||||
292 EOF_INDEX_FILE "EOF while reading index file"
|
||||
293 ERROR_IN_LSK "Error %d in lseek64"
|
||||
294 ERROR_IN_SFP "Error %d in SetFilePointer"
|
||||
295 ERR_READING_REC "Error reading record %d of %s"
|
||||
296 FAIL_ADD_NODE "Failed to add %s table node"
|
||||
297 FETCH_NO_RES "Fetch: No Result Set"
|
||||
298 FIELD_TOO_LONG "Value too long for field %d line %d"
|
||||
299 FILELEN_ERROR "Error in %s for %s"
|
||||
300 FILE_IS_EMPTY "File %s is empty"
|
||||
301 FILE_MAP_ERR "File mapping error"
|
||||
302 FILE_MAP_ERROR "CreateFileMapping %s error rc=%d"
|
||||
303 FILE_OPEN_YET "File %s already open"
|
||||
304 FILE_UNFOUND "File %s not found"
|
||||
305 FLD_TOO_LNG_FOR "Field %d too long for %s line %d of %s"
|
||||
306 FLT_BAD_RESULT "Float inexact result"
|
||||
307 FLT_DENORMAL_OP "Float denormal operand"
|
||||
308 FLT_INVALID_OP "Float invalid operation"
|
||||
309 FLT_OVERFLOW "Float overflow"
|
||||
310 FLT_STACK_CHECK "Float stack check"
|
||||
311 FLT_UNDERFLOW "Float underflow"
|
||||
312 FLT_ZERO_DIVIDE "Float divide by zero"
|
||||
313 FMT_WRITE_NIY "Writing %s files is not implemented yet"
|
||||
314 FOXPRO_FILE "FoxPro file: "
|
||||
315 FPUTS_ERROR "fputs error: %s"
|
||||
316 FSEEK_ERROR "fseek error: %s"
|
||||
317 FSETPOS_ERROR "fseek error for i=%d"
|
||||
318 FTELL_ERROR "ftell error for recd=%d: %s"
|
||||
319 FUNCTION_ERROR "%s error: %d"
|
||||
320 FUNC_ERRNO "Error %d in %s"
|
||||
321 FUNC_ERROR "Error in %s"
|
||||
322 FUNC_ERR_S "%s error: %s"
|
||||
323 FWRITE_ERROR "fwrite error: %s"
|
||||
324 GET_DIST_VALS "Retrieving distinct values from "
|
||||
325 GET_FUNC_ERR "Error getting function %s: %s"
|
||||
326 GLOBAL_ERROR "Cannot allocate Global (size=%d)\n"
|
||||
327 GUARD_PAGE "Guard page violation"
|
||||
328 GZOPEN_ERROR "gzopen %s error %d on %s"
|
||||
329 ILLEGAL_INSTR "Illegal instruction"
|
||||
330 ILL_FILTER_CONV "Filtering implies an illegal conversion"
|
||||
331 INDEX_NOT_UNIQ "Index is not unique"
|
||||
332 INDEX_YET_ON "Index %s already exists on %s"
|
||||
333 INDX_COL_NOTIN "Index column %s is not in table %s"
|
||||
334 INDX_EXIST_YET "Index entry already exists"
|
||||
335 INIT_FAILED "Failed to initialize %s processing"
|
||||
336 INT_COL_ERROR "Internal error for index column %s"
|
||||
337 INT_OVERFLOW "Integer overflow"
|
||||
338 INT_ZERO_DIVIDE "Integer divide by zero"
|
||||
339 INVALID_DISP "Invalid disposition"
|
||||
340 INVALID_FTYPE "SBV: invalid Ftype %d"
|
||||
341 INVALID_HANDLE "Invalid handle"
|
||||
342 INVALID_OPER "Invalid operator %d for %s"
|
||||
343 INV_COLUMN_TYPE "Invalid type %d for column %s"
|
||||
344 INV_COL_TYPE "Invalid column type %s"
|
||||
345 INV_DEF_READ "Invalid deferred Read rc=%d"
|
||||
346 INV_DIRCOL_OFST "Invalid DIRCOL offset %d"
|
||||
347 INV_MAP_POS "Invalid map position"
|
||||
348 INV_RAND_ACC "Invalid random access to non optimized table"
|
||||
349 INV_REC_POS "Invalid record position"
|
||||
350 INV_RESULT_TYPE "Invalid result type %s"
|
||||
351 INV_UPDT_TABLE "Table %s invalid for update"
|
||||
352 IN_WITHOUT_SUB "IN or EXISTS without array or subquery"
|
||||
353 KEY_ALLOC_ERR "Error allocating Key offset block"
|
||||
354 KEY_ALLOC_ERROR "Memory allocation error, Klen=%d n=%d"
|
||||
355 LINE_TOO_LONG "New line is too long"
|
||||
356 LIST "--List--"
|
||||
357 LOADING_FAILED "Loading of %s failed"
|
||||
358 LRECL_TOO_SMALL "Lrecl too small (headlen = %d)"
|
||||
359 MAKE_EMPTY_FILE "Making empty file %s: %s"
|
||||
360 MAKING "Making"
|
||||
361 MALLOC_ERROR "Memory allocation failed: %s returned Null"
|
||||
362 MAP_VIEW_ERROR "MapViewOfFile %s error rc=%d"
|
||||
363 MAXSIZE_ERROR "Cannot calculate max size on open table"
|
||||
364 MEM_ALLOC_ERR "Memory allocation error, %s size=%d"
|
||||
365 MEM_ALLOC_ERROR "Memory allocation error"
|
||||
366 MISPLACED_QUOTE "Misplaced quote in line %d"
|
||||
367 MISSING_ARG "Missing argument for operator %d"
|
||||
368 MISSING_FIELD "Missing field %d in %s line %d"
|
||||
369 MISSING_FNAME "Missing file name"
|
||||
370 MISSING_NODE "Missing %s node in %s"
|
||||
371 MISSING_ROWNODE "Can't find RowNode for row %d"
|
||||
372 MIS_TAG_LIST "Missing column tag list"
|
||||
373 MUL_MAKECOL_ERR "Tabmul MakeCol logical error"
|
||||
374 NAME_CONV_ERR "Error converting node name"
|
||||
375 NEW_DOC_FAILED "Cannot create new document"
|
||||
376 NEW_RETURN_NULL "New returned Null in PlugEvalLike"
|
||||
377 NEXT_FILE_ERROR "Couldn't find next file. rc=%d"
|
||||
378 NONCONT_EXCEPT "Noncontinuable exception"
|
||||
379 NOP_ZLIB_INDEX "Cannot do indexing on non optimized zlib table"
|
||||
380 NOT_A_DBF_FILE "Not a dBASE dbf file "
|
||||
381 NOT_FIXED_LEN "File %s is not fixed length, len=%d lrecl=%d"
|
||||
382 NO_0DH_HEAD "No 0Dh at end of header (dbc=%d)"
|
||||
383 NO_ACTIVE_DB "No active database"
|
||||
384 NO_CHAR_FROM "Cannot return char value from type %d"
|
||||
385 NO_DATE_FMT "No date format for valblock of type %d"
|
||||
386 NO_DEF_FNCCOL "Cannot find default function column"
|
||||
387 NO_DEF_PIVOTCOL "Cannot find default pivot column"
|
||||
388 NO_DIR_INDX_RD "No direct access of %s tables"
|
||||
389 NO_FEAT_SUPPORT "No %s support in this version"
|
||||
390 NO_FLD_FORMAT "Missing format for field %d of %s"
|
||||
391 NO_FORMAT_COL "Cannot format the type COLUMN"
|
||||
392 NO_FORMAT_TYPE "Cannot set format from type %d"
|
||||
393 NO_INDEX_READ "No indexed read for multiple tables"
|
||||
394 NO_KEY_COL "No key columns found"
|
||||
395 NO_KEY_UPDATE "Cannot update key names"
|
||||
396 NO_MAP_INSERT "MAP incompatible with Insert"
|
||||
397 NO_MATCHING_COL "No matching column %s in %s"
|
||||
398 NO_MATCH_COL "Cannot find matching column"
|
||||
399 NO_MEMORY "No memory"
|
||||
400 NO_MODE_PADDED "Mode not supported for padded files"
|
||||
401 NO_MUL_VCT "VCT tables cannot be multiple"
|
||||
402 NO_ODBC_DELETE "Delete should not be called for ODBC tables"
|
||||
403 NO_ODBC_DIRECT "Direct access of ODBC tables not implemented yet"
|
||||
404 NO_ODBC_MUL "Multiple(2) not supported for ODBC tables"
|
||||
405 NO_ODBC_SPECOL "No ODBC special columns"
|
||||
406 NO_PART_DEL "No partial delete of %s files"
|
||||
407 NO_PART_MAP "Partial mapping not implemented for this OS"
|
||||
408 NO_PAR_BLK_INS "Cannot insert partial block yet"
|
||||
409 NO_PIV_DIR_ACC "No direct access to PIVOT tables"
|
||||
410 NO_READ_32 "Can't read 32 bytes"
|
||||
411 NO_RECOV_SPACE "Cannot recover space in index file"
|
||||
412 NO_ROWID_FOR_AM "Can't get RowID in direct access for tables of type %s"
|
||||
413 NO_ROW_NODE "Row node name is not defined"
|
||||
414 NO_SECTION_NAME "Missing section name"
|
||||
415 NO_SEC_UPDATE "Cannot update section names"
|
||||
416 NO_SETPOS_YET "%s SetPos not implemented yet"
|
||||
417 NO_SPEC_COL "No MySQL special columns"
|
||||
418 NO_SUB_VAL "No sub value for array of type %d"
|
||||
419 NO_TABCOL_DATA "No data found for table %s column %s"
|
||||
420 NO_TABLE_DEL "Delete not enabled for %s tables "
|
||||
421 NO_TAB_DATA "No data found for table %s"
|
||||
422 NO_VCT_DELETE "Partial delete not yet implemented for VCT files"
|
||||
423 NO_ZIP_DELETE "Delete Zip files not implemented yet"
|
||||
424 OPENING "Opening"
|
||||
425 OPEN_EMPTY_FILE "Opening empty file %s: %s"
|
||||
426 OPEN_ERROR "Open error %d in mode %d on %s: "
|
||||
427 OPEN_ERROR_IS "Open error on %s: %s"
|
||||
428 OPEN_MODE_ERROR "Open(%s) error %d on %s"
|
||||
429 OPEN_STRERROR "open error: %s"
|
||||
430 OPTBLK_RD_ERR "Error reading opt block values: %s"
|
||||
431 OPTBLK_WR_ERR "Error writing opt block values: %s"
|
||||
432 OPTIMIZING "Optimizing "
|
||||
433 OPT_BMAP_RD_ERR "Error reading opt bitmaps: %s"
|
||||
434 OPT_BMAP_WR_ERR "Error writing opt bitmaps: %s"
|
||||
435 OPT_CANCELLED "Optimize cancelled by User"
|
||||
436 OPT_DVAL_RD_ERR "Error reading distinct values: %s"
|
||||
437 OPT_DVAL_WR_ERR "Error writing distinct values: %s"
|
||||
438 OPT_HEAD_RD_ERR "Error reading opt file header: %s"
|
||||
439 OPT_HEAD_WR_ERR "Error writing opt file header: %s"
|
||||
440 OPT_LOGIC_ERR "Logical error in SetBitmap, i=%d"
|
||||
441 OPT_MAX_RD_ERR "Error reading opt max values: %s"
|
||||
442 OPT_MAX_WR_ERR "Error writing opt max values: %s"
|
||||
443 OPT_MIN_RD_ERR "Error reading opt min values: %s"
|
||||
444 OPT_MIN_WR_ERR "Error writing opt min values: %s"
|
||||
445 OPT_NOT_MATCH "Non-matching opt file %s"
|
||||
446 PAGE_ERROR "In page error"
|
||||
447 PARM_CNT_MISS "Parameter count mismatch"
|
||||
448 PREC_VBLP_NULL "ARRAY SetPrecision: Vblp is NULL"
|
||||
449 PRIV_INSTR "Privileged instruction"
|
||||
450 PROCADD_ERROR "Error %d getting address of %s"
|
||||
451 QUERY_CANCELLED "Query Cancelled by User"
|
||||
452 RANGE_NO_JOIN "Range is not meant for join index"
|
||||
453 RC_READING "rc=%d reading table %s"
|
||||
454 READY "Ready"
|
||||
455 READ_ERROR "Error reading %s: %s"
|
||||
456 READ_ONLY "Cannot modify this read/only protected table"
|
||||
457 READ_SEEK_ERROR "Read seek error: %s"
|
||||
458 REGISTER_ERR "Unable to register NS with prefix='%s' and href='%s'"
|
||||
459 REMOVE_ERROR "Error removing %s: %s"
|
||||
460 RENAME_ERROR "Error renaming %s to %s: %s"
|
||||
461 ROWID_NOT_IMPL "RowNumber not implemented for tables of type %s"
|
||||
462 SEC_KEY_FIRST "Section and key names must come first on Insert"
|
||||
463 SEC_NAME_FIRST "Section name must come first on Insert"
|
||||
464 SEP_IN_FIELD "Field %d contains the separator character"
|
||||
465 SEQUENCE_ERROR "Sequence error on statement allocation"
|
||||
466 SETEOF_ERROR "Error %d in SetEndOfFile"
|
||||
467 SETRECPOS_NIY "SetRecpos not implemented for this table type"
|
||||
468 SET_STR_TRUNC "SetValue: String would be truncated"
|
||||
469 SFP_ERROR "SetFilePointer error: %s"
|
||||
470 SHARED_LIB_ERR "Error loading shared library %s: %s"
|
||||
471 SINGLE_STEP "Single step"
|
||||
472 SORTING_VAL "Sorting %d values"
|
||||
473 SPCOL_READONLY "Special column %s is Read Only"
|
||||
474 SQL_CONF_ERROR "SQL Error: SQL_CONFORMANCE"
|
||||
475 SRCH_CLOSE_ERR "Couldn't close search handle"
|
||||
476 SRC_TABLE_UNDEF "Source table is not defined"
|
||||
477 STACK_OVERFLOW "Stack overflow"
|
||||
478 TABDIR_READONLY "DIR tables are read/only"
|
||||
479 TABLE_NOT_OPT "Not an optimizable table"
|
||||
480 TABLE_NO_INDEX "Table %s is not indexable"
|
||||
481 TABLE_READ_ONLY "%s tables are read only "
|
||||
482 TABMUL_READONLY "Multiple tables are read/only"
|
||||
483 TOO_MANY_FIELDS "Too many fields line %d of %s"
|
||||
484 TOO_MANY_JUMPS "Too many jump levels"
|
||||
485 TOO_MANY_KEYS "Too many keys (%d)"
|
||||
486 TO_BLK_IS_NULL "To Blk is NULL"
|
||||
487 TRUNCATE_ERROR "truncate error: %s"
|
||||
488 TRUNC_BY_ESTIM "truncated by Estimate"
|
||||
489 TYPE_MISMATCH "Key and source are not of the same type"
|
||||
490 TYPE_VALUE_ERR "Column %s type(%s)/value(%s) mismatch"
|
||||
491 UNBALANCE_QUOTE "Unbalanced quote in line %d"
|
||||
492 UNDEFINED_AM "COLBLK %s: undefined Access Method"
|
||||
493 UNKNOWN_EXCPT "Unknown exception"
|
||||
494 UNMATCH_FIL_ARG "Unmatched filter argument"
|
||||
495 UPDATE_ERROR "Error updating %s"
|
||||
496 UPD_ZIP_NOT_IMP "Updating ZDOS tables not implemented yet"
|
||||
497 VALSTR_TOO_LONG "Value %s too long for string of length %d"
|
||||
498 VALTYPE_NOMATCH "Non matching Value types"
|
||||
499 VALUE_ERROR "Column %s: value is null"
|
||||
500 VALUE_TOO_BIG "Value %lld too big for column %s"
|
||||
501 VALUE_TOO_LONG "Value %s too long for column %s of length %d"
|
||||
502 VAL_ALLOC_ERR "Cannot allocate value node"
|
||||
503 VIR_NO_DELETE "Delete not allowed for %s tables"
|
||||
504 VIR_READ_ONLY "Virtual %s tables are read only"
|
||||
505 VOID_FIRST_ARG "First argument should not be void"
|
||||
506 WORK_AREA "Work area: %s"
|
||||
507 WRITE_SEEK_ERR "Write seek error: %s"
|
||||
508 WRITE_STRERROR "Error writing %s: %s"
|
||||
509 WRITING "Writing"
|
||||
510 WRITING_ERROR "Error writing to %s: %s"
|
||||
511 WS_CONV_ERR "Error converting %s to WS"
|
||||
512 XCOL_MISMATCH "Column %s mismatch in index"
|
||||
513 XFILE_READERR "Error %d reading index file"
|
||||
514 XFILE_WRITERR "Error writing index file: %s"
|
||||
515 XMLTAB_INIT_ERR "Error initializing XML table"
|
||||
516 XML_INIT_ERROR "Error initializing new XML file"
|
||||
517 XPATH_CNTX_ERR "Unable to create new XPath context"
|
||||
518 XPATH_EVAL_ERR "Unable to evaluate xpath location '%s'"
|
||||
519 XPATH_NOT_SUPP "Unsupported Xpath for column %s"
|
||||
File diff suppressed because it is too large
Load diff
46
storage/connect/enids.h
Normal file
46
storage/connect/enids.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
case IDS_TABLES: p = "Table Headers"; break;
|
||||
case IDS_TAB_01: p = "Table_Cat"; break;
|
||||
case IDS_TAB_02: p = "Table_Schema"; break;
|
||||
case IDS_TAB_03: p = "Table_Name"; break;
|
||||
case IDS_TAB_04: p = "Table_Type"; break;
|
||||
case IDS_TAB_05: p = "Remark"; break;
|
||||
case IDS_COLUMNS: p = "Column Headers"; break;
|
||||
case IDS_COL_01: p = "Table_Cat"; break;
|
||||
case IDS_COL_02: p = "Table_Schema"; break;
|
||||
case IDS_COL_03: p = "Table_Name"; break;
|
||||
case IDS_COL_04: p = "Column_Name"; break;
|
||||
case IDS_COL_05: p = "Data_Type"; break;
|
||||
case IDS_COL_06: p = "Type_Name"; break;
|
||||
case IDS_COL_07: p = "Column_Size"; break;
|
||||
case IDS_COL_08: p = "Buffer_Length"; break;
|
||||
case IDS_COL_09: p = "Decimal_Digits"; break;
|
||||
case IDS_COL_10: p = "Radix"; break;
|
||||
case IDS_COL_11: p = "Nullable"; break;
|
||||
case IDS_COL_12: p = "Remarks"; break;
|
||||
case IDS_PKEY: p = "Key Headers"; break;
|
||||
case IDS_PKY_01: p = "Table_Catalog"; break;
|
||||
case IDS_PKY_02: p = "Table_Schema"; break;
|
||||
case IDS_PKY_03: p = "Table_Name"; break;
|
||||
case IDS_PKY_04: p = "Column_Name"; break;
|
||||
case IDS_PKY_05: p = "Key_Seq"; break;
|
||||
case IDS_PKY_06: p = "Pk_Name"; break;
|
||||
case IDS_STAT: p = "Stat Headers"; break;
|
||||
case IDS_STA_01: p = "Table_Catalog"; break;
|
||||
case IDS_STA_02: p = "Table_Schema"; break;
|
||||
case IDS_STA_03: p = "Table_Name"; break;
|
||||
case IDS_STA_04: p = "Non_Unique"; break;
|
||||
case IDS_STA_05: p = "Index_Qualifier"; break;
|
||||
case IDS_STA_06: p = "Index_Name"; break;
|
||||
case IDS_STA_07: p = "Type"; break;
|
||||
case IDS_STA_08: p = "Seq_in_Index"; break;
|
||||
case IDS_STA_09: p = "Column_Name"; break;
|
||||
case IDS_STA_10: p = "Collation"; break;
|
||||
case IDS_STA_11: p = "Cardinality"; break;
|
||||
case IDS_STA_12: p = "Pages"; break;
|
||||
case IDS_STA_13: p = "Filter_Condition"; break;
|
||||
case IDS_DRIVER: p = "Driver Headers"; break;
|
||||
case IDS_DRV_01: p = "Description"; break;
|
||||
case IDS_DRV_02: p = "Attributes"; break;
|
||||
case IDS_DSRC: p = "DataSrc Headers"; break;
|
||||
case IDS_DSC_01: p = "Name"; break;
|
||||
case IDS_DSC_02: p = "Description"; break;
|
||||
|
|
@ -46,8 +46,6 @@
|
|||
#include "filamap.h"
|
||||
#include "tabdos.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* --------------------------- Class MAPFAM -------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -360,7 +358,12 @@ int MAPFAM::ReadBuffer(PGLOBAL g)
|
|||
while (*Mempos++ != '\n') ; // What about Unix ???
|
||||
|
||||
// Set caller line buffer
|
||||
len = (Mempos - Fpos) - Ending;
|
||||
len = (Mempos - Fpos) - 1;
|
||||
|
||||
// Don't rely on ENDING setting
|
||||
if (len > 0 && *(Mempos - 2) == '\r')
|
||||
len--; // Line ends by CRLF
|
||||
|
||||
memcpy(Tdbp->GetLine(), Fpos, len);
|
||||
Tdbp->GetLine()[len] = '\0';
|
||||
return RC_OK;
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@
|
|||
#define DBFTYPE 3 /* value of bits 0 and 1 if .dbf */
|
||||
#define EOH 0x0D /* end-of-header marker in .dbf file */
|
||||
|
||||
extern "C" int trace; // The general trace value
|
||||
|
||||
/****************************************************************************/
|
||||
/* First 32 bytes of a .dbf file. */
|
||||
/* Note: some reserved fields are used here to store info (Fields) */
|
||||
|
|
@ -286,7 +284,8 @@ PQRYRES DBFColumns(PGLOBAL g, char *dp, const char *fn, bool info)
|
|||
break;
|
||||
default:
|
||||
if (!info) {
|
||||
sprintf(g->Message, MSG(BAD_DBF_TYPE), thisfield.Type);
|
||||
sprintf(g->Message, MSG(BAD_DBF_TYPE), thisfield.Type
|
||||
, thisfield.Name);
|
||||
goto err;
|
||||
} // endif info
|
||||
|
||||
|
|
@ -587,7 +586,7 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
|
|||
case 'D': // Date
|
||||
break;
|
||||
default: // Should never happen
|
||||
sprintf(g->Message, "Unsupported DBF type %c for column %s",
|
||||
sprintf(g->Message, MSG(BAD_DBF_TYPE),
|
||||
c, cdp->GetName());
|
||||
return true;
|
||||
} // endswitch c
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
#define INVALID_SET_FILE_POINTER 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
extern "C" int trace;
|
||||
extern int num_read, num_there, num_eq[2]; // Statistics
|
||||
|
||||
/* --------------------------- Class FIXFAM -------------------------- */
|
||||
|
|
@ -131,18 +130,49 @@ bool FIXFAM::AllocateBuffer(PGLOBAL g)
|
|||
/*******************************************************************/
|
||||
/* For Insert the buffer must be prepared. */
|
||||
/*******************************************************************/
|
||||
memset(To_Buf, ' ', Buflen);
|
||||
if (Tdbp->GetFtype() == RECFM_BIN) {
|
||||
// The buffer must be prepared depending on column types
|
||||
int n = 0;
|
||||
PDOSDEF defp = (PDOSDEF)Tdbp->GetDef();
|
||||
PCOLDEF cdp;
|
||||
|
||||
if (/*Tdbp->GetFtype() < 2 &&*/ !Padded)
|
||||
// If not binary, the file is physically a text file.
|
||||
// We do it also for binary table because the lrecl can have been
|
||||
// Prepare the first line of the buffer
|
||||
memset(To_Buf, 0, Buflen);
|
||||
|
||||
for (cdp = defp->GetCols(); cdp; cdp = cdp->GetNext()) {
|
||||
if (IsTypeNum(cdp->GetType()))
|
||||
memset(To_Buf + cdp->GetOffset(), ' ', cdp->GetClen());
|
||||
|
||||
n = MY_MAX(n, cdp->GetPoff() + cdp->GetClen());
|
||||
} // endfor cdp
|
||||
|
||||
// We do this for binary table because the lrecl can have been
|
||||
// specified with additional space to include line ending.
|
||||
for (int len = Lrecl; len <= Buflen; len += Lrecl) {
|
||||
#if defined(WIN32)
|
||||
To_Buf[len - 2] = '\r';
|
||||
#endif // WIN32
|
||||
To_Buf[len - 1] = '\n';
|
||||
} // endfor len
|
||||
if (n < Lrecl && Ending) {
|
||||
To_Buf[Lrecl - 1] = '\n';
|
||||
|
||||
if (n < Lrecl - 1 && Ending == 2)
|
||||
To_Buf[Lrecl - 2] = '\r';
|
||||
|
||||
} // endif n
|
||||
|
||||
// Now repeat this for the whole buffer
|
||||
for (int len = Lrecl; len <= Buflen - Lrecl; len += Lrecl)
|
||||
memcpy(To_Buf + len, To_Buf, Lrecl);
|
||||
|
||||
} else {
|
||||
memset(To_Buf, ' ', Buflen);
|
||||
|
||||
if (!Padded)
|
||||
// The file is physically a text file.
|
||||
for (int len = Lrecl; len <= Buflen; len += Lrecl) {
|
||||
if (Ending == 2)
|
||||
To_Buf[len - 2] = '\r';
|
||||
|
||||
To_Buf[len - 1] = '\n';
|
||||
} // endfor len
|
||||
|
||||
} // endif Ftype
|
||||
|
||||
Rbuf = Nrec; // To be used by WriteDB
|
||||
} // endif Insert
|
||||
|
|
@ -205,7 +235,7 @@ int FIXFAM::WriteModifiedBlock(PGLOBAL g)
|
|||
// NOTE: Next line was added to avoid a very strange fread bug.
|
||||
// When the fseek is not executed (even the file has the good
|
||||
// pointer position) the next read can happen anywhere in the file.
|
||||
OldBlk = CurBlk; // This will force fseek to be executed
|
||||
OldBlk = -2; // This will force fseek to be executed
|
||||
Modif = 0;
|
||||
return rc;
|
||||
} // end of WriteModifiedBlock
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
#endif
|
||||
|
||||
extern int num_read, num_there, num_eq[2]; // Statistics
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Routine called externally by TXTFAM SortedRows functions. */
|
||||
|
|
@ -538,7 +537,8 @@ bool DOSFAM::OpenTableFile(PGLOBAL g)
|
|||
PDBUSER dbuserp = PlgGetUser(g);
|
||||
|
||||
// This is required when using Unix files under Windows and vice versa
|
||||
Bin = (Blocked || Ending != CRLF);
|
||||
//Bin = (Blocked || Ending != CRLF);
|
||||
Bin = true; // To avoid ftell problems
|
||||
|
||||
switch (mode) {
|
||||
case MODE_READ:
|
||||
|
|
@ -684,6 +684,7 @@ bool DOSFAM::RecordPos(PGLOBAL g)
|
|||
{
|
||||
if ((Fpos = ftell(Stream)) < 0) {
|
||||
sprintf(g->Message, MSG(FTELL_ERROR), 0, strerror(errno));
|
||||
// strcat(g->Message, " (possible wrong ENDING option value)");
|
||||
return true;
|
||||
} // endif Fpos
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@
|
|||
|
||||
extern int num_read, num_there; // Statistics
|
||||
static int num_write;
|
||||
extern "C" int trace;
|
||||
|
||||
#if defined(UNIX)
|
||||
// Add dummy strerror (NGC)
|
||||
|
|
@ -388,15 +387,20 @@ bool VCTFAM::MakeEmptyFile(PGLOBAL g, char *fn)
|
|||
|
||||
n = (Header == 1 || Header == 3) ? sizeof(VECHEADER) : 0;
|
||||
|
||||
if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) == -1) {
|
||||
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
|
||||
close(h);
|
||||
return true;
|
||||
} // endif h
|
||||
if (lseek(h, n + MaxBlk * Nrec * Lrecl - 1, SEEK_SET) < 0)
|
||||
goto err;
|
||||
|
||||
// This actually fills the empty file
|
||||
if (write(h, &c, 1) < 0)
|
||||
goto err;
|
||||
|
||||
write(h, &c, 1); // This actually fills the empty file
|
||||
close(h);
|
||||
return false;
|
||||
|
||||
err:
|
||||
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
|
||||
close(h);
|
||||
return true;
|
||||
} // end of MakeEmptyFile
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -3393,15 +3397,20 @@ bool BGVFAM::MakeEmptyFile(PGLOBAL g, char *fn)
|
|||
htrc("MEF: pos=%lld n=%d maxblk=%d blksize=%d\n",
|
||||
pos, n, MaxBlk, Blksize);
|
||||
|
||||
if (lseek64(h, pos, SEEK_SET) < 0) {
|
||||
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
|
||||
close(h);
|
||||
return true;
|
||||
} // endif h
|
||||
if (lseek64(h, pos, SEEK_SET) < 0)
|
||||
goto err;
|
||||
|
||||
write(h, &c, 1); // This actually fills the empty file
|
||||
// This actually fills the empty file
|
||||
if (write(h, &c, 1) < 0)
|
||||
goto err;
|
||||
|
||||
close(h);
|
||||
return false;
|
||||
|
||||
err:
|
||||
sprintf(g->Message, MSG(MAKE_EMPTY_FILE), To_File, strerror(errno));
|
||||
close(h);
|
||||
return true;
|
||||
#endif // !WIN32
|
||||
} // end of MakeEmptyFile
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@
|
|||
/* DB static variables. */
|
||||
/***********************************************************************/
|
||||
extern int num_read, num_there, num_eq[]; // Statistics
|
||||
extern "C" int trace;
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,170 +1,170 @@
|
|||
/************** FilAmZip H Declares Source Code File (.H) **************/
|
||||
/* Name: FILAMZIP.H Version 1.2 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
||||
/* */
|
||||
/* This file contains the GZIP access method classes declares. */
|
||||
/***********************************************************************/
|
||||
#ifndef __FILAMZIP_H
|
||||
#define __FILAMZIP_H
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
typedef class ZIPFAM *PZIPFAM;
|
||||
typedef class ZBKFAM *PZBKFAM;
|
||||
typedef class ZIXFAM *PZIXFAM;
|
||||
typedef class ZLBFAM *PZLBFAM;
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for not optimized */
|
||||
/* variable record length files compressed using the gzip library */
|
||||
/* functions. File is accessed record by record (row). */
|
||||
/***********************************************************************/
|
||||
class DllExport ZIPFAM : public TXTFAM {
|
||||
// friend class DOSCOL;
|
||||
public:
|
||||
// Constructor
|
||||
ZIPFAM(PDOSDEF tdp) : TXTFAM(tdp) {Zfile = NULL; Zpos = 0;}
|
||||
ZIPFAM(PZIPFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_ZIP;}
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void);
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZIPFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual void Reset(void);
|
||||
virtual int GetFileLength(PGLOBAL g);
|
||||
virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;}
|
||||
virtual int MaxBlkSize(PGLOBAL g, int s) {return s;}
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int GetRowID(void);
|
||||
virtual bool RecordPos(PGLOBAL g);
|
||||
virtual bool SetPos(PGLOBAL g, int recpos);
|
||||
virtual int SkipRecord(PGLOBAL g, bool header);
|
||||
virtual bool OpenTableFile(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual int DeleteRecords(PGLOBAL g, int irc);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
int Zerror(PGLOBAL g); // GZ error function
|
||||
|
||||
// Members
|
||||
gzFile Zfile; // Points to GZ file structure
|
||||
z_off_t Zpos; // Uncompressed file position
|
||||
}; // end of class ZIPFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for optimized variable */
|
||||
/* record length files compressed using the gzip library functions. */
|
||||
/* The File is accessed by block (requires an opt file). */
|
||||
/***********************************************************************/
|
||||
class DllExport ZBKFAM : public ZIPFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZBKFAM(PDOSDEF tdp);
|
||||
ZBKFAM(PZBKFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void) {return 0;}
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZBKFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual int Cardinality(PGLOBAL g);
|
||||
virtual int MaxBlkSize(PGLOBAL g, int s);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int GetRowID(void);
|
||||
virtual bool RecordPos(PGLOBAL g);
|
||||
virtual int SkipRecord(PGLOBAL g, bool header);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual int DeleteRecords(PGLOBAL g, int irc);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
char *CurLine; // Position of current line in buffer
|
||||
char *NxtLine; // Position of Next line in buffer
|
||||
bool Closing; // True when closing on Insert
|
||||
}; // end of class ZBKFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for fixed record */
|
||||
/* length files compressed using the gzip library functions. */
|
||||
/* The file is always accessed by block. */
|
||||
/***********************************************************************/
|
||||
class DllExport ZIXFAM : public ZBKFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZIXFAM(PDOSDEF tdp);
|
||||
ZIXFAM(PZIXFAM txfp) : ZBKFAM(txfp) {}
|
||||
|
||||
// Implementation
|
||||
virtual int GetNextPos(void) {return 0;}
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZIXFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual int Cardinality(PGLOBAL g);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
// No additional Members
|
||||
}; // end of class ZIXFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the DOS/UNIX Access Method class declaration for PlugDB */
|
||||
/* fixed/variable files compressed using the zlib library functions. */
|
||||
/* Physically these are written and read using the same technique */
|
||||
/* than blocked variable files, only the contain of each block is */
|
||||
/* compressed using the deflate zlib function. The purpose of this */
|
||||
/* specific format is to have a fast mechanism for direct access of */
|
||||
/* records so blocked optimization is fast and direct access (joins) */
|
||||
/* is allowed. Note that the block length is written ahead of each */
|
||||
/* block to enable reading when optimization file is not available. */
|
||||
/***********************************************************************/
|
||||
class DllExport ZLBFAM : public BLKFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZLBFAM(PDOSDEF tdp);
|
||||
ZLBFAM(PZLBFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_ZLIB;}
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void);
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZLBFAM(this);}
|
||||
inline void SetOptimized(bool b) {Optimized = b;}
|
||||
|
||||
// Methods
|
||||
virtual int GetFileLength(PGLOBAL g);
|
||||
/************** FilAmZip H Declares Source Code File (.H) **************/
|
||||
/* Name: FILAMZIP.H Version 1.2 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
|
||||
/* */
|
||||
/* This file contains the GZIP access method classes declares. */
|
||||
/***********************************************************************/
|
||||
#ifndef __FILAMZIP_H
|
||||
#define __FILAMZIP_H
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
typedef class ZIPFAM *PZIPFAM;
|
||||
typedef class ZBKFAM *PZBKFAM;
|
||||
typedef class ZIXFAM *PZIXFAM;
|
||||
typedef class ZLBFAM *PZLBFAM;
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for not optimized */
|
||||
/* variable record length files compressed using the gzip library */
|
||||
/* functions. File is accessed record by record (row). */
|
||||
/***********************************************************************/
|
||||
class DllExport ZIPFAM : public TXTFAM {
|
||||
// friend class DOSCOL;
|
||||
public:
|
||||
// Constructor
|
||||
ZIPFAM(PDOSDEF tdp) : TXTFAM(tdp) {Zfile = NULL; Zpos = 0;}
|
||||
ZIPFAM(PZIPFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_ZIP;}
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void);
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZIPFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual void Reset(void);
|
||||
virtual int GetFileLength(PGLOBAL g);
|
||||
virtual int Cardinality(PGLOBAL g) {return (g) ? -1 : 0;}
|
||||
virtual int MaxBlkSize(PGLOBAL g, int s) {return s;}
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int GetRowID(void);
|
||||
virtual bool RecordPos(PGLOBAL g);
|
||||
virtual bool SetPos(PGLOBAL g, int recpos);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
bool WriteCompressedBuffer(PGLOBAL g);
|
||||
int ReadCompressedBuffer(PGLOBAL g, void *rdbuf);
|
||||
|
||||
// Members
|
||||
z_streamp Zstream; // Compression/decompression stream
|
||||
Byte *Zbuffer; // Compressed block buffer
|
||||
int *Zlenp; // Pointer to block length
|
||||
bool Optimized; // true when opt file is available
|
||||
}; // end of class ZLBFAM
|
||||
|
||||
#endif // __FILAMZIP_H
|
||||
virtual int SkipRecord(PGLOBAL g, bool header);
|
||||
virtual bool OpenTableFile(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual int DeleteRecords(PGLOBAL g, int irc);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
int Zerror(PGLOBAL g); // GZ error function
|
||||
|
||||
// Members
|
||||
gzFile Zfile; // Points to GZ file structure
|
||||
z_off_t Zpos; // Uncompressed file position
|
||||
}; // end of class ZIPFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for optimized variable */
|
||||
/* record length files compressed using the gzip library functions. */
|
||||
/* The File is accessed by block (requires an opt file). */
|
||||
/***********************************************************************/
|
||||
class DllExport ZBKFAM : public ZIPFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZBKFAM(PDOSDEF tdp);
|
||||
ZBKFAM(PZBKFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void) {return 0;}
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZBKFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual int Cardinality(PGLOBAL g);
|
||||
virtual int MaxBlkSize(PGLOBAL g, int s);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int GetRowID(void);
|
||||
virtual bool RecordPos(PGLOBAL g);
|
||||
virtual int SkipRecord(PGLOBAL g, bool header);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual int DeleteRecords(PGLOBAL g, int irc);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
char *CurLine; // Position of current line in buffer
|
||||
char *NxtLine; // Position of Next line in buffer
|
||||
bool Closing; // True when closing on Insert
|
||||
}; // end of class ZBKFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the access method class declaration for fixed record */
|
||||
/* length files compressed using the gzip library functions. */
|
||||
/* The file is always accessed by block. */
|
||||
/***********************************************************************/
|
||||
class DllExport ZIXFAM : public ZBKFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZIXFAM(PDOSDEF tdp);
|
||||
ZIXFAM(PZIXFAM txfp) : ZBKFAM(txfp) {}
|
||||
|
||||
// Implementation
|
||||
virtual int GetNextPos(void) {return 0;}
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZIXFAM(this);}
|
||||
|
||||
// Methods
|
||||
virtual int Cardinality(PGLOBAL g);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
// No additional Members
|
||||
}; // end of class ZIXFAM
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the DOS/UNIX Access Method class declaration for PlugDB */
|
||||
/* fixed/variable files compressed using the zlib library functions. */
|
||||
/* Physically these are written and read using the same technique */
|
||||
/* than blocked variable files, only the contain of each block is */
|
||||
/* compressed using the deflate zlib function. The purpose of this */
|
||||
/* specific format is to have a fast mechanism for direct access of */
|
||||
/* records so blocked optimization is fast and direct access (joins) */
|
||||
/* is allowed. Note that the block length is written ahead of each */
|
||||
/* block to enable reading when optimization file is not available. */
|
||||
/***********************************************************************/
|
||||
class DllExport ZLBFAM : public BLKFAM {
|
||||
public:
|
||||
// Constructor
|
||||
ZLBFAM(PDOSDEF tdp);
|
||||
ZLBFAM(PZLBFAM txfp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_ZLIB;}
|
||||
virtual int GetPos(void);
|
||||
virtual int GetNextPos(void);
|
||||
virtual PTXF Duplicate(PGLOBAL g)
|
||||
{return (PTXF)new(g) ZLBFAM(this);}
|
||||
inline void SetOptimized(bool b) {Optimized = b;}
|
||||
|
||||
// Methods
|
||||
virtual int GetFileLength(PGLOBAL g);
|
||||
virtual bool SetPos(PGLOBAL g, int recpos);
|
||||
virtual bool AllocateBuffer(PGLOBAL g);
|
||||
virtual int ReadBuffer(PGLOBAL g);
|
||||
virtual int WriteBuffer(PGLOBAL g);
|
||||
virtual void CloseTableFile(PGLOBAL g, bool abort);
|
||||
virtual void Rewind(void);
|
||||
|
||||
protected:
|
||||
bool WriteCompressedBuffer(PGLOBAL g);
|
||||
int ReadCompressedBuffer(PGLOBAL g, void *rdbuf);
|
||||
|
||||
// Members
|
||||
z_streamp Zstream; // Compression/decompression stream
|
||||
Byte *Zbuffer; // Compressed block buffer
|
||||
int *Zlenp; // Pointer to block length
|
||||
bool Optimized; // true when opt file is available
|
||||
}; // end of class ZLBFAM
|
||||
|
||||
#endif // __FILAMZIP_H
|
||||
|
|
|
|||
|
|
@ -39,11 +39,6 @@
|
|||
//#include "select.h"
|
||||
#include "xindex.h"
|
||||
|
||||
/***********************************************************************/
|
||||
/* Static variables. */
|
||||
/***********************************************************************/
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Utility routines. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -106,7 +101,7 @@ PFIL MakeFilter(PGLOBAL g, PFIL fp1, OPVAL vop, PFIL fp2)
|
|||
PFIL filp = new(g) FILTER(g, vop);
|
||||
|
||||
filp->Arg(0) = fp1;
|
||||
filp->Arg(1) = fp2;
|
||||
filp->Arg(1) = (fp2) ? fp2 : pXVOID;
|
||||
|
||||
if (filp->Convert(g, false))
|
||||
return NULL;
|
||||
|
|
|
|||
320
storage/connect/frcas.h
Normal file
320
storage/connect/frcas.h
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
case MSG_ACCESS_VIOLATN: p = "Violation accès mémoire"; break;
|
||||
case MSG_ADD_BAD_TYPE: p = "Ajout d'une valeur de type %s non conforme dans un tableau %s"; break;
|
||||
case MSG_ALLOC_ERROR: p = "Erreur d'allocation de %s"; break;
|
||||
case MSG_ANSWER_TYPE: p = "Réponse de type"; break;
|
||||
case MSG_API_CONF_ERROR: p = "Erreur SQL: API_CONFORMANCE"; break;
|
||||
case MSG_APPL_NOT_INIT: p = "Application non initialisée"; break;
|
||||
case MSG_ARRAY_BNDS_EXCD: p = "Hors limite de tableau"; break;
|
||||
case MSG_BAD_ARRAY_OPER: p = "Les tableaux doivent utiliser l'opérateur IN"; break;
|
||||
case MSG_BAD_ARRAY_TYPE: p = "Type=%d invalide pour un tableau"; break;
|
||||
case MSG_BAD_ARRAY_VAL: p = "Les tableaux doivent avoir le même nombre de valeurs"; break;
|
||||
case MSG_BAD_BIN_FMT: p = "Format invalide %c pour la colonne BIN %s"; break;
|
||||
case MSG_BAD_BLK_ESTIM: p = "Nombre de blocs supérieur à l'estimation"; break;
|
||||
case MSG_BAD_BLK_SIZE: p = "Taille du bloc %d non conforme"; break;
|
||||
case MSG_BAD_BYTE_NUM: p = "Le nombre d'octets écrits est faux"; break;
|
||||
case MSG_BAD_BYTE_READ: p = "Le nombre d'octets lus est faux"; break;
|
||||
case MSG_BAD_COL_TYPE: p = "Type invalide %s pour la colonne %s"; break;
|
||||
case MSG_BAD_COL_XPATH: p = "Xpath invalide colonne %s de la table HTML %s"; break;
|
||||
case MSG_BAD_CONST_TYPE: p = "Type=%d invalide pour une constante"; break;
|
||||
case MSG_BAD_CONV_TYPE: p = "Convertion de type invalide %d"; break;
|
||||
case MSG_BAD_DATETIME: p = "Valeur date/temps invalide"; break;
|
||||
case MSG_BAD_DBF_FILE: p = "Le fichier DBF %s est altéré"; break;
|
||||
case MSG_BAD_DBF_REC: p = "Fichier DBF %s altéré enregistrement %d"; break;
|
||||
case MSG_BAD_DBF_TYPE: p = "Type DBF %c non supporté colonne %s"; break;
|
||||
case MSG_BAD_DIRECTORY: p = "Répertoire invalide %s: %s"; break;
|
||||
case MSG_BAD_FIELD_RANK: p = "Rang %d invalide pour la colonne %s"; break;
|
||||
case MSG_BAD_FIELD_TYPE: p = "Mauvais type de champ %s"; break;
|
||||
case MSG_BAD_FILE_HANDLE: p = "Handle de fichier invalide: %s"; break;
|
||||
case MSG_BAD_FILTER: p = "Mauvais filtre: Opc=%d B_T=%d %d Type=%d %d"; break;
|
||||
case MSG_BAD_FILTER_CONV: p = "Conversion filtre incorrecte, B_T=%d,%d"; break;
|
||||
case MSG_BAD_FILTER_OP: p = "Opérateur de filtre invalide %d"; break;
|
||||
case MSG_BAD_FLD_FORMAT: p = "Format invalide pour le champs %d de %s"; break;
|
||||
case MSG_BAD_FLD_LENGTH: p = "Champs %s trop long (%s --> %d) ligne %d de %s"; break;
|
||||
case MSG_BAD_FREQ_SET: p = "Spécification erronnée de Freq pour la colonne %s"; break;
|
||||
case MSG_BAD_FUNC_MODE: p = "%s: mode invalide %d"; break;
|
||||
case MSG_BAD_HANDLE_VAL: p = "Valeur Handle invalide"; break;
|
||||
case MSG_BAD_HEADER: p = "Fichier %s: bloc en-tête altéré"; break;
|
||||
case MSG_BAD_HEAD_END: p = "Lecture fin d'en-tête impossible"; break;
|
||||
case MSG_BAD_INDEX_FILE: p = "Fichier index %s corrompu"; break;
|
||||
case MSG_BAD_LINEFLD_FMT: p = "Format invalide ligne %d champs %d de %s"; break;
|
||||
case MSG_BAD_LINE_LEN: p = "Longueur ligne non égale à Lrecl"; break;
|
||||
case MSG_BAD_LRECL: p = "Disparité lrecl table/fichier (%d,%hd)"; break;
|
||||
case MSG_BAD_NODE_TYPE: p = "Type noeud erroné pour la table"; break;
|
||||
case MSG_BAD_OFFSET_VAL: p = "Nul offset invalide pour une table CSV"; break;
|
||||
case MSG_BAD_OPEN_MODE: p = "Mode d'ouverture invalide %d"; break;
|
||||
case MSG_BAD_PARAM_TYPE: p = "%.8s: Paramètre de type=%d invalide"; break;
|
||||
case MSG_BAD_PARM_COUNT: p = "Nombre de paramètres incohérent"; break;
|
||||
case MSG_BAD_QUOTE_FIELD: p = "Quote manquante dans %s champs %d ligne %d"; break;
|
||||
case MSG_BAD_READ_NUMBER: p = "Mauvais nombre %d de valeurs lues dans %s"; break;
|
||||
case MSG_BAD_RECFM: p = "Recfm type %d invalide pour DOSCOL"; break;
|
||||
case MSG_BAD_RECFM_VAL: p = "Valeur invalide %d de Recfm"; break;
|
||||
case MSG_BAD_SET_CASE: p = "La casse d'un tableau ne peut pas passer de non respect à respecter"; break;
|
||||
case MSG_BAD_SET_STRING: p = "SetValue: appel invalide pour STRING"; break;
|
||||
case MSG_BAD_SPECIAL_COL: p = "Colonne spéciale invalide %s"; break;
|
||||
case MSG_BAD_SPEC_COLUMN: p = "Colonne spéciale invalide pour ce type de table"; break;
|
||||
case MSG_BAD_TABLE_TYPE: p = "Type invalide %s pour la table %s"; break;
|
||||
case MSG_BAD_TYPE_LIKE: p = "Type(%d)= %d invalide pour LIKE"; break;
|
||||
case MSG_BAD_VALBLK_INDX: p = "Valeur hors limites de l'index du bloc de valeurs"; break;
|
||||
case MSG_BAD_VALBLK_TYPE: p = "Type=%d invalide pour un bloc de valeurs"; break;
|
||||
case MSG_BAD_VALNODE: p = "Type %d invalide pour le noeud valeur colonne %s"; break;
|
||||
case MSG_BAD_VALUE_TYPE: p = "Type de valeur invalide %d"; break;
|
||||
case MSG_BAD_VAL_UPDATE: p = "Impossible de déterminer quelle valeur %s doit être mise à jour"; break;
|
||||
case MSG_BAS_NS_LIST: p = "Format invalide de la liste des espace-noms"; break;
|
||||
case MSG_BIN_F_TOO_LONG: p = "Valeur trop longue pour le champ %s (%d --> %d)"; break;
|
||||
case MSG_BIN_MODE_FAIL: p = "Echec mode binaire: %s"; break;
|
||||
case MSG_BLKTYPLEN_MISM: p = "Disparité types/longueurs de bloc dans SetValue"; break;
|
||||
case MSG_BLK_IS_NULL: p = "Blk est nul"; break;
|
||||
case MSG_BREAKPOINT: p = "Point de contrôle"; break;
|
||||
case MSG_BUILD_INDEX: p = "Construction index %s sur %s"; break;
|
||||
case MSG_CANNOT_OPEN: p = "Ouverture impossible de %s"; break;
|
||||
case MSG_CHSIZE_ERROR: p = "Erreur dans chsize: %s"; break;
|
||||
case MSG_COL_ALLOC_ERR: p = "Allocation impossible du noeud colonne"; break;
|
||||
case MSG_COL_ISNOT_TABLE: p = "La colonne %s n'est pas dans la table %s"; break;
|
||||
case MSG_COL_NOT_SORTED: p = "La colonne %s de la table %s n'est pas triée"; break;
|
||||
case MSG_COL_NUM_MISM: p = "Disparité du nombre de colonnes"; break;
|
||||
case MSG_COM_ERROR: p = "Erreur Com"; break;
|
||||
case MSG_CONCAT_SUBNODE: p = "Concaténation de sous-noeuds impossible"; break;
|
||||
case MSG_CONNECT_CANCEL: p = "Connection interrompue par l'utilisateur"; break;
|
||||
case MSG_CONTROL_C_EXIT: p = "Exit par Ctrl-C"; break;
|
||||
case MSG_DATABASE_LOADED: p = "Base de données %s chargée"; break;
|
||||
case MSG_DATA_MISALIGN: p = "Mauvais alignement pour ce type de données"; break;
|
||||
case MSG_DBASE_FILE: p = "Fichier dBASE dbf: "; break;
|
||||
case MSG_DEF_ALLOC_ERROR: p = "Erreur d'allocation de la classe DEF %s"; break;
|
||||
case MSG_DEL_FILE_ERR: p = "Erreur à l'effacement de %s"; break;
|
||||
case MSG_DEL_READ_ERROR: p = "Delete: erreur en lecture req=%d len=%d"; break;
|
||||
case MSG_DEL_WRITE_ERROR: p = "Delete: erreur en écriture: %s"; break;
|
||||
case MSG_DEPREC_FLAG: p = "Option Flag périmée, utiliser Coltype"; break;
|
||||
case MSG_DLL_LOAD_ERROR: p = "Erreur %d au chargement du module %s"; break;
|
||||
case MSG_DOM_NOT_SUPP: p = "MS-DOM non supporté par cette version"; break;
|
||||
case MSG_DVAL_NOTIN_LIST: p = "Valeur %s non trouvée dans la liste des valeurs distinctes de la colonne %s"; break;
|
||||
case MSG_EMPTY_DOC: p = "Document vide"; break;
|
||||
case MSG_EMPTY_FILE: p = "%s du fichier vide %s: "; break;
|
||||
case MSG_EOF_AFTER_LINE: p = "Fin de fichier après la ligne %d"; break;
|
||||
case MSG_EOF_INDEX_FILE: p = "EOF lisant le fichier index"; break;
|
||||
case MSG_ERROR_IN_LSK: p = "Erreur %d dans lseek64"; break;
|
||||
case MSG_ERROR_IN_SFP: p = "Erreur %d dans SetFilePointer"; break;
|
||||
case MSG_ERR_READING_REC: p = "Erreur lisant l'enregistrement %d de %s"; break;
|
||||
case MSG_FAIL_ADD_NODE: p = "L'ajout du noeud %s dans la table a échoué"; break;
|
||||
case MSG_FETCH_NO_RES: p = "Fetch: Pas de Résultats"; break;
|
||||
case MSG_FIELD_TOO_LONG: p = "Valeur trop longue pour le champs %d ligne %d"; break;
|
||||
case MSG_FILELEN_ERROR: p = "Erreur dans %s pour %s"; break;
|
||||
case MSG_FILE_IS_EMPTY: p = "Le fichier %s est vide"; break;
|
||||
case MSG_FILE_MAP_ERR: p = "Erreur de File mapping"; break;
|
||||
case MSG_FILE_MAP_ERROR: p = "CreateFileMapping %s erreur rc=%d"; break;
|
||||
case MSG_FILE_OPEN_YET: p = "Fichier %s déjà ouvert"; break;
|
||||
case MSG_FILE_UNFOUND: p = "Fichier %s non trouvé"; break;
|
||||
case MSG_FLD_TOO_LNG_FOR: p = "Champs %d trop long pour %s ligne %d de %s"; break;
|
||||
case MSG_FLT_BAD_RESULT: p = "Virgule flottante: résultat inexacte"; break;
|
||||
case MSG_FLT_DENORMAL_OP: p = "Opérande virgule flottante non normalisé"; break;
|
||||
case MSG_FLT_INVALID_OP: p = "Opération virgule flottante invalide"; break;
|
||||
case MSG_FLT_OVERFLOW: p = "Dépassement de capacité virgule flottante"; break;
|
||||
case MSG_FLT_STACK_CHECK: p = "Virgule flottante: Erreur de la pile"; break;
|
||||
case MSG_FLT_UNDERFLOW: p = "Sous-dépassement de capacité virgule flottante"; break;
|
||||
case MSG_FLT_ZERO_DIVIDE: p = "Virgule flottante: division par zéro"; break;
|
||||
case MSG_FMT_WRITE_NIY: p = "L'écriture des fichiers %s n'est pas encore implémentée"; break;
|
||||
case MSG_FOXPRO_FILE: p = "Fichier FoxPro: "; break;
|
||||
case MSG_FPUTS_ERROR: p = "Erreur dans fputs: %s"; break;
|
||||
case MSG_FSEEK_ERROR: p = "Erreur dans fseek: %s"; break;
|
||||
case MSG_FSETPOS_ERROR: p = "Erreur dans fseek pour i=%d"; break;
|
||||
case MSG_FTELL_ERROR: p = "Erreur dans ftell enregistrement=%d: %s"; break;
|
||||
case MSG_FUNCTION_ERROR: p = "Erreur dans %s: %d"; break;
|
||||
case MSG_FUNC_ERRNO: p = "Erreur %d dans %s"; break;
|
||||
case MSG_FUNC_ERROR: p = "Erreur dans %s"; break;
|
||||
case MSG_FUNC_ERR_S: p = "Erreur dans %s: %s"; break;
|
||||
case MSG_FWRITE_ERROR: p = "Erreur dans fwrite: %s"; break;
|
||||
case MSG_GET_DIST_VALS: p = "Récupération des valeurs distinctes de "; break;
|
||||
case MSG_GET_FUNC_ERR: p = "Erreur en recherche de la fonction %s: %s"; break;
|
||||
case MSG_GLOBAL_ERROR: p = "Erreur d'allocation de Global (taille=%d)\n"; break;
|
||||
case MSG_GUARD_PAGE: p = "Violation de page de garde"; break;
|
||||
case MSG_GZOPEN_ERROR: p = "gzopen %s: erreur %d sur %s"; break;
|
||||
case MSG_ILLEGAL_INSTR: p = "Instruction illégale"; break;
|
||||
case MSG_ILL_FILTER_CONV: p = "Conversion implicite illégale dans un filtre"; break;
|
||||
case MSG_INDEX_NOT_UNIQ: p = "L'index n'est pas Unique"; break;
|
||||
case MSG_INDEX_YET_ON: p = "L'index %s existe déjà sur %s"; break;
|
||||
case MSG_INDX_COL_NOTIN: p = "La colonne index %s n'existe pas dans la table %s"; break;
|
||||
case MSG_INDX_EXIST_YET: p = "L'entrée index existe déjà"; break;
|
||||
case MSG_INIT_FAILED: p = "L'initialisation de %s a échoué"; break;
|
||||
case MSG_INT_COL_ERROR: p = "Erreur interne sur la colonne index %s"; break;
|
||||
case MSG_INT_OVERFLOW: p = "Dépassement de capacité sur entier"; break;
|
||||
case MSG_INT_ZERO_DIVIDE: p = "Division entière par zéro"; break;
|
||||
case MSG_INVALID_DISP: p = "Disposition invalide"; break;
|
||||
case MSG_INVALID_FTYPE: p = "SBV: Ftype %d invalide"; break;
|
||||
case MSG_INVALID_HANDLE: p = "Poignée invalide"; break;
|
||||
case MSG_INVALID_OPER: p = "Opérateur invalide %d pour %s"; break;
|
||||
case MSG_INV_COLUMN_TYPE: p = "Type %d Invalide pour la colonne %s"; break;
|
||||
case MSG_INV_COL_TYPE: p = "Type de colonne %s invalide"; break;
|
||||
case MSG_INV_DEF_READ: p = "Lecture différée invalide rc=%d"; break;
|
||||
case MSG_INV_DIRCOL_OFST: p = "Offset invalide pour une colonne DIR"; break;
|
||||
case MSG_INV_MAP_POS: p = "Position mémoire invalide"; break;
|
||||
case MSG_INV_RAND_ACC: p = "L'accès aléatoire d'une table non optimisée est impossible"; break;
|
||||
case MSG_INV_REC_POS: p = "Position d'enregistrement invalide"; break;
|
||||
case MSG_INV_RESULT_TYPE: p = "Type de résultat invalide %s"; break;
|
||||
case MSG_INV_UPDT_TABLE: p = "Table %s invalide pour Update"; break;
|
||||
case MSG_IN_WITHOUT_SUB: p = "IN ou EXISTS sans tableau ou subquery"; break;
|
||||
case MSG_KEY_ALLOC_ERR: p = "Erreur d'allocation d'un bloc offset clé"; break;
|
||||
case MSG_KEY_ALLOC_ERROR: p = "Erreur d'allocation mémoire, Klen=%d n=%d"; break;
|
||||
case MSG_LINE_TOO_LONG: p = "La nouvelle ligne est trop longue"; break;
|
||||
case MSG_LIST: p = "--Liste--"; break;
|
||||
case MSG_LOADING_FAILED: p = "Le chargement de %s a échoué"; break;
|
||||
case MSG_LRECL_TOO_SMALL: p = "Lrecl trop petit (longueur en-tête = %d)"; break;
|
||||
case MSG_MAKE_EMPTY_FILE: p = "Génération du fichier vide %s: %s"; break;
|
||||
case MSG_MAKING: p = "Génération"; break;
|
||||
case MSG_MALLOC_ERROR: p = "Allocation mémoire impossible par %s"; break;
|
||||
case MSG_MAP_VIEW_ERROR: p = "MapViewOfFile %s erreur rc=%d"; break;
|
||||
case MSG_MAXSIZE_ERROR: p = "Maxsize incalculable sur table ouverte"; break;
|
||||
case MSG_MEM_ALLOC_ERR: p = "Erreur d'allocation mémoire, taille %s = %d"; break;
|
||||
case MSG_MEM_ALLOC_ERROR: p = "Erreur d'allocation mémoire"; break;
|
||||
case MSG_MISPLACED_QUOTE: p = "Appostrophe mal placée ligne %d"; break;
|
||||
case MSG_MISSING_ARG: p = "Argument manquant pour l'opérateur %d"; break;
|
||||
case MSG_MISSING_FIELD: p = "Champs %d manquant dans %s ligne %d"; break;
|
||||
case MSG_MISSING_FNAME: p = "Nom du fichier manquant"; break;
|
||||
case MSG_MISSING_NODE: p = "Noeud %s manquant dans %s"; break;
|
||||
case MSG_MISSING_ROWNODE: p = "Impossible de trouver le noeud de la ligne %d"; break;
|
||||
case MSG_MIS_TAG_LIST: p = "Liste des balises colonne manquante"; break;
|
||||
case MSG_MUL_MAKECOL_ERR: p = "Erreur logique dans TABMUL::MakeCol"; break;
|
||||
case MSG_NAME_CONV_ERR: p = "Erreur de convertion du nom de noeud"; break;
|
||||
case MSG_NEW_DOC_FAILED: p = "Impossible de créer le nouveau document"; break;
|
||||
case MSG_NEW_RETURN_NULL: p = "NULL renvoyé par New dans PlugEvalLike"; break;
|
||||
case MSG_NEXT_FILE_ERROR: p = "Erreur en recherche du fichier suivant. rc=%s"; break;
|
||||
case MSG_NONCONT_EXCEPT: p = "Exception non-continuable"; break;
|
||||
case MSG_NOP_ZLIB_INDEX: p = "L'indexage d'une table zlib non optimisée est impossible"; break;
|
||||
case MSG_NOT_A_DBF_FILE: p = "Le fichier n'a pas le format dBASE dbf "; break;
|
||||
case MSG_NOT_FIXED_LEN: p = "Fichier %s non fixe, len=%d lrecl=%d"; break;
|
||||
case MSG_NO_0DH_HEAD: p = "0DH manquant en fin d'en-tête (dbc=%d)"; break;
|
||||
case MSG_NO_ACTIVE_DB: p = "Pas de base de données active"; break;
|
||||
case MSG_NO_CHAR_FROM: p = "Conversion de type %d en caractères impossible"; break;
|
||||
case MSG_NO_DATE_FMT: p = "Pas de format date pour le valblock de type %d"; break;
|
||||
case MSG_NO_DEF_FNCCOL: p = "Colonne fonction par défaut introuvable"; break;
|
||||
case MSG_NO_DEF_PIVOTCOL: p = "Colonne pivot par défaut introuvable"; break;
|
||||
case MSG_NO_DIR_INDX_RD: p = "Pas d'accès directe des tables %s"; break;
|
||||
case MSG_NO_FEAT_SUPPORT: p = "%s non supporté dans cette version"; break;
|
||||
case MSG_NO_FLD_FORMAT: p = "Format absent pour le champs %d de %s"; break;
|
||||
case MSG_NO_FORMAT_COL: p = "Type COLUMN informattable"; break;
|
||||
case MSG_NO_FORMAT_TYPE: p = "Le format ne peut pas être défini à partir du type %d"; break;
|
||||
case MSG_NO_INDEX_READ: p = "Pas d'accès directe des tables multiples"; break;
|
||||
case MSG_NO_KEY_COL: p = "Pas de colonne clé trouvée"; break;
|
||||
case MSG_NO_KEY_UPDATE: p = "Le nom des clés ne peut pas être modifié"; break;
|
||||
case MSG_NO_MAP_INSERT: p = "MAP incompatible avec Insert"; break;
|
||||
case MSG_NO_MATCHING_COL: p = "Pas de colonne correspondant à %s dans %s"; break;
|
||||
case MSG_NO_MATCH_COL: p = "Colonne correspondante introuvable"; break;
|
||||
case MSG_NO_MEMORY: p = "Mémoire pleine"; break;
|
||||
case MSG_NO_MODE_PADDED: p = "Mode non supporté pour les fichiers 'padded'"; break;
|
||||
case MSG_NO_MUL_VCT: p = "Les tables VCT ne peuvent pas être multiples"; break;
|
||||
case MSG_NO_ODBC_DELETE: p = "Delete ne devrait pas être appelé pour les tables ODBC"; break;
|
||||
case MSG_NO_ODBC_DIRECT: p = "Accès directe des tables ODBC non encore implémenté"; break;
|
||||
case MSG_NO_ODBC_MUL: p = "Multiple(2) non supporté pour les tables ODBC"; break;
|
||||
case MSG_NO_ODBC_SPECOL: p = "Pas de colonne spéciale ODBC"; break;
|
||||
case MSG_NO_PART_DEL: p = "Delete partiel des fichier %s impossible"; break;
|
||||
case MSG_NO_PART_MAP: p = "Mapping partiel non implémenté pour cet OS"; break;
|
||||
case MSG_NO_PAR_BLK_INS: p = "Insertion de bloc partiel impossible"; break;
|
||||
case MSG_NO_PIV_DIR_ACC: p = "Pas d'accès directe aux tables PIVOT"; break;
|
||||
case MSG_NO_READ_32: p = "Lecture de 32 octets impossible"; break;
|
||||
case MSG_NO_RECOV_SPACE: p = "Espace non recouvrable dans le fichier index"; break;
|
||||
case MSG_NO_ROWID_FOR_AM: p = "Accès direct impossible de ROWID pour les tables de type %s"; break;
|
||||
case MSG_NO_ROW_NODE: p = "Le nom du Rownode n'est pas défini"; break;
|
||||
case MSG_NO_SECTION_NAME: p = "Nom de section manquant"; break;
|
||||
case MSG_NO_SEC_UPDATE: p = "Les noms de section ne peuvent pas être modifiés"; break;
|
||||
case MSG_NO_SETPOS_YET: p = "SetPos pas encore implémenté pour les fichier %s"; break;
|
||||
case MSG_NO_SPEC_COL: p = "Pas de colonne spéciales MYSQL"; break;
|
||||
case MSG_NO_SUB_VAL: p = "Pas de sous-value d'un tableau de type %d"; break;
|
||||
case MSG_NO_TABCOL_DATA: p = "Pas de données pour la table %s colonne %s"; break;
|
||||
case MSG_NO_TABLE_DEL: p = "Delete non autorisé pour les tables %s "; break;
|
||||
case MSG_NO_TAB_DATA: p = "Pas de données pour la table %s"; break;
|
||||
case MSG_NO_VCT_DELETE: p = "Délétion Partielle non implémentée pour les fichiers VCT"; break;
|
||||
case MSG_NO_ZIP_DELETE: p = "Delete sur fichier Zip non encore implementé"; break;
|
||||
case MSG_OPENING: p = "Ouverture"; break;
|
||||
case MSG_OPEN_EMPTY_FILE: p = "Ouverture du fichier vide %s: %s"; break;
|
||||
case MSG_OPEN_ERROR: p = "Erreur d'ouverture %d en mode %d sur %s: "; break;
|
||||
case MSG_OPEN_ERROR_IS: p = "Erreur à l'ouverture de %s: %s"; break;
|
||||
case MSG_OPEN_MODE_ERROR: p = "Erreur d'ouverture(%s) %d sur %s"; break;
|
||||
case MSG_OPEN_STRERROR: p = "Erreur à l'ouverture: %s"; break;
|
||||
case MSG_OPTBLK_RD_ERR: p = "Erreur à la lecture d'un bloc optimisation: %s"; break;
|
||||
case MSG_OPTBLK_WR_ERR: p = "Erreur à l'écriture d'un bloc optimisation: %s"; break;
|
||||
case MSG_OPTIMIZING: p = "Optimisation de "; break;
|
||||
case MSG_OPT_BMAP_RD_ERR: p = "Erreur en lecture des bitmaps d'optimisation: %s"; break;
|
||||
case MSG_OPT_BMAP_WR_ERR: p = "Erreur en écriture des bitmaps d'optimisation: %s"; break;
|
||||
case MSG_OPT_CANCELLED: p = "Optimisation interrompue par l'utilisateur"; break;
|
||||
case MSG_OPT_DVAL_RD_ERR: p = "Erreur en lecture des valeurs distinctes: %s"; break;
|
||||
case MSG_OPT_DVAL_WR_ERR: p = "Erreur en écriture des valeurs distinctes: %s"; break;
|
||||
case MSG_OPT_HEAD_RD_ERR: p = "Erreur en lecture de l'entête du fichier opt: %s"; break;
|
||||
case MSG_OPT_HEAD_WR_ERR: p = "Erreur en écriture de l'entête du fichier opt: %s"; break;
|
||||
case MSG_OPT_LOGIC_ERR: p = "Erreur logique dans SetBitmap, i=%d"; break;
|
||||
case MSG_OPT_MAX_RD_ERR: p = "Erreur en lecture des valeurs maxi: %s"; break;
|
||||
case MSG_OPT_MAX_WR_ERR: p = "Erreur en écriture des valeurs maxi: %s"; break;
|
||||
case MSG_OPT_MIN_RD_ERR: p = "Erreur en lecture des valeurs mini: %s"; break;
|
||||
case MSG_OPT_MIN_WR_ERR: p = "Erreur en écriture des valeurs mini: %s"; break;
|
||||
case MSG_OPT_NOT_MATCH: p = "Le fichier opt %s n'est pas à jour"; break;
|
||||
case MSG_PAGE_ERROR: p = "Erreur de pagination"; break;
|
||||
case MSG_PARM_CNT_MISS: p = "Disparité du nombre de Paramètres"; break;
|
||||
case MSG_PREC_VBLP_NULL: p = "ARRAY SetPrecision: Vblp est NULL"; break;
|
||||
case MSG_PRIV_INSTR: p = "Instruction privilégiée"; break;
|
||||
case MSG_PROCADD_ERROR: p = "Erreur %d sur l'adresse de %s"; break;
|
||||
case MSG_QUERY_CANCELLED: p = "Requête interrompue par l'utilisateur"; break;
|
||||
case MSG_RANGE_NO_JOIN: p = "Range non compatible avec les index de jointure"; break;
|
||||
case MSG_RC_READING: p = "rc=%d en lecture de la table %s"; break;
|
||||
case MSG_READY: p = "Prêt"; break;
|
||||
case MSG_READ_ERROR: p = "Erreur en lecture sur %s: %s"; break;
|
||||
case MSG_READ_ONLY: p = "Cette table protégée en lecture seule ne peut être modifiée"; break;
|
||||
case MSG_READ_SEEK_ERROR: p = "Erreur de recherche en lecture: %s"; break;
|
||||
case MSG_REGISTER_ERR: p = "Enregistrement NS impossible, préfix='%s' et href='%s'"; break;
|
||||
case MSG_REMOVE_ERROR: p = "Erreur en supprimant %s: %s"; break;
|
||||
case MSG_RENAME_ERROR: p = "Erreur renommant %s en %s: %s"; break;
|
||||
case MSG_ROWID_NOT_IMPL: p = "RowNumber non implémenté pour les tables de type %s"; break;
|
||||
case MSG_SEC_KEY_FIRST: p = "Les sections et clés doivent être insérées en premier"; break;
|
||||
case MSG_SEC_NAME_FIRST: p = "Le nom de section doit être en tête de liste en insertion"; break;
|
||||
case MSG_SEP_IN_FIELD: p = "Le champ %d contient le caractère séparateur"; break;
|
||||
case MSG_SEQUENCE_ERROR: p = "HSTMT: Allocation hors séquence"; break;
|
||||
case MSG_SETEOF_ERROR: p = "Erreur %d dans SetEndOfFile"; break;
|
||||
case MSG_SETRECPOS_NIY: p = "SetRecpos non implémenté pour ce type de table"; break;
|
||||
case MSG_SET_STR_TRUNC: p = "SetValue: Chaîne de caractères tronquée"; break;
|
||||
case MSG_SFP_ERROR: p = "Erreur sur SetFilePointer: %s"; break;
|
||||
case MSG_SHARED_LIB_ERR: p = "Erreur au chargement de la librairie partagée %s: %s"; break;
|
||||
case MSG_SINGLE_STEP: p = "Pas à pas"; break;
|
||||
case MSG_SORTING_VAL: p = "Tri de %d valeurs"; break;
|
||||
case MSG_SPCOL_READONLY: p = "La colonne spéciale %s est en lecture seulement"; break;
|
||||
case MSG_SQL_CONF_ERROR: p = "Erreur SQL: SQL_CONFORMANCE"; break;
|
||||
case MSG_SRCH_CLOSE_ERR: p = "Erreur à la fermeture de l'Handle de recherche"; break;
|
||||
case MSG_SRC_TABLE_UNDEF: p = "La table source n'est pas définie"; break;
|
||||
case MSG_STACK_OVERFLOW: p = "Dépassement de capacité de la pile"; break;
|
||||
case MSG_TABDIR_READONLY: p = "Les tables DIR sont en lecture seulement"; break;
|
||||
case MSG_TABLE_NOT_OPT: p = "Table non optimisable"; break;
|
||||
case MSG_TABLE_NO_INDEX: p = "La table %s n'est pas indexable"; break;
|
||||
case MSG_TABLE_READ_ONLY: p = "Les tables %s sont en lecture seulement "; break;
|
||||
case MSG_TABMUL_READONLY: p = "Les tables multiples sont en lecture seulement"; break;
|
||||
case MSG_TOO_MANY_FIELDS: p = "Trop de champs ligne %d de %s"; break;
|
||||
case MSG_TOO_MANY_JUMPS: p = "Trop de niveaux de saut"; break;
|
||||
case MSG_TOO_MANY_KEYS: p = "Trop de clés (%d)"; break;
|
||||
case MSG_TO_BLK_IS_NULL: p = "To Blk est nul"; break;
|
||||
case MSG_TRUNCATE_ERROR: p = "Erreur en troncation: %s"; break;
|
||||
case MSG_TRUNC_BY_ESTIM: p = "Tronqué par l'option Estimate"; break;
|
||||
case MSG_TYPE_MISMATCH: p = "Clé et source ne sont pas du même type"; break;
|
||||
case MSG_TYPE_VALUE_ERR: p = "Colonne %s: disparité type(%s)/valeur(%s)"; break;
|
||||
case MSG_UNBALANCE_QUOTE: p = "Appostrophe en trop ligne %d"; break;
|
||||
case MSG_UNDEFINED_AM: p = "COLBLK %s: méthode d'accès indéfinie"; break;
|
||||
case MSG_UNKNOWN_EXCPT: p = "Exception non répertoriée"; break;
|
||||
case MSG_UNMATCH_FIL_ARG: p = "Argument de filtre dépareillé"; break;
|
||||
case MSG_UPDATE_ERROR: p = "Erreur en Update sur %s"; break;
|
||||
case MSG_UPD_ZIP_NOT_IMP: p = "Mise à jour des tables ZDOS non encore implementé"; break;
|
||||
case MSG_VALSTR_TOO_LONG: p = "Valeur %s trop longue pour une chaîne de longueur %d"; break;
|
||||
case MSG_VALTYPE_NOMATCH: p = "Disparité types de valeur"; break;
|
||||
case MSG_VALUE_ERROR: p = "Colonne %s: bloc valeur nul"; break;
|
||||
case MSG_VALUE_TOO_BIG: p = "Valeur %lld trop grande pour la colonne %s"; break;
|
||||
case MSG_VALUE_TOO_LONG: p = "Valeur %s trop longue pour la colonne %s de longueur %d"; break;
|
||||
case MSG_VAL_ALLOC_ERR: p = "Allocation impossible du noeud valeur"; break;
|
||||
case MSG_VIR_NO_DELETE: p = "Delete impossible sur les tables %s"; break;
|
||||
case MSG_VIR_READ_ONLY: p = "Les tables virtuelles %s sont en lecture seulement"; break;
|
||||
case MSG_VOID_FIRST_ARG: p = "Le premier argument ne doit pas être vide"; break;
|
||||
case MSG_WORK_AREA: p = "Espace de travail: %s"; break;
|
||||
case MSG_WRITE_SEEK_ERR: p = "Erreur de recherche en écriture: %s"; break;
|
||||
case MSG_WRITE_STRERROR: p = "Erreur en écriture sur %s: %s"; break;
|
||||
case MSG_WRITING: p = "Ecriture"; break;
|
||||
case MSG_WRITING_ERROR: p = "Erreur à l'écriture de %s: %s"; break;
|
||||
case MSG_WS_CONV_ERR: p = "Erreur de convertion de %s en WS"; break;
|
||||
case MSG_XCOL_MISMATCH: p = "La colonne %s ne correspond pas à l'index"; break;
|
||||
case MSG_XFILE_READERR: p = "Erreur %d en lisant le fichier index"; break;
|
||||
case MSG_XFILE_WRITERR: p = "Erreur en écrivant le fichier index: %s"; break;
|
||||
case MSG_XMLTAB_INIT_ERR: p = "Erreur d'initialisation de la table XML"; break;
|
||||
case MSG_XML_INIT_ERROR: p = "Erreur d'initialisation du nouveau fichier XML"; break;
|
||||
case MSG_XPATH_CNTX_ERR: p = "Le nouveau contexte XPath ne peut être créé"; break;
|
||||
case MSG_XPATH_EVAL_ERR: p = "Impossible d'évaluer l'emplacement xpath '%s'"; break;
|
||||
case MSG_XPATH_NOT_SUPP: p = "Xpath non supporté colonne %s"; break;
|
||||
366
storage/connect/french.msg
Normal file
366
storage/connect/french.msg
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
100 IDS_TABLES "Table Entêtes"
|
||||
101 IDS_TAB_01 "Catalogue"
|
||||
102 IDS_TAB_02 "Schéma"
|
||||
103 IDS_TAB_03 "Nom"
|
||||
104 IDS_TAB_04 "Type"
|
||||
105 IDS_TAB_05 "Remarque"
|
||||
106 IDS_COLUMNS "Colonne Entêtes"
|
||||
107 IDS_COL_01 "Cat_Table"
|
||||
108 IDS_COL_02 "Schem_Table"
|
||||
109 IDS_COL_03 "Nom_Table"
|
||||
110 IDS_COL_04 "Nom_Colonne"
|
||||
111 IDS_COL_05 "Type_Données"
|
||||
112 IDS_COL_06 "Nom_Type"
|
||||
113 IDS_COL_07 "Précision"
|
||||
114 IDS_COL_08 "Longueur"
|
||||
115 IDS_COL_09 "Echelle"
|
||||
116 IDS_COL_10 "Base"
|
||||
117 IDS_COL_11 "Nullifiable"
|
||||
118 IDS_COL_12 "Remarques"
|
||||
119 IDS_PKEY "Clé Entêtes"
|
||||
120 IDS_PKY_01 "Cat_Table"
|
||||
121 IDS_PKY_02 "Schem_Table"
|
||||
122 IDS_PKY_03 "Nom_Table"
|
||||
123 IDS_PKY_04 "Nom_Colonne"
|
||||
124 IDS_PKY_05 "Numéro_Clé"
|
||||
125 IDS_PKY_06 "Nom_Clé"
|
||||
126 IDS_STAT "Stat Entêtes"
|
||||
127 IDS_STA_01 "Table_Catalog"
|
||||
128 IDS_STA_02 "Table_Schema"
|
||||
129 IDS_STA_03 "Table_Name"
|
||||
130 IDS_STA_04 "Non_Unique"
|
||||
131 IDS_STA_05 "Index_Qualifier"
|
||||
132 IDS_STA_06 "Index_Name"
|
||||
133 IDS_STA_07 "Type"
|
||||
134 IDS_STA_08 "Seq_in_Index"
|
||||
135 IDS_STA_09 "Column_Name"
|
||||
136 IDS_STA_10 "Collation"
|
||||
137 IDS_STA_11 "Cardinality"
|
||||
138 IDS_STA_12 "Pages"
|
||||
139 IDS_STA_13 "Filter_Condition"
|
||||
140 IDS_DRIVER "Driver Entêtes"
|
||||
141 IDS_DRV_01 "Description"
|
||||
142 IDS_DRV_02 "Attributs"
|
||||
143 IDS_DSRC "DataSrc Entêtes"
|
||||
144 IDS_DSC_01 "Nom"
|
||||
145 IDS_DSC_02 "Description"
|
||||
200 ACCESS_VIOLATN "Violation accès mémoire"
|
||||
201 ADD_BAD_TYPE "Ajout d'une valeur de type %s non conforme dans un tableau %s"
|
||||
202 ALLOC_ERROR "Erreur d'allocation de %s"
|
||||
203 ANSWER_TYPE "Réponse de type"
|
||||
204 API_CONF_ERROR "Erreur SQL: API_CONFORMANCE"
|
||||
205 APPL_NOT_INIT "Application non initialisée"
|
||||
206 ARRAY_BNDS_EXCD "Hors limite de tableau"
|
||||
207 BAD_ARRAY_OPER "Les tableaux doivent utiliser l'opérateur IN"
|
||||
208 BAD_ARRAY_TYPE "Type=%d invalide pour un tableau"
|
||||
209 BAD_ARRAY_VAL "Les tableaux doivent avoir le même nombre de valeurs"
|
||||
210 BAD_BIN_FMT "Format invalide %c pour la colonne BIN %s"
|
||||
211 BAD_BLK_ESTIM "Nombre de blocs supérieur à l'estimation"
|
||||
212 BAD_BLK_SIZE "Taille du bloc %d non conforme"
|
||||
213 BAD_BYTE_NUM "Le nombre d'octets écrits est faux"
|
||||
214 BAD_BYTE_READ "Le nombre d'octets lus est faux"
|
||||
215 BAD_COL_TYPE "Type invalide %s pour la colonne %s"
|
||||
216 BAD_COL_XPATH "Xpath invalide colonne %s de la table HTML %s"
|
||||
217 BAD_CONST_TYPE "Type=%d invalide pour une constante"
|
||||
218 BAD_CONV_TYPE "Convertion de type invalide %d"
|
||||
219 BAD_DATETIME "Valeur date/temps invalide"
|
||||
220 BAD_DBF_FILE "Le fichier DBF %s est altéré"
|
||||
221 BAD_DBF_REC "Fichier DBF %s altéré enregistrement %d"
|
||||
222 BAD_DBF_TYPE "Type DBF %c non supporté colonne %s"
|
||||
223 BAD_DIRECTORY "Répertoire invalide %s: %s"
|
||||
224 BAD_FIELD_RANK "Rang %d invalide pour la colonne %s"
|
||||
225 BAD_FIELD_TYPE "Mauvais type de champ %s"
|
||||
226 BAD_FILE_HANDLE "Handle de fichier invalide: %s"
|
||||
227 BAD_FILTER "Mauvais filtre: Opc=%d B_T=%d %d Type=%d %d"
|
||||
228 BAD_FILTER_CONV "Conversion filtre incorrecte, B_T=%d,%d"
|
||||
229 BAD_FILTER_OP "Opérateur de filtre invalide %d"
|
||||
230 BAD_FLD_FORMAT "Format invalide pour le champs %d de %s"
|
||||
231 BAD_FLD_LENGTH "Champs %s trop long (%s --> %d) ligne %d de %s"
|
||||
232 BAD_FREQ_SET "Spécification erronnée de Freq pour la colonne %s"
|
||||
233 BAD_FUNC_MODE "%s: mode invalide %d"
|
||||
234 BAD_HANDLE_VAL "Valeur Handle invalide"
|
||||
235 BAD_HEADER "Fichier %s: bloc en-tête altéré"
|
||||
236 BAD_HEAD_END "Lecture fin d'en-tête impossible"
|
||||
237 BAD_INDEX_FILE "Fichier index %s corrompu"
|
||||
238 BAD_LINEFLD_FMT "Format invalide ligne %d champs %d de %s"
|
||||
239 BAD_LINE_LEN "Longueur ligne non égale à Lrecl"
|
||||
240 BAD_LRECL "Disparité lrecl table/fichier (%d,%hd)"
|
||||
241 BAD_NODE_TYPE "Type noeud erroné pour la table"
|
||||
242 BAD_OFFSET_VAL "Nul offset invalide pour une table CSV"
|
||||
243 BAD_OPEN_MODE "Mode d'ouverture invalide %d"
|
||||
244 BAD_PARAM_TYPE "%.8s: Paramètre de type=%d invalide"
|
||||
245 BAD_PARM_COUNT "Nombre de paramètres incohérent"
|
||||
246 BAD_QUOTE_FIELD "Quote manquante dans %s champs %d ligne %d"
|
||||
247 BAD_READ_NUMBER "Mauvais nombre %d de valeurs lues dans %s"
|
||||
248 BAD_RECFM "Recfm type %d invalide pour DOSCOL"
|
||||
249 BAD_RECFM_VAL "Valeur invalide %d de Recfm"
|
||||
250 BAD_SET_CASE "La casse d'un tableau ne peut pas passer de non respect à respecter"
|
||||
251 BAD_SET_STRING "SetValue: appel invalide pour STRING"
|
||||
252 BAD_SPECIAL_COL "Colonne spéciale invalide %s"
|
||||
253 BAD_SPEC_COLUMN "Colonne spéciale invalide pour ce type de table"
|
||||
254 BAD_TABLE_TYPE "Type invalide %s pour la table %s"
|
||||
255 BAD_TYPE_LIKE "Type(%d)= %d invalide pour LIKE"
|
||||
256 BAD_VALBLK_INDX "Valeur hors limites de l'index du bloc de valeurs"
|
||||
257 BAD_VALBLK_TYPE "Type=%d invalide pour un bloc de valeurs"
|
||||
258 BAD_VALNODE "Type %d invalide pour le noeud valeur colonne %s"
|
||||
259 BAD_VALUE_TYPE "Type de valeur invalide %d"
|
||||
260 BAD_VAL_UPDATE "Impossible de déterminer quelle valeur %s doit être mise à jour"
|
||||
261 BAS_NS_LIST "Format invalide de la liste des espace-noms"
|
||||
262 BIN_F_TOO_LONG "Valeur trop longue pour le champ %s (%d --> %d)"
|
||||
263 BIN_MODE_FAIL "Echec mode binaire: %s"
|
||||
264 BLKTYPLEN_MISM "Disparité types/longueurs de bloc dans SetValue"
|
||||
265 BLK_IS_NULL "Blk est nul"
|
||||
266 BREAKPOINT "Point de contrôle"
|
||||
267 BUILD_INDEX "Construction index %s sur %s"
|
||||
268 CANNOT_OPEN "Ouverture impossible de %s"
|
||||
269 CHSIZE_ERROR "Erreur dans chsize: %s"
|
||||
270 COL_ALLOC_ERR "Allocation impossible du noeud colonne"
|
||||
271 COL_ISNOT_TABLE "La colonne %s n'est pas dans la table %s"
|
||||
272 COL_NOT_SORTED "La colonne %s de la table %s n'est pas triée"
|
||||
273 COL_NUM_MISM "Disparité du nombre de colonnes"
|
||||
274 COM_ERROR "Erreur Com"
|
||||
275 CONCAT_SUBNODE "Concaténation de sous-noeuds impossible"
|
||||
276 CONNECT_CANCEL "Connection interrompue par l'utilisateur"
|
||||
277 CONTROL_C_EXIT "Exit par Ctrl-C"
|
||||
278 DATABASE_LOADED "Base de données %s chargée"
|
||||
279 DATA_MISALIGN "Mauvais alignement pour ce type de données"
|
||||
280 DBASE_FILE "Fichier dBASE dbf: "
|
||||
281 DEF_ALLOC_ERROR "Erreur d'allocation de la classe DEF %s"
|
||||
282 DEL_FILE_ERR "Erreur à l'effacement de %s"
|
||||
283 DEL_READ_ERROR "Delete: erreur en lecture req=%d len=%d"
|
||||
284 DEL_WRITE_ERROR "Delete: erreur en écriture: %s"
|
||||
285 DEPREC_FLAG "Option Flag périmée, utiliser Coltype"
|
||||
286 DLL_LOAD_ERROR "Erreur %d au chargement du module %s"
|
||||
287 DOM_NOT_SUPP "MS-DOM non supporté par cette version"
|
||||
288 DVAL_NOTIN_LIST "Valeur %s non trouvée dans la liste des valeurs distinctes de la colonne %s"
|
||||
289 EMPTY_DOC "Document vide"
|
||||
290 EMPTY_FILE "%s du fichier vide %s: "
|
||||
291 EOF_AFTER_LINE "Fin de fichier après la ligne %d"
|
||||
292 EOF_INDEX_FILE "EOF lisant le fichier index"
|
||||
293 ERROR_IN_LSK "Erreur %d dans lseek64"
|
||||
294 ERROR_IN_SFP "Erreur %d dans SetFilePointer"
|
||||
295 ERR_READING_REC "Erreur lisant l'enregistrement %d de %s"
|
||||
296 FAIL_ADD_NODE "L'ajout du noeud %s dans la table a échoué"
|
||||
297 FETCH_NO_RES "Fetch: Pas de Résultats"
|
||||
298 FIELD_TOO_LONG "Valeur trop longue pour le champs %d ligne %d"
|
||||
299 FILELEN_ERROR "Erreur dans %s pour %s"
|
||||
300 FILE_IS_EMPTY "Le fichier %s est vide"
|
||||
301 FILE_MAP_ERR "Erreur de File mapping"
|
||||
302 FILE_MAP_ERROR "CreateFileMapping %s erreur rc=%d"
|
||||
303 FILE_OPEN_YET "Fichier %s déjà ouvert"
|
||||
304 FILE_UNFOUND "Fichier %s non trouvé"
|
||||
305 FLD_TOO_LNG_FOR "Champs %d trop long pour %s ligne %d de %s"
|
||||
306 FLT_BAD_RESULT "Virgule flottante: résultat inexacte"
|
||||
307 FLT_DENORMAL_OP "Opérande virgule flottante non normalisé"
|
||||
308 FLT_INVALID_OP "Opération virgule flottante invalide"
|
||||
309 FLT_OVERFLOW "Dépassement de capacité virgule flottante"
|
||||
310 FLT_STACK_CHECK "Virgule flottante: Erreur de la pile"
|
||||
311 FLT_UNDERFLOW "Sous-dépassement de capacité virgule flottante"
|
||||
312 FLT_ZERO_DIVIDE "Virgule flottante: division par zéro"
|
||||
313 FMT_WRITE_NIY "L'écriture des fichiers %s n'est pas encore implémentée"
|
||||
314 FOXPRO_FILE "Fichier FoxPro: "
|
||||
315 FPUTS_ERROR "Erreur dans fputs: %s"
|
||||
316 FSEEK_ERROR "Erreur dans fseek: %s"
|
||||
317 FSETPOS_ERROR "Erreur dans fseek pour i=%d"
|
||||
318 FTELL_ERROR "Erreur dans ftell enregistrement=%d: %s"
|
||||
319 FUNCTION_ERROR "Erreur dans %s: %d"
|
||||
320 FUNC_ERRNO "Erreur %d dans %s"
|
||||
321 FUNC_ERROR "Erreur dans %s"
|
||||
322 FUNC_ERR_S "Erreur dans %s: %s"
|
||||
323 FWRITE_ERROR "Erreur dans fwrite: %s"
|
||||
324 GET_DIST_VALS "Récupération des valeurs distinctes de "
|
||||
325 GET_FUNC_ERR "Erreur en recherche de la fonction %s: %s"
|
||||
326 GLOBAL_ERROR "Erreur d'allocation de Global (taille=%d)\n"
|
||||
327 GUARD_PAGE "Violation de page de garde"
|
||||
328 GZOPEN_ERROR "gzopen %s: erreur %d sur %s"
|
||||
329 ILLEGAL_INSTR "Instruction illégale"
|
||||
330 ILL_FILTER_CONV "Conversion implicite illégale dans un filtre"
|
||||
331 INDEX_NOT_UNIQ "L'index n'est pas Unique"
|
||||
332 INDEX_YET_ON "L'index %s existe déjà sur %s"
|
||||
333 INDX_COL_NOTIN "La colonne index %s n'existe pas dans la table %s"
|
||||
334 INDX_EXIST_YET "L'entrée index existe déjà"
|
||||
335 INIT_FAILED "L'initialisation de %s a échoué"
|
||||
336 INT_COL_ERROR "Erreur interne sur la colonne index %s"
|
||||
337 INT_OVERFLOW "Dépassement de capacité sur entier"
|
||||
338 INT_ZERO_DIVIDE "Division entière par zéro"
|
||||
339 INVALID_DISP "Disposition invalide"
|
||||
340 INVALID_FTYPE "SBV: Ftype %d invalide"
|
||||
341 INVALID_HANDLE "Poignée invalide"
|
||||
342 INVALID_OPER "Opérateur invalide %d pour %s"
|
||||
343 INV_COLUMN_TYPE "Type %d Invalide pour la colonne %s"
|
||||
344 INV_COL_TYPE "Type de colonne %s invalide"
|
||||
345 INV_DEF_READ "Lecture différée invalide rc=%d"
|
||||
346 INV_DIRCOL_OFST "Offset invalide pour une colonne DIR"
|
||||
347 INV_MAP_POS "Position mémoire invalide"
|
||||
348 INV_RAND_ACC "L'accès aléatoire d'une table non optimisée est impossible"
|
||||
349 INV_REC_POS "Position d'enregistrement invalide"
|
||||
350 INV_RESULT_TYPE "Type de résultat invalide %s"
|
||||
351 INV_UPDT_TABLE "Table %s invalide pour Update"
|
||||
352 IN_WITHOUT_SUB "IN ou EXISTS sans tableau ou subquery"
|
||||
353 KEY_ALLOC_ERR "Erreur d'allocation d'un bloc offset clé"
|
||||
354 KEY_ALLOC_ERROR "Erreur d'allocation mémoire, Klen=%d n=%d"
|
||||
355 LINE_TOO_LONG "La nouvelle ligne est trop longue"
|
||||
356 LIST "--Liste--"
|
||||
357 LOADING_FAILED "Le chargement de %s a échoué"
|
||||
358 LRECL_TOO_SMALL "Lrecl trop petit (longueur en-tête = %d)"
|
||||
359 MAKE_EMPTY_FILE "Génération du fichier vide %s: %s"
|
||||
360 MAKING "Génération"
|
||||
361 MALLOC_ERROR "Allocation mémoire impossible par %s"
|
||||
362 MAP_VIEW_ERROR "MapViewOfFile %s erreur rc=%d"
|
||||
363 MAXSIZE_ERROR "Maxsize incalculable sur table ouverte"
|
||||
364 MEM_ALLOC_ERR "Erreur d'allocation mémoire, taille %s = %d"
|
||||
365 MEM_ALLOC_ERROR "Erreur d'allocation mémoire"
|
||||
366 MISPLACED_QUOTE "Appostrophe mal placée ligne %d"
|
||||
367 MISSING_ARG "Argument manquant pour l'opérateur %d"
|
||||
368 MISSING_FIELD "Champs %d manquant dans %s ligne %d"
|
||||
369 MISSING_FNAME "Nom du fichier manquant"
|
||||
370 MISSING_NODE "Noeud %s manquant dans %s"
|
||||
371 MISSING_ROWNODE "Impossible de trouver le noeud de la ligne %d"
|
||||
372 MIS_TAG_LIST "Liste des balises colonne manquante"
|
||||
373 MUL_MAKECOL_ERR "Erreur logique dans TABMUL::MakeCol"
|
||||
374 NAME_CONV_ERR "Erreur de convertion du nom de noeud"
|
||||
375 NEW_DOC_FAILED "Impossible de créer le nouveau document"
|
||||
376 NEW_RETURN_NULL "NULL renvoyé par New dans PlugEvalLike"
|
||||
377 NEXT_FILE_ERROR "Erreur en recherche du fichier suivant. rc=%s"
|
||||
378 NONCONT_EXCEPT "Exception non-continuable"
|
||||
379 NOP_ZLIB_INDEX "L'indexage d'une table zlib non optimisée est impossible"
|
||||
380 NOT_A_DBF_FILE "Le fichier n'a pas le format dBASE dbf "
|
||||
381 NOT_FIXED_LEN "Fichier %s non fixe, len=%d lrecl=%d"
|
||||
382 NO_0DH_HEAD "0DH manquant en fin d'en-tête (dbc=%d)"
|
||||
383 NO_ACTIVE_DB "Pas de base de données active"
|
||||
384 NO_CHAR_FROM "Conversion de type %d en caractères impossible"
|
||||
385 NO_DATE_FMT "Pas de format date pour le valblock de type %d"
|
||||
386 NO_DEF_FNCCOL "Colonne fonction par défaut introuvable"
|
||||
387 NO_DEF_PIVOTCOL "Colonne pivot par défaut introuvable"
|
||||
388 NO_DIR_INDX_RD "Pas d'accès directe des tables %s"
|
||||
389 NO_FEAT_SUPPORT "%s non supporté dans cette version"
|
||||
390 NO_FLD_FORMAT "Format absent pour le champs %d de %s"
|
||||
391 NO_FORMAT_COL "Type COLUMN informattable"
|
||||
392 NO_FORMAT_TYPE "Le format ne peut pas être défini à partir du type %d"
|
||||
393 NO_INDEX_READ "Pas d'accès directe des tables multiples"
|
||||
394 NO_KEY_COL "Pas de colonne clé trouvée"
|
||||
395 NO_KEY_UPDATE "Le nom des clés ne peut pas être modifié"
|
||||
396 NO_MAP_INSERT "MAP incompatible avec Insert"
|
||||
397 NO_MATCHING_COL "Pas de colonne correspondant à %s dans %s"
|
||||
398 NO_MATCH_COL "Colonne correspondante introuvable"
|
||||
399 NO_MEMORY "Mémoire pleine"
|
||||
400 NO_MODE_PADDED "Mode non supporté pour les fichiers 'padded'"
|
||||
401 NO_MUL_VCT "Les tables VCT ne peuvent pas être multiples"
|
||||
402 NO_ODBC_DELETE "Delete ne devrait pas être appelé pour les tables ODBC"
|
||||
403 NO_ODBC_DIRECT "Accès directe des tables ODBC non encore implémenté"
|
||||
404 NO_ODBC_MUL "Multiple(2) non supporté pour les tables ODBC"
|
||||
405 NO_ODBC_SPECOL "Pas de colonne spéciale ODBC"
|
||||
406 NO_PART_DEL "Delete partiel des fichier %s impossible"
|
||||
407 NO_PART_MAP "Mapping partiel non implémenté pour cet OS"
|
||||
408 NO_PAR_BLK_INS "Insertion de bloc partiel impossible"
|
||||
409 NO_PIV_DIR_ACC "Pas d'accès directe aux tables PIVOT"
|
||||
410 NO_READ_32 "Lecture de 32 octets impossible"
|
||||
411 NO_RECOV_SPACE "Espace non recouvrable dans le fichier index"
|
||||
412 NO_ROWID_FOR_AM "Accès direct impossible de ROWID pour les tables de type %s"
|
||||
413 NO_ROW_NODE "Le nom du Rownode n'est pas défini"
|
||||
414 NO_SECTION_NAME "Nom de section manquant"
|
||||
415 NO_SEC_UPDATE "Les noms de section ne peuvent pas être modifiés"
|
||||
416 NO_SETPOS_YET "SetPos pas encore implémenté pour les fichier %s"
|
||||
417 NO_SPEC_COL "Pas de colonne spéciales MYSQL"
|
||||
418 NO_SUB_VAL "Pas de sous-value d'un tableau de type %d"
|
||||
419 NO_TABCOL_DATA "Pas de données pour la table %s colonne %s"
|
||||
420 NO_TABLE_DEL "Delete non autorisé pour les tables %s "
|
||||
421 NO_TAB_DATA "Pas de données pour la table %s"
|
||||
422 NO_VCT_DELETE "Délétion Partielle non implémentée pour les fichiers VCT"
|
||||
423 NO_ZIP_DELETE "Delete sur fichier Zip non encore implementé"
|
||||
424 OPENING "Ouverture"
|
||||
425 OPEN_EMPTY_FILE "Ouverture du fichier vide %s: %s"
|
||||
426 OPEN_ERROR "Erreur d'ouverture %d en mode %d sur %s: "
|
||||
427 OPEN_ERROR_IS "Erreur à l'ouverture de %s: %s"
|
||||
428 OPEN_MODE_ERROR "Erreur d'ouverture(%s) %d sur %s"
|
||||
429 OPEN_STRERROR "Erreur à l'ouverture: %s"
|
||||
430 OPTBLK_RD_ERR "Erreur à la lecture d'un bloc optimisation: %s"
|
||||
431 OPTBLK_WR_ERR "Erreur à l'écriture d'un bloc optimisation: %s"
|
||||
432 OPTIMIZING "Optimisation de "
|
||||
433 OPT_BMAP_RD_ERR "Erreur en lecture des bitmaps d'optimisation: %s"
|
||||
434 OPT_BMAP_WR_ERR "Erreur en écriture des bitmaps d'optimisation: %s"
|
||||
435 OPT_CANCELLED "Optimisation interrompue par l'utilisateur"
|
||||
436 OPT_DVAL_RD_ERR "Erreur en lecture des valeurs distinctes: %s"
|
||||
437 OPT_DVAL_WR_ERR "Erreur en écriture des valeurs distinctes: %s"
|
||||
438 OPT_HEAD_RD_ERR "Erreur en lecture de l'entête du fichier opt: %s"
|
||||
439 OPT_HEAD_WR_ERR "Erreur en écriture de l'entête du fichier opt: %s"
|
||||
440 OPT_LOGIC_ERR "Erreur logique dans SetBitmap, i=%d"
|
||||
441 OPT_MAX_RD_ERR "Erreur en lecture des valeurs maxi: %s"
|
||||
442 OPT_MAX_WR_ERR "Erreur en écriture des valeurs maxi: %s"
|
||||
443 OPT_MIN_RD_ERR "Erreur en lecture des valeurs mini: %s"
|
||||
444 OPT_MIN_WR_ERR "Erreur en écriture des valeurs mini: %s"
|
||||
445 OPT_NOT_MATCH "Le fichier opt %s n'est pas à jour"
|
||||
446 PAGE_ERROR "Erreur de pagination"
|
||||
447 PARM_CNT_MISS "Disparité du nombre de Paramètres"
|
||||
448 PREC_VBLP_NULL "ARRAY SetPrecision: Vblp est NULL"
|
||||
449 PRIV_INSTR "Instruction privilégiée"
|
||||
450 PROCADD_ERROR "Erreur %d sur l'adresse de %s"
|
||||
451 QUERY_CANCELLED "Requête interrompue par l'utilisateur"
|
||||
452 RANGE_NO_JOIN "Range non compatible avec les index de jointure"
|
||||
453 RC_READING "rc=%d en lecture de la table %s"
|
||||
454 READY "Prêt"
|
||||
455 READ_ERROR "Erreur en lecture sur %s: %s"
|
||||
456 READ_ONLY "Cette table protégée en lecture seule ne peut être modifiée"
|
||||
457 READ_SEEK_ERROR "Erreur de recherche en lecture: %s"
|
||||
458 REGISTER_ERR "Enregistrement NS impossible, préfix='%s' et href='%s'"
|
||||
459 REMOVE_ERROR "Erreur en supprimant %s: %s"
|
||||
460 RENAME_ERROR "Erreur renommant %s en %s: %s"
|
||||
461 ROWID_NOT_IMPL "RowNumber non implémenté pour les tables de type %s"
|
||||
462 SEC_KEY_FIRST "Les sections et clés doivent être insérées en premier"
|
||||
463 SEC_NAME_FIRST "Le nom de section doit être en tête de liste en insertion"
|
||||
464 SEP_IN_FIELD "Le champ %d contient le caractère séparateur"
|
||||
465 SEQUENCE_ERROR "HSTMT: Allocation hors séquence"
|
||||
466 SETEOF_ERROR "Erreur %d dans SetEndOfFile"
|
||||
467 SETRECPOS_NIY "SetRecpos non implémenté pour ce type de table"
|
||||
468 SET_STR_TRUNC "SetValue: Chaîne de caractères tronquée"
|
||||
469 SFP_ERROR "Erreur sur SetFilePointer: %s"
|
||||
470 SHARED_LIB_ERR "Erreur au chargement de la librairie partagée %s: %s"
|
||||
471 SINGLE_STEP "Pas à pas"
|
||||
472 SORTING_VAL "Tri de %d valeurs"
|
||||
473 SPCOL_READONLY "La colonne spéciale %s est en lecture seulement"
|
||||
474 SQL_CONF_ERROR "Erreur SQL: SQL_CONFORMANCE"
|
||||
475 SRCH_CLOSE_ERR "Erreur à la fermeture de l'Handle de recherche"
|
||||
476 SRC_TABLE_UNDEF "La table source n'est pas définie"
|
||||
477 STACK_OVERFLOW "Dépassement de capacité de la pile"
|
||||
478 TABDIR_READONLY "Les tables DIR sont en lecture seulement"
|
||||
479 TABLE_NOT_OPT "Table non optimisable"
|
||||
480 TABLE_NO_INDEX "La table %s n'est pas indexable"
|
||||
481 TABLE_READ_ONLY "Les tables %s sont en lecture seulement "
|
||||
482 TABMUL_READONLY "Les tables multiples sont en lecture seulement"
|
||||
483 TOO_MANY_FIELDS "Trop de champs ligne %d de %s"
|
||||
484 TOO_MANY_JUMPS "Trop de niveaux de saut"
|
||||
485 TOO_MANY_KEYS "Trop de clés (%d)"
|
||||
486 TO_BLK_IS_NULL "To Blk est nul"
|
||||
487 TRUNCATE_ERROR "Erreur en troncation: %s"
|
||||
488 TRUNC_BY_ESTIM "Tronqué par l'option Estimate"
|
||||
489 TYPE_MISMATCH "Clé et source ne sont pas du même type"
|
||||
490 TYPE_VALUE_ERR "Colonne %s: disparité type(%s)/valeur(%s)"
|
||||
491 UNBALANCE_QUOTE "Appostrophe en trop ligne %d"
|
||||
492 UNDEFINED_AM "COLBLK %s: méthode d'accès indéfinie"
|
||||
493 UNKNOWN_EXCPT "Exception non répertoriée"
|
||||
494 UNMATCH_FIL_ARG "Argument de filtre dépareillé"
|
||||
495 UPDATE_ERROR "Erreur en Update sur %s"
|
||||
496 UPD_ZIP_NOT_IMP "Mise à jour des tables ZDOS non encore implementé"
|
||||
497 VALSTR_TOO_LONG "Valeur %s trop longue pour une chaîne de longueur %d"
|
||||
498 VALTYPE_NOMATCH "Disparité types de valeur"
|
||||
499 VALUE_ERROR "Colonne %s: bloc valeur nul"
|
||||
500 VALUE_TOO_BIG "Valeur %lld trop grande pour la colonne %s"
|
||||
501 VALUE_TOO_LONG "Valeur %s trop longue pour la colonne %s de longueur %d"
|
||||
502 VAL_ALLOC_ERR "Allocation impossible du noeud valeur"
|
||||
503 VIR_NO_DELETE "Delete impossible sur les tables %s"
|
||||
504 VIR_READ_ONLY "Les tables virtuelles %s sont en lecture seulement"
|
||||
505 VOID_FIRST_ARG "Le premier argument ne doit pas être vide"
|
||||
506 WORK_AREA "Espace de travail: %s"
|
||||
507 WRITE_SEEK_ERR "Erreur de recherche en écriture: %s"
|
||||
508 WRITE_STRERROR "Erreur en écriture sur %s: %s"
|
||||
509 WRITING "Ecriture"
|
||||
510 WRITING_ERROR "Erreur à l'écriture de %s: %s"
|
||||
511 WS_CONV_ERR "Erreur de convertion de %s en WS"
|
||||
512 XCOL_MISMATCH "La colonne %s ne correspond pas à l'index"
|
||||
513 XFILE_READERR "Erreur %d en lisant le fichier index"
|
||||
514 XFILE_WRITERR "Erreur en écrivant le fichier index: %s"
|
||||
515 XMLTAB_INIT_ERR "Erreur d'initialisation de la table XML"
|
||||
516 XML_INIT_ERROR "Erreur d'initialisation du nouveau fichier XML"
|
||||
517 XPATH_CNTX_ERR "Le nouveau contexte XPath ne peut être créé"
|
||||
518 XPATH_EVAL_ERR "Impossible d'évaluer l'emplacement xpath '%s'"
|
||||
519 XPATH_NOT_SUPP "Xpath non supporté colonne %s"
|
||||
46
storage/connect/frids.h
Normal file
46
storage/connect/frids.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
case IDS_TABLES: p = "Table Entêtes"; break;
|
||||
case IDS_TAB_01: p = "Catalogue"; break;
|
||||
case IDS_TAB_02: p = "Schéma"; break;
|
||||
case IDS_TAB_03: p = "Nom"; break;
|
||||
case IDS_TAB_04: p = "Type"; break;
|
||||
case IDS_TAB_05: p = "Remarque"; break;
|
||||
case IDS_COLUMNS: p = "Colonne Entêtes"; break;
|
||||
case IDS_COL_01: p = "Cat_Table"; break;
|
||||
case IDS_COL_02: p = "Schem_Table"; break;
|
||||
case IDS_COL_03: p = "Nom_Table"; break;
|
||||
case IDS_COL_04: p = "Nom_Colonne"; break;
|
||||
case IDS_COL_05: p = "Type_Données"; break;
|
||||
case IDS_COL_06: p = "Nom_Type"; break;
|
||||
case IDS_COL_07: p = "Précision"; break;
|
||||
case IDS_COL_08: p = "Longueur"; break;
|
||||
case IDS_COL_09: p = "Echelle"; break;
|
||||
case IDS_COL_10: p = "Base"; break;
|
||||
case IDS_COL_11: p = "Nullifiable"; break;
|
||||
case IDS_COL_12: p = "Remarques"; break;
|
||||
case IDS_PKEY: p = "Clé Entêtes"; break;
|
||||
case IDS_PKY_01: p = "Cat_Table"; break;
|
||||
case IDS_PKY_02: p = "Schem_Table"; break;
|
||||
case IDS_PKY_03: p = "Nom_Table"; break;
|
||||
case IDS_PKY_04: p = "Nom_Colonne"; break;
|
||||
case IDS_PKY_05: p = "Numéro_Clé"; break;
|
||||
case IDS_PKY_06: p = "Nom_Clé"; break;
|
||||
case IDS_STAT: p = "Stat Entêtes"; break;
|
||||
case IDS_STA_01: p = "Table_Catalog"; break;
|
||||
case IDS_STA_02: p = "Table_Schema"; break;
|
||||
case IDS_STA_03: p = "Table_Name"; break;
|
||||
case IDS_STA_04: p = "Non_Unique"; break;
|
||||
case IDS_STA_05: p = "Index_Qualifier"; break;
|
||||
case IDS_STA_06: p = "Index_Name"; break;
|
||||
case IDS_STA_07: p = "Type"; break;
|
||||
case IDS_STA_08: p = "Seq_in_Index"; break;
|
||||
case IDS_STA_09: p = "Column_Name"; break;
|
||||
case IDS_STA_10: p = "Collation"; break;
|
||||
case IDS_STA_11: p = "Cardinality"; break;
|
||||
case IDS_STA_12: p = "Pages"; break;
|
||||
case IDS_STA_13: p = "Filter_Condition"; break;
|
||||
case IDS_DRIVER: p = "Driver Entêtes"; break;
|
||||
case IDS_DRV_01: p = "Description"; break;
|
||||
case IDS_DRV_02: p = "Attributs"; break;
|
||||
case IDS_DSRC: p = "DataSrc Entêtes"; break;
|
||||
case IDS_DSC_01: p = "Nom"; break;
|
||||
case IDS_DSC_02: p = "Description"; break;
|
||||
320
storage/connect/frmsg.h
Normal file
320
storage/connect/frmsg.h
Normal file
|
|
@ -0,0 +1,320 @@
|
|||
#define MSG_ACCESS_VIOLATN "Violation accès mémoire"
|
||||
#define MSG_ADD_BAD_TYPE "Ajout d'une valeur de type %s non conforme dans un tableau %s"
|
||||
#define MSG_ALLOC_ERROR "Erreur d'allocation de %s"
|
||||
#define MSG_ANSWER_TYPE "Réponse de type"
|
||||
#define MSG_API_CONF_ERROR "Erreur SQL: API_CONFORMANCE"
|
||||
#define MSG_APPL_NOT_INIT "Application non initialisée"
|
||||
#define MSG_ARRAY_BNDS_EXCD "Hors limite de tableau"
|
||||
#define MSG_BAD_ARRAY_OPER "Les tableaux doivent utiliser l'opérateur IN"
|
||||
#define MSG_BAD_ARRAY_TYPE "Type=%d invalide pour un tableau"
|
||||
#define MSG_BAD_ARRAY_VAL "Les tableaux doivent avoir le même nombre de valeurs"
|
||||
#define MSG_BAD_BIN_FMT "Format invalide %c pour la colonne BIN %s"
|
||||
#define MSG_BAD_BLK_ESTIM "Nombre de blocs supérieur à l'estimation"
|
||||
#define MSG_BAD_BLK_SIZE "Taille du bloc %d non conforme"
|
||||
#define MSG_BAD_BYTE_NUM "Le nombre d'octets écrits est faux"
|
||||
#define MSG_BAD_BYTE_READ "Le nombre d'octets lus est faux"
|
||||
#define MSG_BAD_COL_TYPE "Type invalide %s pour la colonne %s"
|
||||
#define MSG_BAD_COL_XPATH "Xpath invalide colonne %s de la table HTML %s"
|
||||
#define MSG_BAD_CONST_TYPE "Type=%d invalide pour une constante"
|
||||
#define MSG_BAD_CONV_TYPE "Convertion de type invalide %d"
|
||||
#define MSG_BAD_DATETIME "Valeur date/temps invalide"
|
||||
#define MSG_BAD_DBF_FILE "Le fichier DBF %s est altéré"
|
||||
#define MSG_BAD_DBF_REC "Fichier DBF %s altéré enregistrement %d"
|
||||
#define MSG_BAD_DBF_TYPE "Type DBF %c non supporté colonne %s"
|
||||
#define MSG_BAD_DIRECTORY "Répertoire invalide %s: %s"
|
||||
#define MSG_BAD_FIELD_RANK "Rang %d invalide pour la colonne %s"
|
||||
#define MSG_BAD_FIELD_TYPE "Mauvais type de champ %s"
|
||||
#define MSG_BAD_FILE_HANDLE "Handle de fichier invalide: %s"
|
||||
#define MSG_BAD_FILTER "Mauvais filtre: Opc=%d B_T=%d %d Type=%d %d"
|
||||
#define MSG_BAD_FILTER_CONV "Conversion filtre incorrecte, B_T=%d,%d"
|
||||
#define MSG_BAD_FILTER_OP "Opérateur de filtre invalide %d"
|
||||
#define MSG_BAD_FLD_FORMAT "Format invalide pour le champs %d de %s"
|
||||
#define MSG_BAD_FLD_LENGTH "Champs %s trop long (%s --> %d) ligne %d de %s"
|
||||
#define MSG_BAD_FREQ_SET "Spécification erronnée de Freq pour la colonne %s"
|
||||
#define MSG_BAD_FUNC_MODE "%s: mode invalide %d"
|
||||
#define MSG_BAD_HANDLE_VAL "Valeur Handle invalide"
|
||||
#define MSG_BAD_HEADER "Fichier %s: bloc en-tête altéré"
|
||||
#define MSG_BAD_HEAD_END "Lecture fin d'en-tête impossible"
|
||||
#define MSG_BAD_INDEX_FILE "Fichier index %s corrompu"
|
||||
#define MSG_BAD_LINEFLD_FMT "Format invalide ligne %d champs %d de %s"
|
||||
#define MSG_BAD_LINE_LEN "Longueur ligne non égale à Lrecl"
|
||||
#define MSG_BAD_LRECL "Disparité lrecl table/fichier (%d,%hd)"
|
||||
#define MSG_BAD_NODE_TYPE "Type noeud erroné pour la table"
|
||||
#define MSG_BAD_OFFSET_VAL "Nul offset invalide pour une table CSV"
|
||||
#define MSG_BAD_OPEN_MODE "Mode d'ouverture invalide %d"
|
||||
#define MSG_BAD_PARAM_TYPE "%.8s: Paramètre de type=%d invalide"
|
||||
#define MSG_BAD_PARM_COUNT "Nombre de paramètres incohérent"
|
||||
#define MSG_BAD_QUOTE_FIELD "Quote manquante dans %s champs %d ligne %d"
|
||||
#define MSG_BAD_READ_NUMBER "Mauvais nombre %d de valeurs lues dans %s"
|
||||
#define MSG_BAD_RECFM "Recfm type %d invalide pour DOSCOL"
|
||||
#define MSG_BAD_RECFM_VAL "Valeur invalide %d de Recfm"
|
||||
#define MSG_BAD_SET_CASE "La casse d'un tableau ne peut pas passer de non respect à respecter"
|
||||
#define MSG_BAD_SET_STRING "SetValue: appel invalide pour STRING"
|
||||
#define MSG_BAD_SPECIAL_COL "Colonne spéciale invalide %s"
|
||||
#define MSG_BAD_SPEC_COLUMN "Colonne spéciale invalide pour ce type de table"
|
||||
#define MSG_BAD_TABLE_TYPE "Type invalide %s pour la table %s"
|
||||
#define MSG_BAD_TYPE_LIKE "Type(%d)= %d invalide pour LIKE"
|
||||
#define MSG_BAD_VALBLK_INDX "Valeur hors limites de l'index du bloc de valeurs"
|
||||
#define MSG_BAD_VALBLK_TYPE "Type=%d invalide pour un bloc de valeurs"
|
||||
#define MSG_BAD_VALNODE "Type %d invalide pour le noeud valeur colonne %s"
|
||||
#define MSG_BAD_VALUE_TYPE "Type de valeur invalide %d"
|
||||
#define MSG_BAD_VAL_UPDATE "Impossible de déterminer quelle valeur %s doit être mise à jour"
|
||||
#define MSG_BAS_NS_LIST "Format invalide de la liste des espace-noms"
|
||||
#define MSG_BIN_F_TOO_LONG "Valeur trop longue pour le champ %s (%d --> %d)"
|
||||
#define MSG_BIN_MODE_FAIL "Echec mode binaire: %s"
|
||||
#define MSG_BLKTYPLEN_MISM "Disparité types/longueurs de bloc dans SetValue"
|
||||
#define MSG_BLK_IS_NULL "Blk est nul"
|
||||
#define MSG_BREAKPOINT "Point de contrôle"
|
||||
#define MSG_BUILD_INDEX "Construction index %s sur %s"
|
||||
#define MSG_CANNOT_OPEN "Ouverture impossible de %s"
|
||||
#define MSG_CHSIZE_ERROR "Erreur dans chsize: %s"
|
||||
#define MSG_COL_ALLOC_ERR "Allocation impossible du noeud colonne"
|
||||
#define MSG_COL_ISNOT_TABLE "La colonne %s n'est pas dans la table %s"
|
||||
#define MSG_COL_NOT_SORTED "La colonne %s de la table %s n'est pas triée"
|
||||
#define MSG_COL_NUM_MISM "Disparité du nombre de colonnes"
|
||||
#define MSG_COM_ERROR "Erreur Com"
|
||||
#define MSG_CONCAT_SUBNODE "Concaténation de sous-noeuds impossible"
|
||||
#define MSG_CONNECT_CANCEL "Connection interrompue par l'utilisateur"
|
||||
#define MSG_CONTROL_C_EXIT "Exit par Ctrl-C"
|
||||
#define MSG_DATABASE_LOADED "Base de données %s chargée"
|
||||
#define MSG_DATA_MISALIGN "Mauvais alignement pour ce type de données"
|
||||
#define MSG_DBASE_FILE "Fichier dBASE dbf: "
|
||||
#define MSG_DEF_ALLOC_ERROR "Erreur d'allocation de la classe DEF %s"
|
||||
#define MSG_DEL_FILE_ERR "Erreur à l'effacement de %s"
|
||||
#define MSG_DEL_READ_ERROR "Delete: erreur en lecture req=%d len=%d"
|
||||
#define MSG_DEL_WRITE_ERROR "Delete: erreur en écriture: %s"
|
||||
#define MSG_DEPREC_FLAG "Option Flag périmée, utiliser Coltype"
|
||||
#define MSG_DLL_LOAD_ERROR "Erreur %d au chargement du module %s"
|
||||
#define MSG_DOM_NOT_SUPP "MS-DOM non supporté par cette version"
|
||||
#define MSG_DVAL_NOTIN_LIST "Valeur %s non trouvée dans la liste des valeurs distinctes de la colonne %s"
|
||||
#define MSG_EMPTY_DOC "Document vide"
|
||||
#define MSG_EMPTY_FILE "%s du fichier vide %s: "
|
||||
#define MSG_EOF_AFTER_LINE "Fin de fichier après la ligne %d"
|
||||
#define MSG_EOF_INDEX_FILE "EOF lisant le fichier index"
|
||||
#define MSG_ERROR_IN_LSK "Erreur %d dans lseek64"
|
||||
#define MSG_ERROR_IN_SFP "Erreur %d dans SetFilePointer"
|
||||
#define MSG_ERR_READING_REC "Erreur lisant l'enregistrement %d de %s"
|
||||
#define MSG_FAIL_ADD_NODE "L'ajout du noeud %s dans la table a échoué"
|
||||
#define MSG_FETCH_NO_RES "Fetch: Pas de Résultats"
|
||||
#define MSG_FIELD_TOO_LONG "Valeur trop longue pour le champs %d ligne %d"
|
||||
#define MSG_FILELEN_ERROR "Erreur dans %s pour %s"
|
||||
#define MSG_FILE_IS_EMPTY "Le fichier %s est vide"
|
||||
#define MSG_FILE_MAP_ERR "Erreur de File mapping"
|
||||
#define MSG_FILE_MAP_ERROR "CreateFileMapping %s erreur rc=%d"
|
||||
#define MSG_FILE_OPEN_YET "Fichier %s déjà ouvert"
|
||||
#define MSG_FILE_UNFOUND "Fichier %s non trouvé"
|
||||
#define MSG_FLD_TOO_LNG_FOR "Champs %d trop long pour %s ligne %d de %s"
|
||||
#define MSG_FLT_BAD_RESULT "Virgule flottante: résultat inexacte"
|
||||
#define MSG_FLT_DENORMAL_OP "Opérande virgule flottante non normalisé"
|
||||
#define MSG_FLT_INVALID_OP "Opération virgule flottante invalide"
|
||||
#define MSG_FLT_OVERFLOW "Dépassement de capacité virgule flottante"
|
||||
#define MSG_FLT_STACK_CHECK "Virgule flottante: Erreur de la pile"
|
||||
#define MSG_FLT_UNDERFLOW "Sous-dépassement de capacité virgule flottante"
|
||||
#define MSG_FLT_ZERO_DIVIDE "Virgule flottante: division par zéro"
|
||||
#define MSG_FMT_WRITE_NIY "L'écriture des fichiers %s n'est pas encore implémentée"
|
||||
#define MSG_FOXPRO_FILE "Fichier FoxPro: "
|
||||
#define MSG_FPUTS_ERROR "Erreur dans fputs: %s"
|
||||
#define MSG_FSEEK_ERROR "Erreur dans fseek: %s"
|
||||
#define MSG_FSETPOS_ERROR "Erreur dans fseek pour i=%d"
|
||||
#define MSG_FTELL_ERROR "Erreur dans ftell enregistrement=%d: %s"
|
||||
#define MSG_FUNCTION_ERROR "Erreur dans %s: %d"
|
||||
#define MSG_FUNC_ERRNO "Erreur %d dans %s"
|
||||
#define MSG_FUNC_ERROR "Erreur dans %s"
|
||||
#define MSG_FUNC_ERR_S "Erreur dans %s: %s"
|
||||
#define MSG_FWRITE_ERROR "Erreur dans fwrite: %s"
|
||||
#define MSG_GET_DIST_VALS "Récupération des valeurs distinctes de "
|
||||
#define MSG_GET_FUNC_ERR "Erreur en recherche de la fonction %s: %s"
|
||||
#define MSG_GLOBAL_ERROR "Erreur d'allocation de Global (taille=%d)\n"
|
||||
#define MSG_GUARD_PAGE "Violation de page de garde"
|
||||
#define MSG_GZOPEN_ERROR "gzopen %s: erreur %d sur %s"
|
||||
#define MSG_ILLEGAL_INSTR "Instruction illégale"
|
||||
#define MSG_ILL_FILTER_CONV "Conversion implicite illégale dans un filtre"
|
||||
#define MSG_INDEX_NOT_UNIQ "L'index n'est pas Unique"
|
||||
#define MSG_INDEX_YET_ON "L'index %s existe déjà sur %s"
|
||||
#define MSG_INDX_COL_NOTIN "La colonne index %s n'existe pas dans la table %s"
|
||||
#define MSG_INDX_EXIST_YET "L'entrée index existe déjà"
|
||||
#define MSG_INIT_FAILED "L'initialisation de %s a échoué"
|
||||
#define MSG_INT_COL_ERROR "Erreur interne sur la colonne index %s"
|
||||
#define MSG_INT_OVERFLOW "Dépassement de capacité sur entier"
|
||||
#define MSG_INT_ZERO_DIVIDE "Division entière par zéro"
|
||||
#define MSG_INVALID_DISP "Disposition invalide"
|
||||
#define MSG_INVALID_FTYPE "SBV: Ftype %d invalide"
|
||||
#define MSG_INVALID_HANDLE "Poignée invalide"
|
||||
#define MSG_INVALID_OPER "Opérateur invalide %d pour %s"
|
||||
#define MSG_INV_COLUMN_TYPE "Type %d Invalide pour la colonne %s"
|
||||
#define MSG_INV_COL_TYPE "Type de colonne %s invalide"
|
||||
#define MSG_INV_DEF_READ "Lecture différée invalide rc=%d"
|
||||
#define MSG_INV_DIRCOL_OFST "Offset invalide pour une colonne DIR"
|
||||
#define MSG_INV_MAP_POS "Position mémoire invalide"
|
||||
#define MSG_INV_RAND_ACC "L'accès aléatoire d'une table non optimisée est impossible"
|
||||
#define MSG_INV_REC_POS "Position d'enregistrement invalide"
|
||||
#define MSG_INV_RESULT_TYPE "Type de résultat invalide %s"
|
||||
#define MSG_INV_UPDT_TABLE "Table %s invalide pour Update"
|
||||
#define MSG_IN_WITHOUT_SUB "IN ou EXISTS sans tableau ou subquery"
|
||||
#define MSG_KEY_ALLOC_ERR "Erreur d'allocation d'un bloc offset clé"
|
||||
#define MSG_KEY_ALLOC_ERROR "Erreur d'allocation mémoire, Klen=%d n=%d"
|
||||
#define MSG_LINE_TOO_LONG "La nouvelle ligne est trop longue"
|
||||
#define MSG_LIST "--Liste--"
|
||||
#define MSG_LOADING_FAILED "Le chargement de %s a échoué"
|
||||
#define MSG_LRECL_TOO_SMALL "Lrecl trop petit (longueur en-tête = %d)"
|
||||
#define MSG_MAKE_EMPTY_FILE "Génération du fichier vide %s: %s"
|
||||
#define MSG_MAKING "Génération"
|
||||
#define MSG_MALLOC_ERROR "Allocation mémoire impossible par %s"
|
||||
#define MSG_MAP_VIEW_ERROR "MapViewOfFile %s erreur rc=%d"
|
||||
#define MSG_MAXSIZE_ERROR "Maxsize incalculable sur table ouverte"
|
||||
#define MSG_MEM_ALLOC_ERR "Erreur d'allocation mémoire, taille %s = %d"
|
||||
#define MSG_MEM_ALLOC_ERROR "Erreur d'allocation mémoire"
|
||||
#define MSG_MISPLACED_QUOTE "Appostrophe mal placée ligne %d"
|
||||
#define MSG_MISSING_ARG "Argument manquant pour l'opérateur %d"
|
||||
#define MSG_MISSING_FIELD "Champs %d manquant dans %s ligne %d"
|
||||
#define MSG_MISSING_FNAME "Nom du fichier manquant"
|
||||
#define MSG_MISSING_NODE "Noeud %s manquant dans %s"
|
||||
#define MSG_MISSING_ROWNODE "Impossible de trouver le noeud de la ligne %d"
|
||||
#define MSG_MIS_TAG_LIST "Liste des balises colonne manquante"
|
||||
#define MSG_MUL_MAKECOL_ERR "Erreur logique dans TABMUL::MakeCol"
|
||||
#define MSG_NAME_CONV_ERR "Erreur de convertion du nom de noeud"
|
||||
#define MSG_NEW_DOC_FAILED "Impossible de créer le nouveau document"
|
||||
#define MSG_NEW_RETURN_NULL "NULL renvoyé par New dans PlugEvalLike"
|
||||
#define MSG_NEXT_FILE_ERROR "Erreur en recherche du fichier suivant. rc=%s"
|
||||
#define MSG_NONCONT_EXCEPT "Exception non-continuable"
|
||||
#define MSG_NOP_ZLIB_INDEX "L'indexage d'une table zlib non optimisée est impossible"
|
||||
#define MSG_NOT_A_DBF_FILE "Le fichier n'a pas le format dBASE dbf "
|
||||
#define MSG_NOT_FIXED_LEN "Fichier %s non fixe, len=%d lrecl=%d"
|
||||
#define MSG_NO_0DH_HEAD "0DH manquant en fin d'en-tête (dbc=%d)"
|
||||
#define MSG_NO_ACTIVE_DB "Pas de base de données active"
|
||||
#define MSG_NO_CHAR_FROM "Conversion de type %d en caractères impossible"
|
||||
#define MSG_NO_DATE_FMT "Pas de format date pour le valblock de type %d"
|
||||
#define MSG_NO_DEF_FNCCOL "Colonne fonction par défaut introuvable"
|
||||
#define MSG_NO_DEF_PIVOTCOL "Colonne pivot par défaut introuvable"
|
||||
#define MSG_NO_DIR_INDX_RD "Pas d'accès directe des tables %s"
|
||||
#define MSG_NO_FEAT_SUPPORT "%s non supporté dans cette version"
|
||||
#define MSG_NO_FLD_FORMAT "Format absent pour le champs %d de %s"
|
||||
#define MSG_NO_FORMAT_COL "Type COLUMN informattable"
|
||||
#define MSG_NO_FORMAT_TYPE "Le format ne peut pas être défini à partir du type %d"
|
||||
#define MSG_NO_INDEX_READ "Pas d'accès directe des tables multiples"
|
||||
#define MSG_NO_KEY_COL "Pas de colonne clé trouvée"
|
||||
#define MSG_NO_KEY_UPDATE "Le nom des clés ne peut pas être modifié"
|
||||
#define MSG_NO_MAP_INSERT "MAP incompatible avec Insert"
|
||||
#define MSG_NO_MATCHING_COL "Pas de colonne correspondant à %s dans %s"
|
||||
#define MSG_NO_MATCH_COL "Colonne correspondante introuvable"
|
||||
#define MSG_NO_MEMORY "Mémoire pleine"
|
||||
#define MSG_NO_MODE_PADDED "Mode non supporté pour les fichiers 'padded'"
|
||||
#define MSG_NO_MUL_VCT "Les tables VCT ne peuvent pas être multiples"
|
||||
#define MSG_NO_ODBC_DELETE "Delete ne devrait pas être appelé pour les tables ODBC"
|
||||
#define MSG_NO_ODBC_DIRECT "Accès directe des tables ODBC non encore implémenté"
|
||||
#define MSG_NO_ODBC_MUL "Multiple(2) non supporté pour les tables ODBC"
|
||||
#define MSG_NO_ODBC_SPECOL "Pas de colonne spéciale ODBC"
|
||||
#define MSG_NO_PART_DEL "Delete partiel des fichier %s impossible"
|
||||
#define MSG_NO_PART_MAP "Mapping partiel non implémenté pour cet OS"
|
||||
#define MSG_NO_PAR_BLK_INS "Insertion de bloc partiel impossible"
|
||||
#define MSG_NO_PIV_DIR_ACC "Pas d'accès directe aux tables PIVOT"
|
||||
#define MSG_NO_READ_32 "Lecture de 32 octets impossible"
|
||||
#define MSG_NO_RECOV_SPACE "Espace non recouvrable dans le fichier index"
|
||||
#define MSG_NO_ROWID_FOR_AM "Accès direct impossible de ROWID pour les tables de type %s"
|
||||
#define MSG_NO_ROW_NODE "Le nom du Rownode n'est pas défini"
|
||||
#define MSG_NO_SECTION_NAME "Nom de section manquant"
|
||||
#define MSG_NO_SEC_UPDATE "Les noms de section ne peuvent pas être modifiés"
|
||||
#define MSG_NO_SETPOS_YET "SetPos pas encore implémenté pour les fichier %s"
|
||||
#define MSG_NO_SPEC_COL "Pas de colonne spéciales MYSQL"
|
||||
#define MSG_NO_SUB_VAL "Pas de sous-value d'un tableau de type %d"
|
||||
#define MSG_NO_TABCOL_DATA "Pas de données pour la table %s colonne %s"
|
||||
#define MSG_NO_TABLE_DEL "Delete non autorisé pour les tables %s "
|
||||
#define MSG_NO_TAB_DATA "Pas de données pour la table %s"
|
||||
#define MSG_NO_VCT_DELETE "Délétion Partielle non implémentée pour les fichiers VCT"
|
||||
#define MSG_NO_ZIP_DELETE "Delete sur fichier Zip non encore implementé"
|
||||
#define MSG_OPENING "Ouverture"
|
||||
#define MSG_OPEN_EMPTY_FILE "Ouverture du fichier vide %s: %s"
|
||||
#define MSG_OPEN_ERROR "Erreur d'ouverture %d en mode %d sur %s: "
|
||||
#define MSG_OPEN_ERROR_IS "Erreur à l'ouverture de %s: %s"
|
||||
#define MSG_OPEN_MODE_ERROR "Erreur d'ouverture(%s) %d sur %s"
|
||||
#define MSG_OPEN_STRERROR "Erreur à l'ouverture: %s"
|
||||
#define MSG_OPTBLK_RD_ERR "Erreur à la lecture d'un bloc optimisation: %s"
|
||||
#define MSG_OPTBLK_WR_ERR "Erreur à l'écriture d'un bloc optimisation: %s"
|
||||
#define MSG_OPTIMIZING "Optimisation de "
|
||||
#define MSG_OPT_BMAP_RD_ERR "Erreur en lecture des bitmaps d'optimisation: %s"
|
||||
#define MSG_OPT_BMAP_WR_ERR "Erreur en écriture des bitmaps d'optimisation: %s"
|
||||
#define MSG_OPT_CANCELLED "Optimisation interrompue par l'utilisateur"
|
||||
#define MSG_OPT_DVAL_RD_ERR "Erreur en lecture des valeurs distinctes: %s"
|
||||
#define MSG_OPT_DVAL_WR_ERR "Erreur en écriture des valeurs distinctes: %s"
|
||||
#define MSG_OPT_HEAD_RD_ERR "Erreur en lecture de l'entête du fichier opt: %s"
|
||||
#define MSG_OPT_HEAD_WR_ERR "Erreur en écriture de l'entête du fichier opt: %s"
|
||||
#define MSG_OPT_LOGIC_ERR "Erreur logique dans SetBitmap, i=%d"
|
||||
#define MSG_OPT_MAX_RD_ERR "Erreur en lecture des valeurs maxi: %s"
|
||||
#define MSG_OPT_MAX_WR_ERR "Erreur en écriture des valeurs maxi: %s"
|
||||
#define MSG_OPT_MIN_RD_ERR "Erreur en lecture des valeurs mini: %s"
|
||||
#define MSG_OPT_MIN_WR_ERR "Erreur en écriture des valeurs mini: %s"
|
||||
#define MSG_OPT_NOT_MATCH "Le fichier opt %s n'est pas à jour"
|
||||
#define MSG_PAGE_ERROR "Erreur de pagination"
|
||||
#define MSG_PARM_CNT_MISS "Disparité du nombre de Paramètres"
|
||||
#define MSG_PREC_VBLP_NULL "ARRAY SetPrecision: Vblp est NULL"
|
||||
#define MSG_PRIV_INSTR "Instruction privilégiée"
|
||||
#define MSG_PROCADD_ERROR "Erreur %d sur l'adresse de %s"
|
||||
#define MSG_QUERY_CANCELLED "Requête interrompue par l'utilisateur"
|
||||
#define MSG_RANGE_NO_JOIN "Range non compatible avec les index de jointure"
|
||||
#define MSG_RC_READING "rc=%d en lecture de la table %s"
|
||||
#define MSG_READY "Prêt"
|
||||
#define MSG_READ_ERROR "Erreur en lecture sur %s: %s"
|
||||
#define MSG_READ_ONLY "Cette table protégée en lecture seule ne peut être modifiée"
|
||||
#define MSG_READ_SEEK_ERROR "Erreur de recherche en lecture: %s"
|
||||
#define MSG_REGISTER_ERR "Enregistrement NS impossible, préfix='%s' et href='%s'"
|
||||
#define MSG_REMOVE_ERROR "Erreur en supprimant %s: %s"
|
||||
#define MSG_RENAME_ERROR "Erreur renommant %s en %s: %s"
|
||||
#define MSG_ROWID_NOT_IMPL "RowNumber non implémenté pour les tables de type %s"
|
||||
#define MSG_SEC_KEY_FIRST "Les sections et clés doivent être insérées en premier"
|
||||
#define MSG_SEC_NAME_FIRST "Le nom de section doit être en tête de liste en insertion"
|
||||
#define MSG_SEP_IN_FIELD "Le champ %d contient le caractère séparateur"
|
||||
#define MSG_SEQUENCE_ERROR "HSTMT: Allocation hors séquence"
|
||||
#define MSG_SETEOF_ERROR "Erreur %d dans SetEndOfFile"
|
||||
#define MSG_SETRECPOS_NIY "SetRecpos non implémenté pour ce type de table"
|
||||
#define MSG_SET_STR_TRUNC "SetValue: Chaîne de caractères tronquée"
|
||||
#define MSG_SFP_ERROR "Erreur sur SetFilePointer: %s"
|
||||
#define MSG_SHARED_LIB_ERR "Erreur au chargement de la librairie partagée %s: %s"
|
||||
#define MSG_SINGLE_STEP "Pas à pas"
|
||||
#define MSG_SORTING_VAL "Tri de %d valeurs"
|
||||
#define MSG_SPCOL_READONLY "La colonne spéciale %s est en lecture seulement"
|
||||
#define MSG_SQL_CONF_ERROR "Erreur SQL: SQL_CONFORMANCE"
|
||||
#define MSG_SRCH_CLOSE_ERR "Erreur à la fermeture de l'Handle de recherche"
|
||||
#define MSG_SRC_TABLE_UNDEF "La table source n'est pas définie"
|
||||
#define MSG_STACK_OVERFLOW "Dépassement de capacité de la pile"
|
||||
#define MSG_TABDIR_READONLY "Les tables DIR sont en lecture seulement"
|
||||
#define MSG_TABLE_NOT_OPT "Table non optimisable"
|
||||
#define MSG_TABLE_NO_INDEX "La table %s n'est pas indexable"
|
||||
#define MSG_TABLE_READ_ONLY "Les tables %s sont en lecture seulement "
|
||||
#define MSG_TABMUL_READONLY "Les tables multiples sont en lecture seulement"
|
||||
#define MSG_TOO_MANY_FIELDS "Trop de champs ligne %d de %s"
|
||||
#define MSG_TOO_MANY_JUMPS "Trop de niveaux de saut"
|
||||
#define MSG_TOO_MANY_KEYS "Trop de clés (%d)"
|
||||
#define MSG_TO_BLK_IS_NULL "To Blk est nul"
|
||||
#define MSG_TRUNCATE_ERROR "Erreur en troncation: %s"
|
||||
#define MSG_TRUNC_BY_ESTIM "Tronqué par l'option Estimate"
|
||||
#define MSG_TYPE_MISMATCH "Clé et source ne sont pas du même type"
|
||||
#define MSG_TYPE_VALUE_ERR "Colonne %s: disparité type(%s)/valeur(%s)"
|
||||
#define MSG_UNBALANCE_QUOTE "Appostrophe en trop ligne %d"
|
||||
#define MSG_UNDEFINED_AM "COLBLK %s: méthode d'accès indéfinie"
|
||||
#define MSG_UNKNOWN_EXCPT "Exception non répertoriée"
|
||||
#define MSG_UNMATCH_FIL_ARG "Argument de filtre dépareillé"
|
||||
#define MSG_UPDATE_ERROR "Erreur en Update sur %s"
|
||||
#define MSG_UPD_ZIP_NOT_IMP "Mise à jour des tables ZDOS non encore implementé"
|
||||
#define MSG_VALSTR_TOO_LONG "Valeur %s trop longue pour une chaîne de longueur %d"
|
||||
#define MSG_VALTYPE_NOMATCH "Disparité types de valeur"
|
||||
#define MSG_VALUE_ERROR "Colonne %s: bloc valeur nul"
|
||||
#define MSG_VALUE_TOO_BIG "Valeur %lld trop grande pour la colonne %s"
|
||||
#define MSG_VALUE_TOO_LONG "Valeur %s trop longue pour la colonne %s de longueur %d"
|
||||
#define MSG_VAL_ALLOC_ERR "Allocation impossible du noeud valeur"
|
||||
#define MSG_VIR_NO_DELETE "Delete impossible sur les tables %s"
|
||||
#define MSG_VIR_READ_ONLY "Les tables virtuelles %s sont en lecture seulement"
|
||||
#define MSG_VOID_FIRST_ARG "Le premier argument ne doit pas être vide"
|
||||
#define MSG_WORK_AREA "Espace de travail: %s"
|
||||
#define MSG_WRITE_SEEK_ERR "Erreur de recherche en écriture: %s"
|
||||
#define MSG_WRITE_STRERROR "Erreur en écriture sur %s: %s"
|
||||
#define MSG_WRITING "Ecriture"
|
||||
#define MSG_WRITING_ERROR "Erreur à l'écriture de %s: %s"
|
||||
#define MSG_WS_CONV_ERR "Erreur de convertion de %s en WS"
|
||||
#define MSG_XCOL_MISMATCH "La colonne %s ne correspond pas à l'index"
|
||||
#define MSG_XFILE_READERR "Erreur %d en lisant le fichier index"
|
||||
#define MSG_XFILE_WRITERR "Erreur en écrivant le fichier index: %s"
|
||||
#define MSG_XMLTAB_INIT_ERR "Erreur d'initialisation de la table XML"
|
||||
#define MSG_XML_INIT_ERROR "Erreur d'initialisation du nouveau fichier XML"
|
||||
#define MSG_XPATH_CNTX_ERR "Le nouveau contexte XPath ne peut être créé"
|
||||
#define MSG_XPATH_EVAL_ERR "Impossible d'évaluer l'emplacement xpath '%s'"
|
||||
#define MSG_XPATH_NOT_SUPP "Xpath non supporté colonne %s"
|
||||
|
|
@ -24,11 +24,13 @@
|
|||
#endif
|
||||
|
||||
#if defined(XMSG)
|
||||
//#error Option XMSG is not yet fully implemented
|
||||
// Definition used to read messages from message file.
|
||||
#include "msgid.h"
|
||||
#define MSG(I) PlugReadMessage(NULL, MSG_##I, #I)
|
||||
#define STEP(I) PlugReadMessage(g, MSG_##I, #I)
|
||||
#elif defined(NEWMSG)
|
||||
//#error Option NEWMSG is not yet fully implemented
|
||||
// Definition used to get messages from resource.
|
||||
#include "msgid.h"
|
||||
#define MSG(I) PlugGetMessage(NULL, MSG_##I)
|
||||
|
|
@ -46,6 +48,11 @@
|
|||
#define CRLF 1
|
||||
#endif // !WIN32
|
||||
|
||||
/***********************************************************************/
|
||||
/* Define access to the thread based trace value. */
|
||||
/***********************************************************************/
|
||||
#define trace GetTraceValue()
|
||||
|
||||
/***********************************************************************/
|
||||
/* Miscellaneous Constants */
|
||||
/***********************************************************************/
|
||||
|
|
@ -255,6 +262,7 @@ DllExport void *PlugSubAlloc(PGLOBAL, void *, size_t);
|
|||
DllExport char *PlugDup(PGLOBAL g, const char *str);
|
||||
DllExport void *MakePtr(void *, OFFSET);
|
||||
DllExport void htrc(char const *fmt, ...);
|
||||
DllExport int GetTraceValue(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} // extern "C"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -26,6 +26,8 @@
|
|||
#pragma interface /* gcc class implementation */
|
||||
#endif
|
||||
|
||||
static char *strz(PGLOBAL g, LEX_STRING &ls);
|
||||
|
||||
/****************************************************************************/
|
||||
/* Structures used to pass info between CONNECT and ha_connect. */
|
||||
/****************************************************************************/
|
||||
|
|
@ -177,13 +179,16 @@ class ha_connect: public handler
|
|||
protected:
|
||||
char *PlugSubAllocStr(PGLOBAL g, void *memp, const char *str, size_t length)
|
||||
{
|
||||
char *ptr;
|
||||
if (!(ptr= (char*) PlugSubAlloc(g, memp, length + 1)))
|
||||
return NULL;
|
||||
memcpy(ptr, str, length);
|
||||
ptr[length]= '\0';
|
||||
char *ptr= (char*)PlgDBSubAlloc(g, memp, length + 1);
|
||||
|
||||
if (ptr) {
|
||||
memcpy(ptr, str, length);
|
||||
ptr[length]= '\0';
|
||||
} // endif ptr
|
||||
|
||||
return ptr;
|
||||
}
|
||||
} // end of PlugSubAllocStr
|
||||
|
||||
public:
|
||||
ha_connect(handlerton *hton, TABLE_SHARE *table_arg);
|
||||
~ha_connect();
|
||||
|
|
@ -210,6 +215,7 @@ public:
|
|||
void *GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf);
|
||||
PXOS GetIndexOptionStruct(KEY *kp);
|
||||
PIXDEF GetIndexInfo(TABLE_SHARE *s= NULL);
|
||||
bool CheckVirtualIndex(TABLE_SHARE *s);
|
||||
const char *GetDBName(const char *name);
|
||||
const char *GetTableName(void);
|
||||
char *GetPartName(void);
|
||||
|
|
@ -235,6 +241,8 @@ public:
|
|||
uint key_len= 0);
|
||||
bool MakeKeyWhere(PGLOBAL g, char *qry, OPVAL op, char *q,
|
||||
const void *key, int klen);
|
||||
inline char *Strz(LEX_STRING &ls);
|
||||
|
||||
|
||||
/** @brief
|
||||
The name that will be used for display purposes.
|
||||
|
|
|
|||
|
|
@ -180,7 +180,6 @@ class XML2ATTR : public XMLATTRIBUTE {
|
|||
|
||||
extern "C" {
|
||||
extern char version[];
|
||||
extern int trace;
|
||||
} // "C"
|
||||
|
||||
#if defined(MEMORY_TRACE)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -88,6 +88,7 @@
|
|||
#if defined(PIVOT_SUPPORT)
|
||||
#include "tabpivot.h"
|
||||
#endif // PIVOT_SUPPORT
|
||||
#include "tabvir.h"
|
||||
#include "ha_connect.h"
|
||||
#include "mycat.h"
|
||||
|
||||
|
|
@ -98,8 +99,6 @@
|
|||
extern "C" HINSTANCE s_hModule; // Saved module handle
|
||||
#endif // !WIN32
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -139,6 +138,7 @@ TABTYPE GetTypeID(const char *type)
|
|||
#ifdef PIVOT_SUPPORT
|
||||
: (!stricmp(type, "PIVOT")) ? TAB_PIVOT
|
||||
#endif
|
||||
: (!stricmp(type, "VIR")) ? TAB_VIR
|
||||
: (!stricmp(type, "OEM")) ? TAB_OEM : TAB_NIY;
|
||||
} // end of GetTypeID
|
||||
|
||||
|
|
@ -182,6 +182,7 @@ bool IsExactType(TABTYPE type)
|
|||
case TAB_DBF:
|
||||
// case TAB_XML: depends on Multiple || Xpand || Coltype
|
||||
case TAB_VEC:
|
||||
case TAB_VIR:
|
||||
exact= true;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -280,6 +281,9 @@ int GetIndexType(TABTYPE type)
|
|||
// case TAB_ODBC:
|
||||
xtyp= 2;
|
||||
break;
|
||||
case TAB_VIR:
|
||||
xtyp= 3;
|
||||
break;
|
||||
case TAB_ODBC:
|
||||
default:
|
||||
xtyp= 0;
|
||||
|
|
@ -533,6 +537,7 @@ PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, LPCSTR name, LPCSTR am)
|
|||
#if defined(PIVOT_SUPPORT)
|
||||
case TAB_PIVOT: tdp= new(g) PIVOTDEF; break;
|
||||
#endif // PIVOT_SUPPORT
|
||||
case TAB_VIR: tdp= new(g) VIRDEF; break;
|
||||
default:
|
||||
sprintf(g->Message, MSG(BAD_TABLE_TYPE), am, name);
|
||||
} // endswitch
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@
|
|||
#include "plgcnx.h" // For DB types
|
||||
#include "resource.h"
|
||||
//#include "value.h"
|
||||
#include "valblk.h"
|
||||
//#include "valblk.h"
|
||||
#include "xobject.h"
|
||||
#define DLL_EXPORT // Items are exported from this DLL
|
||||
#include "myconn.h"
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" int zconv;
|
||||
extern MYSQL_PLUGIN_IMPORT uint mysqld_port;
|
||||
extern MYSQL_PLUGIN_IMPORT char *mysqld_unix_port;
|
||||
|
|
@ -135,7 +135,7 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
|
|||
FLD_REM, FLD_NO, FLD_DEFAULT, FLD_EXTRA,
|
||||
FLD_CHARSET};
|
||||
unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0};
|
||||
char *fld, *colname, *chset, *fmt, v, cmd[128], uns[16], zero[16];
|
||||
char *fld, *colname, *chset, *fmt, v, buf[128], uns[16], zero[16];
|
||||
int i, n, nf, ncol = sizeof(buftyp) / sizeof(int);
|
||||
int len, type, prec, rc, k = 0;
|
||||
PQRYRES qrp;
|
||||
|
|
@ -155,16 +155,26 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
|
|||
/********************************************************************/
|
||||
/* Do an evaluation of the result size. */
|
||||
/********************************************************************/
|
||||
sprintf(cmd, "SHOW FULL COLUMNS FROM %s", table);
|
||||
strcat(strcat(cmd, " FROM "), (db) ? db : PlgGetUser(g)->DBName);
|
||||
STRING cmd(g, 64, "SHOW FULL COLUMNS FROM ");
|
||||
bool b = cmd.Append((PSZ)table);
|
||||
|
||||
if (colpat)
|
||||
strcat(strcat(cmd, " LIKE "), colpat);
|
||||
b |= cmd.Append(" FROM ");
|
||||
b |= cmd.Append((PSZ)(db ? db : PlgGetUser(g)->DBName));
|
||||
|
||||
if (colpat) {
|
||||
b |= cmd.Append(" LIKE ");
|
||||
b |= cmd.Append((PSZ)colpat);
|
||||
} // endif colpat
|
||||
|
||||
if (b) {
|
||||
strcpy(g->Message, "Out of memory");
|
||||
return NULL;
|
||||
} // endif b
|
||||
|
||||
if (trace)
|
||||
htrc("MyColumns: cmd='%s'\n", cmd);
|
||||
htrc("MyColumns: cmd='%s'\n", cmd.GetStr());
|
||||
|
||||
if ((n = myc.GetResultSize(g, cmd)) < 0) {
|
||||
if ((n = myc.GetResultSize(g, cmd.GetStr())) < 0) {
|
||||
myc.Close();
|
||||
return NULL;
|
||||
} // endif n
|
||||
|
|
@ -225,15 +235,15 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
|
|||
*uns = 0;
|
||||
*zero = 0;
|
||||
|
||||
switch ((nf = sscanf(fld, "%[^(](%d,%d", cmd, &len, &prec))) {
|
||||
switch ((nf = sscanf(fld, "%[^(](%d,%d", buf, &len, &prec))) {
|
||||
case 3:
|
||||
nf = sscanf(fld, "%[^(](%d,%d) %s %s", cmd, &len, &prec, uns, zero);
|
||||
nf = sscanf(fld, "%[^(](%d,%d) %s %s", buf, &len, &prec, uns, zero);
|
||||
break;
|
||||
case 2:
|
||||
nf = sscanf(fld, "%[^(](%d) %s %s", cmd, &len, uns, zero) + 1;
|
||||
nf = sscanf(fld, "%[^(](%d) %s %s", buf, &len, uns, zero) + 1;
|
||||
break;
|
||||
case 1:
|
||||
nf = sscanf(fld, "%s %s %s", cmd, uns, zero) + 2;
|
||||
nf = sscanf(fld, "%s %s %s", buf, uns, zero) + 2;
|
||||
break;
|
||||
default:
|
||||
sprintf(g->Message, MSG(BAD_FIELD_TYPE), fld);
|
||||
|
|
@ -241,16 +251,16 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
|
|||
return NULL;
|
||||
} // endswitch nf
|
||||
|
||||
if ((type = MYSQLtoPLG(cmd, &v)) == TYPE_ERROR) {
|
||||
if ((type = MYSQLtoPLG(buf, &v)) == TYPE_ERROR) {
|
||||
if (v == 'K') {
|
||||
// Skip this column
|
||||
sprintf(g->Message, "Column %s skipped (unsupported type %s)",
|
||||
colname, cmd);
|
||||
colname, buf);
|
||||
PushWarning(g, thd);
|
||||
continue;
|
||||
} // endif v
|
||||
|
||||
sprintf(g->Message, "Column %s unsupported type %s", colname, cmd);
|
||||
sprintf(g->Message, "Column %s unsupported type %s", colname, buf);
|
||||
myc.Close();
|
||||
return NULL;
|
||||
} else if (type == TYPE_STRING) {
|
||||
|
|
@ -276,11 +286,11 @@ PQRYRES MyColumns(PGLOBAL g, THD *thd, const char *host, const char *db,
|
|||
} // endswitch nf
|
||||
|
||||
crp = crp->Next; // Type_Name
|
||||
crp->Kdata->SetValue(cmd, i);
|
||||
crp->Kdata->SetValue(buf, i);
|
||||
|
||||
if (type == TYPE_DATE) {
|
||||
// When creating tables we do need info about date columns
|
||||
fmt = MyDateFmt(cmd);
|
||||
fmt = MyDateFmt(buf);
|
||||
len = strlen(fmt);
|
||||
} else
|
||||
fmt = NULL;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Checking XCOL tables
|
||||
# Make the children list table
|
||||
#
|
||||
CREATE TABLE chlist (
|
||||
mother char(12) NOT NULL COMMENT 'The mother of the listed children',
|
||||
|
|
@ -20,7 +20,10 @@ Lisbeth Lucy,Charles,Diana
|
|||
Corinne NULL
|
||||
Claude Marc
|
||||
Janet Arthur,Sandra,Peter,John
|
||||
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children,port=PORT';
|
||||
#
|
||||
# Checking XCOL tables
|
||||
#
|
||||
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children';
|
||||
SELECT * FROM child;
|
||||
mother children
|
||||
Sophia Vivian
|
||||
|
|
@ -81,5 +84,34 @@ Corinne 0
|
|||
Janet 4
|
||||
Lisbeth 3
|
||||
Sophia 2
|
||||
#
|
||||
# Test using special columns
|
||||
#
|
||||
CREATE TABLE `child2` (
|
||||
`row` int NOT NULL SPECIAL=ROWID,
|
||||
`num` int NOT NULL SPECIAL=ROWNUM,
|
||||
`mother` varchar(12) NOT NULL COMMENT 'The mother of the children',
|
||||
`child` varchar(12) NOT NULL COMMENT 'The child name' FLAG=2
|
||||
) ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist `OPTION_LIST`='colname=child';
|
||||
SELECT * FROM child2;
|
||||
row num mother child
|
||||
1 1 Sophia Vivian
|
||||
2 2 Sophia Antony
|
||||
3 1 Lisbeth Lucy
|
||||
4 2 Lisbeth Charles
|
||||
5 3 Lisbeth Diana
|
||||
7 1 Claude Marc
|
||||
8 1 Janet Arthur
|
||||
9 2 Janet Sandra
|
||||
10 3 Janet Peter
|
||||
11 4 Janet John
|
||||
# List only first child
|
||||
SELECT mother, child FROM child2 where num = 1;
|
||||
mother child
|
||||
Sophia Vivian
|
||||
Lisbeth Lucy
|
||||
Claude Marc
|
||||
Janet Arthur
|
||||
DROP TABLE child;
|
||||
DROP TABLE chlist;
|
||||
DROP TABLE child2;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
let $PORT= `select @@port`;
|
||||
|
||||
--echo #
|
||||
--echo # Checking XCOL tables
|
||||
--echo # Make the children list table
|
||||
--echo #
|
||||
CREATE TABLE chlist (
|
||||
mother char(12) NOT NULL COMMENT 'The mother of the listed children',
|
||||
|
|
@ -15,8 +12,10 @@ INSERT INTO chlist VALUES('Claude','Marc');
|
|||
INSERT INTO chlist VALUES('Janet','Arthur,Sandra,Peter,John');
|
||||
SELECT * FROM chlist;
|
||||
|
||||
--replace_result $PORT PORT
|
||||
--eval CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children,port=$PORT'
|
||||
--echo #
|
||||
--echo # Checking XCOL tables
|
||||
--echo #
|
||||
CREATE TABLE child ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist OPTION_LIST='colname=children';
|
||||
SELECT * FROM child;
|
||||
SELECT * FROM child ORDER BY mother;
|
||||
SELECT * FROM child ORDER BY children;
|
||||
|
|
@ -24,5 +23,19 @@ SELECT mother FROM child;
|
|||
SELECT mother, COUNT(*) FROM child GROUP BY mother;
|
||||
SELECT mother, COUNT(children) FROM child GROUP BY mother;
|
||||
|
||||
--echo #
|
||||
--echo # Test using special columns
|
||||
--echo #
|
||||
CREATE TABLE `child2` (
|
||||
`row` int NOT NULL SPECIAL=ROWID,
|
||||
`num` int NOT NULL SPECIAL=ROWNUM,
|
||||
`mother` varchar(12) NOT NULL COMMENT 'The mother of the children',
|
||||
`child` varchar(12) NOT NULL COMMENT 'The child name' FLAG=2
|
||||
) ENGINE=CONNECT TABLE_TYPE=XCOL TABNAME=chlist `OPTION_LIST`='colname=child';
|
||||
SELECT * FROM child2;
|
||||
--echo # List only first child
|
||||
SELECT mother, child FROM child2 where num = 1;
|
||||
|
||||
DROP TABLE child;
|
||||
DROP TABLE chlist;
|
||||
DROP TABLE child2;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/************ Odbconn C++ Functions Source Code File (.CPP) ************/
|
||||
/* Name: ODBCONN.CPP Version 1.9 */
|
||||
/* Name: ODBCONN.CPP Version 2.0 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2013 */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
||||
/* */
|
||||
/* This file contains the ODBC connection classes functions. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -64,8 +64,6 @@ extern "C" HINSTANCE s_hModule; // Saved module handle
|
|||
#define DEBUG_ONLY(f) ((void)0)
|
||||
#endif // !_DEBUG
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetSQLType: returns the SQL_TYPE corresponding to a PLG type. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -832,7 +830,7 @@ DBX::DBX(RETCODE rc, PSZ msg)
|
|||
/***********************************************************************/
|
||||
/* This function is called by ThrowDBX. */
|
||||
/***********************************************************************/
|
||||
void DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
||||
bool DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
||||
{
|
||||
if (pdb) {
|
||||
SWORD len;
|
||||
|
|
@ -845,7 +843,9 @@ void DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
|||
rc = SQLError(pdb->m_henv, pdb->m_hdbc, hstmt, state,
|
||||
&native, msg, SQL_MAX_MESSAGE_LENGTH - 1, &len);
|
||||
|
||||
if (rc != SQL_INVALID_HANDLE) {
|
||||
if (rc == SQL_NO_DATA_FOUND)
|
||||
return false;
|
||||
else if (rc != SQL_INVALID_HANDLE) {
|
||||
// Skip non-errors
|
||||
for (int i = 0; i < MAX_NUM_OF_MSG
|
||||
&& (rc == SQL_SUCCESS || rc == SQL_SUCCESS_WITH_INFO)
|
||||
|
|
@ -861,7 +861,7 @@ void DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
|||
|
||||
} // endfor i
|
||||
|
||||
return;
|
||||
return true;
|
||||
} else {
|
||||
snprintf((char*)msg, SQL_MAX_MESSAGE_LENGTH + 1, "%s: %s", m_Msg,
|
||||
MSG(BAD_HANDLE_VAL));
|
||||
|
|
@ -871,7 +871,7 @@ void DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
|||
if (trace)
|
||||
htrc("%s: rc=%hd\n", SVP(m_ErrMsg[0]), m_RC);
|
||||
|
||||
return;
|
||||
return true;
|
||||
} // endif rc
|
||||
|
||||
} else
|
||||
|
|
@ -880,6 +880,7 @@ void DBX::BuildErrorMessage(ODBConn* pdb, HSTMT hstmt)
|
|||
if (trace)
|
||||
htrc("%s: rc=%hd (%s)\n", SVP(m_Msg), m_RC, SVP(m_ErrMsg[0]));
|
||||
|
||||
return true;
|
||||
} // end of BuildErrorMessage
|
||||
|
||||
const char *DBX::GetErrorMessage(int i)
|
||||
|
|
@ -912,6 +913,7 @@ ODBConn::ODBConn(PGLOBAL g, TDBODBC *tdbp)
|
|||
m_Connect = NULL;
|
||||
m_Updatable = true;
|
||||
m_Transact = false;
|
||||
m_Scrollable = (tdbp) ? tdbp->Scrollable : false;
|
||||
m_IDQuoteChar[0] = '"';
|
||||
m_IDQuoteChar[1] = 0;
|
||||
//*m_ErrMsg = '\0';
|
||||
|
|
@ -934,9 +936,10 @@ bool ODBConn::Check(RETCODE rc)
|
|||
if (trace) {
|
||||
DBX x(rc);
|
||||
|
||||
x.BuildErrorMessage(this, m_hstmt);
|
||||
htrc("ODBC Success With Info, hstmt=%p %s\n",
|
||||
m_hstmt, x.GetErrorMessage(0));
|
||||
if (x.BuildErrorMessage(this, m_hstmt))
|
||||
htrc("ODBC Success With Info, hstmt=%p %s\n",
|
||||
m_hstmt, x.GetErrorMessage(0));
|
||||
|
||||
} // endif trace
|
||||
|
||||
// Fall through
|
||||
|
|
@ -955,8 +958,10 @@ void ODBConn::ThrowDBX(RETCODE rc, PSZ msg, HSTMT hstmt)
|
|||
{
|
||||
DBX* xp = new(m_G) DBX(rc, msg);
|
||||
|
||||
xp->BuildErrorMessage(this, hstmt);
|
||||
throw xp;
|
||||
// Don't throw if no error
|
||||
if (xp->BuildErrorMessage(this, hstmt))
|
||||
throw xp;
|
||||
|
||||
} // end of ThrowDBX
|
||||
|
||||
void ODBConn::ThrowDBX(PSZ msg)
|
||||
|
|
@ -1300,25 +1305,28 @@ int ODBConn::ExecDirectSQL(char *sql, ODBCCOL *tocols)
|
|||
b = false;
|
||||
|
||||
if (m_hstmt) {
|
||||
// All this did not seems to make sense and was been commented out
|
||||
// if (IsOpen())
|
||||
// Close(SQL_CLOSE);
|
||||
|
||||
// This is a Requery
|
||||
rc = SQLFreeStmt(m_hstmt, SQL_CLOSE);
|
||||
|
||||
if (trace && !Check(rc))
|
||||
htrc("Error: SQLFreeStmt rc=%d\n", rc);
|
||||
if (!Check(rc))
|
||||
ThrowDBX(rc, "SQLFreeStmt");
|
||||
|
||||
hstmt = m_hstmt;
|
||||
m_hstmt = NULL;
|
||||
ThrowDBX(MSG(SEQUENCE_ERROR));
|
||||
} else {
|
||||
rc = SQLAllocStmt(m_hdbc, &hstmt);
|
||||
} // endif m_hstmt
|
||||
|
||||
rc = SQLAllocStmt(m_hdbc, &hstmt);
|
||||
|
||||
if (!Check(rc))
|
||||
ThrowDBX(rc, "SQLAllocStmt");
|
||||
|
||||
if (m_Scrollable) {
|
||||
rc = SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_SCROLLABLE,
|
||||
(void*)SQL_SCROLLABLE, 0);
|
||||
|
||||
if (!Check(rc))
|
||||
ThrowDBX(SQL_INVALID_HANDLE, "SQLAllocStmt");
|
||||
ThrowDBX(rc, "SQLSetStmtAttr");
|
||||
|
||||
} // endif hstmt
|
||||
} // endif m_Scrollable
|
||||
|
||||
OnSetOptions(hstmt);
|
||||
b = true;
|
||||
|
|
@ -2334,6 +2342,34 @@ int ODBConn::GetCatInfo(CATPARM *cap)
|
|||
return irc;
|
||||
} // end of GetCatInfo
|
||||
|
||||
/***********************************************************************/
|
||||
/* Restart from beginning of result set */
|
||||
/***********************************************************************/
|
||||
bool ODBConn::Rewind(char *sql, ODBCCOL *tocols)
|
||||
{
|
||||
RETCODE rc;
|
||||
|
||||
if (!m_hstmt)
|
||||
return false;
|
||||
|
||||
if (m_Scrollable) {
|
||||
try {
|
||||
rc = SQLFetchScroll(m_hstmt, SQL_FETCH_ABSOLUTE, 0);
|
||||
|
||||
if (rc != SQL_NO_DATA_FOUND)
|
||||
ThrowDBX(rc, "SQLFetchScroll", m_hstmt);
|
||||
|
||||
} catch(DBX *x) {
|
||||
strcpy(m_G->Message, x->GetErrorMessage(0));
|
||||
return true;
|
||||
} // end try/catch
|
||||
|
||||
} else if (ExecDirectSQL(sql, tocols) < 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
} // end of Rewind
|
||||
|
||||
/***********************************************************************/
|
||||
/* Disconnect connection */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class DBX : public BLOCK {
|
|||
const char *GetErrorMessage(int i);
|
||||
|
||||
protected:
|
||||
void BuildErrorMessage(ODBConn* pdb, HSTMT hstmt = SQL_NULL_HSTMT);
|
||||
bool BuildErrorMessage(ODBConn* pdb, HSTMT hstmt = SQL_NULL_HSTMT);
|
||||
|
||||
// Attributes
|
||||
RETCODE m_RC;
|
||||
|
|
@ -124,6 +124,7 @@ class ODBConn : public BLOCK {
|
|||
forceOdbcDialog = 0x0010}; // Always display ODBC connect dialog
|
||||
|
||||
int Open(PSZ ConnectString, DWORD Options = 0);
|
||||
bool Rewind(char *sql, ODBCCOL *tocols);
|
||||
void Close(void);
|
||||
|
||||
// Attributes
|
||||
|
|
@ -190,4 +191,5 @@ class ODBConn : public BLOCK {
|
|||
PSZ m_Connect;
|
||||
bool m_Updatable;
|
||||
bool m_Transact;
|
||||
bool m_Scrollable;
|
||||
}; // end of ODBConn class definition
|
||||
|
|
|
|||
|
|
@ -53,12 +53,12 @@ typedef int HANDLE;
|
|||
#ifdef PATH_MAX
|
||||
#define _MAX_PATH PATH_MAX
|
||||
#else
|
||||
#define _MAX_PATH 260
|
||||
#define _MAX_PATH FN_REFLEN
|
||||
#endif
|
||||
#define _MAX_DRIVE 3
|
||||
#define _MAX_DIR 256
|
||||
#define _MAX_FNAME 256
|
||||
#define _MAX_EXT 256
|
||||
#define _MAX_DIR FN_REFLEN
|
||||
#define _MAX_FNAME FN_HEADLEN
|
||||
#define _MAX_EXT FN_EXTLEN
|
||||
#define INVALID_HANDLE_VALUE (-1)
|
||||
#define __stdcall
|
||||
#endif /* !WIN32 */
|
||||
|
|
|
|||
|
|
@ -72,10 +72,11 @@ enum TABTYPE {TAB_UNDEF = 0, /* Table of undefined type */
|
|||
TAB_OCCUR = 18, /* OCCUR table */
|
||||
TAB_PRX = 19, /* Proxy (catalog) table */
|
||||
TAB_PLG = 20, /* PLG NIY */
|
||||
TAB_PIVOT = 21, /* PIVOT NIY */
|
||||
TAB_JCT = 22, /* Junction tables NIY */
|
||||
TAB_DMY = 23, /* DMY Dummy tables NIY */
|
||||
TAB_NIY = 24}; /* Table not implemented yet */
|
||||
TAB_PIVOT = 21, /* PIVOT table */
|
||||
TAB_VIR = 22, /* Virtual tables */
|
||||
TAB_JCT = 23, /* Junction tables NIY */
|
||||
TAB_DMY = 24, /* DMY Dummy tables NIY */
|
||||
TAB_NIY = 25}; /* Table not implemented yet */
|
||||
|
||||
enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
|
||||
TYPE_AM_ROWID = 1, /* ROWID type (special column) */
|
||||
|
|
@ -127,6 +128,7 @@ enum AMT {TYPE_AM_ERROR = 0, /* Type not defined */
|
|||
TYPE_AM_TFC = 155, /* TFC (Circa) (Fuzzy compare) */
|
||||
TYPE_AM_DBF = 160, /* DBF Dbase files am type no */
|
||||
TYPE_AM_JCT = 170, /* Junction tables am type no */
|
||||
TYPE_AM_VIR = 171, /* Virtual tables am type no */
|
||||
TYPE_AM_DMY = 172, /* DMY Dummy tables am type no */
|
||||
TYPE_AM_SET = 180, /* SET Set tables am type no */
|
||||
TYPE_AM_MYSQL = 192, /* MYSQL access method type no */
|
||||
|
|
|
|||
|
|
@ -87,10 +87,6 @@ bool Initdone = false;
|
|||
bool plugin = false; // True when called by the XDB plugin handler
|
||||
|
||||
extern "C" {
|
||||
#if defined(XMSG)
|
||||
char msglang[16] = "ENGLISH"; // Default language
|
||||
#endif
|
||||
extern int trace;
|
||||
extern char version[];
|
||||
} // extern "C"
|
||||
|
||||
|
|
@ -117,11 +113,17 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool);
|
|||
|
||||
/***********************************************************************/
|
||||
/* Routines for file IO with error reporting to g->Message */
|
||||
/* Note: errno and strerror must be called before the message file */
|
||||
/* is read in the case of XMSG compile. */
|
||||
/***********************************************************************/
|
||||
static void
|
||||
global_open_error_msg(GLOBAL *g, int msgid, const char *path, const char *mode)
|
||||
static void global_open_error_msg(GLOBAL *g, int msgid, const char *path,
|
||||
const char *mode)
|
||||
{
|
||||
int len;
|
||||
int len, rno= (int)errno;
|
||||
char errmsg[256]= "";
|
||||
|
||||
strncat(errmsg, strerror(errno), 255);
|
||||
|
||||
switch (msgid)
|
||||
{
|
||||
case MSGID_CANNOT_OPEN:
|
||||
|
|
@ -133,19 +135,21 @@ global_open_error_msg(GLOBAL *g, int msgid, const char *path, const char *mode)
|
|||
case MSGID_OPEN_MODE_ERROR:
|
||||
len= snprintf(g->Message, sizeof(g->Message) - 1,
|
||||
MSG(OPEN_MODE_ERROR), // "Open(%s) error %d on %s"
|
||||
mode, (int) errno, path);
|
||||
mode, rno, path);
|
||||
break;
|
||||
|
||||
case MSGID_OPEN_MODE_STRERROR:
|
||||
{char fmt[256];
|
||||
strcat(strcpy(fmt, MSG(OPEN_MODE_ERROR)), ": %s");
|
||||
len= snprintf(g->Message, sizeof(g->Message) - 1,
|
||||
MSG(OPEN_MODE_ERROR) ": %s", // Open(%s) error %d on %s: %s
|
||||
mode, (int) errno, path, strerror(errno));
|
||||
break;
|
||||
fmt, // Open(%s) error %d on %s: %s
|
||||
mode, rno, path, errmsg);
|
||||
}break;
|
||||
|
||||
case MSGID_OPEN_STRERROR:
|
||||
len= snprintf(g->Message, sizeof(g->Message) - 1,
|
||||
MSG(OPEN_STRERROR), // "open error: %s"
|
||||
strerror(errno));
|
||||
errmsg);
|
||||
break;
|
||||
|
||||
case MSGID_OPEN_ERROR_AND_STRERROR:
|
||||
|
|
@ -153,13 +157,13 @@ global_open_error_msg(GLOBAL *g, int msgid, const char *path, const char *mode)
|
|||
//OPEN_ERROR does not work, as it wants mode %d (not %s)
|
||||
//MSG(OPEN_ERROR) "%s",// "Open error %d in mode %d on %s: %s"
|
||||
"Open error %d in mode %s on %s: %s",
|
||||
errno, mode, path, strerror(errno));
|
||||
rno, mode, path, errmsg);
|
||||
break;
|
||||
|
||||
case MSGID_OPEN_EMPTY_FILE:
|
||||
len= snprintf(g->Message, sizeof(g->Message) - 1,
|
||||
MSG(OPEN_EMPTY_FILE), // "Opening empty file %s: %s"
|
||||
path, strerror(errno));
|
||||
path, errmsg);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
@ -287,12 +291,9 @@ PQRYRES PlgAllocResult(PGLOBAL g, int ncol, int maxres, int ids,
|
|||
// Get header from message file
|
||||
strncpy(cname, PlugReadMessage(g, ids + crp->Ncol, NULL), NAM_LEN);
|
||||
cname[NAM_LEN] = 0; // for truncated long names
|
||||
//#elif defined(WIN32)
|
||||
// Get header from ressource file
|
||||
// LoadString(s_hModule, ids + crp->Ncol, cname, sizeof(cname));
|
||||
#else // !WIN32
|
||||
#else // !XMSG
|
||||
GetRcString(ids + crp->Ncol, cname, sizeof(cname));
|
||||
#endif // !WIN32
|
||||
#endif // !XMSG
|
||||
crp->Name = (PSZ)PlugSubAlloc(g, NULL, strlen(cname) + 1);
|
||||
strcpy(crp->Name, cname);
|
||||
} else
|
||||
|
|
@ -984,7 +985,7 @@ void PlugCleanup(PGLOBAL g, bool dofree)
|
|||
/* This is the place to reset the pointer on domains. */
|
||||
/*******************************************************************/
|
||||
dbuserp->Subcor = false;
|
||||
dbuserp->Step = STEP(PARSING_QUERY);
|
||||
dbuserp->Step = "New query"; // was STEP(PARSING_QUERY);
|
||||
dbuserp->ProgMax = dbuserp->ProgCur = dbuserp->ProgSav = 0;
|
||||
} // endif dofree
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* */
|
||||
/* PROGRAM NAME: PLUGUTIL */
|
||||
/* ------------- */
|
||||
/* Version 2.8 */
|
||||
/* Version 2.9 */
|
||||
/* */
|
||||
/* COPYRIGHT: */
|
||||
/* ---------- */
|
||||
|
|
@ -76,15 +76,17 @@
|
|||
|
||||
#include "osutil.h"
|
||||
#include "global.h"
|
||||
#if defined(NEWMSG)
|
||||
#include "rcmsg.h"
|
||||
#endif // NEWMSG
|
||||
|
||||
#if defined(WIN32)
|
||||
extern HINSTANCE s_hModule; /* Saved module handle */
|
||||
#endif // WIN32
|
||||
|
||||
extern int trace;
|
||||
|
||||
#if defined(XMSG)
|
||||
extern char msglang[];
|
||||
extern char *msg_path;
|
||||
char *msglang(void);
|
||||
#endif // XMSG
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -157,7 +159,9 @@ PGLOBAL PlugInit(LPCSTR Language, uint worksize)
|
|||
char errmsg[256];
|
||||
sprintf(errmsg, MSG(WORK_AREA), g->Message);
|
||||
strcpy(g->Message, errmsg);
|
||||
} /* endif Sarea */
|
||||
g->Sarea_Size = 0;
|
||||
} else
|
||||
g->Sarea_Size = worksize;
|
||||
|
||||
} /* endif g */
|
||||
|
||||
|
|
@ -232,7 +236,7 @@ BOOL PlugIsAbsolutePath(LPCSTR path)
|
|||
LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
|
||||
{
|
||||
char newname[_MAX_PATH];
|
||||
char direc[_MAX_DIR], defdir[_MAX_DIR];
|
||||
char direc[_MAX_DIR], defdir[_MAX_DIR], tmpdir[_MAX_DIR];
|
||||
char fname[_MAX_FNAME];
|
||||
char ftype[_MAX_EXT];
|
||||
#if !defined(UNIX) && !defined(UNIV_LINUX)
|
||||
|
|
@ -265,7 +269,7 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
|
|||
} // endif FileName
|
||||
#endif // !WIN32
|
||||
|
||||
if (strcmp(prefix, ".") && !PlugIsAbsolutePath(defpath))
|
||||
if (prefix && strcmp(prefix, ".") && !PlugIsAbsolutePath(defpath))
|
||||
{
|
||||
char tmp[_MAX_PATH];
|
||||
int len= snprintf(tmp, sizeof(tmp) - 1, "%s%s%s",
|
||||
|
|
@ -276,7 +280,19 @@ LPCSTR PlugSetPath(LPSTR pBuff, LPCSTR prefix, LPCSTR FileName, LPCSTR defpath)
|
|||
}
|
||||
|
||||
_splitpath(FileName, drive, direc, fname, ftype);
|
||||
_splitpath(defpath, defdrv, defdir, NULL, NULL);
|
||||
|
||||
if (defpath) {
|
||||
char c = defpath[strlen(defpath) - 1];
|
||||
|
||||
strcpy(tmpdir, defpath);
|
||||
|
||||
if (c != '/' && c != '\\')
|
||||
strcat(tmpdir, "/");
|
||||
|
||||
} else
|
||||
strcpy(tmpdir, "./");
|
||||
|
||||
_splitpath(tmpdir, defdrv, defdir, NULL, NULL);
|
||||
|
||||
if (trace > 1) {
|
||||
htrc("after _splitpath: FileName=%s\n", FileName);
|
||||
|
|
@ -328,11 +344,14 @@ char *PlugReadMessage(PGLOBAL g, int mid, char *m)
|
|||
char *msg;
|
||||
FILE *mfile = NULL;
|
||||
|
||||
GetPrivateProfileString("Message", msglang, "Message\\english.msg",
|
||||
msgfile, _MAX_PATH, plgini);
|
||||
//GetPrivateProfileString("Message", msglang, "Message\\english.msg",
|
||||
// msgfile, _MAX_PATH, plgini);
|
||||
//strcat(strcat(strcpy(msgfile, msg_path), msglang()), ".msg");
|
||||
strcat(strcpy(buff, msglang()), ".msg");
|
||||
PlugSetPath(msgfile, NULL, buff, msg_path);
|
||||
|
||||
if (!(mfile = fopen(msgfile, "rt"))) {
|
||||
sprintf(stmsg, "Fail to open message file %s for %s", msgfile, msglang);
|
||||
sprintf(stmsg, "Fail to open message file %s", msgfile);
|
||||
goto err;
|
||||
} // endif mfile
|
||||
|
||||
|
|
@ -382,7 +401,7 @@ char *PlugGetMessage(PGLOBAL g, int mid)
|
|||
{
|
||||
char *msg;
|
||||
|
||||
#if !defined(UNIX) && !defined(UNIV_LINUX)
|
||||
#if 0 // was !defined(UNIX) && !defined(UNIV_LINUX)
|
||||
int n = LoadString(s_hModule, (uint)mid, (LPTSTR)stmsg, 200);
|
||||
|
||||
if (n == 0) {
|
||||
|
|
@ -395,10 +414,10 @@ char *PlugGetMessage(PGLOBAL g, int mid)
|
|||
return msg;
|
||||
} // endif n
|
||||
|
||||
#else // UNIX
|
||||
#else // ALL
|
||||
if (!GetRcString(mid, stmsg, 200))
|
||||
sprintf(stmsg, "Message %d not found", mid);
|
||||
#endif // UNIX
|
||||
#endif // ALL
|
||||
|
||||
if (g) {
|
||||
// Called by STEP
|
||||
|
|
|
|||
|
|
@ -1,225 +1,65 @@
|
|||
/**************** RCMsg C Program Source Code File (.C) ****************/
|
||||
/* PROGRAM NAME: RCMSG */
|
||||
/* ------------- */
|
||||
/* Version 1.1 */
|
||||
/* */
|
||||
/* COPYRIGHT */
|
||||
/* ---------- */
|
||||
/* (C) Copyright to the author Olivier BERTRAND: 2005 - 2013 */
|
||||
/* */
|
||||
/* WHAT THIS PROGRAM DOES */
|
||||
/* ----------------------- */
|
||||
/* This program simulates LoadString for Unix and Linux. */
|
||||
/* */
|
||||
/***********************************************************************/
|
||||
#include <stdio.h>
|
||||
#include "resource.h"
|
||||
#include "rcmsg.h"
|
||||
|
||||
char *GetMsgid(int id)
|
||||
{
|
||||
char *p = NULL;
|
||||
|
||||
switch (id) {
|
||||
case IDS_00: p = "%s"; break;
|
||||
#if defined(FRENCH)
|
||||
case IDS_01: p = "%s: erreur d'allocation du buffer de communication de %d octets"; break;
|
||||
case IDS_02: p = "%s: erreur d'allocation mémoire tampon pour %d colonnes"; break;
|
||||
case IDS_03: p = "%s: Commande spéciale invalide"; break;
|
||||
case IDS_04: p = "%s: Wrong number of arguments %d"; break;
|
||||
case IDS_05: p = "%s"; break;
|
||||
case IDS_06: p = "%s: Commande dépassant la taille du buffer interne (%d octets)"; break;
|
||||
case IDS_07: p = "%s: Données (%d octets) tronquées à la taille du buffer"; break;
|
||||
case IDS_08: p = "%s: Résultat dépassant la taille du buffer interne (%d octets)"; break;
|
||||
case IDS_09: p = "Erreur dans %s: %s"; break;
|
||||
case IDS_10: p = "%s: erreur d'allocating mémoire de %d octets"; break;
|
||||
case IDS_11: p = "%s: mauvaise clé de connexion %d"; break;
|
||||
case IDS_12: p = "%s: Pas plus de %d connexions autorisées pour un programme"; break;
|
||||
case IDS_13: p = "%s: clé de connexion invalide %d"; break;
|
||||
case IDS_14: p = "SafeDB: %s rc=%d"; break;
|
||||
case IDS_15: p = "Mauvaise Dll de communication appelée par le moteur %s"; break;
|
||||
case IDS_TAB_01: p = "Catalogue"; break;
|
||||
case IDS_TAB_02: p = "Schéma"; break;
|
||||
case IDS_TAB_03: p = "Nom"; break;
|
||||
case IDS_TAB_04: p = "Type"; break;
|
||||
case IDS_TAB_05: p = "Remarque"; break;
|
||||
case IDS_COL_01: p = "Cat_Table"; break;
|
||||
case IDS_COL_02: p = "Schem_Table"; break;
|
||||
case IDS_COL_03: p = "Nom_Table"; break;
|
||||
case IDS_COL_04: p = "Nom_Colonne"; break;
|
||||
case IDS_COL_05: p = "Type_Données"; break;
|
||||
case IDS_COL_06: p = "Nom_Type"; break;
|
||||
case IDS_COL_07: p = "Précision"; break;
|
||||
case IDS_COL_08: p = "Longueur"; break;
|
||||
case IDS_COL_09: p = "Echelle"; break;
|
||||
case IDS_COL_10: p = "Base"; break;
|
||||
case IDS_COL_11: p = "Nullifiable"; break;
|
||||
case IDS_COL_12: p = "Remarques"; break;
|
||||
case IDS_INF_01: p = "Nom_Type"; break;
|
||||
case IDS_INF_02: p = "Type_Données"; break;
|
||||
case IDS_INF_03: p = "Précision"; break;
|
||||
case IDS_INF_04: p = "Préfixe_Litéral"; break;
|
||||
case IDS_INF_05: p = "Suffixe_Litéral"; break;
|
||||
case IDS_INF_06: p = "Création_Params"; break;
|
||||
case IDS_INF_07: p = "Nullifiable"; break;
|
||||
case IDS_INF_08: p = "Maj_Minuscule"; break;
|
||||
case IDS_INF_09: p = "Localisable"; break;
|
||||
case IDS_INF_10: p = "Valeur_Absolue"; break;
|
||||
case IDS_INF_11: p = "Monnaie"; break;
|
||||
case IDS_INF_12: p = "Auto_Incrément"; break;
|
||||
case IDS_INF_13: p = "Nom_Type_Local"; break;
|
||||
case IDS_INF_14: p = "Echelle_Minimum"; break;
|
||||
case IDS_INF_15: p = "Echelle_Maximum"; break;
|
||||
case IDS_PKY_01: p = "Cat_Table"; break;
|
||||
case IDS_PKY_02: p = "Schem_Table"; break;
|
||||
case IDS_PKY_03: p = "Nom_Table"; break;
|
||||
case IDS_PKY_04: p = "Nom_Colonne"; break;
|
||||
case IDS_PKY_05: p = "Numéro_Clé"; break;
|
||||
case IDS_PKY_06: p = "Nom_Clé"; break;
|
||||
case IDS_FKY_01: p = "PKTable_Catalog"; break;
|
||||
case IDS_FKY_02: p = "PKTable_Schema"; break;
|
||||
case IDS_FKY_03: p = "PKTable_Name"; break;
|
||||
case IDS_FKY_04: p = "PKColumn_Name"; break;
|
||||
case IDS_FKY_05: p = "FKTable_Catalog"; break;
|
||||
case IDS_FKY_06: p = "FKTable_Schema"; break;
|
||||
case IDS_FKY_07: p = "FKTable_Name"; break;
|
||||
case IDS_FKY_08: p = "FKColumn_Name"; break;
|
||||
case IDS_FKY_09: p = "Key_Seq"; break;
|
||||
case IDS_FKY_10: p = "Update_Rule"; break;
|
||||
case IDS_FKY_11: p = "Delete_Rule"; break;
|
||||
case IDS_FKY_12: p = "FK_Name"; break;
|
||||
case IDS_FKY_13: p = "PK_Name"; break;
|
||||
case IDS_STA_01: p = "Table_Catalog"; break;
|
||||
case IDS_STA_02: p = "Table_Schema"; break;
|
||||
case IDS_STA_03: p = "Table_Name"; break;
|
||||
case IDS_STA_04: p = "Non_Unique"; break;
|
||||
case IDS_STA_05: p = "Index_Qualifier"; break;
|
||||
case IDS_STA_06: p = "Index_Name"; break;
|
||||
case IDS_STA_07: p = "Type"; break;
|
||||
case IDS_STA_08: p = "Seq_in_Index"; break;
|
||||
case IDS_STA_09: p = "Column_Name"; break;
|
||||
case IDS_STA_10: p = "Collation"; break;
|
||||
case IDS_STA_11: p = "Cardinality"; break;
|
||||
case IDS_STA_12: p = "Pages"; break;
|
||||
case IDS_STA_13: p = "Filter_Condition"; break;
|
||||
case IDS_SPC_01: p = "Champ"; break;
|
||||
case IDS_SPC_02: p = "Nom_Colonne"; break;
|
||||
case IDS_SPC_03: p = "Type_Données"; break;
|
||||
case IDS_SPC_04: p = "Nom_Type"; break;
|
||||
case IDS_SPC_05: p = "Précision"; break;
|
||||
case IDS_SPC_06: p = "Longueur"; break;
|
||||
case IDS_SPC_07: p = "Echelle"; break;
|
||||
case IDS_SPC_08: p = "Pseudo_Colonne"; break;
|
||||
case IDS_DRV_01: p = "Description"; break;
|
||||
case IDS_DRV_02: p = "Attributs"; break;
|
||||
case IDS_DSC_01: p = "Nom"; break;
|
||||
case IDS_DSC_02: p = "Description"; break;
|
||||
#else // English
|
||||
case IDS_01: p = "%s: error allocating communication buffer of %d bytes"; break;
|
||||
case IDS_02: p = "%s: error allocating parser memory for %d columns"; break;
|
||||
case IDS_03: p = "%s: Invalid special command"; break;
|
||||
case IDS_04: p = "%s: Wrong number of arguments %d"; break;
|
||||
case IDS_05: p = "%s"; break;
|
||||
case IDS_06: p = "%s: Command bigger than internal buffer of size = %d"; break;
|
||||
case IDS_07: p = "%s: Data truncated to buffer size, actual length is %d bytes"; break;
|
||||
case IDS_08: p = "%s: Result bigger than internal buffer of size = %d"; break;
|
||||
case IDS_09: p = "Error in %s: %s"; break;
|
||||
case IDS_10: p = "%s: error allocating instance memory of %d bytes"; break;
|
||||
case IDS_11: p = "%s: wrong connection key value %d"; break;
|
||||
case IDS_12: p = "%s: No more than %d connections allowed from one process"; break;
|
||||
case IDS_13: p = "%s: invalid connection key value %d"; break;
|
||||
case IDS_14: p = "SafeDB: %s rc=%d"; break;
|
||||
case IDS_15: p = "Wrong communication Dll called for engine %s"; break;
|
||||
case IDS_TAB_01: p = "Table_Cat"; break;
|
||||
case IDS_TAB_02: p = "Table_Schema"; break;
|
||||
case IDS_TAB_03: p = "Table_Name"; break;
|
||||
case IDS_TAB_04: p = "Table_Type"; break;
|
||||
case IDS_TAB_05: p = "Remark"; break;
|
||||
case IDS_COL_01: p = "Table_Cat"; break;
|
||||
case IDS_COL_02: p = "Table_Schema"; break;
|
||||
case IDS_COL_03: p = "Table_Name"; break;
|
||||
case IDS_COL_04: p = "Column_Name"; break;
|
||||
case IDS_COL_05: p = "Data_Type"; break;
|
||||
case IDS_COL_06: p = "Type_Name"; break;
|
||||
case IDS_COL_07: p = "Column_Size"; break;
|
||||
case IDS_COL_08: p = "Buffer_Length"; break;
|
||||
case IDS_COL_09: p = "Decimal_Digits"; break;
|
||||
case IDS_COL_10: p = "Radix"; break;
|
||||
case IDS_COL_11: p = "Nullable"; break;
|
||||
case IDS_COL_12: p = "Remarks"; break;
|
||||
case IDS_INF_01: p = "Type_Name"; break;
|
||||
case IDS_INF_02: p = "Data_Type"; break;
|
||||
case IDS_INF_03: p = "Precision"; break;
|
||||
case IDS_INF_04: p = "Literal_Prefix"; break;
|
||||
case IDS_INF_05: p = "Literal_Suffix"; break;
|
||||
case IDS_INF_06: p = "Create_Params"; break;
|
||||
case IDS_INF_07: p = "Nullable"; break;
|
||||
case IDS_INF_08: p = "Case_Sensitive"; break;
|
||||
case IDS_INF_09: p = "Searchable"; break;
|
||||
case IDS_INF_10: p = "Unsigned_Attribute"; break;
|
||||
case IDS_INF_11: p = "Money"; break;
|
||||
case IDS_INF_12: p = "Auto_Increment"; break;
|
||||
case IDS_INF_13: p = "Local_Type_Name"; break;
|
||||
case IDS_INF_14: p = "Minimum_Scale"; break;
|
||||
case IDS_INF_15: p = "Maximum_Scale"; break;
|
||||
case IDS_PKY_01: p = "Table_Catalog"; break;
|
||||
case IDS_PKY_02: p = "Table_Schema"; break;
|
||||
case IDS_PKY_03: p = "Table_Name"; break;
|
||||
case IDS_PKY_04: p = "Column_Name"; break;
|
||||
case IDS_PKY_05: p = "Key_Seq"; break;
|
||||
case IDS_PKY_06: p = "Pk_Name"; break;
|
||||
case IDS_FKY_01: p = "PKTable_Catalog"; break;
|
||||
case IDS_FKY_02: p = "PKTable_Schema"; break;
|
||||
case IDS_FKY_03: p = "PKTable_Name"; break;
|
||||
case IDS_FKY_04: p = "PKColumn_Name"; break;
|
||||
case IDS_FKY_05: p = "FKTable_Catalog"; break;
|
||||
case IDS_FKY_06: p = "FKTable_Schema"; break;
|
||||
case IDS_FKY_07: p = "FKTable_Name"; break;
|
||||
case IDS_FKY_08: p = "FKColumn_Name"; break;
|
||||
case IDS_FKY_09: p = "Key_Seq"; break;
|
||||
case IDS_FKY_10: p = "Update_Rule"; break;
|
||||
case IDS_FKY_11: p = "Delete_Rule"; break;
|
||||
case IDS_FKY_12: p = "FK_Name"; break;
|
||||
case IDS_FKY_13: p = "PK_Name"; break;
|
||||
case IDS_STA_01: p = "Table_Catalog"; break;
|
||||
case IDS_STA_02: p = "Table_Schema"; break;
|
||||
case IDS_STA_03: p = "Table_Name"; break;
|
||||
case IDS_STA_04: p = "Non_Unique"; break;
|
||||
case IDS_STA_05: p = "Index_Qualifier"; break;
|
||||
case IDS_STA_06: p = "Index_Name"; break;
|
||||
case IDS_STA_07: p = "Type"; break;
|
||||
case IDS_STA_08: p = "Seq_in_Index"; break;
|
||||
case IDS_STA_09: p = "Column_Name"; break;
|
||||
case IDS_STA_10: p = "Collation"; break;
|
||||
case IDS_STA_11: p = "Cardinality"; break;
|
||||
case IDS_STA_12: p = "Pages"; break;
|
||||
case IDS_STA_13: p = "Filter_Condition"; break;
|
||||
case IDS_SPC_01: p = "Scope"; break;
|
||||
case IDS_SPC_02: p = "Column_Name"; break;
|
||||
case IDS_SPC_03: p = "Data_Type"; break;
|
||||
case IDS_SPC_04: p = "Type_Name"; break;
|
||||
case IDS_SPC_05: p = "Precision"; break;
|
||||
case IDS_SPC_06: p = "Length"; break;
|
||||
case IDS_SPC_07: p = "Scale"; break;
|
||||
case IDS_SPC_08: p = "Pseudo_Column"; break;
|
||||
case IDS_DRV_01: p = "Description"; break;
|
||||
case IDS_DRV_02: p = "Attributes"; break;
|
||||
case IDS_DSC_01: p = "Name"; break;
|
||||
case IDS_DSC_02: p = "Description"; break;
|
||||
#endif // English
|
||||
} // endswitch(id)
|
||||
|
||||
return p;
|
||||
} // end of GetMsgid
|
||||
|
||||
int GetRcString(int id, char *buf, int bufsize)
|
||||
{
|
||||
char *p = NULL, msg[32];
|
||||
|
||||
if (!(p = GetMsgid(id))) {
|
||||
sprintf(msg, "ID=%d unknown", id);
|
||||
p = msg;
|
||||
} // endif p
|
||||
|
||||
return sprintf(buf, "%.*s", bufsize-1, p);
|
||||
} // end of GetRcString
|
||||
/**************** RCMsg C Program Source Code File (.C) ****************/
|
||||
/* PROGRAM NAME: RCMSG */
|
||||
/* ------------- */
|
||||
/* Version 1.3 */
|
||||
/* */
|
||||
/* COPYRIGHT */
|
||||
/* ---------- */
|
||||
/* (C) Copyright to the author Olivier BERTRAND: 2005 - 2014 */
|
||||
/* */
|
||||
/* WHAT THIS PROGRAM DOES */
|
||||
/* ----------------------- */
|
||||
/* This program simulates LoadString. */
|
||||
/* */
|
||||
/***********************************************************************/
|
||||
#if !defined(XMSG)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "resource.h"
|
||||
#include "rcmsg.h"
|
||||
#if defined(NEWMSG)
|
||||
#include "msgid.h"
|
||||
#endif // NEWMSG
|
||||
|
||||
#if !defined(WIN32)
|
||||
#define stricmp strcasecmp
|
||||
#endif // !WIN32
|
||||
|
||||
char *msglang(void);
|
||||
|
||||
char *GetMsgid(int id)
|
||||
{
|
||||
char *p = NULL;
|
||||
|
||||
if (!stricmp(msglang(), "french"))
|
||||
switch (id) {
|
||||
#include "frids.h"
|
||||
#if defined(NEWMSG)
|
||||
#include "frcas.h"
|
||||
#endif // NEWMSG
|
||||
} // endswitch(id)
|
||||
|
||||
else // English
|
||||
switch (id) {
|
||||
#include "enids.h"
|
||||
#if defined(NEWMSG)
|
||||
#include "encas.h"
|
||||
#endif // NEWMSG
|
||||
} // endswitch(id)
|
||||
|
||||
return p;
|
||||
} // end of GetMsgid
|
||||
|
||||
int GetRcString(int id, char *buf, int bufsize)
|
||||
{
|
||||
char *p = NULL, msg[32];
|
||||
|
||||
if (!(p = GetMsgid(id))) {
|
||||
sprintf(msg, "ID=%d unknown", id);
|
||||
p = msg;
|
||||
} // endif p
|
||||
|
||||
return sprintf(buf, "%.*s", bufsize-1, p);
|
||||
} // end of GetRcString
|
||||
|
||||
#endif // !XMSG
|
||||
|
|
|
|||
|
|
@ -49,8 +49,14 @@
|
|||
#include "tabmul.h"
|
||||
#include "ha_connect.h"
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" USETEMP Use_Temp;
|
||||
#if !defined(WIN32)
|
||||
extern handlerton *connect_hton;
|
||||
#endif // !WIN32
|
||||
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
USETEMP UseTemp(void);
|
||||
|
||||
/* --------------------------- Class RELDEF -------------------------- */
|
||||
|
||||
|
|
@ -455,6 +461,22 @@ PTABDEF OEMDEF::GetXdef(PGLOBAL g)
|
|||
} // endif getdef
|
||||
#else // !WIN32
|
||||
const char *error = NULL;
|
||||
Dl_info dl_info;
|
||||
|
||||
// The OEM lib must retrieve exported CONNECT variables
|
||||
if (dladdr(&connect_hton, &dl_info)) {
|
||||
if (dlopen(dl_info.dli_fname, RTLD_NOLOAD | RTLD_NOW | RTLD_GLOBAL) == 0) {
|
||||
error = dlerror();
|
||||
sprintf(g->Message, "dlopen failed: %s, OEM not supported", SVP(error));
|
||||
return NULL;
|
||||
} // endif dlopen
|
||||
|
||||
} else {
|
||||
error = dlerror();
|
||||
sprintf(g->Message, "dladdr failed: %s, OEM not supported", SVP(error));
|
||||
return NULL;
|
||||
} // endif dladdr
|
||||
|
||||
// Is the library already loaded?
|
||||
// if (!Hdll && !(Hdll = ???))
|
||||
// Load the desired shared library
|
||||
|
|
@ -571,7 +593,7 @@ PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode)
|
|||
PTXF txfp = NULL;
|
||||
PDOSDEF defp = (PDOSDEF)Pxdef;
|
||||
bool map = defp->Mapped && mode != MODE_INSERT &&
|
||||
!(Use_Temp == TMP_FORCE &&
|
||||
!(UseTemp() == TMP_FORCE &&
|
||||
(mode == MODE_UPDATE || mode == MODE_DELETE));
|
||||
int cmpr = defp->Compressed;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,139 +1,46 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by PlgSock.rc
|
||||
//
|
||||
#define IDS_00 115
|
||||
#define IDS_01 116
|
||||
#define IDS_02 117
|
||||
#define IDS_03 118
|
||||
#define IDS_04 119
|
||||
#define IDS_05 120
|
||||
#define IDS_06 121
|
||||
#define IDS_07 122
|
||||
#define IDS_08 123
|
||||
#define IDS_09 124
|
||||
#define IDS_10 125
|
||||
#define IDS_11 126
|
||||
#define IDS_12 127
|
||||
#define IDS_13 128
|
||||
#define IDS_14 129
|
||||
#define IDS_15 130
|
||||
#define IDS_16 131
|
||||
#define IDS_17 132
|
||||
#define IDS_18 133
|
||||
#define IDS_19 134
|
||||
#define IDS_20 135
|
||||
#define IDS_21 136
|
||||
#define IDS_TABLES 143
|
||||
#define IDS_TAB_01 144
|
||||
#define IDS_TAB_02 145
|
||||
#define IDS_TAB_03 146
|
||||
#define IDS_TAB_04 147
|
||||
#define IDS_TAB_05 148
|
||||
#define IDS_COLUMNS 159
|
||||
#define IDS_COL_01 160
|
||||
#define IDS_COL_02 161
|
||||
#define IDS_COL_03 162
|
||||
#define IDS_COL_04 163
|
||||
#define IDS_COL_05 164
|
||||
#define IDS_COL_06 165
|
||||
#define IDS_COL_07 166
|
||||
#define IDS_COL_08 167
|
||||
#define IDS_COL_09 168
|
||||
#define IDS_COL_10 169
|
||||
#define IDS_COL_11 170
|
||||
#define IDS_COL_12 171
|
||||
#define IDS_INFO 175
|
||||
#define IDS_INF_01 176
|
||||
#define IDS_INF_02 177
|
||||
#define IDS_INF_03 178
|
||||
#define IDS_INF_04 179
|
||||
#define IDS_INF_05 180
|
||||
#define IDS_INF_06 181
|
||||
#define IDS_INF_07 182
|
||||
#define IDS_INF_08 183
|
||||
#define IDS_INF_09 184
|
||||
#define IDS_INF_10 185
|
||||
#define IDS_INF_11 186
|
||||
#define IDS_INF_12 187
|
||||
#define IDS_INF_13 188
|
||||
#define IDS_INF_14 189
|
||||
#define IDS_INF_15 190
|
||||
#define IDS_PKEY 191
|
||||
#define IDS_PKY_01 192
|
||||
#define IDS_PKY_02 193
|
||||
#define IDS_PKY_03 194
|
||||
#define IDS_PKY_04 195
|
||||
#define IDS_PKY_05 196
|
||||
#define IDS_PKY_06 197
|
||||
#define IDS_FKEY 207
|
||||
#define IDS_FKY_01 208
|
||||
#define IDS_FKY_02 209
|
||||
#define IDS_FKY_03 210
|
||||
#define IDS_FKY_04 211
|
||||
#define IDS_FKY_05 212
|
||||
#define IDS_FKY_06 213
|
||||
#define IDS_FKY_07 214
|
||||
#define IDS_FKY_08 215
|
||||
#define IDS_FKY_09 216
|
||||
#define IDS_FKY_10 217
|
||||
#define IDS_FKY_11 218
|
||||
#define IDS_FKY_12 219
|
||||
#define IDS_FKY_13 220
|
||||
#define IDS_STAT 223
|
||||
#define IDS_STA_01 224
|
||||
#define IDS_STA_02 225
|
||||
#define IDS_STA_03 226
|
||||
#define IDS_STA_04 227
|
||||
#define IDS_STA_05 228
|
||||
#define IDS_STA_06 229
|
||||
#define IDS_STA_07 230
|
||||
#define IDS_STA_08 231
|
||||
#define IDS_STA_09 232
|
||||
#define IDS_STA_10 233
|
||||
#define IDS_STA_11 234
|
||||
#define IDS_STA_12 235
|
||||
#define IDS_STA_13 236
|
||||
#define IDS_SPCOLS 1247
|
||||
#define IDS_SPC_01 1248
|
||||
#define IDS_SPC_02 1249
|
||||
#define IDS_SPC_03 1250
|
||||
#define IDS_SPC_04 1251
|
||||
#define IDS_SPC_05 1252
|
||||
#define IDS_SPC_06 1253
|
||||
#define IDS_SPC_07 1254
|
||||
#define IDS_SPC_08 1255
|
||||
#define IDS_CNX 1263
|
||||
#define IDS_CNX_01 1264
|
||||
#define IDS_CNX_02 1265
|
||||
#define IDS_CNX_03 1266
|
||||
#define IDS_CNX_04 1267
|
||||
#define IDS_PLGCOL 1279
|
||||
#define IDS_PLG_01 1280
|
||||
#define IDS_PLG_02 1281
|
||||
#define IDS_PLG_03 1282
|
||||
#define IDS_PLG_04 1283
|
||||
#define IDS_PLG_05 1284
|
||||
#define IDS_PLG_06 1285
|
||||
#define IDS_PLG_07 1286
|
||||
#define IDS_PLG_08 1287
|
||||
#define IDS_PLG_09 1288
|
||||
#define IDS_DRIVER 1290
|
||||
#define IDS_DRV_01 1291
|
||||
#define IDS_DRV_02 1292
|
||||
#define IDS_DSRC 1295
|
||||
#define IDS_DSC_01 1296
|
||||
#define IDS_DSC_02 1297
|
||||
//#define IDS_DSC_03 1298
|
||||
//#define IDS_DSC_04 1299
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 1300
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1440
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
#define IDS_TABLES 100
|
||||
#define IDS_TAB_01 101
|
||||
#define IDS_TAB_02 102
|
||||
#define IDS_TAB_03 103
|
||||
#define IDS_TAB_04 104
|
||||
#define IDS_TAB_05 105
|
||||
#define IDS_COLUMNS 106
|
||||
#define IDS_COL_01 107
|
||||
#define IDS_COL_02 108
|
||||
#define IDS_COL_03 109
|
||||
#define IDS_COL_04 110
|
||||
#define IDS_COL_05 111
|
||||
#define IDS_COL_06 112
|
||||
#define IDS_COL_07 113
|
||||
#define IDS_COL_08 114
|
||||
#define IDS_COL_09 115
|
||||
#define IDS_COL_10 116
|
||||
#define IDS_COL_11 117
|
||||
#define IDS_COL_12 118
|
||||
#define IDS_PKEY 119
|
||||
#define IDS_PKY_01 120
|
||||
#define IDS_PKY_02 121
|
||||
#define IDS_PKY_03 122
|
||||
#define IDS_PKY_04 123
|
||||
#define IDS_PKY_05 124
|
||||
#define IDS_PKY_06 125
|
||||
#define IDS_STAT 126
|
||||
#define IDS_STA_01 127
|
||||
#define IDS_STA_02 128
|
||||
#define IDS_STA_03 129
|
||||
#define IDS_STA_04 130
|
||||
#define IDS_STA_05 131
|
||||
#define IDS_STA_06 132
|
||||
#define IDS_STA_07 133
|
||||
#define IDS_STA_08 134
|
||||
#define IDS_STA_09 135
|
||||
#define IDS_STA_10 136
|
||||
#define IDS_STA_11 137
|
||||
#define IDS_STA_12 138
|
||||
#define IDS_STA_13 139
|
||||
#define IDS_DRIVER 140
|
||||
#define IDS_DRV_01 141
|
||||
#define IDS_DRV_02 142
|
||||
#define IDS_DSRC 143
|
||||
#define IDS_DSC_01 144
|
||||
#define IDS_DSC_02 145
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
#include "xtable.h"
|
||||
#include "tabcol.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* XTAB public constructor. */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -65,15 +65,17 @@
|
|||
/***********************************************************************/
|
||||
int num_read, num_there, num_eq[2]; // Statistics
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" USETEMP Use_Temp;
|
||||
extern bool xinfo;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Size of optimize file header. */
|
||||
/***********************************************************************/
|
||||
#define NZ 4
|
||||
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
bool ExactInfo(void);
|
||||
USETEMP UseTemp(void);
|
||||
|
||||
/***********************************************************************/
|
||||
/* Min and Max blocks contains zero ended fields (blank = false). */
|
||||
/* No conversion of block values (check = true). */
|
||||
|
|
@ -316,7 +318,7 @@ bool DOSDEF::InvalidateIndex(PGLOBAL g)
|
|||
PTDB DOSDEF::GetTable(PGLOBAL g, MODE mode)
|
||||
{
|
||||
// Mapping not used for insert
|
||||
USETEMP tmp = Use_Temp;
|
||||
USETEMP tmp = UseTemp();
|
||||
bool map = Mapped && mode != MODE_INSERT &&
|
||||
!(tmp != TMP_NO && Recfm == RECFM_VAR
|
||||
&& mode == MODE_UPDATE) &&
|
||||
|
|
@ -1776,8 +1778,13 @@ bool TDBDOS::InitialyzeIndex(PGLOBAL g, PIXDEF xdp, bool sorted)
|
|||
To_Link = (PXOB*)PlugSubAlloc(g, NULL, Knum * sizeof(PXOB));
|
||||
|
||||
for (k = 0, kdp = xdp->GetToKeyParts(); kdp; k++, kdp = kdp->GetNext()) {
|
||||
cdp = Key(k)->GetCdp();
|
||||
valp = AllocateValue(g, cdp->GetType(), cdp->GetLength());
|
||||
if ((cdp = Key(k)->GetCdp()))
|
||||
valp = AllocateValue(g, cdp->GetType(), cdp->GetLength());
|
||||
else { // Special column ?
|
||||
colp = Key(k);
|
||||
valp = AllocateValue(g, colp->GetResultType(), colp->GetLength());
|
||||
} // endif cdp
|
||||
|
||||
To_Link[k]= new(g) CONSTANT(valp);
|
||||
} // endfor k
|
||||
|
||||
|
|
@ -1905,7 +1912,7 @@ int TDBDOS::Cardinality(PGLOBAL g)
|
|||
|
||||
} // endif Mode
|
||||
|
||||
if (Mode == MODE_ANY && xinfo) {
|
||||
if (Mode == MODE_ANY && ExactInfo()) {
|
||||
// Using index impossible or failed, do it the hard way
|
||||
Mode = MODE_READ;
|
||||
To_Line = (char*)PlugSubAlloc(g, NULL, Lrecl + 1);
|
||||
|
|
@ -2018,8 +2025,10 @@ int TDBDOS::EstimatedLength(PGLOBAL g)
|
|||
/***********************************************************************/
|
||||
bool TDBDOS::IsUsingTemp(PGLOBAL g)
|
||||
{
|
||||
return (Use_Temp == TMP_YES || Use_Temp == TMP_FORCE ||
|
||||
(Use_Temp == TMP_AUTO && Mode == MODE_UPDATE));
|
||||
USETEMP utp = UseTemp();
|
||||
|
||||
return (utp == TMP_YES || utp == TMP_FORCE ||
|
||||
(utp == TMP_AUTO && Mode == MODE_UPDATE));
|
||||
} // end of IsUsingTemp
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -2059,7 +2068,7 @@ bool TDBDOS::OpenDB(PGLOBAL g)
|
|||
Txfp = new(g) DOSFAM((PDOSDEF)To_Def);
|
||||
Txfp->SetTdbp(this);
|
||||
} else if (Txfp->Blocked && (Mode == MODE_DELETE ||
|
||||
(Mode == MODE_UPDATE && Use_Temp != TMP_NO))) {
|
||||
(Mode == MODE_UPDATE && UseTemp() != TMP_NO))) {
|
||||
/*******************************************************************/
|
||||
/* Delete is not currently handled in block mode neither Update */
|
||||
/* when using a temporary file. */
|
||||
|
|
|
|||
|
|
@ -51,13 +51,15 @@
|
|||
/***********************************************************************/
|
||||
/* DB static variables. */
|
||||
/***********************************************************************/
|
||||
extern "C" int trace;
|
||||
extern "C" USETEMP Use_Temp;
|
||||
|
||||
extern int num_read, num_there, num_eq[2]; // Statistics
|
||||
static const longlong M2G = 0x80000000;
|
||||
static const longlong M4G = (longlong)2 * M2G;
|
||||
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
USETEMP UseTemp(void);
|
||||
|
||||
/* ------------------------------------------------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -273,9 +275,9 @@ bool TDBFIX::IsUsingTemp(PGLOBAL g)
|
|||
{
|
||||
// Not ready yet to handle using a temporary file with mapping
|
||||
// or while deleting from DBF files.
|
||||
return ((Use_Temp == TMP_YES && Txfp->GetAmType() != TYPE_AM_MAP &&
|
||||
return ((UseTemp() == TMP_YES && Txfp->GetAmType() != TYPE_AM_MAP &&
|
||||
!(Mode == MODE_DELETE && Txfp->GetAmType() == TYPE_AM_DBF)) ||
|
||||
Use_Temp == TMP_FORCE || Use_Temp == TMP_TEST);
|
||||
UseTemp() == TMP_FORCE || UseTemp() == TMP_TEST);
|
||||
} // end of IsUsingTemp
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -307,7 +309,7 @@ bool TDBFIX::OpenDB(PGLOBAL g)
|
|||
} // endif use
|
||||
|
||||
if (Mode == MODE_DELETE && Txfp->GetAmType() == TYPE_AM_MAP &&
|
||||
(!Next || Use_Temp == TMP_FORCE)) {
|
||||
(!Next || UseTemp() == TMP_FORCE)) {
|
||||
// Delete all lines or using temp. Not handled in MAP mode
|
||||
Txfp = new(g) FIXFAM((PDOSDEF)To_Def);
|
||||
Txfp->SetTdbp(this);
|
||||
|
|
|
|||
|
|
@ -66,8 +66,10 @@
|
|||
#define MAXCOL 200 /* Default max column nb in result */
|
||||
#define TYPE_UNKNOWN 10 /* Must be greater than other types */
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" USETEMP Use_Temp;
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
USETEMP UseTemp(void);
|
||||
|
||||
/***********************************************************************/
|
||||
/* CSVColumns: constructs the result blocks containing the description */
|
||||
|
|
@ -446,7 +448,7 @@ PTDB CSVDEF::GetTable(PGLOBAL g, MODE mode)
|
|||
PTDBASE tdbp;
|
||||
|
||||
if (Catfunc != FNC_COL) {
|
||||
USETEMP tmp = Use_Temp;
|
||||
USETEMP tmp = UseTemp();
|
||||
bool map = Mapped && mode != MODE_INSERT &&
|
||||
!(tmp != TMP_NO && mode == MODE_UPDATE) &&
|
||||
!(tmp == TMP_FORCE &&
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class TDBFMT : public TDBCSV {
|
|||
|
||||
protected:
|
||||
virtual bool PrepareWriting(PGLOBAL g)
|
||||
{strcpy(g->Message, "FMT is read only"); return true;}
|
||||
{sprintf(g->Message, MSG(TABLE_READ_ONLY), "FMT"); return true;}
|
||||
|
||||
// Members
|
||||
PSZ *FldFormat; // Field read format
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
int TDB::Tnum = 0;
|
||||
|
||||
extern "C" int trace; // The general trace value
|
||||
|
||||
/***********************************************************************/
|
||||
/* Utility routines. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -192,6 +190,18 @@ PSZ TDBASE::GetPath(void)
|
|||
return To_Def->GetPath();
|
||||
} // end of GetPath
|
||||
|
||||
/***********************************************************************/
|
||||
/* Return true if name is a special column of this table. */
|
||||
/***********************************************************************/
|
||||
bool TDBASE::IsSpecial(PSZ name)
|
||||
{
|
||||
for (PCOLDEF cdp = To_Def->GetCols(); cdp; cdp = cdp->GetNext())
|
||||
if (!stricmp(cdp->GetName(), name) && (cdp->Flags & U_SPECIAL))
|
||||
return true; // Special column to ignore while inserting
|
||||
|
||||
return false; // Not found or not special or not inserting
|
||||
} // end of IsSpecial
|
||||
|
||||
/***********************************************************************/
|
||||
/* Initialize TDBASE based column description block construction. */
|
||||
/* name is used to call columns by name. */
|
||||
|
|
|
|||
4
storage/connect/tabmul.cpp
Executable file → Normal file
4
storage/connect/tabmul.cpp
Executable file → Normal file
|
|
@ -68,8 +68,6 @@
|
|||
#include "tabdos.h" // TDBDOS and DOSCOL class dcls
|
||||
#include "tabmul.h" // TDBMUL and MULCOL classes dcls
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* ------------------------- Class TDBMUL ---------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -199,7 +197,7 @@ bool TDBMUL::InitFileNames(PGLOBAL g)
|
|||
|
||||
#else // !WIN32
|
||||
struct stat fileinfo;
|
||||
char fn[PATH_MAX], direc[PATH_MAX], pattern[256], ftype[8];
|
||||
char fn[FN_REFLEN], direc[FN_REFLEN], pattern[FN_HEADLEN], ftype[FN_EXTLEN];
|
||||
DIR *dir;
|
||||
struct dirent *entry;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,13 +67,15 @@
|
|||
void PrintResult(PGLOBAL, PSEM, PQRYRES);
|
||||
#endif // _CONSOLE
|
||||
|
||||
extern "C" int trace;
|
||||
extern bool xinfo;
|
||||
|
||||
// Used to check whether a MYSQL table is created on itself
|
||||
bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host,
|
||||
const char *db, char *tab, const char *src, int port);
|
||||
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
bool ExactInfo(void);
|
||||
|
||||
/* -------------- Implementation of the MYSQLDEF class --------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -430,7 +432,6 @@ TDBMYSQL::TDBMYSQL(PMYDEF tdp) : TDBASE(tdp)
|
|||
|
||||
Bind = NULL;
|
||||
Query = NULL;
|
||||
Qbuf = NULL;
|
||||
Fetched = false;
|
||||
m_Rc = RC_FX;
|
||||
AftRows = 0;
|
||||
|
|
@ -454,7 +455,6 @@ TDBMYSQL::TDBMYSQL(PGLOBAL g, PTDBMY tdbp) : TDBASE(tdbp)
|
|||
Delayed = tdbp->Delayed;
|
||||
Bind = NULL;
|
||||
Query = tdbp->Query;
|
||||
Qbuf = NULL;
|
||||
Fetched = tdbp->Fetched;
|
||||
m_Rc = tdbp->m_Rc;
|
||||
AftRows = tdbp->AftRows;
|
||||
|
|
@ -495,9 +495,10 @@ PCOL TDBMYSQL::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||
/***********************************************************************/
|
||||
bool TDBMYSQL::MakeSelect(PGLOBAL g, bool mx)
|
||||
{
|
||||
char *tk = "`";
|
||||
//char *tk = "`";
|
||||
char tk = '`';
|
||||
int len = 0, rank = 0;
|
||||
bool b = false;
|
||||
bool b = false, oom = false;
|
||||
PCOL colp;
|
||||
//PDBUSER dup = PlgGetUser(g);
|
||||
|
||||
|
|
@ -505,27 +506,24 @@ bool TDBMYSQL::MakeSelect(PGLOBAL g, bool mx)
|
|||
return false; // already done
|
||||
|
||||
if (Srcdef) {
|
||||
Query = Srcdef;
|
||||
Query = new(g)STRING(g, 0, Srcdef);
|
||||
return false;
|
||||
} // endif Srcdef
|
||||
|
||||
//Find the address of the suballocated query
|
||||
Query = (char*)PlugSubAlloc(g, NULL, 0);
|
||||
strcpy(Query, "SELECT ");
|
||||
// Allocate the string used to contain Query
|
||||
Query = new(g) STRING(g, 1023, "SELECT ");
|
||||
|
||||
if (Columns) {
|
||||
for (colp = Columns; colp; colp = colp->GetNext())
|
||||
if (!colp->IsSpecial()) {
|
||||
// if (colp->IsSpecial()) {
|
||||
// strcpy(g->Message, MSG(NO_SPEC_COL));
|
||||
// return true;
|
||||
// } else {
|
||||
if (b)
|
||||
strcat(Query, ", ");
|
||||
oom |= Query->Append(", ");
|
||||
else
|
||||
b = true;
|
||||
|
||||
strcat(strcat(strcat(Query, tk), colp->GetName()), tk);
|
||||
oom |= Query->Append(tk);
|
||||
oom |= Query->Append(colp->GetName());
|
||||
oom |= Query->Append(tk);
|
||||
((PMYCOL)colp)->Rank = rank++;
|
||||
} // endif colp
|
||||
|
||||
|
|
@ -534,27 +532,38 @@ bool TDBMYSQL::MakeSelect(PGLOBAL g, bool mx)
|
|||
// Query count(*) from... for which we will count the rows from
|
||||
// Query '*' from...
|
||||
// (the use of a char constant minimize the result storage)
|
||||
strcat(Query, (Isview) ? "*" : "'*'");
|
||||
if (Isview)
|
||||
oom |= Query->Append('*');
|
||||
else
|
||||
oom |= Query->Append("'*'");
|
||||
|
||||
} // endif ncol
|
||||
|
||||
strcat(strcat(strcat(strcat(Query, " FROM "), tk), Tabname), tk);
|
||||
len = strlen(Query);
|
||||
oom |= Query->Append(" FROM ");
|
||||
oom |= Query->Append(tk);
|
||||
oom |= Query->Append(Tabname);
|
||||
oom |= Query->Append(tk);
|
||||
len = Query->GetLength();
|
||||
|
||||
if (To_CondFil) {
|
||||
if (!mx) {
|
||||
strcat(strcat(Query, " WHERE "), To_CondFil->Body);
|
||||
len = strlen(Query) + 1;
|
||||
oom |= Query->Append(" WHERE ");
|
||||
oom |= Query->Append(To_CondFil->Body);
|
||||
len = Query->GetLength() + 1;
|
||||
} else
|
||||
len += (strlen(To_CondFil->Body) + 256);
|
||||
|
||||
} else
|
||||
len += (mx ? 256 : 1);
|
||||
|
||||
if (trace)
|
||||
htrc("Query=%s\n", Query);
|
||||
if (oom || Query->Resize(len)) {
|
||||
strcpy(g->Message, "MakeSelect: Out of memory");
|
||||
return true;
|
||||
} // endif oom
|
||||
|
||||
if (trace)
|
||||
htrc("Query=%s\n", Query->GetStr());
|
||||
|
||||
// Now we know how much to suballocate
|
||||
PlugSubAlloc(g, NULL, len);
|
||||
return false;
|
||||
} // end of MakeSelect
|
||||
|
||||
|
|
@ -563,81 +572,82 @@ bool TDBMYSQL::MakeSelect(PGLOBAL g, bool mx)
|
|||
/***********************************************************************/
|
||||
bool TDBMYSQL::MakeInsert(PGLOBAL g)
|
||||
{
|
||||
char *colist, *valist = NULL;
|
||||
char *tk = "`";
|
||||
int len = 0, qlen = 0;
|
||||
bool b = false;
|
||||
uint len = 0;
|
||||
bool b = false, oom;
|
||||
PCOL colp;
|
||||
|
||||
if (Query)
|
||||
return false; // already done
|
||||
|
||||
for (colp = Columns; colp; colp = colp->GetNext())
|
||||
if (!colp->IsSpecial()) {
|
||||
// if (colp->IsSpecial()) {
|
||||
// strcpy(g->Message, MSG(NO_SPEC_COL));
|
||||
// return true;
|
||||
// } else {
|
||||
len += (strlen(colp->GetName()) + 4);
|
||||
((PMYCOL)colp)->Rank = Nparm++;
|
||||
} // endif colp
|
||||
|
||||
colist = (char*)PlugSubAlloc(g, NULL, len);
|
||||
*colist = '\0';
|
||||
|
||||
if (Prep) {
|
||||
#if defined(MYSQL_PREPARED_STATEMENTS)
|
||||
valist = (char*)PlugSubAlloc(g, NULL, 2 * Nparm);
|
||||
*valist = '\0';
|
||||
#else // !MYSQL_PREPARED_STATEMENTS
|
||||
#if !defined(MYSQL_PREPARED_STATEMENTS)
|
||||
strcpy(g->Message, "Prepared statements not used (not supported)");
|
||||
PushWarning(g, this);
|
||||
Prep = false;
|
||||
#endif // !MYSQL_PREPARED_STATEMENTS
|
||||
} // endif Prep
|
||||
|
||||
for (colp = Columns; colp; colp = colp->GetNext()) {
|
||||
if (b) {
|
||||
strcat(colist, ", ");
|
||||
if (Prep) strcat(valist, ",");
|
||||
} else
|
||||
b = true;
|
||||
for (colp = Columns; colp; colp = colp->GetNext())
|
||||
if (colp->IsSpecial()) {
|
||||
strcpy(g->Message, MSG(NO_SPEC_COL));
|
||||
return true;
|
||||
} else {
|
||||
len += (strlen(colp->GetName()) + 4);
|
||||
|
||||
strcat(strcat(strcat(colist, tk), colp->GetName()), tk);
|
||||
// Parameter marker
|
||||
if (!Prep) {
|
||||
if (colp->GetResultType() == TYPE_DATE)
|
||||
len += 20;
|
||||
else
|
||||
len += colp->GetLength();
|
||||
|
||||
} else
|
||||
len += 2;
|
||||
|
||||
// Parameter marker
|
||||
if (!Prep) {
|
||||
if (colp->GetResultType() == TYPE_DATE)
|
||||
qlen += 20;
|
||||
else
|
||||
qlen += colp->GetLength();
|
||||
|
||||
} else // Prep
|
||||
strcat(valist, "?");
|
||||
|
||||
} // endfor colp
|
||||
((PMYCOL)colp)->Rank = Nparm++;
|
||||
} // endif colp
|
||||
|
||||
// Below 40 is enough to contain the fixed part of the query
|
||||
len = (strlen(Tabname) + strlen(colist)
|
||||
+ ((Prep) ? strlen(valist) : 0) + 40);
|
||||
Query = (char*)PlugSubAlloc(g, NULL, len);
|
||||
len += (strlen(Tabname) + 40);
|
||||
Query = new(g) STRING(g, len);
|
||||
|
||||
if (Delayed)
|
||||
strcpy(Query, "INSERT DELAYED INTO ");
|
||||
oom = Query->Set("INSERT DELAYED INTO ");
|
||||
else
|
||||
strcpy(Query, "INSERT INTO ");
|
||||
oom = Query->Set("INSERT INTO ");
|
||||
|
||||
strcat(strcat(strcat(Query, tk), Tabname), tk);
|
||||
strcat(strcat(strcat(Query, " ("), colist), ") VALUES (");
|
||||
oom |= Query->Append(tk);
|
||||
oom |= Query->Append(Tabname);
|
||||
oom |= Query->Append("` (");
|
||||
|
||||
if (Prep)
|
||||
strcat(strcat(Query, valist), ")");
|
||||
else {
|
||||
qlen += (strlen(Query) + Nparm);
|
||||
Qbuf = (char *)PlugSubAlloc(g, NULL, qlen);
|
||||
} // endelse Prep
|
||||
for (colp = Columns; colp; colp = colp->GetNext()) {
|
||||
if (b)
|
||||
oom |= Query->Append(", ");
|
||||
else
|
||||
b = true;
|
||||
|
||||
oom |= Query->Append(tk);
|
||||
oom |= Query->Append(colp->GetName());
|
||||
oom |= Query->Append(tk);
|
||||
} // endfor colp
|
||||
|
||||
return false;
|
||||
oom |= Query->Append(") VALUES (");
|
||||
|
||||
#if defined(MYSQL_PREPARED_STATEMENTS)
|
||||
if (Prep) {
|
||||
for (int i = 0; i < Nparm; i++)
|
||||
oom |= Query->Append("?,");
|
||||
|
||||
Query->RepLast(')');
|
||||
Query->Trim();
|
||||
} // endif Prep
|
||||
#endif // MYSQL_PREPARED_STATEMENTS
|
||||
|
||||
if (oom)
|
||||
strcpy(g->Message, "MakeInsert: Out of memory");
|
||||
|
||||
return oom;
|
||||
} // end of MakeInsert
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -646,7 +656,7 @@ bool TDBMYSQL::MakeInsert(PGLOBAL g)
|
|||
/***********************************************************************/
|
||||
int TDBMYSQL::MakeCommand(PGLOBAL g)
|
||||
{
|
||||
Query = (char*)PlugSubAlloc(g, NULL, strlen(Qrystr) + 64);
|
||||
Query = new(g) STRING(g, strlen(Qrystr) + 64);
|
||||
|
||||
if (Quoted > 0 || stricmp(Name, Tabname)) {
|
||||
char *p, *qrystr, name[68];
|
||||
|
|
@ -665,16 +675,23 @@ int TDBMYSQL::MakeCommand(PGLOBAL g)
|
|||
strlwr(strcpy(name, Name)); // Not a keyword
|
||||
|
||||
if ((p = strstr(qrystr, name))) {
|
||||
memcpy(Query, Qrystr, p - qrystr);
|
||||
Query[p - qrystr] = 0;
|
||||
bool oom = Query->Set(Qrystr, p - qrystr);
|
||||
|
||||
if (qtd && *(p-1) == ' ')
|
||||
strcat(strcat(strcat(Query, "`"), Tabname), "`");
|
||||
else
|
||||
strcat(Query, Tabname);
|
||||
if (qtd && *(p-1) == ' ') {
|
||||
oom |= Query->Append('`');
|
||||
oom |= Query->Append(Tabname);
|
||||
oom |= Query->Append('`');
|
||||
} else
|
||||
oom |= Query->Append(Tabname);
|
||||
|
||||
oom |= Query->Append(Qrystr + (p - qrystr) + strlen(name));
|
||||
|
||||
if (oom) {
|
||||
strcpy(g->Message, "MakeCommand: Out of memory");
|
||||
return RC_FX;
|
||||
} else
|
||||
strlwr(strcpy(qrystr, Query->GetStr()));
|
||||
|
||||
strcat(Query, Qrystr + (p - qrystr) + strlen(name));
|
||||
strlwr(strcpy(qrystr, Query));
|
||||
} else {
|
||||
sprintf(g->Message, "Cannot use this %s command",
|
||||
(Mode == MODE_UPDATE) ? "UPDATE" : "DELETE");
|
||||
|
|
@ -682,7 +699,7 @@ int TDBMYSQL::MakeCommand(PGLOBAL g)
|
|||
} // endif p
|
||||
|
||||
} else
|
||||
strcpy(Query, Qrystr);
|
||||
(void)Query->Set(Qrystr);
|
||||
|
||||
return RC_OK;
|
||||
} // end of MakeCommand
|
||||
|
|
@ -755,7 +772,7 @@ int TDBMYSQL::Cardinality(PGLOBAL g)
|
|||
if (!g)
|
||||
return (Mode == MODE_ANY && !Srcdef) ? 1 : 0;
|
||||
|
||||
if (Cardinal < 0 && Mode == MODE_ANY && !Srcdef && xinfo) {
|
||||
if (Cardinal < 0 && Mode == MODE_ANY && !Srcdef && ExactInfo()) {
|
||||
// Info command, we must return the exact table row number
|
||||
char query[96];
|
||||
MYSQLC myc;
|
||||
|
|
@ -802,7 +819,7 @@ int TDBMYSQL::GetMaxSize(PGLOBAL g)
|
|||
/***********************************************************************/
|
||||
int TDBMYSQL::RowNumber(PGLOBAL g, bool b)
|
||||
{
|
||||
return N;
|
||||
return N + 1;
|
||||
} // end of RowNumber
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -842,6 +859,7 @@ bool TDBMYSQL::OpenDB(PGLOBAL g)
|
|||
/* Table already open, just replace it at its beginning. */
|
||||
/*******************************************************************/
|
||||
Myc.Rewind();
|
||||
N = -1;
|
||||
return false;
|
||||
} // endif use
|
||||
|
||||
|
|
@ -871,7 +889,8 @@ bool TDBMYSQL::OpenDB(PGLOBAL g)
|
|||
/*********************************************************************/
|
||||
if (Mode == MODE_READ || Mode == MODE_READX) {
|
||||
MakeSelect(g, Mode == MODE_READX);
|
||||
m_Rc = (Mode == MODE_READ) ? Myc.ExecSQL(g, Query) : RC_OK;
|
||||
m_Rc = (Mode == MODE_READ)
|
||||
? Myc.ExecSQL(g, Query->GetStr()) : RC_OK;
|
||||
|
||||
#if 0
|
||||
if (!Myc.m_Res || !Myc.m_Fields) {
|
||||
|
|
@ -894,7 +913,8 @@ bool TDBMYSQL::OpenDB(PGLOBAL g)
|
|||
|
||||
if (!MakeInsert(g)) {
|
||||
#if defined(MYSQL_PREPARED_STATEMENTS)
|
||||
int n = (Prep) ? Myc.PrepareSQL(g, Query) : Nparm;
|
||||
int n = (Prep)
|
||||
? Myc.PrepareSQL(g, Query->GetCharValue()) : Nparm;
|
||||
|
||||
if (Nparm != n) {
|
||||
if (n >= 0) // Other errors return negative values
|
||||
|
|
@ -1007,7 +1027,7 @@ int TDBMYSQL::SendCommand(PGLOBAL g)
|
|||
{
|
||||
int w;
|
||||
|
||||
if (Myc.ExecSQLcmd(g, Query, &w) == RC_NF) {
|
||||
if (Myc.ExecSQLcmd(g, Query->GetStr(), &w) == RC_NF) {
|
||||
AftRows = Myc.m_Afrw;
|
||||
sprintf(g->Message, "%s: %d affected rows", Tabname, AftRows);
|
||||
PushWarning(g, this, 0); // 0 means a Note
|
||||
|
|
@ -1037,28 +1057,45 @@ int TDBMYSQL::SendCommand(PGLOBAL g)
|
|||
/***********************************************************************/
|
||||
bool TDBMYSQL::ReadKey(PGLOBAL g, OPVAL op, const void *key, int len)
|
||||
{
|
||||
int oldlen = strlen(Query);
|
||||
bool oom;
|
||||
int oldlen = Query->GetLength();
|
||||
|
||||
if (!key || op == OP_NEXT ||
|
||||
Mode == MODE_UPDATE || Mode == MODE_DELETE)
|
||||
return false;
|
||||
else if (op == OP_FIRST) {
|
||||
if (To_CondFil)
|
||||
strcat(strcat(Query, " WHERE "), To_CondFil->Body);
|
||||
if (To_CondFil) {
|
||||
oom = Query->Append(" WHERE ");
|
||||
|
||||
if ((oom |= Query->Append(To_CondFil->Body))) {
|
||||
strcpy(g->Message, "Readkey: Out of memory");
|
||||
return true;
|
||||
} // endif oom
|
||||
|
||||
} // endif To_Condfil
|
||||
|
||||
} else {
|
||||
if (Myc.m_Res)
|
||||
Myc.FreeResult();
|
||||
|
||||
To_Def->GetHandler()->MakeKeyWhere(g, Query, op, "`", key, len);
|
||||
To_Def->GetHandler()->MakeKeyWhere(g, Query->GetStr(),
|
||||
op, "`", key, len);
|
||||
|
||||
if (To_CondFil)
|
||||
strcat(strcat(strcat(Query, " AND ("), To_CondFil->Body), ")");
|
||||
if (To_CondFil) {
|
||||
oom = Query->Append(" AND (");
|
||||
oom |= Query->Append(To_CondFil->Body);
|
||||
|
||||
if ((oom |= Query->Append(')'))) {
|
||||
strcpy(g->Message, "Readkey: Out of memory");
|
||||
return true;
|
||||
} // endif oom
|
||||
|
||||
} // endif To_Condfil
|
||||
|
||||
} // endif's op
|
||||
|
||||
m_Rc = Myc.ExecSQL(g, Query);
|
||||
Query[oldlen] = 0;
|
||||
m_Rc = Myc.ExecSQL(g, Query->GetStr());
|
||||
Query->Truncate(oldlen);
|
||||
return (m_Rc == RC_FX) ? true : false;
|
||||
} // end of ReadKey
|
||||
|
||||
|
|
@ -1102,31 +1139,38 @@ int TDBMYSQL::WriteDB(PGLOBAL g)
|
|||
// Statement was not prepared, we must construct and execute
|
||||
// an insert query for each line to insert
|
||||
int rc;
|
||||
uint len = Query->GetLength();
|
||||
char buf[64];
|
||||
|
||||
strcpy(Qbuf, Query);
|
||||
bool b, oom = false;
|
||||
|
||||
// Make the Insert command value list
|
||||
for (PCOL colp = Columns; colp; colp = colp->GetNext()) {
|
||||
if (!colp->GetValue()->IsNull()) {
|
||||
if (colp->GetResultType() == TYPE_STRING ||
|
||||
colp->GetResultType() == TYPE_DATE)
|
||||
strcat(Qbuf, "'");
|
||||
|
||||
strcat(Qbuf, colp->GetValue()->GetCharString(buf));
|
||||
|
||||
if (colp->GetResultType() == TYPE_STRING ||
|
||||
colp->GetResultType() == TYPE_DATE)
|
||||
strcat(Qbuf, "'");
|
||||
|
||||
if ((b = colp->GetResultType() == TYPE_STRING ||
|
||||
colp->GetResultType() == TYPE_DATE))
|
||||
oom |= Query->Append('\'');
|
||||
|
||||
oom |= Query->Append(colp->GetValue()->GetCharString(buf));
|
||||
|
||||
if (b)
|
||||
oom |= Query->Append('\'');
|
||||
|
||||
} else
|
||||
strcat(Qbuf, "NULL");
|
||||
|
||||
strcat(Qbuf, (colp->GetNext()) ? "," : ")");
|
||||
oom |= Query->Append("NULL");
|
||||
|
||||
oom |= Query->Append(',');
|
||||
} // endfor colp
|
||||
|
||||
Myc.m_Rows = -1; // To execute the query
|
||||
rc = Myc.ExecSQL(g, Qbuf);
|
||||
if (unlikely(oom)) {
|
||||
strcpy(g->Message, "WriteDB: Out of memory");
|
||||
rc = RC_FX;
|
||||
} else {
|
||||
Query->RepLast(')');
|
||||
Myc.m_Rows = -1; // To execute the query
|
||||
rc = Myc.ExecSQL(g, Query->GetStr());
|
||||
Query->Truncate(len); // Restore query
|
||||
} // endif oom
|
||||
|
||||
return (rc == RC_NF) ? RC_OK : rc; // RC_NF is Ok
|
||||
} // end of WriteDB
|
||||
|
||||
|
|
@ -1531,7 +1575,7 @@ bool TDBMYEXC::OpenDB(PGLOBAL g)
|
|||
if (!(Cmdlist = MakeCMD(g))) {
|
||||
Myc.Close();
|
||||
return true;
|
||||
} // endif Query
|
||||
} // endif Cmdlist
|
||||
|
||||
return false;
|
||||
} // end of OpenDB
|
||||
|
|
@ -1559,9 +1603,12 @@ int TDBMYEXC::ReadDB(PGLOBAL g)
|
|||
int rc;
|
||||
|
||||
do {
|
||||
Query = Cmdlist->Cmd;
|
||||
if (Query)
|
||||
Query->Set(Cmdlist->Cmd);
|
||||
else
|
||||
Query = new(g) STRING(g, 0, Cmdlist->Cmd);
|
||||
|
||||
switch (rc = Myc.ExecSQLcmd(g, Query, &Warnings)) {
|
||||
switch (rc = Myc.ExecSQLcmd(g, Query->GetStr(), &Warnings)) {
|
||||
case RC_NF:
|
||||
AftRows = Myc.m_Afrw;
|
||||
strcpy(g->Message, "Affected rows");
|
||||
|
|
@ -1650,11 +1697,11 @@ void MYXCOL::ReadColumn(PGLOBAL g)
|
|||
|
||||
} else
|
||||
switch (Flag) {
|
||||
case 0: Value->SetValue_psz(tdbp->Query); break;
|
||||
case 1: Value->SetValue(tdbp->AftRows); break;
|
||||
case 2: Value->SetValue_psz(g->Message); break;
|
||||
case 3: Value->SetValue(tdbp->Warnings); break;
|
||||
default: Value->SetValue_psz("Invalid Flag"); break;
|
||||
case 0: Value->SetValue_psz(tdbp->Query->GetStr()); break;
|
||||
case 1: Value->SetValue(tdbp->AftRows); break;
|
||||
case 2: Value->SetValue_psz(g->Message); break;
|
||||
case 3: Value->SetValue(tdbp->Warnings); break;
|
||||
default: Value->SetValue_psz("Invalid Flag"); break;
|
||||
} // endswitch Flag
|
||||
|
||||
} // end of ReadColumn
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ class TDBMYSQL : public TDBASE {
|
|||
// Members
|
||||
MYSQLC Myc; // MySQL connection class
|
||||
MYSQL_BIND *Bind; // To the MySQL bind structure array
|
||||
PSTRG Query; // Constructed SQL query
|
||||
char *Host; // Host machine to use
|
||||
char *User; // User logon info
|
||||
char *Pwd; // Password logon info
|
||||
|
|
@ -126,8 +127,6 @@ class TDBMYSQL : public TDBASE {
|
|||
char *Tabname; // External table name
|
||||
char *Srcdef; // The source table SQL definition
|
||||
char *Server; // The server ID
|
||||
char *Query; // Points to SQL query
|
||||
char *Qbuf; // Used for not prepared insert
|
||||
char *Qrystr; // The original query
|
||||
bool Fetched; // True when fetch was done
|
||||
bool Isview; // True if this table is a MySQL view
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@
|
|||
#include "ha_connect.h"
|
||||
#include "mycat.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Prepare and count columns in the column list. */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -75,15 +75,17 @@
|
|||
|
||||
#include "sql_string.h"
|
||||
|
||||
extern "C" int trace;
|
||||
extern bool xinfo;
|
||||
|
||||
/***********************************************************************/
|
||||
/* DB static variables. */
|
||||
/***********************************************************************/
|
||||
// int num_read, num_there, num_eq[2], num_nf; // Statistics
|
||||
extern int num_read, num_there, num_eq[2]; // Statistics
|
||||
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
bool ExactInfo(void);
|
||||
|
||||
/* -------------------------- Class ODBCDEF -------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -93,7 +95,7 @@ ODBCDEF::ODBCDEF(void)
|
|||
{
|
||||
Connect= Tabname= Tabschema= Tabcat= Srcdef= Qchar= Qrystr= Sep= NULL;
|
||||
Catver = Options = Quoted = Maxerr = Maxres = 0;
|
||||
Xsrc = false;
|
||||
Scrollable = Xsrc = false;
|
||||
} // end of ODBCDEF constructor
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -127,6 +129,11 @@ bool ODBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
|
|||
Maxres = GetIntCatInfo("Maxres", 0);
|
||||
Quoted = GetIntCatInfo("Quoted", 0);
|
||||
Options = ODBConn::noOdbcDialog;
|
||||
//Options = ODBConn::noOdbcDialog | ODBConn::useCursorLib;
|
||||
|
||||
if ((Scrollable = GetBoolCatInfo("Scrollable", false)))
|
||||
Elemt = 0; // Not compatible with extended fetch
|
||||
|
||||
Pseudo = 2; // FILID is Ok but not ROWID
|
||||
return false;
|
||||
} // end of DefineAM
|
||||
|
|
@ -191,6 +198,7 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
|
|||
Quoted = MY_MAX(0, tdp->GetQuoted());
|
||||
Rows = tdp->GetElemt();
|
||||
Catver = tdp->Catver;
|
||||
Scrollable = tdp->Scrollable;
|
||||
} else {
|
||||
Connect = NULL;
|
||||
TableName = NULL;
|
||||
|
|
@ -203,6 +211,7 @@ TDBODBC::TDBODBC(PODEF tdp) : TDBASE(tdp)
|
|||
Quoted = 0;
|
||||
Rows = 0;
|
||||
Catver = 0;
|
||||
Scrollable = false;
|
||||
} // endif tdp
|
||||
|
||||
Quote = NULL;
|
||||
|
|
@ -229,6 +238,7 @@ TDBODBC::TDBODBC(PTDBODBC tdbp) : TDBASE(tdbp)
|
|||
Catalog = tdbp->Catalog;
|
||||
Srcdef = tdbp->Srcdef;
|
||||
Qrystr = tdbp->Qrystr;
|
||||
Scrollable = tdbp->Scrollable;
|
||||
Quote = tdbp->Quote;
|
||||
Query = tdbp->Query;
|
||||
Count = tdbp->Count;
|
||||
|
|
@ -672,7 +682,7 @@ int TDBODBC::Cardinality(PGLOBAL g)
|
|||
if (!g)
|
||||
return (Mode == MODE_ANY && !Srcdef) ? 1 : 0;
|
||||
|
||||
if (Cardinal < 0 && Mode == MODE_ANY && !Srcdef && xinfo) {
|
||||
if (Cardinal < 0 && Mode == MODE_ANY && !Srcdef && ExactInfo()) {
|
||||
// Info command, we must return the exact table row number
|
||||
char qry[96], tbn[64];
|
||||
ODBConn *ocp = new(g) ODBConn(g, this);
|
||||
|
|
@ -755,6 +765,12 @@ bool TDBODBC::OpenDB(PGLOBAL g)
|
|||
// To_Kindex->Reset();
|
||||
|
||||
// rewind(Stream); >>>>>>> Something to be done with Cursor <<<<<<<
|
||||
if (Ocp->Rewind(Query, (PODBCCOL)Columns)) {
|
||||
Ocp->Close();
|
||||
return true;
|
||||
} // endif Rewind
|
||||
|
||||
Fpos = 0;
|
||||
return false;
|
||||
} // endif use
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class DllExport ODBCDEF : public TABDEF { /* Logical table description */
|
|||
int Quoted; /* Identifier quoting level */
|
||||
int Maxerr; /* Maxerr for an Exec table */
|
||||
int Maxres; /* Maxres for a catalog table */
|
||||
bool Scrollable; /* Use scrollable cursor */
|
||||
bool Xsrc; /* Execution type */
|
||||
}; // end of ODBCDEF
|
||||
|
||||
|
|
@ -142,6 +143,7 @@ class TDBODBC : public TDBASE {
|
|||
int Rbuf; // Number of lines read in buffer
|
||||
int BufSize; // Size of connect string buffer
|
||||
int Nparm; // The number of statement parameters
|
||||
bool Scrollable; // Use scrollable cursor
|
||||
}; // end of class TDBODBC
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@
|
|||
#include "ha_connect.h"
|
||||
#include "mycat.h" // For GetHandler
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Make the Pivot table column list. */
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@
|
|||
GetPrivateProfileString(NULL,NULL,"",S,L,I)
|
||||
#endif // !WIN32
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* -------------- Implementation of the INI classes ------------------ */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -86,8 +86,6 @@
|
|||
#define SYSEXIT void *
|
||||
#endif // !WIN32
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* ---------------------------- Class TBLDEF ---------------------------- */
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@
|
|||
#include "tabutil.h"
|
||||
#include "ha_connect.h"
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" int zconv;
|
||||
|
||||
/************************************************************************/
|
||||
|
|
|
|||
|
|
@ -76,8 +76,10 @@
|
|||
char *strerror(int num);
|
||||
#endif // UNIX
|
||||
|
||||
extern "C" int trace;
|
||||
extern "C" USETEMP Use_Temp;
|
||||
/***********************************************************************/
|
||||
/* External function. */
|
||||
/***********************************************************************/
|
||||
USETEMP UseTemp(void);
|
||||
|
||||
/***********************************************************************/
|
||||
/* Char VCT column blocks are right filled with blanks (blank = true) */
|
||||
|
|
@ -209,7 +211,7 @@ PTDB VCTDEF::GetTable(PGLOBAL g, MODE mode)
|
|||
// Mapping not used for insert (except for true VEC not split tables)
|
||||
// or when UseTemp is forced
|
||||
bool map = Mapped && (Estimate || mode != MODE_INSERT) &&
|
||||
!(Use_Temp == TMP_FORCE &&
|
||||
!(UseTemp() == TMP_FORCE &&
|
||||
(mode == MODE_UPDATE || mode == MODE_DELETE));
|
||||
PTXF txfp;
|
||||
PTDB tdbp;
|
||||
|
|
@ -291,7 +293,7 @@ PCOL TDBVCT::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
|||
bool TDBVCT::IsUsingTemp(PGLOBAL g)
|
||||
{
|
||||
// For developpers
|
||||
return (Use_Temp == TMP_TEST);
|
||||
return (UseTemp() == TMP_TEST);
|
||||
} // end of IsUsingTemp
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
305
storage/connect/tabvir.cpp
Normal file
305
storage/connect/tabvir.cpp
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
/************* tdbvir C++ Program Source Code File (.CPP) **************/
|
||||
/* PROGRAM NAME: tdbvir.cpp Version 1.1 */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 2014 */
|
||||
/* This program are the VIR classes DB execution routines. */
|
||||
/***********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include relevant sections of the MariaDB header file. */
|
||||
/***********************************************************************/
|
||||
#include <my_global.h>
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include application header files: */
|
||||
/* global.h is header containing all global declarations. */
|
||||
/* plgdbsem.h is header containing the DB application declarations. */
|
||||
/* xtable.h is header containing the TDBASE declarations. */
|
||||
/* tdbvir.h is header containing the VIR classes declarations. */
|
||||
/***********************************************************************/
|
||||
#include "global.h"
|
||||
#include "plgdbsem.h"
|
||||
#include "filter.h"
|
||||
#include "xtable.h"
|
||||
#include "reldef.h"
|
||||
#include "colblk.h"
|
||||
#include "mycat.h" // for FNC_COL
|
||||
#include "tabvir.h"
|
||||
#include "resource.h" // for IDS_COLUMNS
|
||||
|
||||
/***********************************************************************/
|
||||
/* Return the unique column definition to MariaDB. */
|
||||
/***********************************************************************/
|
||||
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info)
|
||||
{
|
||||
int buftyp[] = {TYPE_STRING, TYPE_SHORT, TYPE_STRING,
|
||||
TYPE_INT, TYPE_STRING, TYPE_STRING};
|
||||
XFLD fldtyp[] = {FLD_NAME, FLD_TYPE, FLD_TYPENAME,
|
||||
FLD_PREC, FLD_KEY, FLD_EXTRA};
|
||||
unsigned int length[] = {8, 4, 16, 4, 16, 16};
|
||||
int i, n, ncol = sizeof(buftyp) / sizeof(int);
|
||||
PQRYRES qrp;
|
||||
PCOLRES crp;
|
||||
|
||||
n = (info) ? 0 : 1;
|
||||
|
||||
/**********************************************************************/
|
||||
/* Allocate the structures used to refer to the result set. */
|
||||
/**********************************************************************/
|
||||
if (!(qrp = PlgAllocResult(g, ncol, n, IDS_COLUMNS + 3,
|
||||
buftyp, fldtyp, length, false, true)))
|
||||
return NULL;
|
||||
|
||||
// Some columns must be renamed before info
|
||||
for (i = 0, crp = qrp->Colresp; crp; crp = crp->Next)
|
||||
switch (++i) {
|
||||
case 5: crp->Name = "Key"; break;
|
||||
case 6: crp->Name = "Extra"; break;
|
||||
} // endswitch i
|
||||
|
||||
if (info)
|
||||
return qrp;
|
||||
|
||||
/**********************************************************************/
|
||||
/* Now get the results into blocks. */
|
||||
/**********************************************************************/
|
||||
// Set column name
|
||||
crp = qrp->Colresp; // Column_Name
|
||||
crp->Kdata->SetValue("n", 0);
|
||||
|
||||
// Set type, type name, precision
|
||||
crp = crp->Next; // Data_Type
|
||||
crp->Kdata->SetValue(TYPE_INT, 0);
|
||||
|
||||
crp = crp->Next; // Type_Name
|
||||
crp->Kdata->SetValue(GetTypeName(TYPE_INT), 0);
|
||||
|
||||
crp = crp->Next; // Precision
|
||||
crp->Kdata->SetValue(11, 0);
|
||||
|
||||
crp = crp->Next; // Key
|
||||
crp->Kdata->SetValue("KEY", 0);
|
||||
|
||||
crp = crp->Next; // Extra
|
||||
crp->Kdata->SetValue("SPECIAL=ROWID", 0);
|
||||
|
||||
qrp->Nblin = 1;
|
||||
|
||||
/**********************************************************************/
|
||||
/* Return the result pointer for use by discovery routines. */
|
||||
/**********************************************************************/
|
||||
return qrp;
|
||||
} // end of VirColumns
|
||||
|
||||
/* --------------------------- Class VIRDEF --------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetTable: makes a new Table Description Block. */
|
||||
/***********************************************************************/
|
||||
PTDB VIRDEF::GetTable(PGLOBAL g, MODE m)
|
||||
{
|
||||
// Column blocks will be allocated only when needed.
|
||||
if (Catfunc == FNC_COL)
|
||||
return new(g) TDBVICL(this);
|
||||
else
|
||||
return new(g) TDBVIR(this);
|
||||
|
||||
} // end of GetTable
|
||||
|
||||
/* ------------------------ TDBVIR functions ------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* Implementation of the TDBVIR class. */
|
||||
/***********************************************************************/
|
||||
TDBVIR::TDBVIR(PVIRDEF tdp) : TDBASE(tdp)
|
||||
{
|
||||
Size = (tdp->GetElemt()) ? tdp->GetElemt() : 1;
|
||||
N = -1;
|
||||
} // end of TDBVIR constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* Analyze the filter and reset the size limit accordingly. */
|
||||
/* This is possible when a filter contains predicates implying the */
|
||||
/* special column ROWID. Here we just test for when no more good */
|
||||
/* records can be met in the remaining of the table. */
|
||||
/***********************************************************************/
|
||||
int TDBVIR::TestFilter(PFIL filp, bool nop)
|
||||
{
|
||||
int i, op = filp->GetOpc(), n = 0, type[2] = {0,0};
|
||||
int l1 = 0, l2, limit = Size;
|
||||
PXOB arg[2] = {NULL,NULL};
|
||||
|
||||
if (op == OP_GT || op == OP_GE || op == OP_LT || op == OP_LE) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
arg[i] = filp->Arg(i);
|
||||
|
||||
switch (filp->GetArgType(i)) {
|
||||
case TYPE_CONST:
|
||||
if ((l1 = arg[i]->GetIntValue()) >= 0)
|
||||
type[i] = 1;
|
||||
|
||||
break;
|
||||
case TYPE_COLBLK:
|
||||
if (((PCOL)arg[i])->GetTo_Tdb() == this &&
|
||||
((PCOL)arg[i])->GetAmType() == TYPE_AM_ROWID)
|
||||
type[i] = 2;
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} // endswitch ArgType
|
||||
|
||||
if (!type[i])
|
||||
break;
|
||||
|
||||
n += type[i];
|
||||
} // endfor i
|
||||
|
||||
if (n == 3) {
|
||||
// If true it will be ok to delete the filter
|
||||
BOOL ok = (filp == To_Filter);
|
||||
|
||||
if (type[0] == 1)
|
||||
// Make it always a Column-op-Value
|
||||
switch (op) {
|
||||
case OP_GT: op = OP_LT; break;
|
||||
case OP_GE: op = OP_LE; break;
|
||||
case OP_LT: op = OP_GT; break;
|
||||
case OP_LE: op = OP_GE; break;
|
||||
} // endswitch op
|
||||
|
||||
if (!nop) switch (op) {
|
||||
case OP_LT: l1--;
|
||||
case OP_LE: limit = l1; break;
|
||||
default: ok = false;
|
||||
} // endswitch op
|
||||
|
||||
else switch (op) {
|
||||
case OP_GE: l1--;
|
||||
case OP_GT: limit = l1; break;
|
||||
default: ok = false;
|
||||
} // endswitch op
|
||||
|
||||
limit = MY_MIN(MY_MAX(0, limit), Size);
|
||||
|
||||
// Just one where clause such as Rowid < limit;
|
||||
if (ok)
|
||||
To_Filter = NULL;
|
||||
|
||||
} else
|
||||
limit = Size;
|
||||
|
||||
} else if ((op == OP_AND && !nop) || (op == OP_OR && nop)) {
|
||||
l1 = TestFilter((PFIL)filp->Arg(0), nop);
|
||||
l2 = TestFilter((PFIL)filp->Arg(1), nop);
|
||||
limit = MY_MIN(l1, l2);
|
||||
} else if (op == OP_NOT)
|
||||
limit = TestFilter((PFIL)filp->Arg(0), !nop);
|
||||
|
||||
return limit;
|
||||
} // end of TestFilter
|
||||
|
||||
/***********************************************************************/
|
||||
/* Allocate source column description block. */
|
||||
/***********************************************************************/
|
||||
PCOL TDBVIR::MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n)
|
||||
{
|
||||
PCOL colp = NULL;
|
||||
|
||||
if (cdp->IsVirtual()) {
|
||||
colp = new(g) VIRCOL(cdp, this, cprec, n);
|
||||
} else strcpy(g->Message,
|
||||
"Virtual tables accept only special or virtual columns");
|
||||
|
||||
return colp;
|
||||
} // end of MakeCol
|
||||
|
||||
/***********************************************************************/
|
||||
/* VIR Access Method opening routine. */
|
||||
/***********************************************************************/
|
||||
bool TDBVIR::OpenDB(PGLOBAL g)
|
||||
{
|
||||
if (Use == USE_OPEN) {
|
||||
// Table already open
|
||||
N = -1;
|
||||
return false;
|
||||
} // endif use
|
||||
|
||||
if (Mode != MODE_READ) {
|
||||
strcpy(g->Message, "Virtual tables are read only");
|
||||
return true;
|
||||
} // endif Mode
|
||||
|
||||
/*********************************************************************/
|
||||
/* Analyze the filter and refine Size accordingly. */
|
||||
/*********************************************************************/
|
||||
if (To_Filter)
|
||||
Size = TestFilter(To_Filter, false);
|
||||
|
||||
return false;
|
||||
} // end of OpenDB
|
||||
|
||||
/***********************************************************************/
|
||||
/* Data Base read routine for the VIR access method. */
|
||||
/***********************************************************************/
|
||||
int TDBVIR::ReadDB(PGLOBAL g)
|
||||
{
|
||||
return (++N >= Size) ? RC_EF : RC_OK;
|
||||
} // end of ReadDB
|
||||
|
||||
/***********************************************************************/
|
||||
/* WriteDB: Data Base write routine for the VIR access methods. */
|
||||
/***********************************************************************/
|
||||
int TDBVIR::WriteDB(PGLOBAL g)
|
||||
{
|
||||
sprintf(g->Message, MSG(VIR_READ_ONLY), To_Def->GetType());
|
||||
return RC_FX;
|
||||
} // end of WriteDB
|
||||
|
||||
/***********************************************************************/
|
||||
/* Data Base delete line routine for the VIR access methods. */
|
||||
/***********************************************************************/
|
||||
int TDBVIR::DeleteDB(PGLOBAL g, int irc)
|
||||
{
|
||||
sprintf(g->Message, MSG(VIR_NO_DELETE), To_Def->GetType());
|
||||
return RC_FX;
|
||||
} // end of DeleteDB
|
||||
|
||||
/* ---------------------------- VIRCOL ------------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* VIRCOL public constructor. */
|
||||
/***********************************************************************/
|
||||
VIRCOL::VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am)
|
||||
: COLBLK(cdp, tdbp, i)
|
||||
{
|
||||
if (cprec) {
|
||||
Next = cprec->GetNext();
|
||||
cprec->SetNext(this);
|
||||
} else {
|
||||
Next = tdbp->GetColumns();
|
||||
tdbp->SetColumns(this);
|
||||
} // endif cprec
|
||||
|
||||
} // end of VIRCOL constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* ReadColumn: */
|
||||
/***********************************************************************/
|
||||
void VIRCOL::ReadColumn(PGLOBAL g)
|
||||
{
|
||||
// This should never be called
|
||||
sprintf(g->Message, "ReadColumn: Column %s is not virtual", Name);
|
||||
longjmp(g->jumper[g->jump_level], TYPE_COLBLK);
|
||||
} // end of ReadColumn
|
||||
|
||||
/* ---------------------------TDBVICL class -------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetResult: Get the list the VIRTUAL table columns. */
|
||||
/***********************************************************************/
|
||||
PQRYRES TDBVICL::GetResult(PGLOBAL g)
|
||||
{
|
||||
return VirColumns(g, NULL, NULL, false);
|
||||
} // end of GetResult
|
||||
|
||||
/* ------------------------- End of Virtual -------------------------- */
|
||||
110
storage/connect/tabvir.h
Normal file
110
storage/connect/tabvir.h
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
/**************** tdbvir H Declares Source Code File (.H) **************/
|
||||
/* Name: TDBVIR.H Version 1.1 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 2006-2014 */
|
||||
/* */
|
||||
/* This file contains the VIR classes declare code. */
|
||||
/***********************************************************************/
|
||||
typedef class VIRDEF *PVIRDEF;
|
||||
typedef class TDBVIR *PTDBVIR;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Return the unique column definition to MariaDB. */
|
||||
/***********************************************************************/
|
||||
PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info);
|
||||
|
||||
/* --------------------------- VIR classes --------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* VIR: Virtual table used to select constant values. */
|
||||
/***********************************************************************/
|
||||
class DllExport VIRDEF : public TABDEF { /* Logical table description */
|
||||
public:
|
||||
// Constructor
|
||||
VIRDEF(void) {}
|
||||
|
||||
// Implementation
|
||||
virtual const char *GetType(void) {return "VIRTUAL";}
|
||||
|
||||
// Methods
|
||||
virtual bool DefineAM(PGLOBAL, LPCSTR, int) {Pseudo = 3; return false;}
|
||||
virtual int Indexable(void) {return 3;}
|
||||
virtual PTDB GetTable(PGLOBAL g, MODE m);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
}; // end of VIRDEF
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the Virtual table. */
|
||||
/***********************************************************************/
|
||||
class DllExport TDBVIR : public TDBASE {
|
||||
public:
|
||||
// Constructors
|
||||
TDBVIR(PVIRDEF tdp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_VIR;}
|
||||
|
||||
// Methods
|
||||
virtual int GetRecpos(void) {return N;}
|
||||
virtual bool SetRecpos(PGLOBAL g, int recpos)
|
||||
{N = recpos - 2; return false;}
|
||||
virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;}
|
||||
int TestFilter(PFIL filp, bool nop);
|
||||
|
||||
// Database routines
|
||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||
virtual int Cardinality(PGLOBAL g) {return (g) ? Size : 1;}
|
||||
virtual int GetMaxSize(PGLOBAL g) {return Size;}
|
||||
virtual bool OpenDB(PGLOBAL g);
|
||||
virtual int ReadDB(PGLOBAL g);
|
||||
virtual int WriteDB(PGLOBAL g);
|
||||
virtual int DeleteDB(PGLOBAL g, int irc);
|
||||
virtual void CloseDB(PGLOBAL g) {}
|
||||
|
||||
protected:
|
||||
// Members
|
||||
int Size; // Table size
|
||||
int N; // The VIR table current position
|
||||
}; // end of class TDBVIR
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class VIRCOL: VIRTUAL access method column descriptor. */
|
||||
/***********************************************************************/
|
||||
class VIRCOL : public COLBLK {
|
||||
friend class TDBVIR;
|
||||
public:
|
||||
// Constructors
|
||||
VIRCOL(PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i, PSZ am = "VIRTUAL");
|
||||
|
||||
// Implementation
|
||||
virtual int GetAmType(void) {return TYPE_AM_VIR;}
|
||||
|
||||
// Methods
|
||||
virtual void ReadColumn(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
// Default constructor not to be used
|
||||
VIRCOL(void) {}
|
||||
|
||||
// No additional members
|
||||
}; // end of class VIRCOL
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the VIR column catalog table. */
|
||||
/***********************************************************************/
|
||||
class TDBVICL : public TDBCAT {
|
||||
public:
|
||||
// Constructor
|
||||
TDBVICL(PVIRDEF tdp) : TDBCAT(tdp) {}
|
||||
|
||||
// Methods
|
||||
virtual int Cardinality(PGLOBAL g) {return 2;} // Avoid DBUG_ASSERT
|
||||
|
||||
protected:
|
||||
// Specific routines
|
||||
virtual PQRYRES GetResult(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
}; // end of class TDBVICL
|
||||
|
|
@ -21,8 +21,6 @@
|
|||
#include "plgcnx.h" // For DB types
|
||||
#include "resource.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* ------------------- Functions WMI Column info --------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -1,151 +1,151 @@
|
|||
// TABWMI.H Olivier Bertrand 2012
|
||||
// WMI: Virtual table to Get WMI information
|
||||
#define _WIN32_DCOM
|
||||
#include <wbemidl.h>
|
||||
# pragma comment(lib, "wbemuuid.lib")
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <comdef.h>
|
||||
|
||||
/***********************************************************************/
|
||||
/* Definitions. */
|
||||
/***********************************************************************/
|
||||
typedef class WMIDEF *PWMIDEF;
|
||||
typedef class TDBWMI *PTDBWMI;
|
||||
typedef class WMICOL *PWMICOL;
|
||||
typedef class TDBWCL *PTDBWCL;
|
||||
typedef class WCLCOL *PWCLCOL;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Structure used by WMI column info functions. */
|
||||
/***********************************************************************/
|
||||
typedef struct _WMIutil {
|
||||
IWbemServices *Svc;
|
||||
IWbemClassObject *Cobj;
|
||||
} WMIUTIL, *PWMIUT;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Functions used externally. */
|
||||
/***********************************************************************/
|
||||
PQRYRES WMIColumns(PGLOBAL g, char *nsp, char *cls, bool info);
|
||||
|
||||
/* -------------------------- WMI classes ---------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* WMI: Virtual table to get the WMI information. */
|
||||
/***********************************************************************/
|
||||
class WMIDEF : public TABDEF { /* Logical table description */
|
||||
friend class TDBWMI;
|
||||
friend class TDBWCL;
|
||||
friend class TDBWCX;
|
||||
public:
|
||||
// Constructor
|
||||
WMIDEF(void) {Pseudo = 3; Nspace = NULL; Wclass = NULL; Ems = 0;}
|
||||
|
||||
// Implementation
|
||||
virtual const char *GetType(void) {return "WMI";}
|
||||
|
||||
// Methods
|
||||
virtual bool DefineAM(PGLOBAL g, LPCSTR am, int poff);
|
||||
virtual PTDB GetTable(PGLOBAL g, MODE m);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
char *Nspace;
|
||||
char *Wclass;
|
||||
int Ems;
|
||||
}; // end of WMIDEF
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the WMI table. */
|
||||
/***********************************************************************/
|
||||
class TDBWMI : public TDBASE {
|
||||
friend class WMICOL;
|
||||
public:
|
||||
// Constructor
|
||||
TDBWMI(PWMIDEF tdp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_WMI;}
|
||||
|
||||
// Methods
|
||||
virtual int GetRecpos(void);
|
||||
virtual int GetProgCur(void) {return N;}
|
||||
virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;}
|
||||
|
||||
// Database routines
|
||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||
// TABWMI.H Olivier Bertrand 2012
|
||||
// WMI: Virtual table to Get WMI information
|
||||
#define _WIN32_DCOM
|
||||
#include <wbemidl.h>
|
||||
# pragma comment(lib, "wbemuuid.lib")
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <comdef.h>
|
||||
|
||||
/***********************************************************************/
|
||||
/* Definitions. */
|
||||
/***********************************************************************/
|
||||
typedef class WMIDEF *PWMIDEF;
|
||||
typedef class TDBWMI *PTDBWMI;
|
||||
typedef class WMICOL *PWMICOL;
|
||||
typedef class TDBWCL *PTDBWCL;
|
||||
typedef class WCLCOL *PWCLCOL;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Structure used by WMI column info functions. */
|
||||
/***********************************************************************/
|
||||
typedef struct _WMIutil {
|
||||
IWbemServices *Svc;
|
||||
IWbemClassObject *Cobj;
|
||||
} WMIUTIL, *PWMIUT;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Functions used externally. */
|
||||
/***********************************************************************/
|
||||
PQRYRES WMIColumns(PGLOBAL g, char *nsp, char *cls, bool info);
|
||||
|
||||
/* -------------------------- WMI classes ---------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* WMI: Virtual table to get the WMI information. */
|
||||
/***********************************************************************/
|
||||
class WMIDEF : public TABDEF { /* Logical table description */
|
||||
friend class TDBWMI;
|
||||
friend class TDBWCL;
|
||||
friend class TDBWCX;
|
||||
public:
|
||||
// Constructor
|
||||
WMIDEF(void) {Pseudo = 3; Nspace = NULL; Wclass = NULL; Ems = 0;}
|
||||
|
||||
// Implementation
|
||||
virtual const char *GetType(void) {return "WMI";}
|
||||
|
||||
// Methods
|
||||
virtual bool DefineAM(PGLOBAL g, LPCSTR am, int poff);
|
||||
virtual PTDB GetTable(PGLOBAL g, MODE m);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
char *Nspace;
|
||||
char *Wclass;
|
||||
int Ems;
|
||||
}; // end of WMIDEF
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the WMI table. */
|
||||
/***********************************************************************/
|
||||
class TDBWMI : public TDBASE {
|
||||
friend class WMICOL;
|
||||
public:
|
||||
// Constructor
|
||||
TDBWMI(PWMIDEF tdp);
|
||||
|
||||
// Implementation
|
||||
virtual AMT GetAmType(void) {return TYPE_AM_WMI;}
|
||||
|
||||
// Methods
|
||||
virtual int GetRecpos(void);
|
||||
virtual int GetProgCur(void) {return N;}
|
||||
virtual int RowNumber(PGLOBAL g, bool b = false) {return N + 1;}
|
||||
|
||||
// Database routines
|
||||
virtual PCOL MakeCol(PGLOBAL g, PCOLDEF cdp, PCOL cprec, int n);
|
||||
virtual int Cardinality(PGLOBAL g) {return GetMaxSize(g);}
|
||||
virtual int GetMaxSize(PGLOBAL g);
|
||||
virtual bool OpenDB(PGLOBAL g);
|
||||
virtual int ReadDB(PGLOBAL g);
|
||||
virtual int WriteDB(PGLOBAL g);
|
||||
virtual int DeleteDB(PGLOBAL g, int irc);
|
||||
virtual void CloseDB(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
// Specific routines
|
||||
bool Initialize(PGLOBAL g);
|
||||
char *MakeWQL(PGLOBAL g);
|
||||
void DoubleSlash(PGLOBAL g);
|
||||
bool GetWMIInfo(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
IWbemServices *Svc; // IWbemServices pointer
|
||||
IEnumWbemClassObject *Enumerator;
|
||||
IWbemClassObject *ClsObj;
|
||||
char *Nspace; // Namespace
|
||||
char *Wclass; // Class name
|
||||
char *ObjPath; // Used for direct access
|
||||
char *Kvp; // Itou
|
||||
int Ems; // Estimated max size
|
||||
PCOL Kcol; // Key column
|
||||
HRESULT Res;
|
||||
PVBLK Vbp;
|
||||
bool Init;
|
||||
bool Done;
|
||||
ULONG Rc;
|
||||
int N; // Row number
|
||||
}; // end of class TDBWMI
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class WMICOL: WMI Address column. */
|
||||
/***********************************************************************/
|
||||
class WMICOL : public COLBLK {
|
||||
friend class TDBWMI;
|
||||
public:
|
||||
// Constructors
|
||||
WMICOL(PCOLDEF cdp, PTDB tdbp, int n);
|
||||
|
||||
// Implementation
|
||||
virtual int GetAmType(void) {return TYPE_AM_WMI;}
|
||||
|
||||
// Methods
|
||||
virtual void ReadColumn(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
WMICOL(void) {} // Default constructor not to be used
|
||||
|
||||
// Members
|
||||
PTDBWMI Tdbp; // Points to WMI table block
|
||||
VARIANT Prop; // Property value
|
||||
CIMTYPE Ctype; // CIM Type
|
||||
HRESULT Res;
|
||||
}; // end of class WMICOL
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the WMI catalog table. */
|
||||
/***********************************************************************/
|
||||
class TDBWCL : public TDBCAT {
|
||||
public:
|
||||
// Constructor
|
||||
TDBWCL(PWMIDEF tdp);
|
||||
|
||||
protected:
|
||||
// Specific routines
|
||||
virtual PQRYRES GetResult(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
char *Nsp; // Name space
|
||||
char *Cls; // Class
|
||||
}; // end of class TDBWCL
|
||||
virtual int GetMaxSize(PGLOBAL g);
|
||||
virtual bool OpenDB(PGLOBAL g);
|
||||
virtual int ReadDB(PGLOBAL g);
|
||||
virtual int WriteDB(PGLOBAL g);
|
||||
virtual int DeleteDB(PGLOBAL g, int irc);
|
||||
virtual void CloseDB(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
// Specific routines
|
||||
bool Initialize(PGLOBAL g);
|
||||
char *MakeWQL(PGLOBAL g);
|
||||
void DoubleSlash(PGLOBAL g);
|
||||
bool GetWMIInfo(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
IWbemServices *Svc; // IWbemServices pointer
|
||||
IEnumWbemClassObject *Enumerator;
|
||||
IWbemClassObject *ClsObj;
|
||||
char *Nspace; // Namespace
|
||||
char *Wclass; // Class name
|
||||
char *ObjPath; // Used for direct access
|
||||
char *Kvp; // Itou
|
||||
int Ems; // Estimated max size
|
||||
PCOL Kcol; // Key column
|
||||
HRESULT Res;
|
||||
PVBLK Vbp;
|
||||
bool Init;
|
||||
bool Done;
|
||||
ULONG Rc;
|
||||
int N; // Row number
|
||||
}; // end of class TDBWMI
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class WMICOL: WMI Address column. */
|
||||
/***********************************************************************/
|
||||
class WMICOL : public COLBLK {
|
||||
friend class TDBWMI;
|
||||
public:
|
||||
// Constructors
|
||||
WMICOL(PCOLDEF cdp, PTDB tdbp, int n);
|
||||
|
||||
// Implementation
|
||||
virtual int GetAmType(void) {return TYPE_AM_WMI;}
|
||||
|
||||
// Methods
|
||||
virtual void ReadColumn(PGLOBAL g);
|
||||
|
||||
protected:
|
||||
WMICOL(void) {} // Default constructor not to be used
|
||||
|
||||
// Members
|
||||
PTDBWMI Tdbp; // Points to WMI table block
|
||||
VARIANT Prop; // Property value
|
||||
CIMTYPE Ctype; // CIM Type
|
||||
HRESULT Res;
|
||||
}; // end of class WMICOL
|
||||
|
||||
/***********************************************************************/
|
||||
/* This is the class declaration for the WMI catalog table. */
|
||||
/***********************************************************************/
|
||||
class TDBWCL : public TDBCAT {
|
||||
public:
|
||||
// Constructor
|
||||
TDBWCL(PWMIDEF tdp);
|
||||
|
||||
protected:
|
||||
// Specific routines
|
||||
virtual PQRYRES GetResult(PGLOBAL g);
|
||||
|
||||
// Members
|
||||
char *Nsp; // Name space
|
||||
char *Cls; // Class
|
||||
}; // end of class TDBWCL
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@
|
|||
#include "ha_connect.h"
|
||||
#include "mycat.h"
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/* -------------- Implementation of the XCOL classes ---------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
@ -184,8 +182,9 @@ bool TDBXCL::OpenDB(PGLOBAL g)
|
|||
/* Check and initialize the subtable columns. */
|
||||
/*********************************************************************/
|
||||
for (PCOL cp = Columns; cp; cp = cp->GetNext())
|
||||
if (((PPRXCOL)cp)->Init(g))
|
||||
return TRUE;
|
||||
if (!cp->IsSpecial())
|
||||
if (((PPRXCOL)cp)->Init(g))
|
||||
return TRUE;
|
||||
|
||||
/*********************************************************************/
|
||||
/* Physically open the object table. */
|
||||
|
|
@ -267,6 +266,7 @@ bool XCLCOL::Init(PGLOBAL g, PTDBASE tp)
|
|||
void XCLCOL::ReadColumn(PGLOBAL g)
|
||||
{
|
||||
if (((PTDBXCL)To_Tdb)->New) {
|
||||
Colp->Reset(); // Moved here in case of failed filtering
|
||||
Colp->Eval(g);
|
||||
strncpy(Cbuf, To_Val->GetCharValue(), Colp->GetLength());
|
||||
Cbuf[Colp->GetLength()] = 0;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class XCLCOL : public PRXCOL {
|
|||
XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
|
||||
|
||||
// Methods
|
||||
virtual void Reset(void) {Colp->Reset();} // Evaluated only by TDBXCL
|
||||
virtual void Reset(void) {} // Evaluated only by TDBXCL
|
||||
virtual void ReadColumn(PGLOBAL g);
|
||||
virtual bool Init(PGLOBAL g, PTDBASE tp = NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,7 @@
|
|||
#include "tabxml.h"
|
||||
#include "tabmul.h"
|
||||
|
||||
extern "C" {
|
||||
extern char version[];
|
||||
extern int trace;
|
||||
} // "C"
|
||||
extern "C" char version[];
|
||||
|
||||
#if defined(WIN32) && defined(DOMDOC_SUPPORT)
|
||||
#define XMLSUP "MS-DOM"
|
||||
|
|
|
|||
|
|
@ -47,14 +47,17 @@
|
|||
#include "user_connect.h"
|
||||
#include "mycat.h"
|
||||
|
||||
extern "C" int trace;
|
||||
extern uint worksize;
|
||||
|
||||
/****************************************************************************/
|
||||
/* Initialize the user_connect static member. */
|
||||
/****************************************************************************/
|
||||
PCONNECT user_connect::to_users= NULL;
|
||||
|
||||
/****************************************************************************/
|
||||
/* Get the work_size SESSION variable value . */
|
||||
/****************************************************************************/
|
||||
uint GetWorkSize(void);
|
||||
void SetWorkSize(uint);
|
||||
|
||||
/* -------------------------- class user_connect -------------------------- */
|
||||
|
||||
/****************************************************************************/
|
||||
|
|
@ -91,6 +94,7 @@ user_connect::~user_connect()
|
|||
bool user_connect::user_init()
|
||||
{
|
||||
// Initialize Plug-like environment
|
||||
uint worksize= GetWorkSize();
|
||||
PACTIVITY ap= NULL;
|
||||
PDBUSER dup= NULL;
|
||||
|
||||
|
|
@ -143,6 +147,8 @@ void user_connect::SetHandler(ha_connect *hc)
|
|||
bool user_connect::CheckCleanup(void)
|
||||
{
|
||||
if (thdp->query_id > last_query_id) {
|
||||
uint worksize= GetWorkSize();
|
||||
|
||||
PlugCleanup(g, true);
|
||||
|
||||
if (g->Sarea_Size != worksize) {
|
||||
|
|
@ -152,7 +158,7 @@ bool user_connect::CheckCleanup(void)
|
|||
// Check whether the work area size was changed
|
||||
if (!(g->Sarea = PlugAllocMem(g, worksize))) {
|
||||
g->Sarea = PlugAllocMem(g, g->Sarea_Size);
|
||||
worksize = g->Sarea_Size; // Was too big
|
||||
SetWorkSize(g->Sarea_Size); // Was too big
|
||||
} else
|
||||
g->Sarea_Size = worksize; // Ok
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@
|
|||
#define CheckBlanks assert(!Blanks);
|
||||
#define CheckParms(V, N) ChkIndx(N); ChkTyp(V);
|
||||
|
||||
extern "C" int trace;
|
||||
extern MBLOCK Nmblk; /* Used to initialize MBLOCK's */
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
#include "global.h"
|
||||
#include "plgdbsem.h"
|
||||
#include "preparse.h" // For DATPAR
|
||||
//#include "value.h"
|
||||
#include "valblk.h"
|
||||
#define NO_FUNC // Already defined in ODBConn
|
||||
#include "plgcnx.h" // For DB types
|
||||
|
|
@ -68,12 +67,6 @@
|
|||
|
||||
#define FOURYEARS 126230400 // Four years in seconds (1 leap)
|
||||
|
||||
/***********************************************************************/
|
||||
/* Static variables. */
|
||||
/***********************************************************************/
|
||||
|
||||
extern "C" int trace;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Initialize the DTVAL static member. */
|
||||
/***********************************************************************/
|
||||
|
|
@ -1019,8 +1012,11 @@ TYPVAL<PSZ>::TYPVAL(PGLOBAL g, PSZ s, int n, int c)
|
|||
|
||||
if (!s) {
|
||||
if (g) {
|
||||
Strp = (char *)PlugSubAlloc(g, NULL, Len + 1);
|
||||
Strp[Len] = '\0';
|
||||
if ((Strp = (char *)PlgDBSubAlloc(g, NULL, Len + 1)))
|
||||
Strp[Len] = '\0';
|
||||
else
|
||||
Len = 0;
|
||||
|
||||
} else
|
||||
assert(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ class DllExport TYPVAL<PSZ>: public VALUE {
|
|||
virtual bool FormatValue(PVAL vp, char *fmt);
|
||||
virtual bool SetConstFormat(PGLOBAL, FORMAT&);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
PSZ Strp;
|
||||
bool Ci; // true if case insensitive
|
||||
|
|
@ -283,6 +284,7 @@ class DllExport DECVAL: public TYPVAL<PSZ> {
|
|||
virtual bool IsEqual(PVAL vp, bool chktype);
|
||||
virtual int CompareValue(PVAL vp);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
}; // end of class DECVAL
|
||||
|
||||
|
|
@ -337,6 +339,7 @@ class DllExport BINVAL: public VALUE {
|
|||
virtual bool FormatValue(PVAL vp, char *fmt);
|
||||
virtual bool SetConstFormat(PGLOBAL, FORMAT&);
|
||||
|
||||
protected:
|
||||
// Members
|
||||
void *Binp;
|
||||
char *Chrp;
|
||||
|
|
|
|||
|
|
@ -58,12 +58,11 @@
|
|||
#endif
|
||||
|
||||
/***********************************************************************/
|
||||
/* DB static external variables. */
|
||||
/* DB external variables. */
|
||||
/***********************************************************************/
|
||||
extern MBLOCK Nmblk; /* Used to initialize MBLOCK's */
|
||||
extern "C" int trace;
|
||||
#if defined(XMAP)
|
||||
extern bool xmap;
|
||||
extern my_bool xmap;
|
||||
#endif // XMAP
|
||||
|
||||
/***********************************************************************/
|
||||
|
|
|
|||
|
|
@ -1,186 +1,371 @@
|
|||
/************ Xobject C++ Functions Source Code File (.CPP) ************/
|
||||
/* Name: XOBJECT.CPP Version 2.3 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
||||
/* */
|
||||
/* This file contains base XOBJECT class functions. */
|
||||
/* Also here is the implementation of the CONSTANT class. */
|
||||
/***********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include mariaDB header file. */
|
||||
/***********************************************************************/
|
||||
#include "my_global.h"
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include required application header files */
|
||||
/* global.h is header containing all global Plug declarations. */
|
||||
/* plgdbsem.h is header containing the DB applic. declarations. */
|
||||
/***********************************************************************/
|
||||
#include "global.h"
|
||||
#include "plgdbsem.h"
|
||||
#include "xobject.h"
|
||||
|
||||
/***********************************************************************/
|
||||
/* Macro definitions. */
|
||||
/***********************************************************************/
|
||||
#if defined(_DEBUG) || defined(DEBTRACE)
|
||||
#define ASSERT(B) assert(B);
|
||||
#else
|
||||
#define ASSERT(B)
|
||||
#endif
|
||||
|
||||
/***********************************************************************/
|
||||
/* The one and only needed void object. */
|
||||
/***********************************************************************/
|
||||
XVOID Xvoid;
|
||||
PXOB const pXVOID = &Xvoid; // Pointer used by other classes
|
||||
|
||||
/* ------------------------- Class XOBJECT --------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetCharValue: returns the Result value as a char string. */
|
||||
/* Using GetCharValue provides no conversion from numeric types. */
|
||||
/***********************************************************************/
|
||||
PSZ XOBJECT::GetCharValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetCharValue();
|
||||
} // end of GetCharValue()
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetShortValue: returns the Result value as a short integer. */
|
||||
/***********************************************************************/
|
||||
short XOBJECT::GetShortValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetShortValue();
|
||||
} // end of GetShortValue
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetIntValue: returns the Result value as a int integer. */
|
||||
/***********************************************************************/
|
||||
int XOBJECT::GetIntValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetIntValue();
|
||||
} // end of GetIntValue
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetFloatValue: returns the Result value as a double float. */
|
||||
/***********************************************************************/
|
||||
double XOBJECT::GetFloatValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetFloatValue();
|
||||
} // end of GetFloatValue
|
||||
|
||||
/* ------------------------- Class CONSTANT -------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* CONSTANT public constructor. */
|
||||
/***********************************************************************/
|
||||
CONSTANT::CONSTANT(PGLOBAL g, void *value, short type)
|
||||
{
|
||||
if (!(Value = AllocateValue(g, value, (int)type)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
Constant = true;
|
||||
} // end of CONSTANT constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* CONSTANT public constructor. */
|
||||
/***********************************************************************/
|
||||
CONSTANT::CONSTANT(PGLOBAL g, int n)
|
||||
{
|
||||
if (!(Value = AllocateValue(g, &n, TYPE_INT)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
Constant = true;
|
||||
} // end of CONSTANT constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetLengthEx: returns an evaluation of the constant string length. */
|
||||
/* Note: When converting from token to string, length has to be */
|
||||
/* specified but we need the domain length, not the value length. */
|
||||
/***********************************************************************/
|
||||
int CONSTANT::GetLengthEx(void)
|
||||
{
|
||||
return Value->GetValLen();
|
||||
} // end of GetLengthEx
|
||||
|
||||
/***********************************************************************/
|
||||
/* Convert a constant to the given type. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Convert(PGLOBAL g, int newtype)
|
||||
{
|
||||
if (Value->GetType() != newtype)
|
||||
if (!(Value = AllocateValue(g, Value, newtype)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
} // end of Convert
|
||||
|
||||
/***********************************************************************/
|
||||
/* Compare: returns true if this object is equivalent to xp. */
|
||||
/***********************************************************************/
|
||||
bool CONSTANT::Compare(PXOB xp)
|
||||
{
|
||||
if (this == xp)
|
||||
return true;
|
||||
else if (xp->GetType() != TYPE_CONST)
|
||||
return false;
|
||||
else
|
||||
return Value->IsEqual(xp->GetValue(), true);
|
||||
|
||||
} // end of Compare
|
||||
|
||||
#if 0
|
||||
/***********************************************************************/
|
||||
/* Rephrase: temporary implementation used by PlugRephraseSQL. */
|
||||
/***********************************************************************/
|
||||
bool CONSTANT::Rephrase(PGLOBAL g, PSZ work)
|
||||
{
|
||||
switch (Value->GetType()) {
|
||||
case TYPE_STRING:
|
||||
sprintf(work + strlen(work), "'%s'", Value->GetCharValue());
|
||||
break;
|
||||
case TYPE_SHORT:
|
||||
sprintf(work + strlen(work), "%hd", Value->GetShortValue());
|
||||
break;
|
||||
case TYPE_INT:
|
||||
case TYPE_DATE:
|
||||
sprintf(work + strlen(work), "%d", Value->GetIntValue());
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
sprintf(work + strlen(work), "%lf", Value->GetFloatValue());
|
||||
break;
|
||||
case TYPE_BIGINT:
|
||||
sprintf(work + strlen(work), "%lld", Value->GetBigintValue());
|
||||
break;
|
||||
case TYPE_TINY:
|
||||
sprintf(work + strlen(work), "%d", Value->GetTinyValue());
|
||||
break;
|
||||
default:
|
||||
sprintf(g->Message, MSG(BAD_CONST_TYPE), Value->GetType());
|
||||
return false;
|
||||
} // endswitch
|
||||
|
||||
return false;
|
||||
} // end of Rephrase
|
||||
#endif // 0
|
||||
|
||||
/***********************************************************************/
|
||||
/* Make file output of a constant object. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Print(PGLOBAL g, FILE *f, uint n)
|
||||
{
|
||||
Value->Print(g, f, n);
|
||||
} /* end of Print */
|
||||
|
||||
/***********************************************************************/
|
||||
/* Make string output of a constant object. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Print(PGLOBAL g, char *ps, uint z)
|
||||
{
|
||||
Value->Print(g, ps, z);
|
||||
} /* end of Print */
|
||||
/************ Xobject C++ Functions Source Code File (.CPP) ************/
|
||||
/* Name: XOBJECT.CPP Version 2.4 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
||||
/* */
|
||||
/* This file contains base XOBJECT class functions. */
|
||||
/* Also here is the implementation of the CONSTANT class. */
|
||||
/***********************************************************************/
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include mariaDB header file. */
|
||||
/***********************************************************************/
|
||||
#include "my_global.h"
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include required application header files */
|
||||
/* global.h is header containing all global Plug declarations. */
|
||||
/* plgdbsem.h is header containing the DB applic. declarations. */
|
||||
/***********************************************************************/
|
||||
#include "global.h"
|
||||
#include "plgdbsem.h"
|
||||
#include "xobject.h"
|
||||
|
||||
/***********************************************************************/
|
||||
/* Macro definitions. */
|
||||
/***********************************************************************/
|
||||
#if defined(_DEBUG) || defined(DEBTRACE)
|
||||
#define ASSERT(B) assert(B);
|
||||
#else
|
||||
#define ASSERT(B)
|
||||
#endif
|
||||
|
||||
/***********************************************************************/
|
||||
/* The one and only needed void object. */
|
||||
/***********************************************************************/
|
||||
XVOID Xvoid;
|
||||
PXOB const pXVOID = &Xvoid; // Pointer used by other classes
|
||||
|
||||
/* ------------------------- Class XOBJECT --------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetCharValue: returns the Result value as a char string. */
|
||||
/* Using GetCharValue provides no conversion from numeric types. */
|
||||
/***********************************************************************/
|
||||
PSZ XOBJECT::GetCharValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetCharValue();
|
||||
} // end of GetCharValue()
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetShortValue: returns the Result value as a short integer. */
|
||||
/***********************************************************************/
|
||||
short XOBJECT::GetShortValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetShortValue();
|
||||
} // end of GetShortValue
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetIntValue: returns the Result value as a int integer. */
|
||||
/***********************************************************************/
|
||||
int XOBJECT::GetIntValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetIntValue();
|
||||
} // end of GetIntValue
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetFloatValue: returns the Result value as a double float. */
|
||||
/***********************************************************************/
|
||||
double XOBJECT::GetFloatValue(void)
|
||||
{
|
||||
ASSERT(Value)
|
||||
return Value->GetFloatValue();
|
||||
} // end of GetFloatValue
|
||||
|
||||
/* ------------------------- Class CONSTANT -------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* CONSTANT public constructor. */
|
||||
/***********************************************************************/
|
||||
CONSTANT::CONSTANT(PGLOBAL g, void *value, short type)
|
||||
{
|
||||
if (!(Value = AllocateValue(g, value, (int)type)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
Constant = true;
|
||||
} // end of CONSTANT constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* CONSTANT public constructor. */
|
||||
/***********************************************************************/
|
||||
CONSTANT::CONSTANT(PGLOBAL g, int n)
|
||||
{
|
||||
if (!(Value = AllocateValue(g, &n, TYPE_INT)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
Constant = true;
|
||||
} // end of CONSTANT constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* GetLengthEx: returns an evaluation of the constant string length. */
|
||||
/* Note: When converting from token to string, length has to be */
|
||||
/* specified but we need the domain length, not the value length. */
|
||||
/***********************************************************************/
|
||||
int CONSTANT::GetLengthEx(void)
|
||||
{
|
||||
return Value->GetValLen();
|
||||
} // end of GetLengthEx
|
||||
|
||||
/***********************************************************************/
|
||||
/* Convert a constant to the given type. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Convert(PGLOBAL g, int newtype)
|
||||
{
|
||||
if (Value->GetType() != newtype)
|
||||
if (!(Value = AllocateValue(g, Value, newtype)))
|
||||
longjmp(g->jumper[g->jump_level], TYPE_CONST);
|
||||
|
||||
} // end of Convert
|
||||
|
||||
/***********************************************************************/
|
||||
/* Compare: returns true if this object is equivalent to xp. */
|
||||
/***********************************************************************/
|
||||
bool CONSTANT::Compare(PXOB xp)
|
||||
{
|
||||
if (this == xp)
|
||||
return true;
|
||||
else if (xp->GetType() != TYPE_CONST)
|
||||
return false;
|
||||
else
|
||||
return Value->IsEqual(xp->GetValue(), true);
|
||||
|
||||
} // end of Compare
|
||||
|
||||
#if 0
|
||||
/***********************************************************************/
|
||||
/* Rephrase: temporary implementation used by PlugRephraseSQL. */
|
||||
/***********************************************************************/
|
||||
bool CONSTANT::Rephrase(PGLOBAL g, PSZ work)
|
||||
{
|
||||
switch (Value->GetType()) {
|
||||
case TYPE_STRING:
|
||||
sprintf(work + strlen(work), "'%s'", Value->GetCharValue());
|
||||
break;
|
||||
case TYPE_SHORT:
|
||||
sprintf(work + strlen(work), "%hd", Value->GetShortValue());
|
||||
break;
|
||||
case TYPE_INT:
|
||||
case TYPE_DATE:
|
||||
sprintf(work + strlen(work), "%d", Value->GetIntValue());
|
||||
break;
|
||||
case TYPE_DOUBLE:
|
||||
sprintf(work + strlen(work), "%lf", Value->GetFloatValue());
|
||||
break;
|
||||
case TYPE_BIGINT:
|
||||
sprintf(work + strlen(work), "%lld", Value->GetBigintValue());
|
||||
break;
|
||||
case TYPE_TINY:
|
||||
sprintf(work + strlen(work), "%d", Value->GetTinyValue());
|
||||
break;
|
||||
default:
|
||||
sprintf(g->Message, MSG(BAD_CONST_TYPE), Value->GetType());
|
||||
return false;
|
||||
} // endswitch
|
||||
|
||||
return false;
|
||||
} // end of Rephrase
|
||||
#endif // 0
|
||||
|
||||
/***********************************************************************/
|
||||
/* Make file output of a constant object. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Print(PGLOBAL g, FILE *f, uint n)
|
||||
{
|
||||
Value->Print(g, f, n);
|
||||
} /* end of Print */
|
||||
|
||||
/***********************************************************************/
|
||||
/* Make string output of a constant object. */
|
||||
/***********************************************************************/
|
||||
void CONSTANT::Print(PGLOBAL g, char *ps, uint z)
|
||||
{
|
||||
Value->Print(g, ps, z);
|
||||
} /* end of Print */
|
||||
|
||||
/* -------------------------- Class STRING --------------------------- */
|
||||
|
||||
/***********************************************************************/
|
||||
/* STRING public constructor for new char values. Alloc Size must be */
|
||||
/* calculated because PlugSubAlloc rounds up size to multiple of 8. */
|
||||
/***********************************************************************/
|
||||
STRING::STRING(PGLOBAL g, uint n, char *str)
|
||||
{
|
||||
G = g;
|
||||
Length = (str) ? strlen(str) : 0;
|
||||
|
||||
if ((Strp = (PSZ)PlgDBSubAlloc(g, NULL, MY_MAX(n, Length) + 1))) {
|
||||
if (str)
|
||||
strcpy(Strp, str);
|
||||
else
|
||||
*Strp = 0;
|
||||
|
||||
Next = GetNext();
|
||||
Size = Next - Strp;
|
||||
} else {
|
||||
// This should normally never happen
|
||||
Next = NULL;
|
||||
Size = 0;
|
||||
} // endif Strp
|
||||
|
||||
} // end of STRING constructor
|
||||
|
||||
/***********************************************************************/
|
||||
/* Reallocate the string memory and return the (new) position. */
|
||||
/* If Next is equal to GetNext() this means that no new suballocation */
|
||||
/* has been done. Then we can just increase the size of the current */
|
||||
/* allocation and the Strp will remain pointing to the same memory. */
|
||||
/***********************************************************************/
|
||||
char *STRING::Realloc(uint len)
|
||||
{
|
||||
char *p;
|
||||
bool b = (Next == GetNext());
|
||||
|
||||
p = (char*)PlgDBSubAlloc(G, NULL, b ? len - Size : len);
|
||||
|
||||
if (!p) {
|
||||
// No more room in Sarea; this is very unlikely
|
||||
strcpy(G->Message, "No more room in work area");
|
||||
return NULL;
|
||||
} // endif p
|
||||
|
||||
if (b)
|
||||
p = Strp;
|
||||
|
||||
Next = GetNext();
|
||||
Size = Next - p;
|
||||
return p;
|
||||
} // end of Realloc
|
||||
|
||||
/***********************************************************************/
|
||||
/* Set a STRING new PSZ value. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Set(PSZ s)
|
||||
{
|
||||
if (!s)
|
||||
return false;
|
||||
|
||||
uint len = strlen(s) + 1;
|
||||
|
||||
if (len > Size) {
|
||||
char *p = Realloc(len);
|
||||
|
||||
if (!p)
|
||||
return true;
|
||||
else
|
||||
Strp = p;
|
||||
|
||||
} // endif n
|
||||
|
||||
strcpy(Strp, s);
|
||||
Length = len - 1;
|
||||
return false;
|
||||
} // end of Set
|
||||
|
||||
/***********************************************************************/
|
||||
/* Set a STRING new PSZ value. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Set(char *s, uint n)
|
||||
{
|
||||
if (!s)
|
||||
return false;
|
||||
|
||||
uint len = strnlen(s, n) + 1;
|
||||
|
||||
if (len > Size) {
|
||||
char *p = Realloc(len);
|
||||
|
||||
if (!p)
|
||||
return true;
|
||||
else
|
||||
Strp = p;
|
||||
|
||||
} // endif n
|
||||
|
||||
strncpy(Strp, s, n);
|
||||
Length = len - 1;
|
||||
return false;
|
||||
} // end of Set
|
||||
|
||||
/***********************************************************************/
|
||||
/* Append a PSZ to a STRING. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Append(PSZ s)
|
||||
{
|
||||
if (!s)
|
||||
return false;
|
||||
|
||||
uint len = Length + strlen(s) + 1;
|
||||
|
||||
if (len > Size) {
|
||||
char *p = Realloc(len);
|
||||
|
||||
if (!p)
|
||||
return true;
|
||||
else if (p != Strp) {
|
||||
strcpy(p, Strp);
|
||||
Strp = p;
|
||||
} // endif p
|
||||
|
||||
} // endif n
|
||||
|
||||
strcpy(Strp + Length, s);
|
||||
Length = len - 1;
|
||||
return false;
|
||||
} // end of Append
|
||||
|
||||
/***********************************************************************/
|
||||
/* Append a STRING to a STRING. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Append(STRING &str)
|
||||
{
|
||||
return Append(str.GetStr());
|
||||
} // end of Append
|
||||
|
||||
/***********************************************************************/
|
||||
/* Append a char to a STRING. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Append(char c)
|
||||
{
|
||||
if (Length + 2 > Size) {
|
||||
char *p = Realloc(Length + 2);
|
||||
|
||||
if (!p)
|
||||
return true;
|
||||
else if (p != Strp) {
|
||||
strcpy(p, Strp);
|
||||
Strp = p;
|
||||
} // endif p
|
||||
|
||||
} // endif n
|
||||
|
||||
Strp[Length++] = c;
|
||||
Strp[Length] = 0;
|
||||
return false;
|
||||
} // end of Append
|
||||
|
||||
/***********************************************************************/
|
||||
/* Resize to given length but only when last suballocated. */
|
||||
/* New size should be greater than string length. */
|
||||
/***********************************************************************/
|
||||
bool STRING::Resize(uint newsize)
|
||||
{
|
||||
if (Next == GetNext() && newsize > Length) {
|
||||
uint nsz = (((signed)newsize + 7) / 8) * 8;
|
||||
int diff = (signed)Size - (signed)nsz;
|
||||
PPOOLHEADER pp = (PPOOLHEADER)G->Sarea;
|
||||
|
||||
if ((signed)pp->FreeBlk + diff < 0)
|
||||
return true; // Out of memory
|
||||
|
||||
pp->To_Free -= diff;
|
||||
pp->FreeBlk += diff;
|
||||
Size = nsz;
|
||||
return false;
|
||||
} else
|
||||
return newsize > Size;
|
||||
|
||||
} // end of Resize
|
||||
|
||||
|
|
|
|||
|
|
@ -1,119 +1,159 @@
|
|||
/*************** Xobject H Declares Source Code File (.H) **************/
|
||||
/* Name: XOBJECT.H Version 2.4 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
||||
/* */
|
||||
/* This file contains the XOBJECT and derived classes declares. */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef __XOBJECT__H
|
||||
#define __XOBJECT__H
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include required application header files */
|
||||
/* block.h is header containing Block global declarations. */
|
||||
/***********************************************************************/
|
||||
#include "block.h"
|
||||
#include "valblk.h" // includes value.h
|
||||
|
||||
/***********************************************************************/
|
||||
/* Types used in some class definitions. */
|
||||
/***********************************************************************/
|
||||
//typedef struct _tabdesc *PTABD; // For friend setting
|
||||
|
||||
/***********************************************************************/
|
||||
/* The pointer to the one and only needed void object. */
|
||||
/***********************************************************************/
|
||||
extern PXOB const pXVOID;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class XOBJECT is the base class for all classes that can be used */
|
||||
/* in evaluation operations: FILTER, EXPRESSION, SCALF, FNC, COLBLK, */
|
||||
/* SELECT, FILTER as well as all the constant object types. */
|
||||
/***********************************************************************/
|
||||
class DllExport XOBJECT : public BLOCK {
|
||||
public:
|
||||
XOBJECT(void) {Value = NULL; Constant = false;}
|
||||
|
||||
// Implementation
|
||||
PVAL GetValue(void) {return Value;}
|
||||
bool IsConstant(void) {return Constant;}
|
||||
virtual int GetType(void) {return TYPE_XOBJECT;}
|
||||
virtual int GetResultType(void) {return TYPE_VOID;}
|
||||
virtual int GetKey(void) {return 0;}
|
||||
#if defined(_DEBUG)
|
||||
virtual void SetKey(int k) {assert(false);}
|
||||
#else // !_DEBUG
|
||||
virtual void SetKey(int k) {} // Only defined for COLBLK
|
||||
#endif // !_DEBUG
|
||||
virtual int GetLength(void) = 0;
|
||||
virtual int GetLengthEx(void) = 0;
|
||||
virtual PSZ GetCharValue(void);
|
||||
virtual short GetShortValue(void);
|
||||
virtual int GetIntValue(void);
|
||||
virtual double GetFloatValue(void);
|
||||
virtual int GetScale(void) = 0;
|
||||
|
||||
// Methods
|
||||
virtual void Reset(void) {}
|
||||
virtual bool Compare(PXOB) = 0;
|
||||
virtual bool Init(PGLOBAL) {return false;}
|
||||
virtual bool Eval(PGLOBAL) {return false;}
|
||||
virtual bool SetFormat(PGLOBAL, FORMAT&) = 0;
|
||||
|
||||
protected:
|
||||
PVAL Value; // The current value of the object.
|
||||
bool Constant; // true for an object having a constant value.
|
||||
}; // end of class XOBJECT
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class XVOID: represent a void (null) object. */
|
||||
/* Used to represent a void parameter for count(*) or for a filter. */
|
||||
/***********************************************************************/
|
||||
class DllExport XVOID : public XOBJECT {
|
||||
public:
|
||||
XVOID(void) {Constant = true;}
|
||||
|
||||
// Implementation
|
||||
virtual int GetType(void) {return TYPE_VOID;}
|
||||
virtual int GetLength(void) {return 0;}
|
||||
virtual int GetLengthEx(void) {return 0;}
|
||||
virtual PSZ GetCharValue(void) {return NULL;}
|
||||
virtual int GetIntValue(void) {return 0;}
|
||||
virtual double GetFloatValue(void) {return 0.0;}
|
||||
virtual int GetScale() {return 0;}
|
||||
|
||||
// Methods
|
||||
virtual bool Compare(PXOB xp) {return xp->GetType() == TYPE_VOID;}
|
||||
virtual bool SetFormat(PGLOBAL, FORMAT&) {return true;}
|
||||
}; // end of class XVOID
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class CONSTANT: represents a constant XOBJECT of any value type. */
|
||||
/* Note that the CONSTANT class is a friend of the VALUE class; */
|
||||
/***********************************************************************/
|
||||
class DllExport CONSTANT : public XOBJECT {
|
||||
public:
|
||||
CONSTANT(PGLOBAL g, void *value, short type);
|
||||
CONSTANT(PGLOBAL g, int n);
|
||||
CONSTANT(PVAL valp) {Value = valp; Constant = true;}
|
||||
|
||||
// Implementation
|
||||
virtual int GetType(void) {return TYPE_CONST;}
|
||||
virtual int GetResultType(void) {return Value->Type;}
|
||||
virtual int GetLength(void) {return Value->GetValLen();}
|
||||
virtual int GetScale() {return Value->GetValPrec();}
|
||||
virtual int GetLengthEx(void);
|
||||
|
||||
// Methods
|
||||
virtual bool Compare(PXOB xp);
|
||||
virtual bool SetFormat(PGLOBAL g, FORMAT& fmt)
|
||||
{return Value->SetConstFormat(g, fmt);}
|
||||
void Convert(PGLOBAL g, int newtype);
|
||||
void SetValue(PVAL vp) {Value = vp;}
|
||||
virtual void Print(PGLOBAL g, FILE *, uint);
|
||||
virtual void Print(PGLOBAL g, char *, uint);
|
||||
}; // end of class CONSTANT
|
||||
|
||||
#endif
|
||||
/*************** Xobject H Declares Source Code File (.H) **************/
|
||||
/* Name: XOBJECT.H Version 2.4 */
|
||||
/* */
|
||||
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
|
||||
/* */
|
||||
/* This file contains the XOBJECT and derived classes declares. */
|
||||
/***********************************************************************/
|
||||
|
||||
#ifndef __XOBJECT__H
|
||||
#define __XOBJECT__H
|
||||
|
||||
/***********************************************************************/
|
||||
/* Include required application header files */
|
||||
/* block.h is header containing Block global declarations. */
|
||||
/***********************************************************************/
|
||||
#include "block.h"
|
||||
#include "valblk.h" // includes value.h
|
||||
|
||||
/***********************************************************************/
|
||||
/* Types used in some class definitions. */
|
||||
/***********************************************************************/
|
||||
typedef class STRING *PSTRG;
|
||||
|
||||
/***********************************************************************/
|
||||
/* The pointer to the one and only needed void object. */
|
||||
/***********************************************************************/
|
||||
extern PXOB const pXVOID;
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class XOBJECT is the base class for all classes that can be used */
|
||||
/* in evaluation operations: FILTER, EXPRESSION, SCALF, FNC, COLBLK, */
|
||||
/* SELECT, FILTER as well as all the constant object types. */
|
||||
/***********************************************************************/
|
||||
class DllExport XOBJECT : public BLOCK {
|
||||
public:
|
||||
XOBJECT(void) {Value = NULL; Constant = false;}
|
||||
|
||||
// Implementation
|
||||
PVAL GetValue(void) {return Value;}
|
||||
bool IsConstant(void) {return Constant;}
|
||||
virtual int GetType(void) {return TYPE_XOBJECT;}
|
||||
virtual int GetResultType(void) {return TYPE_VOID;}
|
||||
virtual int GetKey(void) {return 0;}
|
||||
#if defined(_DEBUG)
|
||||
virtual void SetKey(int k) {assert(false);}
|
||||
#else // !_DEBUG
|
||||
virtual void SetKey(int k) {} // Only defined for COLBLK
|
||||
#endif // !_DEBUG
|
||||
virtual int GetLength(void) = 0;
|
||||
virtual int GetLengthEx(void) = 0;
|
||||
virtual PSZ GetCharValue(void);
|
||||
virtual short GetShortValue(void);
|
||||
virtual int GetIntValue(void);
|
||||
virtual double GetFloatValue(void);
|
||||
virtual int GetScale(void) = 0;
|
||||
|
||||
// Methods
|
||||
virtual void Reset(void) {}
|
||||
virtual bool Compare(PXOB) = 0;
|
||||
virtual bool Init(PGLOBAL) {return false;}
|
||||
virtual bool Eval(PGLOBAL) {return false;}
|
||||
virtual bool SetFormat(PGLOBAL, FORMAT&) = 0;
|
||||
|
||||
protected:
|
||||
PVAL Value; // The current value of the object.
|
||||
bool Constant; // true for an object having a constant value.
|
||||
}; // end of class XOBJECT
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class XVOID: represent a void (null) object. */
|
||||
/* Used to represent a void parameter for count(*) or for a filter. */
|
||||
/***********************************************************************/
|
||||
class DllExport XVOID : public XOBJECT {
|
||||
public:
|
||||
XVOID(void) {Constant = true;}
|
||||
|
||||
// Implementation
|
||||
virtual int GetType(void) {return TYPE_VOID;}
|
||||
virtual int GetLength(void) {return 0;}
|
||||
virtual int GetLengthEx(void) {return 0;}
|
||||
virtual PSZ GetCharValue(void) {return NULL;}
|
||||
virtual int GetIntValue(void) {return 0;}
|
||||
virtual double GetFloatValue(void) {return 0.0;}
|
||||
virtual int GetScale() {return 0;}
|
||||
|
||||
// Methods
|
||||
virtual bool Compare(PXOB xp) {return xp->GetType() == TYPE_VOID;}
|
||||
virtual bool SetFormat(PGLOBAL, FORMAT&) {return true;}
|
||||
}; // end of class XVOID
|
||||
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class CONSTANT: represents a constant XOBJECT of any value type. */
|
||||
/* Note that the CONSTANT class is a friend of the VALUE class; */
|
||||
/***********************************************************************/
|
||||
class DllExport CONSTANT : public XOBJECT {
|
||||
public:
|
||||
CONSTANT(PGLOBAL g, void *value, short type);
|
||||
CONSTANT(PGLOBAL g, int n);
|
||||
CONSTANT(PVAL valp) {Value = valp; Constant = true;}
|
||||
|
||||
// Implementation
|
||||
virtual int GetType(void) {return TYPE_CONST;}
|
||||
virtual int GetResultType(void) {return Value->Type;}
|
||||
virtual int GetLength(void) {return Value->GetValLen();}
|
||||
virtual int GetScale() {return Value->GetValPrec();}
|
||||
virtual int GetLengthEx(void);
|
||||
|
||||
// Methods
|
||||
virtual bool Compare(PXOB xp);
|
||||
virtual bool SetFormat(PGLOBAL g, FORMAT& fmt)
|
||||
{return Value->SetConstFormat(g, fmt);}
|
||||
void Convert(PGLOBAL g, int newtype);
|
||||
void SetValue(PVAL vp) {Value = vp;}
|
||||
virtual void Print(PGLOBAL g, FILE *, uint);
|
||||
virtual void Print(PGLOBAL g, char *, uint);
|
||||
}; // end of class CONSTANT
|
||||
|
||||
/***********************************************************************/
|
||||
/* Class STRING handles variable length char strings. */
|
||||
/* It is mainly used to avoid buffer overrun. */
|
||||
/***********************************************************************/
|
||||
class DllExport STRING : public BLOCK {
|
||||
public:
|
||||
// Constructor
|
||||
STRING(PGLOBAL g, uint n, PSZ str = NULL);
|
||||
|
||||
// Implementation
|
||||
inline int GetLength(void) {return (int)Length;}
|
||||
inline PSZ GetStr(void) {return Strp;}
|
||||
inline uint32 GetSize(void) {return Size;}
|
||||
|
||||
// Methods
|
||||
inline void Reset(void) {*Strp = 0;}
|
||||
bool Set(PSZ s);
|
||||
bool Set(char *s, uint n);
|
||||
bool Append(PSZ s);
|
||||
bool Append(STRING &str);
|
||||
bool Append(char c);
|
||||
bool Resize(uint n);
|
||||
inline void Trim(void) {(void)Resize(Length + 1);}
|
||||
inline void Chop(void) {if (Length) Strp[--Length] = 0;}
|
||||
inline void RepLast(char c) {if (Length) Strp[Length-1] = c;}
|
||||
inline void Truncate(uint n) {if (n < Length) {Strp[n] = 0; Length = n;}}
|
||||
|
||||
protected:
|
||||
char *Realloc(uint len);
|
||||
inline char *GetNext(void)
|
||||
{return ((char*)G->Sarea)+((PPOOLHEADER)G->Sarea)->To_Free;}
|
||||
|
||||
// Members
|
||||
PGLOBAL G; // To avoid parameter
|
||||
PSZ Strp; // The char string
|
||||
uint Length; // String length
|
||||
uint Size; // Allocated size
|
||||
char *Next; // Next alloc position
|
||||
}; // end of class STRING
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ class DllExport TDB: public BLOCK { // Table Descriptor Block.
|
|||
|
||||
// Methods
|
||||
virtual bool IsSame(PTDB tp) {return tp == this;}
|
||||
virtual bool IsSpecial(PSZ name) = 0;
|
||||
virtual bool GetBlockValues(PGLOBAL g) {return false;}
|
||||
virtual int Cardinality(PGLOBAL g) {return 0;}
|
||||
virtual int GetMaxSize(PGLOBAL) = 0;
|
||||
|
|
@ -158,6 +159,7 @@ class DllExport TDBASE : public TDB {
|
|||
// Methods
|
||||
virtual bool IsUsingTemp(PGLOBAL g) {return false;}
|
||||
virtual bool IsIndexed(void) {return false;}
|
||||
virtual bool IsSpecial(PSZ name);
|
||||
virtual PCATLG GetCat(void);
|
||||
virtual PSZ GetPath(void);
|
||||
virtual void PrintAM(FILE *f, char *m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue