diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 40d38fdc3b5..40b2a84d87d 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -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) # diff --git a/storage/connect/array.cpp b/storage/connect/array.cpp index 466d71d3b06..a2f537436c9 100644 --- a/storage/connect/array.cpp +++ b/storage/connect/array.cpp @@ -51,11 +51,6 @@ #define ASSERT(B) #endif -/***********************************************************************/ -/* Static variables. */ -/***********************************************************************/ -extern "C" int trace; - /***********************************************************************/ /* DB static external variables. */ /***********************************************************************/ diff --git a/storage/connect/blkfil.cpp b/storage/connect/blkfil.cpp index c1099261cef..802231b24ec 100644 --- a/storage/connect/blkfil.cpp +++ b/storage/connect/blkfil.cpp @@ -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 ------------------------ */ /***********************************************************************/ diff --git a/storage/connect/colblk.cpp b/storage/connect/colblk.cpp index 81ab1ad7245..78aba7bc494 100644 --- a/storage/connect/colblk.cpp +++ b/storage/connect/colblk.cpp @@ -23,8 +23,6 @@ #include "xindex.h" #include "xtable.h" -extern "C" int trace; - /***********************************************************************/ /* COLBLK protected constructor. */ /***********************************************************************/ diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index 381e437f9ec..87c782ba953 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -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; diff --git a/storage/connect/encas.h b/storage/connect/encas.h new file mode 100644 index 00000000000..37e97f211e6 --- /dev/null +++ b/storage/connect/encas.h @@ -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; diff --git a/storage/connect/english.msg b/storage/connect/english.msg new file mode 100644 index 00000000000..9f445ca6000 --- /dev/null +++ b/storage/connect/english.msg @@ -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" diff --git a/storage/connect/engmsg.h b/storage/connect/engmsg.h index ccced92261e..ad6dc6b5689 100644 --- a/storage/connect/engmsg.h +++ b/storage/connect/engmsg.h @@ -1,54 +1,10 @@ #define MSG_ACCESS_VIOLATN "Access violation" -#define MSG_ACT_ALLOC_FAIL "PlugInitLang: Activity allocation failed" -#define MSG_ADDVAL_ERROR "Error %d in AddValue" #define MSG_ADD_BAD_TYPE "Array add value type mismatch (%s -> %s)" -#define MSG_ADD_NULL_DOM "Adding string %s to a null domain" -#define MSG_ADPOS_IN_DICTP "ADPOS to work in User_Dictp" -#define MSG_AFTER " after: " -#define MSG_ALG_CHOICE_AUTO "Best algorithm choice is automatic" -#define MSG_ALG_CHOICE_BAD "Bad algorithm choice value, reset to AUTO" -#define MSG_ALG_CHOICE_QRY "Using Query algorithm" -#define MSG_ALG_CURLY_BRK "Algorithm choice depends on outer curly brackets" #define MSG_ALLOC_ERROR "Error allocating %s" -#define MSG_ALL_DELETED "All lines deleted in %.2lf sec" -#define MSG_ALTER_DB_ERR "Cannot find the DB to alter" -#define MSG_AMBIG_COL_QUAL "Ambiguous qualifier %s for column %s" -#define MSG_AMBIG_CORREL "Select %s.* refers more than one table" -#define MSG_AMBIG_SPEC_COL "Ambiguous special column %s" #define MSG_ANSWER_TYPE "Answer of type" #define MSG_API_CONF_ERROR "SQL Error: API_CONFORMANCE" -#define MSG_APPL_ACCESSIBLE "Application %s accessible" -#define MSG_APPL_ACTIVE "Application %s still active" -#define MSG_APPL_BAD_SAVE "Application %s may be incorrectly saved" -#define MSG_APPL_CREATED "Application %s created" -#define MSG_APPL_IS_ACTIVE "Application already active" #define MSG_APPL_NOT_INIT "Application not initialized" -#define MSG_APPL_NOT_LOADED "Application not loaded" -#define MSG_APPL_QUIT "Application %s quit" -#define MSG_APPL_SAVED "Application %s saved" -#define MSG_APP_STILL_ACTIV "Application of language %s still active (not freed)" -#define MSG_AREAFILE_NOTFND "Area file not found" -#define MSG_ARGS_SYNTAX_ERR "?SetArgs syntax error: unexpected %s after %s" -#define MSG_ARG_ALREADY_SET "Argument %d already set" -#define MSG_ARG_NOT_AN_ATTR "Argument is not an attribute (wrong pos-type %d)" -#define MSG_ARG_OUT_CONTEXT "@-type argument used out of context" -#define MSG_ARG_OUT_RANGE "Phrase argument of value %d is out of range" -#define MSG_ARG_PTR_NOSEM "Argument of value %d points to a nonterm having no Sem" -#define MSG_ARG_PTR_NOSEMS "Argument of value %d points to a nonterm having no semantics" -#define MSG_ARG_REF_LOOP "?Looping argument cross references" -#define MSG_ARG_TWO_CONST "2nd argument of %s must be a constant" -#define MSG_ARRAY_ALLOC_ERR "Memory allocation error in ARRAY" #define MSG_ARRAY_BNDS_EXCD "Array bounds exceeded" -#define MSG_ARRAY_ERROR "Error while making array k=%d n=%d" -#define MSG_ATTRIBUTE_ERROR "Error rule %u attribute %s: " -#define MSG_ATT_NOT_CASE "Attribute has wrong value %d (not a casevalue)" -#define MSG_ATT_POSCODE_BIG "Attribute poscode %d is too big (max=%d)" -#define MSG_AVGLEN_ERROR "avglen should be between %d and %d" -#define MSG_BAD_AGGREG_FUNC "Unsupported aggregate function %d" -#define MSG_BAD_ARGTYPES "Argument type invalid for %s" -#define MSG_BAD_ARGUMENTS "Argument not attached for %s" -#define MSG_BAD_ARG_NUM "Invalid number of arguments %d" -#define MSG_BAD_ARG_TYPE "Bad argument type %d" #define MSG_BAD_ARRAY_OPER "Arrays must be used with the IN operator" #define MSG_BAD_ARRAY_TYPE "Illegal array type %d" #define MSG_BAD_ARRAY_VAL "Arrays must have the same number of values" @@ -57,321 +13,97 @@ #define MSG_BAD_BLK_SIZE "No match in block %d size" #define MSG_BAD_BYTE_NUM "bad number of bytes written" #define MSG_BAD_BYTE_READ "bad number of bytes read" -#define MSG_BAD_CARDINALITY "Invalid Cardinality call for multiple table" -#define MSG_BAD_CASE_SPEC "Wrong case specification %c, enter new one: " -#define MSG_BAD_CHAR_SPEC "Invalid character specification:'%s'" -#define MSG_BAD_CHECK_TYPE "Invalid CheckColumn subtype %d" -#define MSG_BAD_CHECK_VAL "Bad check setting '%s'" -#define MSG_BAD_COLCRT_ARG "Bad COLCRT argument (type=%hd, domain=%hd)" -#define MSG_BAD_COLDEF_TYPE "Coldefs: wrong type %d" -#define MSG_BAD_COLIST_ITEM "Incorrect colist item" -#define MSG_BAD_COLIST_TYPE "Bad Colist type=%d" -#define MSG_BAD_COLSIZE "Colsize %d is too small for this database" -#define MSG_BAD_COL_ENTRY "Invalid entry for column %s" -#define MSG_BAD_COL_FORMAT "Invalid column format type %d" -#define MSG_BAD_COL_IN_FILT "Incorrect column in filter" -#define MSG_BAD_COL_QUALIF "Bad qualifier %s for column %s" #define MSG_BAD_COL_TYPE "Invalid type %s for column %s" #define MSG_BAD_COL_XPATH "Invalid Xpath in column %s for HTML table %s" -#define MSG_BAD_COMPARE_OP "Bad compare op %d" #define MSG_BAD_CONST_TYPE "Bad constant type=%d" #define MSG_BAD_CONV_TYPE "Invalid convert type %d" -#define MSG_BAD_CORREL "Select %s.* correlation refers no tables" #define MSG_BAD_DATETIME "Invalid datetime value" -#define MSG_BAD_DATE_OPER "Unexpected date operator %d" #define MSG_BAD_DBF_FILE "DBF file %s is corrupted" #define MSG_BAD_DBF_REC "DBF file %s corrupted at record %d" -#define MSG_BAD_DBF_TYPE "Unsupported DBF type %c" -#define MSG_BAD_DEF_ARG "Bad INDEXDEF argument (type=%hd, domain=%hd)" -#define MSG_BAD_DEF_READ "Unexpected EOF in deferred Read" -#define MSG_BAD_DEF_TYPE "Invalid column definition type" +#define MSG_BAD_DBF_TYPE "Unsupported DBF type %c for column %s" #define MSG_BAD_DIRECTORY "Bad directory %s: %s" -#define MSG_BAD_DIST_JN_FIL "Invalid Distinct Join filter" -#define MSG_BAD_DIST_JOIN "Invalid Distinct Join specification" -#define MSG_BAD_DOM_COL_DEF "Invalid column definitions for a domain" -#define MSG_BAD_DOM_VALUE "%d is not a valid domain value" -#define MSG_BAD_EDIT_INIT "Coparm: edition %s not properly initialized" -#define MSG_BAD_EVAL_TYPE "Bad scalar function eval type=%d" -#define MSG_BAD_EXEC_MODE "Bad execution mode '%s'" -#define MSG_BAD_EXP_ARGTYPE "Invalid expression argument type=%d" -#define MSG_BAD_EXP_OPER "Bad expression operator=%d" -#define MSG_BAD_FETCH_RC "Unexpected Fetch return code %d" -#define MSG_BAD_FIELD_FMT "Invalid field format %c for %s" #define MSG_BAD_FIELD_RANK "Invalid field rank %d for column %s" #define MSG_BAD_FIELD_TYPE "Bad type field %s" #define MSG_BAD_FILE_HANDLE "Invalid File Handle: %s" -#define MSG_BAD_FILE_LIST "Bad Filelist section" #define MSG_BAD_FILTER "Bad filter: Opc=%d B_T=%d %d Type=%d %d" #define MSG_BAD_FILTER_CONV "Bad filter conversion, B_T=%d,%d" -#define MSG_BAD_FILTER_LINK "Bad filter link operator %d" #define MSG_BAD_FILTER_OP "Invalid filter operator %d" -#define MSG_BAD_FILTEST_OP "Invalid operator %d %d for FilTest" #define MSG_BAD_FLD_FORMAT "Bad format for field %d of %s" #define MSG_BAD_FLD_LENGTH "Field %s too long (%s --> %d) line %d of %s" -#define MSG_BAD_FLOAT_CONV "Invalid convert of float array" -#define MSG_BAD_FPARM_NEXT "Coparm: FPARM with non-null Next" #define MSG_BAD_FREQ_SET "Bad frequency setting for column %s" -#define MSG_BAD_FUNC_ARG "Funcarg of type %d not implemented" -#define MSG_BAD_FUNC_ARGTYP "Bad Function argument type=%d" #define MSG_BAD_FUNC_MODE "%s: invalid mode %d" -#define MSG_BAD_GENRE "Genre is invalid" -#define MSG_BAD_GETVIEW_RET "GetView: invalid return type %d" #define MSG_BAD_HANDLE_VAL "Invalid handle value" -#define MSG_BAD_HAV_FILTER "Having filter found in a Vanilla query" -#define MSG_BAD_HAV_FILTYPE "Bad filter type for Having Clause" #define MSG_BAD_HEADER "File %s: Header corrupted" -#define MSG_BAD_HEADER_VAL "Invalid header value %d" #define MSG_BAD_HEAD_END "Can't read end of header" -#define MSG_BAD_INDEX_COL "Bad column %s for index %s" -#define MSG_BAD_INDEX_DEF "Bad index definition for %s" #define MSG_BAD_INDEX_FILE "Wrong index file %s" -#define MSG_BAD_INDEX_PART "Bad index part for %s" -#define MSG_BAD_INPUT "Incorrect input" -#define MSG_BAD_IN_ARGTYPE "Bad argument type for IN operator" -#define MSG_BAD_IN_ENDING "Error: wrong end of IN string" -#define MSG_BAD_IN_STRING "IN string begins or ends with invalid char %c ... %c" -#define MSG_BAD_JCOL_TYPE "Logical JCT error: Unmatched column types" -#define MSG_BAD_JOIN_EXP "Invalid expression used in join" -#define MSG_BAD_JOIN_FILTER "Improper join filter" -#define MSG_BAD_JOIN_OP "Bad join operator %d" -#define MSG_BAD_LANG_SIZE "Wrong Language file size %d" #define MSG_BAD_LINEFLD_FMT "Bad format line %d field %d of %s" #define MSG_BAD_LINE_LEN "Line length not equal to Lrecl" -#define MSG_BAD_LIST_TYPE "Invalid list type=%d" -#define MSG_BAD_LOCALE "Invalid locale %s" -#define MSG_BAD_LOCDFON_ARG "Bad parameter for LOCDFON" -#define MSG_BAD_LOCNODE_USE "Unexpected use of LOCNODE" #define MSG_BAD_LRECL "Table/File lrecl mismatch (%d,%hd)" -#define MSG_BAD_MAX_HAVING "MAXTMP value too small for Having" -#define MSG_BAD_MAX_NREC "MaxRec=%d doesn't match MaxBlk=%d Nrec=%d" -#define MSG_BAD_MAX_PARAM "Bad parameters for setting max value" -#define MSG_BAD_MAX_SETTING "Bad max setting '%c'" -#define MSG_BAD_MERGE_TYPE "Type %d cannot be merged" #define MSG_BAD_NODE_TYPE "Bad type %d for table node" #define MSG_BAD_OFFSET_VAL "Invalid null offset value for a CSV table" #define MSG_BAD_OPEN_MODE "Invalid open mode %d" -#define MSG_BAD_OPERATOR "Invalid operator %s" -#define MSG_BAD_ORDER_MODE "Bad ordering mode %c" -#define MSG_BAD_ORDER_TYPE "Type=%d invalid for order item" -#define MSG_BAD_OUTER_JOIN "Invalid outer join on child table" -#define MSG_BAD_PAD_ARGTYP "Bad argument type for Pad or Justify" -#define MSG_BAD_PARAMETERS "%.8s: Bad parameters" #define MSG_BAD_PARAM_TYPE "%.8s: Bad parameter type=%d" #define MSG_BAD_PARM_COUNT "Parameter count mismatch" -#define MSG_BAD_PHASE_NUM "Out of range phrase number %d" -#define MSG_BAD_PHRASE_NB "out of range phrase number %d rc=%d\n" -#define MSG_BAD_POS_CODE "Invalid POS code %d" -#define MSG_BAD_POS_TYPE "Invalid POS code type %d" -#define MSG_BAD_PROJNUM "Bad projnum %d for column %s" -#define MSG_BAD_QUERY_OPEN "Query open invalid mode %d" -#define MSG_BAD_QUERY_TYPE "Invalid query type %d for %s" #define MSG_BAD_QUOTE_FIELD "Missing ending quote in %s field %d line %d" #define MSG_BAD_READ_NUMBER "Wrong number %d of values read from %s" #define MSG_BAD_RECFM "Invalid recfm type %d for DOSCOL" #define MSG_BAD_RECFM_VAL "Bad Recfm value %d" -#define MSG_BAD_RESULT_TYPE "Bad result type %d for %s" -#define MSG_BAD_RETURN_TYPE "Bad returned type %d" -#define MSG_BAD_ROW_VALIST "Invalid ROW list of values" -#define MSG_BAD_ROW_VALNB "Number of values in list mismatch" -#define MSG_BAD_SCF_ARGTYPE "Argument %d type=%s invalid for %s" -#define MSG_BAD_SEM_DOMAIN "Invalid domain .%d" -#define MSG_BAD_SETTINGS "Some settings do not match table type" #define MSG_BAD_SET_CASE "Cannot set sensitive an insensitive array" #define MSG_BAD_SET_STRING "Invalid SetValue from string" -#define MSG_BAD_SET_TYPE "Bad set type %hd" -#define MSG_BAD_SPECIAL_CMD "Ill formed special command" #define MSG_BAD_SPECIAL_COL "Bad special column %s" #define MSG_BAD_SPEC_COLUMN "Special column invalid for this table type" -#define MSG_BAD_SQL_PARAM "Invalid SQL parameter for FindColblk" -#define MSG_BAD_SUBLST_TYPE "Coparm: bad sub-list type %d" -#define MSG_BAD_SUBSEL_IN_X "Bad sub-select in expression" -#define MSG_BAD_SUBSEL_TYPE "Bad Sub-Select returned type %d" -#define MSG_BAD_SUB_RESULT "Undefined Sub-Select function result" -#define MSG_BAD_SUB_SELECT "Bad sub-select in function argument" -#define MSG_BAD_TABLE_LINE "Illegal or truncated line '%s' in Tables section" -#define MSG_BAD_TABLE_LIST "Table %s not found in table list" #define MSG_BAD_TABLE_TYPE "Bad type %s for table %s" -#define MSG_BAD_TEST_TYPE "Array BlockTest type mismatch %s %s" -#define MSG_BAD_TRIM_ARGTYP "Bad argument type for Trim" -#define MSG_BAD_TYPE_FOR_IN "Arg type mismatch for IN function" -#define MSG_BAD_TYPE_FOR_S "Incorrect type %d for %s(%d)" #define MSG_BAD_TYPE_LIKE "Bad operand(%d) type=%d for LIKE" -#define MSG_BAD_UPD_COR "Qualifier %s of column %s not related to the updated table %s" -#define MSG_BAD_USERBLK_LEN "User block write length error" -#define MSG_BAD_USETEMP "Bad usetemp setting '%s'" -#define MSG_BAD_USETEMP_VAL "Bad Usetemp value %d" #define MSG_BAD_VALBLK_INDX "Out of range valblock index value" #define MSG_BAD_VALBLK_TYPE "Invalid value block type %d" #define MSG_BAD_VALNODE "Bad type %d for column %s value node" #define MSG_BAD_VALUE_TYPE "Invalid value type %d" #define MSG_BAD_VAL_UPDATE "Don't know which %s value to update" -#define MSG_BAD_VIEW_OPEN "View open invalid mode %d" -#define MSG_BAD_XMODE_VAL "Bad execution mode %d" -#define MSG_BAD_XOBJ_TYPE "Bad Xobject type %d" #define MSG_BAS_NS_LIST "Invalid namespaces list format" #define MSG_BIN_F_TOO_LONG "Value too long for field %s (%d --> %d)" #define MSG_BIN_MODE_FAIL "Set binary mode failed: %s" #define MSG_BLKTYPLEN_MISM "Non matching block types/lengths in SetValue" #define MSG_BLK_IS_NULL "Blk is NULL" -#define MSG_BLOCK_NO_MATCH "Non matching block" #define MSG_BREAKPOINT "Breakpoint" -#define MSG_BUFF_TOO_SMALL "GetColData: Buffer is too small" -#define MSG_BUFSIZE_ERROR "Error getting screen buffer size" -#define MSG_BUILDING_GROUPS "Building groups" -#define MSG_BUILD_DIST_GRPS "Building groups distinct" #define MSG_BUILD_INDEX "Building index %s on %s" -#define MSG_BXP_NULL "Bxp NULL in PUTFON" #define MSG_CANNOT_OPEN "Cannot open %s" -#define MSG_CD_ONE_STEP "Count Distinct must be processed in one step" -#define MSG_CD_ORDER_ERROR "Ordering error in Count Distinct" -#define MSG_CHECKING_ROWS "Checking rows to update" -#define MSG_CHECK_LEVEL "Checking level reset to %u" #define MSG_CHSIZE_ERROR "chsize error: %s" -#define MSG_CLN_NOT_IN_JOIN "Column C%d not found in join" -#define MSG_CNTDIS_COL_LOST "Count Distinct column lost" -#define MSG_COLIST_BAD_TYPE "Invalid Colist element type=%d" -#define MSG_COLNAM_TOO_LONG "Column name too long" -#define MSG_COLSEC_TOO_BIG "Column section too big in table %s (%d)" -#define MSG_COLS_REDUCED " (reduced by Maxcol)" -#define MSG_COLUMN_ERROR "Column error" -#define MSG_COLUMN_MISMATCH "Column %s mismatch" -#define MSG_COLUMN_NOT_KEY "Join column R%d.%s is not a key" #define MSG_COL_ALLOC_ERR "Cannot allocate column node" -#define MSG_COL_ALLOC_ERROR "Memory allocation error for column %d" -#define MSG_COL_HAS_NO_DEF "Column %s has no definition" -#define MSG_COL_INVAL_TABLE "Column %s.%s not found in table %s alias %s" #define MSG_COL_ISNOT_TABLE "Column %s is not in table %s" -#define MSG_COL_NB_MISM "Number of columns mismatch" -#define MSG_COL_NOTIN_GRPBY "Column %s not in Group By list" -#define MSG_COL_NOTIN_TABLE "Column %s is not in any table" -#define MSG_COL_NOTIN_UPDT "%s does not belong to the updated table %s" -#define MSG_COL_NOT_CODED "Column %s is not coded" -#define MSG_COL_NOT_EXIST "Column %s is not in table %s" -#define MSG_COL_NOT_FOUND "Column %s does not exist in %s" -#define MSG_COL_NOT_IN_DB "Column %s of table %s not in DB" -#define MSG_COL_NOT_IN_JOIN "Column %s not found in join" #define MSG_COL_NOT_SORTED "Column %s of table %s is not sorted" #define MSG_COL_NUM_MISM "Number of columns mismatch" -#define MSG_COL_USED_TWICE "Column %s linked twice ???" -#define MSG_COMPUTE_ERROR "Error in Compute, op=%d" -#define MSG_COMPUTE_NIY "Compute not implemented for token strings" -#define MSG_COMPUTING "Computing" -#define MSG_COMPUTING_DIST "Computing Distinct" -#define MSG_COMPUTING_FUNC "Computing function(s)" #define MSG_COM_ERROR "Com error" #define MSG_CONCAT_SUBNODE "Cannot concatenate sub-nodes" -#define MSG_CONNECTED "Connected" #define MSG_CONNECT_CANCEL "Connection cancelled by user" -#define MSG_CONNECT_ERROR "Error %d connecting to %s" -#define MSG_CONN_CLOSED "%s(%d) closed" -#define MSG_CONN_CREATED "Connection %s created" -#define MSG_CONN_DROPPED "Connection %s dropped" -#define MSG_CONN_OPEN "%s(%d) open (%s)" -#define MSG_CONN_SUC_OPEN "%s(%d) successfully open" #define MSG_CONTROL_C_EXIT "Control C exit" -#define MSG_COPY_BAD_PHASE "List copy invalid in phase %d" -#define MSG_COPY_INV_TYPE "Coparm: type not supported %d" -#define MSG_CORREL_NO_QRY "Correlated subqueries cannot be of QRY type" -#define MSG_CREATED_PLUGDB " Created by PlugDB %s " -#define MSG_CURSOR_SET "Cursor set to %d" -#define MSG_DATABASE_ACTIVE "Database %s activated" #define MSG_DATABASE_LOADED "Database %s loaded" -#define MSG_DATA_IS_NULL "ExecSpecialCmd: data is NULL" #define MSG_DATA_MISALIGN "Datatype misalignment" #define MSG_DBASE_FILE "dBASE dbf file: " -#define MSG_DB_ALREADY_DEF "Database %s already defined" -#define MSG_DB_ALTERED "Database altered" -#define MSG_DB_CREATED "Database %s created" -#define MSG_DB_NOT_SPEC "Database not specified" -#define MSG_DB_REMOVED "Database %s removed from DB list" -#define MSG_DB_SORT_ERROR "Error in DB sort" -#define MSG_DB_STOPPED "Database %s stopped" -#define MSG_DEBUG_NOT_ACTIV "Debug is not active" -#define MSG_DEBUG_SET_INV "Invalid Debug set %c" #define MSG_DEF_ALLOC_ERROR "Error allocating %s DEF class" -#define MSG_DELETING_ROWS "Deleting rows" #define MSG_DEL_FILE_ERR "Error deleting %s" #define MSG_DEL_READ_ERROR "Delete: read error req=%d len=%d" #define MSG_DEL_WRITE_ERROR "Delete: write error: %s" #define MSG_DEPREC_FLAG "Deprecated option Flag, use Coltype" -#define MSG_DICTIONARY "Dictionary " -#define MSG_DIRECT_VARTOK "Direct access of variable token rules not implemented" -#define MSG_DISCONNECTED "Disonnected" -#define MSG_DISTINCT_ERROR "More than one DISTINCT functional item" -#define MSG_DISTINCT_ROWS "Selecting distinct rows" -#define MSG_DISTINCT_VALUES "Retrieving distinct values" -#define MSG_DIS_NOHEAD_JOIN "Distinct join on not heading table" #define MSG_DLL_LOAD_ERROR "Error %d loading module %s" -#define MSG_DOMAIN_EMPTY "Domain %s is empty" -#define MSG_DOMAIN_ERROR "Column %s domain(%s)/value(%s) mismatch" -#define MSG_DOMAIN_FULL "Domain %s is full (max=%d)" -#define MSG_DOM_FILE_ERROR "Domain file %s not found" #define MSG_DOM_NOT_SUPP "MS-DOM not supported by this version" -#define MSG_DOM_OPEN_ERROR "Domain open error: %s" -#define MSG_DOM_READ_ERROR "Domain read error %d: %s" -#define MSG_DOM_READ_ONLY "Domain table %s is read only" -#define MSG_DOM_WRITE_ERROR "Domain write error %d: %s" -#define MSG_DONE "Done, rc=%d" -#define MSG_DOSALMEM_NOMEM "Memory Allocation failed, not enough memory" -#define MSG_DROP_DB_ERR "Drop database %s failed" -#define MSG_DSORT_LOG_ERROR "Logical error in Kindex distinct Sort" -#define MSG_DUMMY_NO_COLS "Dummy tables must have no columns" -#define MSG_DUPLICAT_COUNT "Count on more than one column" -#define MSG_DUP_COL_NAME "Duplicate column name %s" -#define MSG_DUP_PROJNUM "Duplicated projnum %d for column %s" #define MSG_DVAL_NOTIN_LIST "Value %s not found in distinct values list of column %s" #define MSG_EMPTY_DOC "Empty document" #define MSG_EMPTY_FILE "%s empty file %s: " -#define MSG_ENDSTR_MISMATCH "No match between end of string and end of node" -#define MSG_END_OF_DELETE "%d line(s) deleted in %.2lf sec" -#define MSG_END_OF_INSERT "%d line(s) inserted in %.2lf sec" -#define MSG_END_OF_QUERY "%d line(s) retrieved in %.2lf sec" -#define MSG_END_OF_UPDATE "%d line(s) updated in %.2lf sec" #define MSG_EOF_AFTER_LINE "EOF after line %d" #define MSG_EOF_INDEX_FILE "EOF while reading index file" -#define MSG_ERASED " and erased" -#define MSG_ERASE_FAILED " (erase failed)" -#define MSG_ERROR "Error" #define MSG_ERROR_IN_LSK "Error %d in lseek64" #define MSG_ERROR_IN_SFP "Error %d in SetFilePointer" -#define MSG_ERROR_NO_PARM "No parameter (valid only with %.8s.1 and %.8s.5)" -#define MSG_ERROR_OPENING "Error opening: " -#define MSG_ERR_NUM_GT_MAX "Error: Numval (%d) greater than Maxnum (%d)" #define MSG_ERR_READING_REC "Error reading record %d of %s" -#define MSG_ERR_RET_RULE "error return, rule=%u" -#define MSG_ERR_RET_TYPE "error return, type=%d" -#define MSG_EVAL_EXPIRED "Evaluation version expired" -#define MSG_EVAL_ONLY "I agree to use this Dll for evaluation purpose only" -#define MSG_EXECUTING "Executing" -#define MSG_EXECUTION_ERROR "Execution error" -#define MSG_EXEC_MODE_IS "Execution mode is %s" -#define MSG_EXEC_MODE_RESET ". Mode reset to Execute" -#define MSG_EXEC_MODE_SET "Execution mode set to %s" -#define MSG_EXIT_EVAL_ERR "Error evaluating Exit" -#define MSG_EXIT_FROM_LANG "Exit from language %s version %d.%d" #define MSG_FAIL_ADD_NODE "Failed to add %s table node" -#define MSG_FETCHING_DATA "Fetching data" -#define MSG_FETCHING_ROWS "Fetching rows" #define MSG_FETCH_NO_RES "Fetch: No Result Set" #define MSG_FIELD_TOO_LONG "Value too long for field %d line %d" #define MSG_FILELEN_ERROR "Error in %s for %s" -#define MSG_FILE_CLOSE_ERR "Error %d occurred closing the file" #define MSG_FILE_IS_EMPTY "File %s is empty" #define MSG_FILE_MAP_ERR "File mapping error" #define MSG_FILE_MAP_ERROR "CreateFileMapping %s error rc=%d" -#define MSG_FILE_NOT_FOUND "File %s cannot be found" #define MSG_FILE_OPEN_YET "File %s already open" #define MSG_FILE_UNFOUND "File %s not found" -#define MSG_FILGRP_NO_TABLE "Missing table %d for a filter group" -#define MSG_FILTER_ATTACH "Filter passed to Attach" -#define MSG_FILTER_NO_TABLE "Missing first table for a filter" -#define MSG_FIND_BAD_TYPE "Array Find type mismatch %s %s" -#define MSG_FIX_OVFLW_ADD "Fixed Overflow on add" -#define MSG_FIX_OVFLW_TIMES "Fixed Overflow on times" -#define MSG_FIX_UNFLW_ADD "Fixed Underflow on add" -#define MSG_FIX_UNFLW_TIMES "Fixed Underflow on times" #define MSG_FLD_TOO_LNG_FOR "Field %d too long for %s line %d of %s" -#define MSG_FLTST_NO_CORREL "FilTest should be called only for correlated subqueries" #define MSG_FLT_BAD_RESULT "Float inexact result" #define MSG_FLT_DENORMAL_OP "Float denormal operand" #define MSG_FLT_INVALID_OP "Float invalid operation" @@ -380,11 +112,8 @@ #define MSG_FLT_UNDERFLOW "Float underflow" #define MSG_FLT_ZERO_DIVIDE "Float divide by zero" #define MSG_FMT_WRITE_NIY "Writing %s files is not implemented yet" -#define MSG_FNC_NOTIN_SLIST "Order aggregate function not in select list" -#define MSG_FORMAT_ERROR "Formating error" #define MSG_FOXPRO_FILE "FoxPro file: " #define MSG_FPUTS_ERROR "fputs error: %s" -#define MSG_FSBPARP_NULL "PUTFON: fsbparp is NULL" #define MSG_FSEEK_ERROR "fseek error: %s" #define MSG_FSETPOS_ERROR "fseek error for i=%d" #define MSG_FTELL_ERROR "ftell error for recd=%d: %s" @@ -392,360 +121,113 @@ #define MSG_FUNC_ERRNO "Error %d in %s" #define MSG_FUNC_ERROR "Error in %s" #define MSG_FUNC_ERR_S "%s error: %s" -#define MSG_FUNC_REF_DEL "Reference to a defined function (rule %d) which has been deleted" #define MSG_FWRITE_ERROR "fwrite error: %s" -#define MSG_GETCWD_ERR_NO "?getcwd %s errno=%d" -#define MSG_GETFILESIZE_ERR "Error %d in GetFileSize" #define MSG_GET_DIST_VALS "Retrieving distinct values from " -#define MSG_GET_ERROR "Error in %s (column %d)" #define MSG_GET_FUNC_ERR "Error getting function %s: %s" -#define MSG_GET_NAME_ERR "Error getting SYS table names" #define MSG_GLOBAL_ERROR "Cannot allocate Global (size=%d)\n" -#define MSG_GRAM_ALLOC_ERR "Allocation error in Grammar Up" -#define MSG_GRAM_MISMATCH "Warning: GRAMMAR version mismatch (saved under GRAMMAR v%u)" -#define MSG_GRAM_SUBSET_ERR "Grammar dictionary Subset error" -#define MSG_GRBY_TAB_NOTIMP "Group by filtered joined table not implemented" -#define MSG_GROUPBY_NOT_ALL "Group By must include all non-functional select items" -#define MSG_GROUP_ON_FUNC "Invalid group by on functional column" -#define MSG_GRP_COL_MISM "Column mismatch in groups" -#define MSG_GRP_LIST_MISMAT "Grouping does not match select list" #define MSG_GUARD_PAGE "Guard page violation" #define MSG_GZOPEN_ERROR "gzopen %s error %d on %s" -#define MSG_GZPUTS_ERROR "gzputs error: %s" -#define MSG_HANDLE_IS_NULL "%s is NULL: last error: %d" -#define MSG_HARRY_COMP_NIY "Compute not implemented for coded strings" -#define MSG_HAVING_FILTER "Filtering by Having" -#define MSG_HBUF_TOO_SMALL "Buffer(%d) too small for header(%d)" -#define MSG_HEAD_OPEN_ERROR "Error opening header file %s" -#define MSG_HEAD_READ_ERROR "Error reading header file %s" -#define MSG_HEAD_WRITE_ERR "Error writing header file %s" -#define MSG_HI_OFFSET_ERR "High offet is not 0" -#define MSG_HUGE_DEFAULT "Huge defaults to %d" -#define MSG_HUGE_WARNING_1 "Huge memory not 16-bit compatible for %d\n" -#define MSG_HUGE_WARNING_2 "Unpredictable results may occur\n" -#define MSG_IDLE "Idle" #define MSG_ILLEGAL_INSTR "Illegal instruction" #define MSG_ILL_FILTER_CONV "Filtering implies an illegal conversion" -#define MSG_INDEX_CREATED "Index %s created on %s" -#define MSG_INDEX_DEF_ERR "Error storing index definition for %s" -#define MSG_INDEX_DROPPED "Index %s dropped from %s" -#define MSG_INDEX_INIT_ERR "Cannot initialize index %s" -#define MSG_INDEX_NOT_DEF "Index %s has no definition" #define MSG_INDEX_NOT_UNIQ "Index is not unique" -#define MSG_INDEX_ONE_SAVE "Indexes are saved in one unique file" -#define MSG_INDEX_SEP_SAVE "Indexes are saved in separate files" #define MSG_INDEX_YET_ON "Index %s already exists on %s" -#define MSG_INDX_ALL_DROP "All indexes dropped from %s" #define MSG_INDX_COL_NOTIN "Index column %s is not in table %s" #define MSG_INDX_EXIST_YET "Index entry already exists" -#define MSG_INIT_ERROR "Error initializing %s" #define MSG_INIT_FAILED "Failed to initialize %s processing" -#define MSG_INPUT "Input: " -#define MSG_INPUT_KEYBD_YET "Input already from keyboard" -#define MSG_INSERTING "Inserting: " -#define MSG_INSERT_ERROR "Insert error: file %s in use" -#define MSG_INSERT_MISMATCH "Column/Value list mismatch" -#define MSG_INTERNAL "internal" #define MSG_INT_COL_ERROR "Internal error for index column %s" #define MSG_INT_OVERFLOW "Integer overflow" #define MSG_INT_ZERO_DIVIDE "Integer divide by zero" -#define MSG_INVALID_BIP "Invalid Bip .%d" #define MSG_INVALID_DISP "Invalid disposition" #define MSG_INVALID_FTYPE "SBV: invalid Ftype %d" #define MSG_INVALID_HANDLE "Invalid handle" #define MSG_INVALID_OPER "Invalid operator %d for %s" -#define MSG_INVALID_OPTION "Invalid option %s" #define MSG_INV_COLUMN_TYPE "Invalid type %d for column %s" -#define MSG_INV_COL_DATATYP "Invalid Data Type %d for column %d" -#define MSG_INV_COL_NUM "Invalid column %d" #define MSG_INV_COL_TYPE "Invalid column type %s" -#define MSG_INV_CONC_BIP "Invalid bip (only valid are : %.8s.0 .1 and .5)" -#define MSG_INV_DATA_PATH "Invalid database path %s" #define MSG_INV_DEF_READ "Invalid deferred Read rc=%d" #define MSG_INV_DIRCOL_OFST "Invalid DIRCOL offset %d" -#define MSG_INV_DOMAIN_TYPE "Invalid type %d" -#define MSG_INV_FILTER "Filter met in %s" -#define MSG_INV_FNC_BUFTYPE "FNC: invalid argument type %d for %s" -#define MSG_INV_INFO_TYPE "Invalid catalog info type %d" -#define MSG_INV_INIPATH "Invalid inipath " #define MSG_INV_MAP_POS "Invalid map position" -#define MSG_INV_OPERATOR "invalid operator %d\n" -#define MSG_INV_PARAMETER "Invalid parameter %s" -#define MSG_INV_PARM_TYPE "Invalid parameter type" -#define MSG_INV_QUALIFIER "Invalid qualifier '%s'" -#define MSG_INV_QUERY_TYPE "Invalid query type %d" #define MSG_INV_RAND_ACC "Invalid random access to non optimized table" #define MSG_INV_REC_POS "Invalid record position" #define MSG_INV_RESULT_TYPE "Invalid result type %s" -#define MSG_INV_SET_SUBTYPE "Invalid SetFormat subtype %d" -#define MSG_INV_SPECIAL_CMD "%s: Invalid special command" -#define MSG_INV_SUBTYPE "Invalid subtype %s" -#define MSG_INV_TOK_DOMAIN "Invalid token domain %s" -#define MSG_INV_TOPSEM_CMD "Invalid TopSem command %c" -#define MSG_INV_TRANSF_USE "Invalid use in transformation rule" -#define MSG_INV_TYPE_SPEC "Invalid type specification (%.8s.%d)" #define MSG_INV_UPDT_TABLE "Table %s invalid for update" -#define MSG_INV_VALUE_LIST "Invalid Insert value list" -#define MSG_INV_WHERE_JOIN "Invalid where clause in join query" -#define MSG_INV_WORK_PATH "Invalid work path %s" -#define MSG_IN_ARGTYPE_MISM "Argument type mismatch for IN expression" -#define MSG_IN_USE " and in use" #define MSG_IN_WITHOUT_SUB "IN or EXISTS without array or subquery" -#define MSG_IS_NOT_CONN "%s is not a connection definition" -#define MSG_JCT_MISS_COLS "Missing columns for a JCT table" -#define MSG_JCT_MISS_TABLE "Missing joined table for JCT" -#define MSG_JCT_NO_FILTER "Virtual JCT tables cannot be filtered" -#define MSG_JCT_NO_KEY "Logical JCT error: no key" -#define MSG_JOIN_KEY_NO_COL "Join key is not a column" #define MSG_KEY_ALLOC_ERR "Error allocating Key offset block" #define MSG_KEY_ALLOC_ERROR "Memory allocation error, Klen=%d n=%d" -#define MSG_LANGUAGE_QUIT "%s quit" -#define MSG_LANG_ACTIVE "Language %s active" -#define MSG_LANG_ALLOC_FAIL "PlugInitLang: Lang block allocation failed" -#define MSG_LANG_ALREADY_UP "Edited language is already there" -#define MSG_LANG_BAD_SAVE "Language %s may be incorrectly saved" -#define MSG_LANG_NOT_FREED "Language %s cannot be freed (not in main chain)" -#define MSG_LANG_SAVED "Language %s saved" -#define MSG_LANG_WR_LEN_ERR "Lang block write length error" -#define MSG_LDF_ALLOC_ERROR "LdfBlock allocation error" -#define MSG_LDF_RN_MISMATCH "LDF rule number mismatch" -#define MSG_LDF_WLEN_ERROR "LdfData write length error" -#define MSG_LDF_W_LEN_ERROR "LdfData write length error" -#define MSG_LIC_NO_MYSQL "Your current license does not enable using the MySQL table type" -#define MSG_LINEAR_ERROR "Linearization error" -#define MSG_LINE_LENGTH "Output line length reset to %d" -#define MSG_LINE_MAXLIN "Max number of work lines reset to %d" -#define MSG_LINE_MAXRES "Max number of output lines reset to %d" -#define MSG_LINE_MAXTMP "Max number of intermediate lines reset to %d" #define MSG_LINE_TOO_LONG "New line is too long" -#define MSG_LINJOINDB_ERROR "System error: incorrect call to LinJoinDB" #define MSG_LIST "--List--" -#define MSG_LNG_NOT_IN_LIST "Language %s not found in attached list" -#define MSG_LOADING_DB "Loading DB Description" #define MSG_LOADING_FAILED "Loading of %s failed" -#define MSG_LOAD_CDLL_ERROR "Error loading ConnDll: rc=%d" -#define MSG_LOCSTRG_TOO_BIG "LOCSTRG: n too big ? (%d)\n" -#define MSG_LOGICAL_ERROR "%s: Logical error" #define MSG_LRECL_TOO_SMALL "Lrecl too small (headlen = %d)" -#define MSG_MAC_NO_DELETE "Delete not enabled for MAC tables" -#define MSG_MAC_NO_INDEX "No direct access to MAC tables" -#define MSG_MAC_READ_ONLY "MAC tables are read only" -#define MSG_MAC_WIN_ONLY "MAC tables are Windows only" #define MSG_MAKE_EMPTY_FILE "Making empty file %s: %s" #define MSG_MAKING "Making" -#define MSG_MAKING_DISTINCT "Making distinct groups" #define MSG_MALLOC_ERROR "Memory allocation failed: %s returned Null" -#define MSG_MALLOC_NULL "malloc returned Null" -#define MSG_MAP_NO_MORE "Type %s no more supported" -#define MSG_MAP_OBJ_ERR "Error %d occurred closing the mapping object" -#define MSG_MAP_VEC_ONLY "MAP Insert is for VEC Estimate tables only" #define MSG_MAP_VIEW_ERROR "MapViewOfFile %s error rc=%d" #define MSG_MAXSIZE_ERROR "Cannot calculate max size on open table" -#define MSG_MAXTMP_TRUNCATE "Intermediate results truncated by maxtmp=%d" -#define MSG_MAX_BITMAP "Max opt bitmap size reset to %d" -#define MSG_MEMSIZE_TOO_BIG "Error: memsize (%d) too big for length (%d)" #define MSG_MEM_ALLOC_ERR "Memory allocation error, %s size=%d" #define MSG_MEM_ALLOC_ERROR "Memory allocation error" -#define MSG_MEM_ALLOC_YET "Memory already allocated" -#define MSG_METAFILE_NOTFND "Grammar Meta file not found" #define MSG_MISPLACED_QUOTE "Misplaced quote in line %d" -#define MSG_MISSING "Missing: Value=%p Argval=%p Builtin=%d" #define MSG_MISSING_ARG "Missing argument for operator %d" -#define MSG_MISSING_COL_DEF "Missing column definition" -#define MSG_MISSING_CONNECT "Missing connect string" -#define MSG_MISSING_EOL "Missing endline character in %s" #define MSG_MISSING_FIELD "Missing field %d in %s line %d" #define MSG_MISSING_FNAME "Missing file name" #define MSG_MISSING_NODE "Missing %s node in %s" -#define MSG_MISSING_POS "Missing POS code" #define MSG_MISSING_ROWNODE "Can't find RowNode for row %d" -#define MSG_MISSING_SERV_DB "Missing server and/or database string" -#define MSG_MISS_LEAD_COL "Missing leading index column %s" -#define MSG_MISS_NAME_LRECL "Missing file name and/or lrecl" -#define MSG_MISS_TABLE_LIST "Missing table list" -#define MSG_MISS_VCT_ELMT "Missing VCT block size (Elements)" #define MSG_MIS_TAG_LIST "Missing column tag list" -#define MSG_MKEMPTY_NIY "MakeEmptyFile: not yet implemented for Huge and Unix" -#define MSG_MOVE_INV_TYPE "MOVPARM: Invalid parameter type %d" -#define MSG_MULT_DISTINCT "Distinct is specified more than once" -#define MSG_MULT_KEY_ERROR "Multiple key error k=%d n=%d" #define MSG_MUL_MAKECOL_ERR "Tabmul MakeCol logical error" -#define MSG_MYSQL_CNC_OFF "MySQL connection is closed" -#define MSG_MYSQL_CNC_ON "MySQL connection is established" -#define MSG_MYSQL_NOT_SUP "MySQL not supported by this version" -#define MSG_MY_CNC_ALREADY "MySQL connection already active" #define MSG_NAME_CONV_ERR "Error converting node name" -#define MSG_NAME_IS_USED "Name %s already in use" -#define MSG_NCOL_GT_MAXCOL "Too many columns (%d > %d max)" -#define MSG_NEW_CHAR_NULL "new char(%d) returned Null" #define MSG_NEW_DOC_FAILED "Cannot create new document" #define MSG_NEW_RETURN_NULL "New returned Null in PlugEvalLike" -#define MSG_NEW_TABLE_ERR "Unable to retrieve new table %s" #define MSG_NEXT_FILE_ERROR "Couldn't find next file. rc=%d" -#define MSG_NODEF_FROM_VIEW "Cannot define a table from a view" -#define MSG_NODE_FOR_CHAR "Node %s found when looking for character" -#define MSG_NODE_SUBSET_ERR "Node %d Subset error" #define MSG_NONCONT_EXCEPT "Noncontinuable exception" -#define MSG_NON_DUP_HAVING "Having clause in non/dup functional query" -#define MSG_NON_EVAL_SEM "Sem not evaluated: p_no=%d" #define MSG_NOP_ZLIB_INDEX "Cannot do indexing on non optimized zlib table" #define MSG_NOT_A_DBF_FILE "Not a dBASE dbf file " -#define MSG_NOT_ENOUGH_COLS "Not enough columns in %s" -#define MSG_NOT_ENOUGH_MEM "Not enough memory to perform this operation" #define MSG_NOT_FIXED_LEN "File %s is not fixed length, len=%d lrecl=%d" -#define MSG_NOT_IMPLEMENTED "Not implemented: %.8s" -#define MSG_NOT_IMPL_JOIN "Not implemented for Join" -#define MSG_NOT_IMPL_SET "Not implemented for set operators" -#define MSG_NOT_IMPL_YET "Not implemented yet" -#define MSG_NOT_LINEARIZED "Table tree was not linearized" -#define MSG_NOT_MODIFIABLE " (not modifiable)" #define MSG_NO_0DH_HEAD "No 0Dh at end of header (dbc=%d)" -#define MSG_NO_ACTIVE_APPL "No active application" #define MSG_NO_ACTIVE_DB "No active database" -#define MSG_NO_ACTIVE_UDIC "No active user dictionary" -#define MSG_NO_AGGR_FUNC "Aggregated function %d not allowed here" -#define MSG_NO_AREA_FILE "Area file not found" -#define MSG_NO_AVAIL_RESULT "No result available" -#define MSG_NO_BIG_DELETE "Partial delete not yet implemented for Huge files" #define MSG_NO_CHAR_FROM "Cannot return char value from type %d" -#define MSG_NO_CLUSTER_COL "No clustered columns" -#define MSG_NO_COL_ADDING "Cannot add new column(s) to old definition" -#define MSG_NO_COL_DEF_AS "Column definitions cannot be used with AS Select" -#define MSG_NO_COL_FOUND "No column found in section %s" -#define MSG_NO_COL_IN_TABLE "Column %d not in table %s" -#define MSG_NO_COL_SECTION "Missing column section for table %s" -#define MSG_NO_CONNECT_ADDR "No connexion address provided" -#define MSG_NO_CONST_FILTER "Constant filters not implemented" -#define MSG_NO_CURLY_BRKT "No closing curly bracket" -#define MSG_NO_DATABASE "Database %s not found" #define MSG_NO_DATE_FMT "No date format for valblock of type %d" -#define MSG_NO_DBF_INSERT "Insert not supported yet for GDF files" #define MSG_NO_DEF_FNCCOL "Cannot find default function column" #define MSG_NO_DEF_PIVOTCOL "Cannot find default pivot column" #define MSG_NO_DIR_INDX_RD "No direct access of %s tables" -#define MSG_NO_DMY_DIR_ACC "No direct access of virtual DUMMY tables" -#define MSG_NO_DOM_DELETE "Partial delete not yet implemented for domains" -#define MSG_NO_DOM_MATCH "Unmatched string %.8s... in domain %s" -#define MSG_NO_EDITED_LANG "Coparm: No active edited language" -#define MSG_NO_EXP_LINK "Cannot use expression to link a JCT table" -#define MSG_NO_EXT_FILTER "Filtering cannot refer to another table" -#define MSG_NO_EXT_UPDATE "Cannot update with reference to another table" #define MSG_NO_FEAT_SUPPORT "No %s support in this version" -#define MSG_NO_FILE_LIST "Table %s has no file list" #define MSG_NO_FLD_FORMAT "Missing format for field %d of %s" #define MSG_NO_FORMAT_COL "Cannot format the type COLUMN" #define MSG_NO_FORMAT_TYPE "Cannot set format from type %d" -#define MSG_NO_FULL_JOIN "Only Equi-join on key(s) is allowed by check setting" -#define MSG_NO_FUL_OUT_JOIN "Full outer joins are not supported" -#define MSG_NO_FUNC_ORDER "Unsupported ordering on functional item" -#define MSG_NO_HEAD_JOIN "Join on not heading table" -#define MSG_NO_HQL_CONV "Conversion to HQL not available" -#define MSG_NO_INDEX "No indexes on table %s" -#define MSG_NO_INDEX_GBX "No or improper index for SQLGBX" -#define MSG_NO_INDEX_IN "No indexes found in %s" #define MSG_NO_INDEX_READ "No indexed read for multiple tables" -#define MSG_NO_INIT_LANG "No initial language" -#define MSG_NO_JOIN_TO_EXP "No join to expressions" -#define MSG_NO_JOIN_UPDEL "Update/Delete on MySQL table cannot be joined" #define MSG_NO_KEY_COL "No key columns found" #define MSG_NO_KEY_UPDATE "Cannot update key names" -#define MSG_NO_LANGUAGE "No language in operation\n" -#define MSG_NO_LANG_TO_QUIT "No next language to quit" -#define MSG_NO_LISTVAL_HERE "LSTBLK: List of values used out of context" #define MSG_NO_MAP_INSERT "MAP incompatible with Insert" #define MSG_NO_MATCHING_COL "No matching column %s in %s" #define MSG_NO_MATCH_COL "Cannot find matching column" #define MSG_NO_MEMORY "No memory" -#define MSG_NO_MEM_CORR_SUB "In memory correlated subquery not implemented yet" #define MSG_NO_MODE_PADDED "Mode not supported for padded files" -#define MSG_NO_MORE_COL "Column %s no more in pivot table" -#define MSG_NO_MORE_LANG "No more language, exit from %s\n" -#define MSG_NO_MORE_VAR "VAR files no more supported" -#define MSG_NO_MULCOL_JOIN "No join yet on muticolumn index" -#define MSG_NO_MULT_HAVING "Multiple having clauses not implemented" -#define MSG_NO_MUL_DIR_ACC "Direct access of multiple tables not implemented yet" #define MSG_NO_MUL_VCT "VCT tables cannot be multiple" -#define MSG_NO_MYSQL_CONN "No open MySQL connection" -#define MSG_NO_MYSQL_DELETE "Delete should not be called for MySQL tables" -#define MSG_NO_NBCOL "No NBcol" -#define MSG_NO_NBLIN "No NBlin, MaxSize or Continued" -#define MSG_NO_NBLIN_CONT "Fetch: No NBlin or Continued" -#define MSG_NO_NULL_CONST "Cannot handle constant" -#define MSG_NO_ODBC_COL "Automatic ODBC columns not supported in this version" #define MSG_NO_ODBC_DELETE "Delete should not be called for ODBC tables" #define MSG_NO_ODBC_DIRECT "Direct access of ODBC tables not implemented yet" #define MSG_NO_ODBC_MUL "Multiple(2) not supported for ODBC tables" #define MSG_NO_ODBC_SPECOL "No ODBC special columns" -#define MSG_NO_OPT_COLUMN "Not optimizable or no optimized columns" -#define MSG_NO_OP_MODIF "Modificators do not apply to %s" -#define MSG_NO_PARAMETER "No parameter" #define MSG_NO_PART_DEL "No partial delete of %s files" #define MSG_NO_PART_MAP "Partial mapping not implemented for this OS" #define MSG_NO_PAR_BLK_INS "Cannot insert partial block yet" #define MSG_NO_PIV_DIR_ACC "No direct access to PIVOT tables" -#define MSG_NO_POS_ADDED "No Pos_code added" -#define MSG_NO_PROMPTING "Cannot handle prompting for distributed tables" -#define MSG_NO_QRY_DELETE "Delete cannot be used for QRY views" -#define MSG_NO_QUERY_ARRAY "Array from QUERY not implemented yet" -#define MSG_NO_RCUR_DSK_YET "Recursive use of DISK not implemented yet" #define MSG_NO_READ_32 "Can't read 32 bytes" #define MSG_NO_RECOV_SPACE "Cannot recover space in index file" -#define MSG_NO_REF_DELETE "Cannot delete with reference to another table" -#define MSG_NO_REF_UPDATE "Cannot update with reference to another table" -#define MSG_NO_REMOTE_FNC "Cannot process some functions remotely" #define MSG_NO_ROWID_FOR_AM "Can't get RowID in direct access for tables of type %s" #define MSG_NO_ROW_NODE "Row node name is not defined" #define MSG_NO_SECTION_NAME "Missing section name" #define MSG_NO_SEC_UPDATE "Cannot update section names" -#define MSG_NO_SELECTED_DB "No selected database" -#define MSG_NO_SELF_PIVOT "Cannot pivot oneself!" -#define MSG_NO_SERVER_FOUND "No server found" #define MSG_NO_SETPOS_YET "%s SetPos not implemented yet" -#define MSG_NO_SFEXIT_UNIX "Function %s not available on Unix" -#define MSG_NO_SOURCE " (no source)" #define MSG_NO_SPEC_COL "No MySQL special columns" -#define MSG_NO_SQL_DELETE "Delete cannot be currently used for SQL views" #define MSG_NO_SUB_VAL "No sub value for array of type %d" -#define MSG_NO_SUCH_INDEX "No indexes %s on table %s" -#define MSG_NO_SUCH_SERVER "cannot find the server %s" -#define MSG_NO_SUCH_TABLE "Table %s not in DB" #define MSG_NO_TABCOL_DATA "No data found for table %s column %s" -#define MSG_NO_TABLE_COL "No columns found for %s" #define MSG_NO_TABLE_DEL "Delete not enabled for %s tables " -#define MSG_NO_TABLE_DESC "No Table Description Block" -#define MSG_NO_TABLE_INDEX "Table %s has no index" -#define MSG_NO_TABLE_LIST "No table list" #define MSG_NO_TAB_DATA "No data found for table %s" -#define MSG_NO_TERM_IN_TOK "Non terminal cannot be used in token rules" -#define MSG_NO_TOKEN_DB "Cannot find DB for Token column %s" -#define MSG_NO_UNIX_CATINFO "No catalog info under Unix" -#define MSG_NO_UPDEL_JOIN "Update/Delete on ODBC table cannot be joined" #define MSG_NO_VCT_DELETE "Partial delete not yet implemented for VCT files" -#define MSG_NO_VIEW_COLDEF "No coldefs available for views" -#define MSG_NO_VIEW_SORT "Cannot sort/join SQL functional view %s" #define MSG_NO_ZIP_DELETE "Delete Zip files not implemented yet" -#define MSG_NO_ZIP_DIR_ACC "Direct access of ZDOS tables not implemented yet" -#define MSG_NULL_COL_VALUE "Column Value block is NULL" -#define MSG_NULL_ENTRY "InitLang, null entry %d %s" -#define MSG_NULL_QUERY "Null query" -#define MSG_NUMVAL_NOMATCH "Numval mismatch for %s" -#define MSG_N_FULL_PARSES "%d full parses" -#define MSG_ODBC_READ_ONLY "ODBC is currently read only" -#define MSG_OFFSET_NOT_SUPP "Offset not implemented for this type of sub query" -#define MSG_ONE_LANG_YET "Already one language in edition" -#define MSG_ONE_PARAM_ONLY "Only one parameter allowed" -#define MSG_ONLY_LOG10_IMPL "Only Log10 is implemented" -#define MSG_ON_LANGUAGE "Language %.8s version %d.%d loaded for editing" #define MSG_OPENING "Opening" -#define MSG_OPENING_QUERY "Opening query" #define MSG_OPEN_EMPTY_FILE "Opening empty file %s: %s" #define MSG_OPEN_ERROR "Open error %d in mode %d on %s: " #define MSG_OPEN_ERROR_IS "Open error on %s: %s" -#define MSG_OPEN_ERROR_ON "Open error on %s" #define MSG_OPEN_MODE_ERROR "Open(%s) error %d on %s" -#define MSG_OPEN_SORT_ERROR "Logical sort error in QUERY Open" #define MSG_OPEN_STRERROR "open error: %s" -#define MSG_OPEN_W_ERROR "Couldn't open %s for writing" #define MSG_OPTBLK_RD_ERR "Error reading opt block values: %s" #define MSG_OPTBLK_WR_ERR "Error writing opt block values: %s" #define MSG_OPTIMIZING "Optimizing " @@ -756,258 +238,83 @@ #define MSG_OPT_DVAL_WR_ERR "Error writing distinct values: %s" #define MSG_OPT_HEAD_RD_ERR "Error reading opt file header: %s" #define MSG_OPT_HEAD_WR_ERR "Error writing opt file header: %s" -#define MSG_OPT_INIT "Optimization initialized" #define MSG_OPT_LOGIC_ERR "Logical error in SetBitmap, i=%d" #define MSG_OPT_MAX_RD_ERR "Error reading opt max values: %s" #define MSG_OPT_MAX_WR_ERR "Error writing opt max values: %s" #define MSG_OPT_MIN_RD_ERR "Error reading opt min values: %s" #define MSG_OPT_MIN_WR_ERR "Error writing opt min values: %s" #define MSG_OPT_NOT_MATCH "Non-matching opt file %s" -#define MSG_OP_RES_TOO_LONG "Result too long for operator=%d" -#define MSG_ORDER_OUT_RANGE "Order %d out of range" -#define MSG_ORDER_TWICE "Ordering twice the same select item" #define MSG_PAGE_ERROR "In page error" #define MSG_PARM_CNT_MISS "Parameter count mismatch" -#define MSG_PARSE_NULL_SEM "Parse with null semantics" -#define MSG_PARSING_QUERY "Parsing query" -#define MSG_PIX_ERROR "Pix %s error Rule_no=%u\n" -#define MSG_PIX_TEST_ERROR "Rule=%u: pix-TEST not in first node\n" -#define MSG_PLG_READ_ONLY "PLG is currently Read Only" -#define MSG_PLM_NULL_SFP "TABPLM ReadDB: Sfp is NULL" -#define MSG_PLUG_NOT_INIT "Plug was not initialized\n" -#define MSG_PLUG_NOT_RUN "Plug is not running" -#define MSG_PNODE_RULE "(P_node %d rule %d) " -#define MSG_POS_TOO_LONG "%s too long (>%d)" #define MSG_PREC_VBLP_NULL "ARRAY SetPrecision: Vblp is NULL" #define MSG_PRIV_INSTR "Privileged instruction" #define MSG_PROCADD_ERROR "Error %d getting address of %s" -#define MSG_PROCESS_SUBQRY "Processing Sub-Query" -#define MSG_PROC_WOULD_LOOP "Process would loop (maxres=%d maxlin=%d)" -#define MSG_PROGRESS_INFO "Progress Information" -#define MSG_PROMPT_CANCEL "Prompt was cancelled" -#define MSG_PROMPT_NIY "Prompt not implemented for this configuration" -#define MSG_PTR_NOT_FOUND "Pointer not found Num=%d ti1=%d" -#define MSG_PXDEF_IS_NULL "Pxdef is NULL" -#define MSG_QRY_READ_ONLY "QRY views are read only" #define MSG_QUERY_CANCELLED "Query Cancelled by User" -#define MSG_QUERY_NOT_EXEC "Query not executed" -#define MSG_QUERY_SAVED "Query %s saved" -#define MSG_QUOTE_IN_QUOTE "Quote char inside quoted field in line %d" -#define MSG_RANGE_NIY "Range NIY for %s" #define MSG_RANGE_NO_JOIN "Range is not meant for join index" #define MSG_RC_READING "rc=%d reading table %s" -#define MSG_READB_BAD_INIT "%s ReadDB called with Init=0" -#define MSG_READCOL_ERROR "SQLCOL ReadColumn error" -#define MSG_READING "Reading" -#define MSG_READING_FROM "Reading from %s" -#define MSG_READING_RECORD "Error reading record %d of %s" #define MSG_READY "Ready" #define MSG_READ_ERROR "Error reading %s: %s" -#define MSG_READ_ERROR_RC "Read error, rc=%d" -#define MSG_READ_MEM_ERROR "Reading memory %d: size=%d" #define MSG_READ_ONLY "Cannot modify this read/only protected table" #define MSG_READ_SEEK_ERROR "Read seek error: %s" -#define MSG_READ_SEG_ERROR "Reading segment %d: size=%d" -#define MSG_RECEIVED "Received %c\n" -#define MSG_RECORD_ERROR "Error reading record %d of %s" -#define MSG_RECORD_NO_SEP "Record with no separator" -#define MSG_REC_SKIPPED " (%d bad records skipped by MaxErr setting)" -#define MSG_REDUCE_INDEX "Reducing index" #define MSG_REGISTER_ERR "Unable to register NS with prefix='%s' and href='%s'" -#define MSG_REMOTE_CONN_ERR "Remote connection failed" #define MSG_REMOVE_ERROR "Error removing %s: %s" -#define MSG_REMOVE_NOT_IMPL "Remove not implemented for non-table TDB" #define MSG_RENAME_ERROR "Error renaming %s to %s: %s" -#define MSG_RENUM_RULES "Renumber rules and enter ADD again (rule saved in buffer)" -#define MSG_REORDER_INDEX "Reordering index" -#define MSG_REQU_ARG_NUM "Function %s requires %d arguments" -#define MSG_RESET_TO "%s reset to %d" -#define MSG_RES_NOT_UNIQUE "Result is not a unique value" -#define MSG_RET_FROM_LANG "Return to language %s version %d.%d from language %s version %d.%d" #define MSG_ROWID_NOT_IMPL "RowNumber not implemented for tables of type %s" -#define MSG_ROWS_SELECTED "%d rows selected in %.2lf sec" -#define MSG_ROWS_TRUNCATED " (truncated by MAXRES, LIMIT, FREQ or AreaSize setting)" -#define MSG_ROW_ARGNB_ERR "ROW arg number mismatch (%d,%d)" -#define MSG_RPC_SERVER_ERR "RPC error, server not responding" -#define MSG_RSC_ALLOC_ERROR "Memory allocation error in Rescol %s" -#define MSG_RULE_ENTERED "Rule %d entered" -#define MSG_RULE_SUBSET_ERR "Rules Subset error" -#define MSG_SAVING_INDEX "Saving index file" -#define MSG_SCAN_NOT_IMP "Scan not implemented" #define MSG_SEC_KEY_FIRST "Section and key names must come first on Insert" #define MSG_SEC_NAME_FIRST "Section name must come first on Insert" -#define MSG_SEC_NOT_FOUND "Section %s not found in %s" -#define MSG_SEEK_ERROR "Seek error in CopyHeader" -#define MSG_SEMANTIC_TREE "Semantic Tree" -#define MSG_SEM_BAD_REF "Sem name @%d refers to an argument of type not 0 or 1" -#define MSG_SEM_UNKNOWN "unknown, rc=%d" #define MSG_SEP_IN_FIELD "Field %d contains the separator character" #define MSG_SEQUENCE_ERROR "Sequence error on statement allocation" #define MSG_SETEOF_ERROR "Error %d in SetEndOfFile" #define MSG_SETRECPOS_NIY "SetRecpos not implemented for this table type" -#define MSG_SET_LOCALE "Locale set to %s" -#define MSG_SET_NULL_DOM "Setting value %d to a null domain" -#define MSG_SET_OP_NOT_IMPL "sorry - set operators not implemented" #define MSG_SET_STR_TRUNC "SetValue: String would be truncated" -#define MSG_SEVERAL_TREES "Some tables are not properly joined" #define MSG_SFP_ERROR "SetFilePointer error: %s" -#define MSG_SFUNC_NOT_IMPL "Scalar Function %s not implemented" #define MSG_SHARED_LIB_ERR "Error loading shared library %s: %s" #define MSG_SINGLE_STEP "Single step" -#define MSG_SLEEP "I slept %d milliseconds" -#define MSG_SMART_SORTING "Retrieving sorted rows (pass %d of %d)" -#define MSG_SMART_SORT_ERR "Logical Smart Sort Error 1" -#define MSG_SORTING "Sorting" -#define MSG_SORTING_INDEX "Sorting index" #define MSG_SORTING_VAL "Sorting %d values" -#define MSG_SORT_JOIN_INDEX "Sorting join index" #define MSG_SPCOL_READONLY "Special column %s is Read Only" -#define MSG_SPEC_CMD_SEP "Special commands must be executed separately" -#define MSG_SQL_BAD_TYPE "RephraseSQL: type %d not supported" -#define MSG_SQL_BLOCK_MISM "CheckColumn: SQL current blocks mismatch" #define MSG_SQL_CONF_ERROR "SQL Error: SQL_CONFORMANCE" -#define MSG_SQL_READ_ONLY "SQL views are currently read only" #define MSG_SRCH_CLOSE_ERR "Couldn't close search handle" #define MSG_SRC_TABLE_UNDEF "Source table is not defined" -#define MSG_STACK_ERROR "stack error, i=%d\n" -#define MSG_STACK_OVERFLOW "Parser: Stack overflow\n" -#define MSG_STRG_NOT_FOUND "String not found" -#define MSG_STRING_INV_LIST "List invalid for SemString" -#define MSG_STRING_TOO_BIG "String too big for domain %s" -#define MSG_SUBALLOC_ERROR "Not enough memory in area %p for request of %d (used=%d free=%d)" -#define MSG_SUBAL_HUGE_ERR "Not enough memory in huge %p for request of %d" -#define MSG_SUBARG_NOSEM "@ or sub-phrase arg of level %d points to a meaningless argument" -#define MSG_SUBARG_OUTRANGE "Out of range @ or sub-phrase argument of level %d" -#define MSG_SUBQRY_ONEITEM "Sub-Query must have exactly one select item" -#define MSG_SUBSET_ERROR "SubSet error in LoadDB" -#define MSG_SUB_OPEN_YET "Subquery already open" -#define MSG_SUB_RES_TOO_LNG "Result too long for SUBSTR" -#define MSG_SYNTAX_ERROR "Syntax error" -#define MSG_SYSTEM_ERROR "System error %d" -#define MSG_S_ACCESS_DENIED "%s: access denied" -#define MSG_S_ERROR "%s error" -#define MSG_S_ERROR_NUM "%s: error=%d" -#define MSG_S_INTRUPT_ERROR "%s: interrupt error" -#define MSG_S_INVALID_PARM "%s: invalid parameter" -#define MSG_S_INV_ADDRESS "%s: invalid address" -#define MSG_S_UNKNOWN_ERROR "%s: unknown error code %u" +#define MSG_STACK_OVERFLOW "Stack overflow" #define MSG_TABDIR_READONLY "DIR tables are read/only" -#define MSG_TABLE_ALREADY "Table %s already exists" -#define MSG_TABLE_ALTERED "%s table %s altered" -#define MSG_TABLE_CREATED "%s table %s created" -#define MSG_TABLE_DROPPED "Table %s dropped" -#define MSG_TABLE_MULT_JOIN "Table %s used more than once for join" -#define MSG_TABLE_NOT_IN_DB "Table %s does not exist in %s" #define MSG_TABLE_NOT_OPT "Not an optimizable table" -#define MSG_TABLE_NO_INDEX "Table %s cannot be indexed" -#define MSG_TABLE_NO_OPT "Table %s does not exist or type is not optimizable" +#define MSG_TABLE_NO_INDEX "Table %s is not indexable" #define MSG_TABLE_READ_ONLY "%s tables are read only " #define MSG_TABMUL_READONLY "Multiple tables are read/only" -#define MSG_TAB_NOT_LOADED " (some tables could not be loaded)" -#define MSG_TAB_NOT_SPEC "No table specified" -#define MSG_TB_VW_NOTIN_DB "Table or view %s not in DB" -#define MSG_TDB_NXT_NOT_NUL "Tdb.Next not NULL" -#define MSG_TDB_USE_ERROR "Error, Tdbp->Use=%d" -#define MSG_TOO_MANY_COLS "Too many columns" -#define MSG_TOO_MANY_COLTAB "Too many columns in %s (%d)" #define MSG_TOO_MANY_FIELDS "Too many fields line %d of %s" #define MSG_TOO_MANY_JUMPS "Too many jump levels" #define MSG_TOO_MANY_KEYS "Too many keys (%d)" -#define MSG_TOO_MANY_POS "Too many pos_codes" -#define MSG_TOO_MANY_TABLES "Too many tables (%d)" -#define MSG_TOPSEM_ERROR "Unknown error in TopSem" #define MSG_TO_BLK_IS_NULL "To Blk is NULL" -#define MSG_TO_FTR_NOT_NULL "Set.To_Ftr is not null" -#define MSG_TO_PIX_NOT_NULL "Set.To_Pix is not null" -#define MSG_TO_SEM_NOT_NULL "Set.To_Sem is not null" #define MSG_TRUNCATE_ERROR "truncate error: %s" #define MSG_TRUNC_BY_ESTIM "truncated by Estimate" -#define MSG_TYPES_ERROR "Error on Types(%d)" -#define MSG_TYPE_CONV_ERROR "Type cannot be converted in expression" -#define MSG_TYPE_DEF_MISM "type and definition do not match" #define MSG_TYPE_MISMATCH "Key and source are not of the same type" -#define MSG_TYPE_RECFM_MISM "Type and Recfm mismatch" -#define MSG_TYPE_TO_VERIFY "Type to verify: %d" #define MSG_TYPE_VALUE_ERR "Column %s type(%s)/value(%s) mismatch" #define MSG_UNBALANCE_QUOTE "Unbalanced quote in line %d" #define MSG_UNDEFINED_AM "COLBLK %s: undefined Access Method" -#define MSG_UNDEFINED_PATH "Undefined Plgcnx.ini path" -#define MSG_UNDEF_COL_COUNT "Count on undefined column" -#define MSG_UNKNOWN_DOMAIN "Unknown domain %s" -#define MSG_UNKNOWN_ERROR "Unknown error" #define MSG_UNKNOWN_EXCPT "Unknown exception" -#define MSG_UNKNOWN_NAME "Unknown name: %.8s" -#define MSG_UNKNOWN_PATH "Unknown Plgcnx.ini path" -#define MSG_UNKNOWN_POS "Unknown pos name: %s" -#define MSG_UNKNOWN_SEM "Unknown Sem %.8s, rc=%d" -#define MSG_UNKNOWN_SYNONYM "Unknown synonym" -#define MSG_UNKNW_QRY_TYPE "ReadDB: unknown query type" -#define MSG_UNKN_ERR_CODE "Unknown error code %d" -#define MSG_UNLOADABLE " unloadable: " -#define MSG_UNLOADABLE_PRM "%s unloadable: %s" #define MSG_UNMATCH_FIL_ARG "Unmatched filter argument" -#define MSG_UNQ_COL_SEV_TAB "Unqualified column %s is in several tables" -#define MSG_UNRESOLVED_ARG "?Unresolved argument %s at %d line %d" #define MSG_UPDATE_ERROR "Error updating %s" -#define MSG_UPDATING_ROWS "Updating rows" #define MSG_UPD_ZIP_NOT_IMP "Updating ZDOS tables not implemented yet" -#define MSG_UP_LANGUAGE "Block language %.8s version %d level %d loaded" -#define MSG_USED_FREE_MEM "%d used in sarea, %d free" -#define MSG_USETEMP_IS "UseTemp is %s" -#define MSG_USETEMP_RESET ". Usetemp reset to Auto" -#define MSG_USETEMP_SET "UseTemp set to %s" -#define MSG_USE_NO_MATCH "Use do not match : Use=%d, ti2=%d, ti3=%d" -#define MSG_USING_INDEX " (Using index" -#define MSG_VALIST_MISMATCH "List of values mismatch" #define MSG_VALSTR_TOO_LONG "Value %s too long for string of length %d" #define MSG_VALTYPE_NOMATCH "Non matching Value types" #define MSG_VALUE_ERROR "Column %s: value is null" -#define MSG_VALUE_NOT_ALLOC "Value not allocated for column R%d %s" #define MSG_VALUE_TOO_BIG "Value %lld too big for column %s" #define MSG_VALUE_TOO_LONG "Value %s too long for column %s of length %d" #define MSG_VAL_ALLOC_ERR "Cannot allocate value node" -#define MSG_VAL_TOO_LONG "Value field %s too long for %s" -#define MSG_VIEW_ALREADY "View %s already exists" -#define MSG_VIEW_CREATED "%s view %s created" -#define MSG_VIEW_DROPPED "View %s dropped" -#define MSG_VIEW_NOT_IN_DB "View %s does not exist in %s" #define MSG_VIR_NO_DELETE "Delete not allowed for %s tables" #define MSG_VIR_READ_ONLY "Virtual %s tables are read only" -#define MSG_VM_LANG "Language has VM format, not supported" #define MSG_VOID_FIRST_ARG "First argument should not be void" -#define MSG_VOID_IN_STRING "Error: void IN string" -#define MSG_VOID_ORDER_LIST "Null ordering list, system error ?" -#define MSG_VOID_POS_DICT "Void Pos dictionary" -#define MSG_VOID_QUERY "Void query %s" #define MSG_WORK_AREA "Work area: %s" -#define MSG_WORK_TOO_SMALL "Work area too small, increase AreaSize" -#define MSG_WRITE_ERROR "Error writing to %s" #define MSG_WRITE_SEEK_ERR "Write seek error: %s" #define MSG_WRITE_STRERROR "Error writing %s: %s" #define MSG_WRITING "Writing" #define MSG_WRITING_ERROR "Error writing to %s: %s" -#define MSG_WRITING_QUERY "Writing query: " -#define MSG_WRONG_ARG_NUM "Function %s does not take %d arguments" -#define MSG_WRONG_COL_NUM "Column number %d out of range in %s" -#define MSG_WRONG_DB_LIST "Wrong or nul database list" -#define MSG_WRONG_FUNCTION "Wrong function %d" -#define MSG_WRONG_OP_PARM "Wrong operator or parameters for %s" -#define MSG_WRONG_PARMS "Wrong parameters for %s" -#define MSG_WRONG_PASSWORD "Illegal password for %s" -#define MSG_WRONG_TYPE "unsupported type" -#define MSG_WRONG_USERFILE "Wrong Userfile size=%d" #define MSG_WS_CONV_ERR "Error converting %s to WS" #define MSG_XCOL_MISMATCH "Column %s mismatch in index" -#define MSG_XDB_DEL_ERROR "Error while deleting entries from XDB file" #define MSG_XFILE_READERR "Error %d reading index file" -#define MSG_XFILE_TOO_SMALL "Index file is smaller than index length" #define MSG_XFILE_WRITERR "Error writing index file: %s" #define MSG_XMLTAB_INIT_ERR "Error initializing XML table" #define MSG_XML_INIT_ERROR "Error initializing new XML file" #define MSG_XPATH_CNTX_ERR "Unable to create new XPath context" #define MSG_XPATH_EVAL_ERR "Unable to evaluate xpath location '%s'" #define MSG_XPATH_NOT_SUPP "Unsupported Xpath for column %s" -#define MSG_X_ARG_ADDED "%d arguments have been added" -#define MSG_X_ARG_SET "%d arguments have been set" -#define MSG_X_ON_TAB " %s on %s(" -#define MSG_ZERO_DIVIDE "Zero divide in expression" diff --git a/storage/connect/enids.h b/storage/connect/enids.h new file mode 100644 index 00000000000..d171955b0bd --- /dev/null +++ b/storage/connect/enids.h @@ -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; diff --git a/storage/connect/filamap.cpp b/storage/connect/filamap.cpp index 5efe9c95d81..08f87e2b836 100644 --- a/storage/connect/filamap.cpp +++ b/storage/connect/filamap.cpp @@ -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; diff --git a/storage/connect/filamdbf.cpp b/storage/connect/filamdbf.cpp index a214ab8acf2..98b8bb6fd95 100644 --- a/storage/connect/filamdbf.cpp +++ b/storage/connect/filamdbf.cpp @@ -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 diff --git a/storage/connect/filamfix.cpp b/storage/connect/filamfix.cpp index 1fa72d52746..980d558eee5 100644 --- a/storage/connect/filamfix.cpp +++ b/storage/connect/filamfix.cpp @@ -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 diff --git a/storage/connect/filamtxt.cpp b/storage/connect/filamtxt.cpp index 851faaaaf1a..675c021fe51 100644 --- a/storage/connect/filamtxt.cpp +++ b/storage/connect/filamtxt.cpp @@ -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 diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp index b93adbd13dd..c449347bbcb 100755 --- a/storage/connect/filamvct.cpp +++ b/storage/connect/filamvct.cpp @@ -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 diff --git a/storage/connect/filamzip.cpp b/storage/connect/filamzip.cpp index 8473011ab8b..1288689325c 100644 --- a/storage/connect/filamzip.cpp +++ b/storage/connect/filamzip.cpp @@ -62,7 +62,6 @@ /* DB static variables. */ /***********************************************************************/ extern int num_read, num_there, num_eq[]; // Statistics -extern "C" int trace; /* ------------------------------------------------------------------- */ diff --git a/storage/connect/filamzip.h b/storage/connect/filamzip.h index 6d27cb67e81..edb8b5db323 100644 --- a/storage/connect/filamzip.h +++ b/storage/connect/filamzip.h @@ -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 diff --git a/storage/connect/filter.cpp b/storage/connect/filter.cpp index ce4f69c5ecc..949d49c2943 100644 --- a/storage/connect/filter.cpp +++ b/storage/connect/filter.cpp @@ -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; diff --git a/storage/connect/frcas.h b/storage/connect/frcas.h new file mode 100644 index 00000000000..e9401d475ae --- /dev/null +++ b/storage/connect/frcas.h @@ -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; diff --git a/storage/connect/french.msg b/storage/connect/french.msg new file mode 100644 index 00000000000..019df607be3 --- /dev/null +++ b/storage/connect/french.msg @@ -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" diff --git a/storage/connect/frids.h b/storage/connect/frids.h new file mode 100644 index 00000000000..561dbb68837 --- /dev/null +++ b/storage/connect/frids.h @@ -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; diff --git a/storage/connect/frmsg.h b/storage/connect/frmsg.h new file mode 100644 index 00000000000..d58779b948f --- /dev/null +++ b/storage/connect/frmsg.h @@ -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" diff --git a/storage/connect/global.h b/storage/connect/global.h index ae4440b12bc..88e5094d6d2 100644 --- a/storage/connect/global.h +++ b/storage/connect/global.h @@ -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" diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index f6f7fac8a76..ebf286a049b 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -170,8 +170,8 @@ #define SZWMIN 4194304 // Minimum work area size 4M extern "C" { - char version[]= "Version 1.03.0003 August 22, 2014"; - char compver[]= "Version 1.03.0003 " __DATE__ " " __TIME__; + char version[]= "Version 1.03.0005 November 08, 2014"; + char compver[]= "Version 1.03.0005 " __DATE__ " " __TIME__; #if defined(WIN32) char slash= '\\'; @@ -179,65 +179,172 @@ extern "C" { char slash= '/'; #endif // !WIN32 -#if defined(XMSG) - char msglang[]; // Default message language -#endif - int trace= 0; // The general trace value - int xconv= 0; // The type conversion option - int zconv= SZCONV; // The text conversion size - USETEMP Use_Temp= TMP_AUTO; // The temporary file use +// int trace= 0; // The general trace value + ulong xconv= 0; // The type conversion option + int zconv= 0; // The text conversion size } // extern "C" #if defined(XMAP) - bool xmap= false; + my_bool xmap= false; #endif // XMAP - bool xinfo= false; - uint worksize= SZWORK; +// uint worksize= 0; ulong ha_connect::num= 0; //int DTVAL::Shift= 0; /* CONNECT system variables */ -static int xtrace= 0; -static int conv_size= SZCONV; -static uint work_size= SZWORK; -static ulong type_conv= 0; -static ulong use_tempfile= 1; +//atic int conv_size= 0; +//atic uint work_size= 0; +//atic ulong type_conv= 0; #if defined(XMAP) -static my_bool indx_map= 0; +//atic my_bool indx_map= 0; #endif // XMAP -static my_bool exact_info= 0; +#if defined(XMSG) +extern "C" { + char *msg_path; +} // extern "C" +#endif // XMSG /***********************************************************************/ /* Utility functions. */ /***********************************************************************/ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info); -void PushWarning(PGLOBAL g, THD *thd, int level); -bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host, - const char *db, char *tab, const char *src, int port); - +PQRYRES VirColumns(PGLOBAL g, char *tab, char *db, bool info); +void PushWarning(PGLOBAL g, THD *thd, int level); +bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host, + const char *db, char *tab, const char *src, int port); +bool ExactInfo(void); +USETEMP UseTemp(void); +uint GetWorkSize(void); +void SetWorkSize(uint); +extern "C" const char *msglang(void); static PCONNECT GetUser(THD *thd, PCONNECT xp); static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp); static handler *connect_create_handler(handlerton *hton, - TABLE_SHARE *table, - MEM_ROOT *mem_root); + TABLE_SHARE *table, + MEM_ROOT *mem_root); static int connect_assisted_discovery(handlerton *hton, THD* thd, TABLE_SHARE *table_s, HA_CREATE_INFO *info); +/****************************************************************************/ +/* Return str as a zero terminated string. */ +/****************************************************************************/ +static char *strz(PGLOBAL g, LEX_STRING &ls) +{ + char *str= (char*)PlugSubAlloc(g, NULL, ls.length + 1); + + memcpy(str, ls.str, ls.length); + str[ls.length]= 0; + return str; +} // end of strz + +/***********************************************************************/ +/* CONNECT session variables definitions. */ +/***********************************************************************/ +// Tracing: 0 no, 1 yes, >1 more tracing +static MYSQL_THDVAR_INT(xtrace, + PLUGIN_VAR_RQCMDARG, "Console trace value.", + NULL, NULL, 0, 0, INT_MAX, 1); + +// Getting exact info values +static MYSQL_THDVAR_BOOL(exact_info, PLUGIN_VAR_RQCMDARG, + "Getting exact info values", + NULL, NULL, 0); + +/** + Temporary file usage: + no: Not using temporary file + auto: Using temporary file when needed + yes: Allways using temporary file + force: Force using temporary file (no MAP) + test: Reserved +*/ +const char *usetemp_names[]= +{ + "NO", "AUTO", "YES", "FORCE", "TEST", NullS +}; + +TYPELIB usetemp_typelib= +{ + array_elements(usetemp_names) - 1, "usetemp_typelib", + usetemp_names, NULL +}; + +static MYSQL_THDVAR_ENUM( + use_tempfile, // name + PLUGIN_VAR_RQCMDARG, // opt + "Temporary file use.", // comment + NULL, // check + NULL, // update function + 1, // def (AUTO) + &usetemp_typelib); // typelib + +// Size used for g->Sarea_Size +static MYSQL_THDVAR_UINT(work_size, + PLUGIN_VAR_RQCMDARG, + "Size of the CONNECT work area.", + NULL, NULL, SZWORK, SZWMIN, UINT_MAX, 1); + +#if defined(XMSG) || defined(NEWMSG) +const char *language_names[]= +{ + "default", "english", "french", NullS +}; + +TYPELIB language_typelib= +{ + array_elements(language_names) - 1, "language_typelib", + language_names, NULL +}; + +static MYSQL_THDVAR_ENUM( + msg_lang, // name + PLUGIN_VAR_RQCMDARG, // opt + "Message language", // comment + NULL, // check + NULL, // update + 1, // def (ENGLISH) + &language_typelib); // typelib +#endif // XMSG || NEWMSG + +/***********************************************************************/ +/* Function to export session variable values to other source files. */ +/***********************************************************************/ +extern "C" int GetTraceValue(void) {return THDVAR(current_thd, xtrace);} +bool ExactInfo(void) {return THDVAR(current_thd, exact_info);} +USETEMP UseTemp(void) {return (USETEMP)THDVAR(current_thd, use_tempfile);} +uint GetWorkSize(void) {return THDVAR(current_thd, work_size);} +void SetWorkSize(uint n) +{ + // Changing the session variable value seems to be impossible here + // and should be done in a check function + push_warning(current_thd, Sql_condition::WARN_LEVEL_WARN, 0, + "Work size too big, try setting a smaller value"); +} // end of SetWorkSize +#if defined(XMSG) || defined(NEWMSG) +extern "C" const char *msglang(void) +{ + return language_names[THDVAR(current_thd, msg_lang)]; +} // end of msglang +#else // !XMSG && !NEWMSG +extern "C" const char *msglang(void) +{ +#if defined(FRENCH) + return "french"; +#else // DEFAULT + return "english"; +#endif // DEFAULT +} // end of msglang +#endif // !XMSG && !NEWMSG + +#if 0 /***********************************************************************/ /* Global variables update functions. */ /***********************************************************************/ -static void update_connect_xtrace(MYSQL_THD thd, - struct st_mysql_sys_var *var, - void *var_ptr, const void *save) -{ - trace= *(int *)var_ptr= *(int *)save; -} // end of update_connect_xtrace - static void update_connect_zconv(MYSQL_THD thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) @@ -252,35 +359,57 @@ static void update_connect_xconv(MYSQL_THD thd, xconv= (int)(*(ulong *)var_ptr= *(ulong *)save); } // end of update_connect_xconv -static void update_connect_worksize(MYSQL_THD thd, - struct st_mysql_sys_var *var, - void *var_ptr, const void *save) -{ - worksize= (uint)(*(ulong *)var_ptr= *(ulong *)save); -} // end of update_connect_worksize - -static void update_connect_usetemp(MYSQL_THD thd, - struct st_mysql_sys_var *var, - void *var_ptr, const void *save) -{ - Use_Temp= (USETEMP)(*(ulong *)var_ptr= *(ulong *)save); -} // end of update_connect_usetemp - #if defined(XMAP) static void update_connect_xmap(MYSQL_THD thd, struct st_mysql_sys_var *var, void *var_ptr, const void *save) { - xmap= (bool)(*(my_bool *)var_ptr= *(my_bool *)save); + xmap= (my_bool)(*(my_bool *)var_ptr= *(my_bool *)save); } // end of update_connect_xmap #endif // XMAP +#endif // 0 -static void update_connect_xinfo(MYSQL_THD thd, - struct st_mysql_sys_var *var, - void *var_ptr, const void *save) +#if 0 // (was XMSG) Unuseful because not called for default value +static void update_msg_path(MYSQL_THD thd, + struct st_mysql_sys_var *var, + void *var_ptr, const void *save) { - xinfo= (bool)(*(my_bool *)var_ptr= *(my_bool *)save); -} // end of update_connect_xinfo + char *value= *(char**)save; + char *old= *(char**)var_ptr; + + if (value) + *(char**)var_ptr= my_strdup(value, MYF(0)); + else + *(char**)var_ptr= 0; + + my_free(old); +} // end of update_msg_path + +static int check_msg_path (MYSQL_THD thd, struct st_mysql_sys_var *var, + void *save, struct st_mysql_value *value) +{ + const char *path; + char buff[512]; + int len= sizeof(buff); + + path= value->val_str(value, buff, &len); + + if (path && *path != '*') { + /* Save a pointer to the name in the + 'file_format_name_map' constant array. */ + *(char**)save= my_strdup(path, MYF(0)); + return(0); + } else { + push_warning_printf(thd, + Sql_condition::WARN_LEVEL_WARN, + ER_WRONG_ARGUMENTS, + "CONNECT: invalid message path"); + } // endif path + + *(char**)save= NULL; + return(1); +} // end of check_msg_path +#endif // 0 /***********************************************************************/ /* The CONNECT handlerton object. */ @@ -451,10 +580,25 @@ static int connect_init_func(void *p) { DBUG_ENTER("connect_init_func"); - sql_print_information("CONNECT: %s", compver); +// added from Sergei mail +#if 0 // (defined(LINUX)) + Dl_info dl_info; + if (dladdr(&connect_hton, &dl_info)) + { + if (dlopen(dl_info.dli_fname, RTLD_NOLOAD | RTLD_NOW | RTLD_GLOBAL) == 0) + { + sql_print_information("CONNECT: dlopen() failed, OEM table type is not supported"); + sql_print_information("CONNECT: %s", dlerror()); + } + } + else + { + sql_print_information("CONNECT: dladdr() failed, OEM table type is not supported"); + sql_print_information("CONNECT: %s", dlerror()); + } +#endif // 0 (LINUX) - // xtrace is now a system variable - trace= xtrace; + sql_print_information("CONNECT: %s", compver); #ifdef LIBXML2_SUPPORT XmlInitParserLib(); @@ -473,7 +617,7 @@ static int connect_init_func(void *p) connect_hton->tablefile_extensions= ha_connect_exts; connect_hton->discover_table_structure= connect_assisted_discovery; - if (xtrace) + if (trace) sql_print_information("connect_init: hton=%p", p); DTVAL::SetTimeShift(); // Initialize time zone shift once for all @@ -546,9 +690,10 @@ static handler* connect_create_handler(handlerton *hton, { handler *h= new (mem_root) ha_connect(hton, table); - if (xtrace) - htrc("New CONNECT %p, table: %s\n", - h, table ? table->table_name.str : ""); + if (trace) + htrc("New CONNECT %p, table: %.*s\n", h, + table ? table->table_name.length : 6, + table ? table->table_name.str : ""); return h; } // end of connect_create_handler @@ -601,8 +746,9 @@ ha_connect::ha_connect(handlerton *hton, TABLE_SHARE *table_arg) /****************************************************************************/ ha_connect::~ha_connect(void) { - if (xtrace) - htrc("Delete CONNECT %p, table: %s, xp=%p count=%d\n", this, + if (trace) + htrc("Delete CONNECT %p, table: %.*s, xp=%p count=%d\n", this, + table ? table->s->table_name.length : 6, table ? table->s->table_name.str : "", xp, xp ? xp->count : 0); @@ -711,6 +857,7 @@ const char *ha_connect::index_type(uint inx) return "XINDEX"; case 2: return "REMOTE"; + case 3: return "VIRTUAL"; } // endswitch return "Unknown"; @@ -867,10 +1014,11 @@ char *ha_connect::GetStringOption(char *opname, char *sdef) PTOS options= GetTableOptionStruct(); if (!stricmp(opname, "Connect")) { - LEX_STRING cnc= (tshp) ? tshp->connect_string : table->s->connect_string; + LEX_STRING cnc= (tshp) ? tshp->connect_string + : table->s->connect_string; if (cnc.length) - opval= GetRealString(cnc.str); + opval= GetRealString(strz(xp->g, cnc)); } else if (!stricmp(opname, "Query_String")) opval= thd_query_string(table->in_use)->str; @@ -1210,11 +1358,9 @@ void *ha_connect::GetColumnOption(PGLOBAL g, void *field, PCOLINFO pcf) pcf->Key= 0; // Not used when called from MySQL // Get the comment if any - if (fp->comment.str && fp->comment.length) { - pcf->Remark= (char*)PlugSubAlloc(g, NULL, fp->comment.length + 1); - memcpy(pcf->Remark, fp->comment.str, fp->comment.length); - pcf->Remark[fp->comment.length]= 0; - } else + if (fp->comment.str && fp->comment.length) + pcf->Remark= strz(g, fp->comment); + else pcf->Remark= NULL; return fldp; @@ -1242,8 +1388,8 @@ bool ha_connect::GetIndexOption(KEY *kp, char *opname) else if (!stricmp(opname, "Mapped")) opval= options->mapped; - } else if (kp->comment.str != NULL) { - char *pv, *oplist= kp->comment.str; + } else if (kp->comment.str && kp->comment.length) { + char *pv, *oplist= strz(xp->g, kp->comment); if ((pv= GetListOption(xp->g, opname, oplist))) opval= (!*pv || *pv == 'y' || *pv == 'Y' || atoi(pv) != 0); @@ -1280,7 +1426,7 @@ PIXDEF ha_connect::GetIndexInfo(TABLE_SHARE *s) s= table->s; for (int n= 0; (unsigned)n < s->keynames.count; n++) { - if (xtrace) + if (trace) htrc("Getting created index %d info\n", n + 1); // Find the index to describe @@ -1340,6 +1486,42 @@ PIXDEF ha_connect::GetIndexInfo(TABLE_SHARE *s) return toidx; } // end of GetIndexInfo +/****************************************************************************/ +/* Returns the index description structure used to make the index. */ +/****************************************************************************/ +bool ha_connect::CheckVirtualIndex(TABLE_SHARE *s) +{ + + char *rid; + KEY kp; + Field *fp; + PGLOBAL& g= xp->g; + + if (!s) + s= table->s; + + for (int n= 0; (unsigned)n < s->keynames.count; n++) { + kp= s->key_info[n]; + + // Now get index information + + // Get the the key parts info + for (int k= 0; (unsigned)k < kp.user_defined_key_parts; k++) { + fp= kp.key_part[k].field; + rid= (fp->option_struct) ? fp->option_struct->special : NULL; + + if (!rid || (stricmp(rid, "ROWID") && stricmp(rid, "ROWNUM"))) { + strcpy(g->Message, "Invalid virtual index"); + return true; + } // endif rowid + + } // endfor k + + } // endfor n + + return false; +} // end of CheckVirtualIndex + bool ha_connect::IsPartitioned(void) { if (tshp) @@ -1358,7 +1540,7 @@ const char *ha_connect::GetDBName(const char* name) const char *ha_connect::GetTableName(void) { - return (tshp) ? tshp->table_name.str : table_share->table_name.str; + return tshp ? tshp->table_name.str : table_share->table_name.str; } // end of GetTableName char *ha_connect::GetPartName(void) @@ -1651,7 +1833,7 @@ int ha_connect::MakeRecord(char *buf) PCOL colp= NULL; DBUG_ENTER("ha_connect::MakeRecord"); - if (xtrace > 1) + if (trace > 1) htrc("Maps: read=%08X write=%08X vcol=%08X defr=%08X defw=%08X\n", *table->read_set->bitmap, *table->write_set->bitmap, *table->vcol_set->bitmap, @@ -2081,14 +2263,14 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) if (!cond) return NULL; - if (xtrace) + if (trace) htrc("Cond type=%d\n", cond->type()); if (cond->type() == COND::COND_ITEM) { PFIL fp; Item_cond *cond_item= (Item_cond *)cond; - if (xtrace) + if (trace) htrc("Cond: Ftype=%d name=%s\n", cond_item->functype(), cond_item->func_name()); @@ -2122,9 +2304,9 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) Item_func *condf= (Item_func *)cond; Item* *args= condf->arguments(); - if (xtrace) + if (trace) htrc("Func type=%d argnum=%d\n", condf->functype(), - condf->argument_count()); + condf->argument_count()); switch (condf->functype()) { case Item_func::EQUAL_FUNC: @@ -2151,11 +2333,11 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) return NULL; for (i= 0; i < condf->argument_count(); i++) { - if (xtrace) + if (trace) htrc("Argtype(%d)=%d\n", i, args[i]->type()); if (i >= 2 && !ismul) { - if (xtrace) + if (trace) htrc("Unexpected arg for vop=%d\n", vop); continue; @@ -2172,10 +2354,10 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) !(colp[i]= tdbp->ColDB(g, (PSZ)pField->field->field_name, 0))) return NULL; // Column does not belong to this table - if (xtrace) { + if (trace) { htrc("Field index=%d\n", pField->field->field_index); htrc("Field name=%s\n", pField->field->field_name); - } // endif xtrace + } // endif trace } else { char buff[256]; @@ -2192,8 +2374,8 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) switch (args[i]->real_type()) { case COND::STRING_ITEM: - pp->Type= TYPE_STRING; pp->Value= PlugSubAllocStr(g, NULL, res->ptr(), res->length()); + pp->Type= (pp->Value) ? TYPE_STRING : TYPE_ERROR; break; case COND::INT_ITEM: pp->Type= TYPE_INT; @@ -2221,7 +2403,7 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) return NULL; } // endswitch type - if (xtrace) + if (trace) htrc("Value=%.*s\n", res->length(), res->ptr()); // Append the value to the argument list @@ -2239,7 +2421,7 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond) filp= MakeFilter(g, colp, pop, pfirst, neg); } else { - if (xtrace) + if (trace) htrc("Unsupported condition\n"); return NULL; @@ -2261,7 +2443,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) if (!cond) return NULL; - if (xtrace) + if (trace) htrc("Cond type=%d\n", cond->type()); if (cond->type() == COND::COND_ITEM) { @@ -2271,7 +2453,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) if (x) return NULL; - if (xtrace) + if (trace) htrc("Cond: Ftype=%d name=%s\n", cond_item->functype(), cond_item->func_name()); @@ -2318,7 +2500,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) Item_func *condf= (Item_func *)cond; Item* *args= condf->arguments(); - if (xtrace) + if (trace) htrc("Func type=%d argnum=%d\n", condf->functype(), condf->argument_count()); @@ -2349,11 +2531,11 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) return NULL; for (i= 0; i < condf->argument_count(); i++) { - if (xtrace) + if (trace) htrc("Argtype(%d)=%d\n", i, args[i]->type()); if (i >= 2 && !ismul) { - if (xtrace) + if (trace) htrc("Unexpected arg for vop=%d\n", vop); continue; @@ -2385,10 +2567,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) else fnm= pField->field->field_name; - if (xtrace) { + if (trace) { htrc("Field index=%d\n", pField->field->field_index); htrc("Field name=%s\n", pField->field->field_name); - } // endif xtrace + } // endif trace // IN and BETWEEN clauses should be col VOP list if (i && ismul) @@ -2424,7 +2606,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) if ((res= pval->val_str(&tmp)) == NULL) return NULL; // To be clarified - if (xtrace) + if (trace) htrc("Value=%.*s\n", res->length(), res->ptr()); // IN and BETWEEN clauses should be col VOP list @@ -2469,7 +2651,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, AMT tty, Item *cond) filp->Op= vop; } else { - if (xtrace) + if (trace) htrc("Unsupported condition\n"); return NULL; @@ -2503,6 +2685,7 @@ const COND *ha_connect::cond_push(const COND *cond) DBUG_ENTER("ha_connect::cond_push"); if (tdbp) { + int rc; PGLOBAL& g= xp->g; AMT tty= tdbp->GetAmType(); bool x= (tty == TYPE_AM_MYX || tty == TYPE_AM_XDBC); @@ -2510,6 +2693,16 @@ const COND *ha_connect::cond_push(const COND *cond) tty == TYPE_AM_TBL || tty == TYPE_AM_MYSQL || tty == TYPE_AM_PLG || x); + // Save stack and allocation environment and prepare error return + if (g->jump_level == MAX_JUMP) { + strcpy(g->Message, MSG(TOO_MANY_JUMPS)); + DBUG_RETURN(cond); + } // endif jump_level + + // This should never happen but is done to avoid crashing + if ((rc= setjmp(g->jumper[++g->jump_level])) != 0) + goto fin; + if (b) { PCFIL filp= (PCFIL)PlugSubAlloc(g, NULL, sizeof(CONDFIL)); @@ -2519,7 +2712,7 @@ const COND *ha_connect::cond_push(const COND *cond) filp->Cmds= NULL; if (CheckCond(g, filp, tty, (Item *)cond)) { - if (xtrace) + if (trace) htrc("cond_push: %s\n", filp->Body); if (!x) @@ -2534,6 +2727,8 @@ const COND *ha_connect::cond_push(const COND *cond) } else tdbp->SetFilter(CondFilter(g, (Item *)cond)); + fin: + g->jump_level--; } // endif tdbp // Let MySQL do the filtering @@ -2632,7 +2827,7 @@ int ha_connect::open(const char *name, int mode, uint test_if_locked) int rc= 0; DBUG_ENTER("ha_connect::open"); - if (xtrace) + if (trace) htrc("open: name=%s mode=%d test=%u\n", name, mode, test_if_locked); if (!(share= get_share())) @@ -2844,7 +3039,7 @@ int ha_connect::update_row(const uchar *old_data, uchar *new_data) PGLOBAL& g= xp->g; DBUG_ENTER("ha_connect::update_row"); - if (xtrace > 1) + if (trace > 1) htrc("update_row: old=%s new=%s\n", old_data, new_data); // Check values for possible change in indexed column @@ -2905,7 +3100,7 @@ int ha_connect::index_init(uint idx, bool sorted) PGLOBAL& g= xp->g; DBUG_ENTER("index_init"); - if (xtrace) + if (trace) htrc("index_init: this=%p idx=%u sorted=%d\n", this, idx, sorted); if (GetIndexType(GetRealType()) == 2) { @@ -2958,7 +3153,7 @@ int ha_connect::index_init(uint idx, bool sorted) rc= 0; } // endif indexing - if (xtrace) + if (trace) htrc("index_init: rc=%d indexing=%d active_index=%d\n", rc, indexing, active_index); @@ -3005,7 +3200,7 @@ int ha_connect::ReadIndexed(uchar *buf, OPVAL op, const uchar *key, uint key_len break; } // endswitch RC - if (xtrace > 1) + if (trace > 1) htrc("ReadIndexed: op=%d rc=%d\n", op, rc); table->status= (rc == RC_OK) ? 0 : STATUS_NOT_FOUND; @@ -3048,7 +3243,7 @@ int ha_connect::index_read(uchar * buf, const uchar * key, uint key_len, default: DBUG_RETURN(-1); break; } // endswitch find_flag - if (xtrace > 1) + if (trace > 1) htrc("%p index_read: op=%d\n", this, op); if (indexing > 0) { @@ -3206,7 +3401,7 @@ int ha_connect::rnd_init(bool scan) alter= 1; } // endif xmod - if (xtrace) + if (trace) htrc("rnd_init: this=%p scan=%d xmod=%d alter=%d\n", this, scan, xmod, alter); @@ -3312,7 +3507,7 @@ int ha_connect::rnd_next(uchar *buf) break; } // endswitch RC - if (xtrace > 1 && (rc || !(xp->nrd++ % 16384))) { + if (trace > 1 && (rc || !(xp->nrd++ % 16384))) { ulonglong tb2= my_interval_timer(); double elapsed= (double) (tb2 - xp->tb1) / 1000000000ULL; DBUG_PRINT("rnd_next", ("rc=%d nrd=%u fnd=%u nfd=%u sec=%.3lf\n", @@ -3444,7 +3639,7 @@ int ha_connect::info(uint flag) DBUG_ENTER("ha_connect::info"); - if (xtrace) + if (trace) htrc("%p In info: flag=%u valid_info=%d\n", this, flag, valid_info); // tdbp must be available to get updated info @@ -3459,8 +3654,6 @@ int ha_connect::info(uint flag) } // endif xmod // This is necessary for getting file length -// if (cat && table) -// cat->SetDataPath(g, table->s->db.str); if (table) SetDataPath(g, table->s->db.str); else @@ -3650,6 +3843,7 @@ bool ha_connect::check_privileges(THD *thd, PTOS options, char *dbn) case TAB_PRX: case TAB_OCCUR: case TAB_PIVOT: + case TAB_VIR: return false; } // endswitch type @@ -3685,11 +3879,11 @@ bool ha_connect::IsSameIndex(PIXDEF xp1, PIXDEF xp2) MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, MODE newmode, bool *chk, bool *cras) { - if ((trace= xtrace)) { + if (trace) { LEX_STRING *query_string= thd_query_string(thd); htrc("%p check_mode: cmdtype=%d\n", this, thd_sql_command(thd)); htrc("Cmd=%.*s\n", (int) query_string->length, query_string->str); - } // endif xtrace + } // endif trace // Next code is temporarily replaced until sql_command is set stop= false; @@ -3721,6 +3915,8 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, case SQLCOM_OPTIMIZE: newmode= MODE_READ; break; + case SQLCOM_FLUSH: + locked= 0; case SQLCOM_DROP_TABLE: case SQLCOM_RENAME_TABLE: newmode= MODE_ANY; @@ -3798,7 +3994,7 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, } // endif's newmode - if (xtrace) + if (trace) htrc("New mode=%d\n", newmode); return newmode; @@ -3873,7 +4069,7 @@ int ha_connect::external_lock(THD *thd, int lock_type) DBUG_ASSERT(thd == current_thd); - if (xtrace) + if (trace) htrc("external_lock: this=%p thd=%p xp=%p g=%p lock_type=%d\n", this, thd, xp, g, lock_type); @@ -3900,6 +4096,8 @@ int ha_connect::external_lock(THD *thd, int lock_type) // This is unlocking, do it by closing the table if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES && sqlcom != SQLCOM_LOCK_TABLES + && sqlcom != SQLCOM_FLUSH + && sqlcom != SQLCOM_BEGIN && sqlcom != SQLCOM_DROP_TABLE) { sprintf(g->Message, "external_lock: unexpected command %d", sqlcom); push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); @@ -3994,6 +4192,14 @@ int ha_connect::external_lock(THD *thd, int lock_type) rc= 0; } // endif MakeIndex + } else if (((PTDBASE)tdbp)->GetDef()->Indexable() == 3) { + if (CheckVirtualIndex(NULL)) { + // Make it a warning to avoid crash + push_warning(thd, Sql_condition::WARN_LEVEL_WARN, + 0, g->Message); + rc= 0; + } // endif Check + } // endif indexable } // endif Tdbp @@ -4048,7 +4254,7 @@ int ha_connect::external_lock(THD *thd, int lock_type) if (cras) g->Createas= 1; // To tell created table to ignore FLAG - if (xtrace) { + if (trace) { #if 0 htrc("xcheck=%d cras=%d\n", xcheck, cras); @@ -4057,7 +4263,7 @@ int ha_connect::external_lock(THD *thd, int lock_type) ((PCHK)g->Xchk)->oldsep, ((PCHK)g->Xchk)->oldpix); #endif // 0 htrc("Calling CntCheckDB db=%s cras=%d\n", GetDBName(NULL), cras); - } // endif xtrace + } // endif trace // Set or reset the good database environment if (CntCheckDB(g, this, GetDBName(NULL))) { @@ -4081,7 +4287,7 @@ int ha_connect::external_lock(THD *thd, int lock_type) // Delay open until used fields are known } // endif tdbp - if (xtrace) + if (trace) htrc("external_lock: rc=%d\n", rc); DBUG_RETURN(rc); @@ -4217,7 +4423,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) THD *thd= current_thd; int sqlcom= thd_sql_command(thd); - if (xtrace) { + if (trace) { if (to) htrc("rename_table: this=%p thd=%p sqlcom=%d from=%s to=%s\n", this, thd, sqlcom, name, to); @@ -4225,7 +4431,7 @@ int ha_connect::delete_or_rename_table(const char *name, const char *to) htrc("delete_table: this=%p thd=%p sqlcom=%d name=%s\n", this, thd, sqlcom, name); - } // endif xtrace + } // endif trace if (to && (filename_to_dbname_and_tablename(to, db, sizeof(db), tabname, sizeof(tabname)) @@ -4325,7 +4531,7 @@ ha_rows ha_connect::records_in_range(uint inx, key_range *min_key, if (index_init(inx, false)) DBUG_RETURN(HA_POS_ERROR); - if (xtrace) + if (trace) htrc("records_in_range: inx=%d indexing=%d\n", inx, indexing); if (indexing > 0) { @@ -4379,85 +4585,8 @@ static char *encode(PGLOBAL g, const char *cnm) @return Return 0 if ok */ -#if defined(NEW_WAY) -static bool add_fields(PGLOBAL g, - THD *thd, - Alter_info *alter_info, - char *name, - int typ, int len, int dec, - uint type_modifier, - char *rem, -// CHARSET_INFO *cs, -// void *vcolinfo, -// engine_option_value *create_options, - int flg, - bool dbf, - char v) -{ - register Create_field *new_field; - char *length, *decimals= NULL; - enum_field_types type; -//Virtual_column_info *vcol_info= (Virtual_column_info *)vcolinfo; - engine_option_value *crop; - LEX_STRING *comment; - LEX_STRING *field_name; - - DBUG_ENTER("ha_connect::add_fields"); - - if (len) { - if (!v && typ == TYPE_STRING && len > 255) - v= 'V'; // Change CHAR to VARCHAR - - length= (char*)PlugSubAlloc(g, NULL, 8); - sprintf(length, "%d", len); - - if (typ == TYPE_DOUBLE) { - decimals= (char*)PlugSubAlloc(g, NULL, 8); - sprintf(decimals, "%d", min(dec, (min(len, 31) - 1))); - } // endif dec - - } else - length= NULL; - - if (!rem) - rem= ""; - - type= PLGtoMYSQL(typ, dbf, v); - comment= thd->make_lex_string(rem, strlen(rem)); - field_name= thd->make_lex_string(name, strlen(name)); - - switch (v) { - case 'Z': type_modifier|= ZEROFILL_FLAG; - case 'U': type_modifier|= UNSIGNED_FLAG; break; - } // endswitch v - - if (flg) { - engine_option_value *start= NULL, *end= NULL; - LEX_STRING *flag= thd->make_lex_string("flag", 4); - - crop= new(thd->mem_root) engine_option_value(*flag, (ulonglong)flg, - &start, &end, thd->mem_root); - } else - crop= NULL; - - if (check_string_char_length(field_name, "", NAME_CHAR_LEN, - system_charset_info, 1)) { - my_error(ER_TOO_LONG_IDENT, MYF(0), field_name->str); /* purecov: inspected */ - DBUG_RETURN(1); /* purecov: inspected */ - } // endif field_name - - if (!(new_field= new Create_field()) || - new_field->init(thd, field_name->str, type, length, decimals, - type_modifier, NULL, NULL, comment, NULL, - NULL, NULL, 0, NULL, crop, true)) - DBUG_RETURN(1); - - alter_info->create_list.push_back(new_field); - DBUG_RETURN(0); -} // end of add_fields -#else // !NEW_WAY static bool add_field(String *sql, const char *field_name, int typ, - int len, int dec, uint tm, const char *rem, + int len, int dec, char *key, uint tm, const char *rem, char *dft, char *xtra, int flag, bool dbf, char v) { char var = (len > 255) ? 'V' : v; @@ -4491,6 +4620,11 @@ static bool add_field(String *sql, const char *field_name, int typ, else if (v == 'Z') error|= sql->append(" ZEROFILL"); + if (key && *key) { + error|= sql->append(" "); + error|= sql->append(key); + } // endif key + if (tm) error|= sql->append(STRING_WITH_LEN(" NOT NULL"), system_charset_info); @@ -4525,7 +4659,6 @@ static bool add_field(String *sql, const char *field_name, int typ, error|= sql->append(','); return error; } // end of add_field -#endif // !NEW_WAY /** Initialise the table share with the new columns. @@ -4533,114 +4666,9 @@ static bool add_field(String *sql, const char *field_name, int typ, @return Return 0 if ok */ -#if defined(NEW_WAY) -//static bool sql_unusable_for_discovery(THD *thd, const char *sql); - -static int init_table_share(THD *thd, - TABLE_SHARE *table_s, - HA_CREATE_INFO *create_info, - Alter_info *alter_info) -{ - KEY *not_used_1; - uint not_used_2; - int rc= 0; - handler *file; - LEX_CUSTRING frm= {0,0}; - - DBUG_ENTER("init_table_share"); - -#if 0 - ulonglong saved_mode= thd->variables.sql_mode; - CHARSET_INFO *old_cs= thd->variables.character_set_client; - Parser_state parser_state; - char *sql_copy; - LEX *old_lex; - Query_arena *arena, backup; - LEX tmp_lex; - - /* - Ouch. Parser may *change* the string it's working on. - Currently (2013-02-26) it is used to permanently disable - conditional comments. - Anyway, let's copy the caller's string... - */ - if (!(sql_copy= thd->strmake(sql, sql_length))) - DBUG_RETURN(HA_ERR_OUT_OF_MEM); - - if (parser_state.init(thd, sql_copy, sql_length)) - DBUG_RETURN(HA_ERR_OUT_OF_MEM); - - thd->variables.sql_mode= MODE_NO_ENGINE_SUBSTITUTION | MODE_NO_DIR_IN_CREATE; - thd->variables.character_set_client= system_charset_info; - old_lex= thd->lex; - thd->lex= &tmp_lex; - - arena= thd->stmt_arena; - - if (arena->is_conventional()) - arena= 0; - else - thd->set_n_backup_active_arena(arena, &backup); - - lex_start(thd); - - if ((error= parse_sql(thd, & parser_state, NULL))) - goto ret; - - if (table_s->sql_unusable_for_discovery(thd, NULL)) { - my_error(ER_SQL_DISCOVER_ERROR, MYF(0), plugin_name(db_plugin)->str, - db.str, table_name.str, sql_copy); - goto ret; - } // endif unusable - - thd->lex->create_info.db_type= plugin_data(db_plugin, handlerton *); - - if (tabledef_version.str) - thd->lex->create_info.tabledef_version= tabledef_version; -#endif // 0 - - tmp_disable_binlog(thd); - - file= mysql_create_frm_image(thd, table_s->db.str, table_s->table_name.str, - create_info, alter_info, C_ORDINARY_CREATE, - ¬_used_1, ¬_used_2, &frm); - if (file) - delete file; - else - rc= OPEN_FRM_CORRUPTED; - - if (!rc && frm.str) { - table_s->option_list= 0; // cleanup existing options ... - table_s->option_struct= 0; // ... if it's an assisted discovery - rc= table_s->init_from_binary_frm_image(thd, true, frm.str, frm.length); - } // endif frm - -//ret: - my_free(const_cast(frm.str)); - reenable_binlog(thd); -#if 0 - lex_end(thd->lex); - thd->lex= old_lex; - if (arena) - thd->restore_active_arena(arena, &backup); - thd->variables.sql_mode= saved_mode; - thd->variables.character_set_client= old_cs; -#endif // 0 - - if (thd->is_error() || rc) { - thd->clear_error(); - my_error(ER_NO_SUCH_TABLE, MYF(0), table_s->db.str, - table_s->table_name.str); - DBUG_RETURN(HA_ERR_NOT_A_TABLE); - } else - DBUG_RETURN(0); - -} // end of init_table_share -#else // !NEW_WAY static int init_table_share(THD* thd, TABLE_SHARE *table_s, HA_CREATE_INFO *create_info, -// char *dsn, String *sql) { bool oom= false; @@ -4699,12 +4727,10 @@ static int init_table_share(THD* thd, } // endfor opt if (create_info->connect_string.length) { -//if (dsn) { oom|= sql->append(' '); oom|= sql->append("CONNECTION='"); oom|= sql->append_for_single_quote(create_info->connect_string.str, create_info->connect_string.length); -// oom|= sql->append_for_single_quote(dsn, strlen(dsn)); oom|= sql->append('\''); if (oom) @@ -4722,29 +4748,12 @@ static int init_table_share(THD* thd, } // endif charset - if (xtrace) + if (trace) htrc("s_init: %.*s\n", sql->length(), sql->ptr()); return table_s->init_from_sql_statement_string(thd, true, sql->ptr(), sql->length()); } // end of init_table_share -#endif // !NEW_WAY - -// Add an option to the create_info option list -static void add_option(THD* thd, HA_CREATE_INFO *create_info, - const char *opname, const char *opval) -{ -#if defined(NEW_WAY) - LEX_STRING *opn= thd->make_lex_string(opname, strlen(opname)); - LEX_STRING *val= thd->make_lex_string(opval, strlen(opval)); - engine_option_value *pov, **start= &create_info->option_list, *end= NULL; - - for (pov= *start; pov; pov= pov->next) - end= pov; - - pov= new(thd->mem_root) engine_option_value(*opn, *val, false, start, &end); -#endif // NEW_WAY -} // end of add_option // Used to check whether a MYSQL table is created on itself bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host, @@ -4861,7 +4870,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, } // endif option_list if (!(shm= (char*)db)) - db= table_s->db.str; // Default value + db= table_s->db.str; // Default value // Check table type if (ttp == TAB_UNDEF) { @@ -4869,13 +4878,24 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ttp= GetTypeID(topt->type); sprintf(g->Message, "No table_type. Was set to %s", topt->type); push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); - add_option(thd, create_info, "table_type", topt->type); } else if (ttp == TAB_NIY) { sprintf(g->Message, "Unsupported table type %s", topt->type); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); return HA_ERR_INTERNAL_ERROR; } // endif ttp + // Save stack and allocation environment and prepare error return + if (g->jump_level == MAX_JUMP) { + strcpy(g->Message, MSG(TOO_MANY_JUMPS)); + return HA_ERR_INTERNAL_ERROR; + } // endif jump_level + + if ((rc= setjmp(g->jumper[++g->jump_level])) != 0) { + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + goto err; + } // endif rc + + if (!tab) { if (ttp == TAB_TBL) { // Make tab the first table of the list @@ -4884,7 +4904,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (!tbl) { strcpy(g->Message, "Missing table list"); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } // endif tbl tab= (char*)PlugSubAlloc(g, NULL, strlen(tbl) + 1); @@ -4900,7 +4920,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, } // endif p } else if (ttp != TAB_ODBC || !(fnc & (FNC_TABLE | FNC_COL))) - tab= table_s->table_name.str; // Default value + tab= table_s->table_name.str; // Default value #if defined(NEW_WAY) // add_option(thd, create_info, "tabname", tab); @@ -4910,7 +4930,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, switch (ttp) { #if defined(ODBC_SUPPORT) case TAB_ODBC: - dsn= create_info->connect_string.str; + dsn= strz(g, create_info->connect_string); if (fnc & (FNC_DSN | FNC_DRIVER)) { ok= true; @@ -4945,13 +4965,11 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, case TAB_MYSQL: ok= true; - if (create_info->connect_string.str) { - int len= create_info->connect_string.length; + if (create_info->connect_string.str && + create_info->connect_string.length) { PMYDEF mydef= new(g) MYSQLDEF(); - dsn= (char*)PlugSubAlloc(g, NULL, len + 1); - strncpy(dsn, create_info->connect_string.str, len); - dsn[len]= 0; + dsn= strz(g, create_info->connect_string); mydef->SetName(create_info->alias); if (!mydef->ParseURL(g, dsn, false)) { @@ -5008,6 +5026,9 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, else strcpy(g->Message, "Missing OEM module or subtype"); + break; + case TAB_VIR: + ok= true; break; default: sprintf(g->Message, "Cannot get column info for table type %s", topt->type); @@ -5027,7 +5048,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, } // endif src if (ok) { - char *cnm, *rem, *dft, *xtra; + char *cnm, *rem, *dft, *xtra, *key; int i, len, prec, dec, typ, flg; // if (cat) @@ -5043,7 +5064,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (qrp && ttp == TAB_OCCUR) if (OcrSrcCols(g, qrp, col, ocl, rnk)) { my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } // endif OcrSrcCols } else switch (ttp) { @@ -5105,13 +5126,16 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (qrp && ttp == TAB_OCCUR && fnc != FNC_COL) if (OcrColumns(g, qrp, col, ocl, rnk)) { my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } // endif OcrColumns break; case TAB_PIVOT: qrp= PivotColumns(g, tab, src, pic, fcl, skc, host, db, user, pwd, port); break; + case TAB_VIR: + qrp= VirColumns(g, tab, (char*)db, fnc == FNC_COL); + break; case TAB_OEM: qrp= OEMColumns(g, topt, tab, (char*)db, fnc == FNC_COL); break; @@ -5122,7 +5146,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (!qrp) { my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } // endif !qrp if (fnc != FNC_NO || src || ttp == TAB_PIVOT) { @@ -5143,7 +5167,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, rc= add_fields(g, thd, &alter_info, cnm, typ, len, dec, NOT_NULL_FLAG, "", flg, dbf, v); #else // !NEW_WAY - if (add_field(&sql, cnm, typ, len, dec, NOT_NULL_FLAG, + if (add_field(&sql, cnm, typ, len, dec, NULL, NOT_NULL_FLAG, NULL, NULL, NULL, flg, dbf, v)) rc= HA_ERR_OUT_OF_MEM; #endif // !NEW_WAY @@ -5158,14 +5182,14 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, strcpy(g->Message, "Fail to retrieve columns"); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } // endif !nblin for (i= 0; !rc && i < qrp->Nblin; i++) { typ= len= prec= dec= 0; tm= NOT_NULL_FLAG; cnm= (char*)"noname"; - dft= xtra= NULL; + dft= xtra= key= NULL; #if defined(NEW_WAY) rem= ""; // cs= NULL; @@ -5216,6 +5240,11 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (!stricmp(xtra, "AUTO_INCREMENT")) xtra= NULL; + break; + case FLD_KEY: + if (ttp == TAB_VIR) + key= crp->Kdata->GetCharValue(i); + break; default: break; // Ignore @@ -5229,7 +5258,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, if (!(plgtyp= TranslateSQLType(typ, dec, prec, v))) { sprintf(g->Message, "Unsupported SQL type %d", typ); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); - return HA_ERR_INTERNAL_ERROR; + goto err; } else typ= plgtyp; @@ -5257,7 +5286,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, rc= add_fields(g, thd, &alter_info, cnm, typ, prec, dec, tm, rem, 0, dbf, v); #else // !NEW_WAY - if (add_field(&sql, cnm, typ, prec, dec, tm, rem, dft, xtra, + if (add_field(&sql, cnm, typ, prec, dec, key, tm, rem, dft, xtra, 0, dbf, v)) rc= HA_ERR_OUT_OF_MEM; #endif // !NEW_WAY @@ -5273,10 +5302,14 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, // rc= init_table_share(thd, table_s, create_info, dsn, &sql); #endif // !NEW_WAY + g->jump_level--; return rc; } // endif ok my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + + err: + g->jump_level--; return HA_ERR_INTERNAL_ERROR; } // end of connect_assisted_discovery @@ -5349,7 +5382,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, table= table_arg; // Used by called functions - if (xtrace) + if (trace) htrc("create: this=%p thd=%p xp=%p g=%p sqlcom=%d name=%s\n", this, thd, xp, g, sqlcom, GetTableName()); @@ -5415,7 +5448,8 @@ int ha_connect::create(const char *name, TABLE *table_arg, push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); } else if (options->tabname) { if (!stricmp(options->tabname, create_info->alias) && - (!options->dbname || !stricmp(options->dbname, table_arg->s->db.str))) { + (!options->dbname || + !stricmp(options->dbname, table_arg->s->db.str))) { sprintf(g->Message, "A %s table cannot refer to itself", options->type); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); @@ -5440,14 +5474,11 @@ int ha_connect::create(const char *name, TABLE *table_arg, db= GetStringOption("database", NULL); port= atoi(GetListOption(g, "port", options->oplist, "0")); - if (create_info->connect_string.str) { - char *dsn; - int len= create_info->connect_string.length; + if (create_info->connect_string.str && + create_info->connect_string.length) { + char *dsn= strz(g, create_info->connect_string); PMYDEF mydef= new(g) MYSQLDEF(); - dsn= (char*)PlugSubAlloc(g, NULL, len + 1); - strncpy(dsn, create_info->connect_string.str, len); - dsn[len]= 0; mydef->SetName(create_info->alias); if (!mydef->ParseURL(g, dsn, false)) { @@ -5547,6 +5578,14 @@ int ha_connect::create(const char *name, TABLE *table_arg, DBUG_RETURN(rc); } // endif flags + if (type == TAB_VIR) + if (!fp->option_struct || !fp->option_struct->special) { + strcpy(g->Message, "Virtual tables accept only special or virtual columns"); + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + rc= HA_ERR_INTERNAL_ERROR; + DBUG_RETURN(rc); + } // endif special + switch (fp->type()) { case MYSQL_TYPE_SHORT: case MYSQL_TYPE_LONG: @@ -5630,7 +5669,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, // the database directory named table_name.table_type. // (temporarily not done for XML because a void file causes // the XML parsers to report an error on the first Insert) - char buf[256], fn[_MAX_PATH], dbpath[128], lwt[12]; + char buf[_MAX_PATH], fn[_MAX_PATH], dbpath[_MAX_PATH], lwt[12]; int h; // Check for incompatible options @@ -5700,7 +5739,7 @@ int ha_connect::create(const char *name, TABLE *table_arg, } // endif sqlcom - if (xtrace) + if (trace) htrc("xchk=%p createas=%d\n", g->Xchk, g->Createas); // To check whether indexes have to be made or remade @@ -5771,6 +5810,12 @@ int ha_connect::create(const char *name, TABLE *table_arg, } // endif cat + } else if (GetIndexType(type) == 3) { + if (CheckVirtualIndex(table_arg->s)) { + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + rc= HA_ERR_UNSUPPORTED; + } // endif Check + } else if (!GetIndexType(type)) { sprintf(g->Message, "Table type %s is not indexable", options->type); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); @@ -5804,7 +5849,7 @@ bool ha_connect::FileExists(const char *fn, bool bf) return true; if (table) { - char *s, tfn[_MAX_PATH], filename[_MAX_PATH], path[128]; + char *s, tfn[_MAX_PATH], filename[_MAX_PATH], path[_MAX_PATH]; bool b= false; int n; struct stat info; @@ -6042,7 +6087,7 @@ ha_connect::check_if_supported_inplace_alter(TABLE *altered_table, xcp->newsep= xcp->SetName(g, GetStringOption("optname")); tshp= NULL; - if (xtrace && g->Xchk) + if (trace && g->Xchk) htrc( "oldsep=%d newsep=%d oldopn=%s newopn=%s oldpix=%p newpix=%p\n", xcp->oldsep, xcp->newsep, @@ -6054,6 +6099,12 @@ ha_connect::check_if_supported_inplace_alter(TABLE *altered_table, else DBUG_RETURN(HA_ALTER_INPLACE_EXCLUSIVE_LOCK); + } else if (GetIndexType(type) == 3) { + if (CheckVirtualIndex(altered_table->s)) { + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); + DBUG_RETURN(HA_ALTER_ERROR); + } // endif Check + } else if (!GetIndexType(type)) { sprintf(g->Message, "Table type %s is not indexable", oldopt->type); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); @@ -6247,15 +6298,18 @@ struct st_mysql_storage_engine connect_storage_engine= /***********************************************************************/ /* CONNECT global variables definitions. */ /***********************************************************************/ -// Tracing: 0 no, 1 yes, >1 more tracing -static MYSQL_SYSVAR_INT(xtrace, xtrace, - PLUGIN_VAR_RQCMDARG, "Console trace value.", - NULL, update_connect_xtrace, 0, 0, INT_MAX, 1); - // Size used when converting TEXT columns to VARCHAR -static MYSQL_SYSVAR_INT(conv_size, conv_size, - PLUGIN_VAR_RQCMDARG, "Size used when converting TEXT columns.", - NULL, update_connect_zconv, SZCONV, 0, 65500, 1); +#if defined(_DEBUG) +static MYSQL_SYSVAR_INT(conv_size, zconv, + PLUGIN_VAR_RQCMDARG, // opt + "Size used when converting TEXT columns.", + NULL, NULL, SZCONV, 0, 65500, 1); +#else +static MYSQL_SYSVAR_INT(conv_size, zconv, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, // opt + "Size used when converting TEXT columns.", + NULL, NULL, SZCONV, 0, 65500, 1); +#endif /** Type conversion: @@ -6274,61 +6328,43 @@ TYPELIB xconv_typelib= xconv_names, NULL }; +#if defined(_DEBUG) static MYSQL_SYSVAR_ENUM( type_conv, // name - type_conv, // varname + xconv, // varname PLUGIN_VAR_RQCMDARG, // opt "Unsupported types conversion.", // comment NULL, // check - update_connect_xconv, // update function + NULL, // update function 0, // def (no) &xconv_typelib); // typelib - -/** - Temporary file usage: - no: Not using temporary file - auto: Using temporary file when needed - yes: Allways using temporary file - force: Force using temporary file (no MAP) - test: Reserved -*/ -const char *usetemp_names[]= -{ - "NO", "AUTO", "YES", "FORCE", "TEST", NullS -}; - -TYPELIB usetemp_typelib= -{ - array_elements(usetemp_names) - 1, "usetemp_typelib", - usetemp_names, NULL -}; - +#else static MYSQL_SYSVAR_ENUM( - use_tempfile, // name - use_tempfile, // varname - PLUGIN_VAR_RQCMDARG, // opt - "Temporary file use.", // comment + type_conv, // name + xconv, // varname + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Unsupported types conversion.", // comment NULL, // check - update_connect_usetemp, // update function - 1, // def (AUTO) - &usetemp_typelib); // typelib + NULL, // update function + 0, // def (no) + &xconv_typelib); // typelib +#endif #if defined(XMAP) // Using file mapping for indexes if true -static MYSQL_SYSVAR_BOOL(indx_map, indx_map, PLUGIN_VAR_RQCMDARG, - "Using file mapping for indexes", - NULL, update_connect_xmap, 0); +static MYSQL_SYSVAR_BOOL(indx_map, xmap, PLUGIN_VAR_RQCMDARG, + "Using file mapping for indexes", NULL, NULL, 0); #endif // XMAP -// Size used for g->Sarea_Size -static MYSQL_SYSVAR_UINT(work_size, work_size, - PLUGIN_VAR_RQCMDARG, "Size of the CONNECT work area.", - NULL, update_connect_worksize, SZWORK, SZWMIN, UINT_MAX, 1); - -// Getting exact info values -static MYSQL_SYSVAR_BOOL(exact_info, exact_info, PLUGIN_VAR_RQCMDARG, - "Getting exact info values", - NULL, update_connect_xinfo, 0); +#if defined(XMSG) +static MYSQL_SYSVAR_STR(errmsg_dir_path, msg_path, +// PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC, + PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, + "Path to the directory where are the message files", +// check_msg_path, update_msg_path, + NULL, NULL, + "../../../../storage/connect/"); // for testing +#endif // XMSG static struct st_mysql_sys_var* connect_system_variables[]= { MYSQL_SYSVAR(xtrace), @@ -6340,6 +6376,12 @@ static struct st_mysql_sys_var* connect_system_variables[]= { MYSQL_SYSVAR(work_size), MYSQL_SYSVAR(use_tempfile), MYSQL_SYSVAR(exact_info), +#if defined(XMSG) || defined(NEWMSG) + MYSQL_SYSVAR(msg_lang), +#endif // XMSG || NEWMSG +#if defined(XMSG) + MYSQL_SYSVAR(errmsg_dir_path), +#endif // XMSG NULL }; @@ -6356,7 +6398,7 @@ maria_declare_plugin(connect) 0x0103, /* version number (1.03) */ NULL, /* status variables */ connect_system_variables, /* system variables */ - "1.03", /* string version */ + "1.03.0005", /* string version */ MariaDB_PLUGIN_MATURITY_BETA /* maturity */ } maria_declare_plugin_end; diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h index 47665a87a65..6c3ed87d5f6 100644 --- a/storage/connect/ha_connect.h +++ b/storage/connect/ha_connect.h @@ -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. diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp index d019d1b61d9..e576c1cf5fa 100644 --- a/storage/connect/libdoc.cpp +++ b/storage/connect/libdoc.cpp @@ -180,7 +180,6 @@ class XML2ATTR : public XMLATTRIBUTE { extern "C" { extern char version[]; -extern int trace; } // "C" #if defined(MEMORY_TRACE) diff --git a/storage/connect/msgid.h b/storage/connect/msgid.h index 7a9f9438472..4496994afa3 100644 --- a/storage/connect/msgid.h +++ b/storage/connect/msgid.h @@ -1,1013 +1,320 @@ -#define MSG_BAD_ARRAY_VAL 239 -#define MSG_BAD_SET_CASE 240 -#define MSG_MISSING_ARG 241 -#define MSG_NO_SUB_VAL 242 -#define MSG_PREC_VBLP_NULL 243 -#define MSG_X_ON_TAB 244 -#define MSG_BAD_COLCRT_ARG 245 -#define MSG_BAD_COLSIZE 246 -#define MSG_BAD_COL_ENTRY 247 -#define MSG_BAD_COL_TYPE 248 -#define MSG_BAD_FILE_LIST 249 -#define MSG_BAD_GETVIEW_RET 250 -#define MSG_BAD_OFFSET_VAL 251 -#define MSG_BAD_TABLE_LINE 252 -#define MSG_BAD_TABLE_TYPE 253 -#define MSG_COLSEC_TOO_BIG 254 -#define MSG_COL_HAS_NO_DEF 255 -#define MSG_COL_NOT_CODED 256 -#define MSG_ERASED 257 -#define MSG_ERASE_FAILED 258 -#define MSG_INDEX_DROPPED 259 -#define MSG_INDX_ALL_DROP 260 -#define MSG_INV_QUALIFIER 261 -#define MSG_LOADING_DB 262 -#define MSG_NO_COL_FOUND 263 -#define MSG_NO_COL_SECTION 264 -#define MSG_NO_FEAT_SUPPORT 265 -#define MSG_NO_FILE_LIST 266 -#define MSG_NO_INDEX 267 -#define MSG_NO_MORE_VAR 268 -#define MSG_NO_MUL_VCT 269 -#define MSG_NO_OPT_COLUMN 270 -#define MSG_NO_SUCH_INDEX 271 -#define MSG_NO_SUCH_TABLE 272 -#define MSG_NO_TABLE_INDEX 273 -#define MSG_OPEN_ERROR_ON 274 -#define MSG_RECORD_ERROR 275 -#define MSG_SUBSET_ERROR 276 -#define MSG_TABLE_ALREADY 277 -#define MSG_TABLE_NOT_IN_DB 278 -#define MSG_TABLE_NO_OPT 279 -#define MSG_TAB_NOT_LOADED 280 -#define MSG_TAB_NOT_SPEC 281 -#define MSG_TB_VW_NOTIN_DB 282 -#define MSG_TOO_MANY_COLTAB 283 -#define MSG_TOO_MANY_JUMPS 284 -#define MSG_TOO_MANY_TABLES 285 -#define MSG_VIEW_ALREADY 286 -#define MSG_VIEW_NOT_IN_DB 287 -#define MSG_WRITE_ERROR 288 -#define MSG_XDB_DEL_ERROR 289 -#define MSG_COL_NOTIN_GRPBY 290 -#define MSG_DOMAIN_ERROR 291 -#define MSG_NO_TOKEN_DB 292 -#define MSG_SPCOL_READONLY 293 -#define MSG_TYPE_VALUE_ERR 294 -#define MSG_UNDEFINED_AM 295 -#define MSG_VALUE_ERROR 296 -#define MSG_SORTING_VAL 297 -#define MSG_NAME_CONV_ERR 298 -#define MSG_WS_CONV_ERR 299 -#define MSG_BAD_COMPARE_OP 300 -#define MSG_BAD_EXP_ARGTYPE 301 -#define MSG_BAD_IN_ARGTYPE 302 -#define MSG_BAD_SUBSEL_IN_X 303 -#define MSG_IN_ARGTYPE_MISM 304 -#define MSG_ROW_ARGNB_ERR 305 -#define MSG_TYPE_CONV_ERROR 306 -#define MSG_NO_MAP_INSERT 307 -#define MSG_SEEK_ERROR 308 -#define MSG_BAD_DBF_FILE 309 -#define MSG_BAD_DBF_REC 310 -#define MSG_BAD_DBF_TYPE 311 -#define MSG_BAD_HEADER 312 -#define MSG_BAD_HEAD_END 313 -#define MSG_BAD_LRECL 314 -#define MSG_BIN_MODE_FAIL 315 -#define MSG_DBASE_FILE 316 -#define MSG_FOXPRO_FILE 317 -#define MSG_NOT_A_DBF_FILE 318 -#define MSG_NO_0DH_HEAD 319 -#define MSG_NO_DBF_INSERT 320 -#define MSG_NO_READ_32 321 -#define MSG_NO_MODE_PADDED 322 -#define MSG_SETEOF_ERROR 323 -#define MSG_REMOVE_ERROR 324 -#define MSG_RENAME_ERROR 325 -#define MSG_BAD_HEADER_VAL 326 -#define MSG_BAD_MAX_NREC 327 -#define MSG_HEAD_OPEN_ERROR 328 -#define MSG_HEAD_READ_ERROR 329 -#define MSG_HEAD_WRITE_ERR 330 -#define MSG_MAP_VEC_ONLY 331 -#define MSG_MKEMPTY_NIY 332 -#define MSG_BAD_BLK_SIZE 333 -#define MSG_BAD_LINE_LEN 334 -#define MSG_FUNC_ERR_S 335 -#define MSG_INV_RAND_ACC 336 -#define MSG_NOP_ZLIB_INDEX 337 -#define MSG_NO_PART_DEL 338 -#define MSG_NO_PAR_BLK_INS 339 -#define MSG_NO_SETPOS_YET 340 -#define MSG_BAD_ARRAY_OPER 341 -#define MSG_BAD_FILTER 342 -#define MSG_BAD_FILTER_CONV 343 -#define MSG_BAD_HAV_FILTYPE 344 -#define MSG_BAD_TYPE_LIKE 345 -#define MSG_ILL_FILTER_CONV 346 -#define MSG_IN_WITHOUT_SUB 347 -#define MSG_UNMATCH_FIL_ARG 348 -#define MSG_VALUE_NOT_ALLOC 349 -#define MSG_VOID_FIRST_ARG 350 -#define MSG_DISTINCT_ERROR 351 -#define MSG_INV_FNC_BUFTYPE 352 -#define MSG_INV_SET_SUBTYPE 353 -#define MSG_NO_AGGR_FUNC 354 -#define MSG_APP_STILL_ACTIV 355 -#define MSG_AREAFILE_NOTFND 356 -#define MSG_BAD_LANG_SIZE 357 -#define MSG_BAD_PARAMETERS 358 -#define MSG_BAD_PARAM_TYPE 359 -#define MSG_GRAM_ALLOC_ERR 360 -#define MSG_GRAM_MISMATCH 361 -#define MSG_GRAM_SUBSET_ERR 362 -#define MSG_INVALID_BIP 363 -#define MSG_LANGUAGE_QUIT 364 -#define MSG_LANG_ALREADY_UP 365 -#define MSG_LANG_BAD_SAVE 366 -#define MSG_LANG_NOT_FREED 367 -#define MSG_LANG_SAVED 368 -#define MSG_LANG_WR_LEN_ERR 369 -#define MSG_LDF_ALLOC_ERROR 370 -#define MSG_LDF_W_LEN_ERROR 371 -#define MSG_LNG_NOT_IN_LIST 372 -#define MSG_METAFILE_NOTFND 373 -#define MSG_NODE_SUBSET_ERR 374 -#define MSG_NO_LANG_TO_QUIT 375 -#define MSG_NO_MORE_LANG 376 -#define MSG_ONE_LANG_YET 377 -#define MSG_ON_LANGUAGE 378 -#define MSG_OPEN_W_ERROR 379 -#define MSG_RULE_SUBSET_ERR 380 -#define MSG_UP_LANGUAGE 381 -#define MSG_VM_LANG 382 -#define MSG_BUILD_INDEX 383 -#define MSG_CD_ORDER_ERROR 384 -#define MSG_DSORT_LOG_ERROR 385 -#define MSG_JOIN_KEY_NO_COL 386 -#define MSG_KEY_ALLOC_ERROR 387 -#define MSG_LOGICAL_ERROR 388 -#define MSG_MEM_ALLOC_ERR 389 -#define MSG_QUERY_CANCELLED 390 -#define MSG_RC_READING 391 -#define MSG_REORDER_INDEX 392 -#define MSG_SORTING_INDEX 393 -#define MSG_SORT_JOIN_INDEX 394 -#define MSG_TOO_MANY_KEYS 395 -#define MSG_TYPE_MISMATCH 396 -#define MSG_REGISTER_ERR 397 -#define MSG_XPATH_CNTX_ERR 398 -#define MSG_XPATH_EVAL_ERR 399 -#define MSG_API_CONF_ERROR 400 -#define MSG_BAD_HANDLE_VAL 401 -#define MSG_COL_NUM_MISM 402 -#define MSG_CONNECT_CANCEL 403 -#define MSG_INV_COLUMN_TYPE 404 -#define MSG_NO_CONNECT_ADDR 405 -#define MSG_NO_TABCOL_DATA 406 -#define MSG_NO_TAB_DATA 407 -#define MSG_SEQUENCE_ERROR 408 -#define MSG_SQL_CONF_ERROR 409 -#define MSG_CONNECTED 410 -#define MSG_CONN_CLOSED 411 -#define MSG_CONN_CREATED 412 -#define MSG_CONN_DROPPED 413 -#define MSG_CONN_OPEN 414 -#define MSG_CONN_SUC_OPEN 415 -#define MSG_DISCONNECTED 416 -#define MSG_IS_NOT_CONN 417 -#define MSG_NAME_IS_USED 418 -#define MSG_NO_SUCH_SERVER 419 -#define MSG_BAD_COLIST_ITEM 420 -#define MSG_BAD_COLIST_TYPE 421 -#define MSG_BAD_COL_IN_FILT 422 -#define MSG_BAD_FUNC_ARG 423 -#define MSG_BAD_FUNC_ARGTYP 424 -#define MSG_BAD_OPERATOR 425 -#define MSG_BAD_PROJNUM 426 -#define MSG_BAD_SEM_DOMAIN 427 -#define MSG_CLN_NOT_IN_JOIN 428 -#define MSG_COLIST_BAD_TYPE 429 -#define MSG_COLUMN_ERROR 430 -#define MSG_COL_NOT_EXIST 431 -#define MSG_COL_NOT_FOUND 432 -#define MSG_COL_NOT_IN_JOIN 433 -#define MSG_DUPLICAT_COUNT 434 -#define MSG_DUP_PROJNUM 435 -#define MSG_FILTER_ATTACH 436 -#define MSG_GRBY_TAB_NOTIMP 437 -#define MSG_NON_DUP_HAVING 438 -#define MSG_NOT_IMPL_JOIN 439 -#define MSG_NOT_IMPL_SET 440 -#define MSG_NO_COL_IN_TABLE 441 -#define MSG_NO_MULT_HAVING 442 -#define MSG_NO_TABLE_DESC 443 -#define MSG_REMOVE_NOT_IMPL 444 -#define MSG_TYPE_TO_VERIFY 445 -#define MSG_UNDEF_COL_COUNT 446 -#define MSG_UNKNOWN_NAME 447 -#define MSG_WRONG_COL_NUM 448 -#define MSG_ALL_DELETED 449 -#define MSG_BAD_LOCALE 450 -#define MSG_BAD_QUERY_TYPE 451 -#define MSG_BUFSIZE_ERROR 452 -#define MSG_END_OF_DELETE 453 -#define MSG_END_OF_INSERT 454 -#define MSG_END_OF_QUERY 455 -#define MSG_END_OF_UPDATE 456 -#define MSG_NCOL_GT_MAXCOL 457 -#define MSG_OPEN_ERROR_IS 458 -#define MSG_SET_LOCALE 459 -#define MSG_X_ARG_ADDED 460 -#define MSG_ALG_CHOICE_AUTO 461 -#define MSG_ALG_CHOICE_BAD 462 -#define MSG_ALG_CHOICE_QRY 463 -#define MSG_ALG_CURLY_BRK 464 -#define MSG_ALTER_DB_ERR 465 -#define MSG_APPL_IS_ACTIVE 466 -#define MSG_APPL_NOT_INIT 467 -#define MSG_AVGLEN_ERROR 468 -#define MSG_BAD_DEF_TYPE 469 -#define MSG_BAD_DIST_JN_FIL 470 -#define MSG_BAD_DIST_JOIN 471 -#define MSG_BAD_DOM_COL_DEF 472 -#define MSG_BAD_FIELD_FMT 473 -#define MSG_BAD_OUTER_JOIN 474 -#define MSG_BAD_SETTINGS 475 -#define MSG_BAD_XMODE_VAL 476 -#define MSG_DATABASE_ACTIVE 477 -#define MSG_DATABASE_LOADED 478 -#define MSG_DB_ALREADY_DEF 479 -#define MSG_DB_ALTERED 480 -#define MSG_DB_CREATED 481 -#define MSG_DB_REMOVED 482 -#define MSG_DB_STOPPED 483 -#define MSG_DIS_NOHEAD_JOIN 484 -#define MSG_DROP_DB_ERR 485 -#define MSG_DUP_COL_NAME 486 -#define MSG_EXECUTING 487 -#define MSG_EXEC_MODE_SET 488 -#define MSG_INDEX_CREATED 489 -#define MSG_INV_DATA_PATH 490 -#define MSG_INV_WORK_PATH 491 -#define MSG_IN_USE 492 -#define MSG_LIC_NO_MYSQL 493 -#define MSG_LINE_LENGTH 494 -#define MSG_LINE_MAXLIN 495 -#define MSG_LINE_MAXRES 496 -#define MSG_LINE_MAXTMP 497 -#define MSG_MAC_WIN_ONLY 498 -#define MSG_MALLOC_NULL 499 -#define MSG_MAP_NO_MORE 500 -#define MSG_MISSING_COL_DEF 501 -#define MSG_MISSING_CONNECT 502 -#define MSG_MISSING_SERV_DB 503 -#define MSG_MISS_NAME_LRECL 504 -#define MSG_MISS_TABLE_LIST 505 -#define MSG_MISS_VCT_ELMT 506 -#define MSG_NEW_CHAR_NULL 507 -#define MSG_NODEF_FROM_VIEW 508 -#define MSG_NO_COL_ADDING 509 -#define MSG_NO_COL_DEF_AS 510 -#define MSG_NO_DATABASE 511 -#define MSG_NO_FULL_JOIN 512 -#define MSG_NO_FUL_OUT_JOIN 513 -#define MSG_NO_HEAD_JOIN 514 -#define MSG_NO_ODBC_COL 515 -#define MSG_NO_SELECTED_DB 516 -#define MSG_NO_SELF_PIVOT 517 -#define MSG_NULL_QUERY 518 -#define MSG_READY 519 -#define MSG_SEC_NOT_FOUND 520 -#define MSG_SET_OP_NOT_IMPL 521 -#define MSG_TABLE_ALTERED 522 -#define MSG_TABLE_CREATED 523 -#define MSG_TABLE_DROPPED 524 -#define MSG_TDB_NXT_NOT_NUL 525 -#define MSG_TYPE_DEF_MISM 526 -#define MSG_TYPE_RECFM_MISM 527 -#define MSG_VIEW_CREATED 528 -#define MSG_VIEW_DROPPED 529 -#define MSG_ANSWER_TYPE 530 -#define MSG_COPY_BAD_PHASE 531 -#define MSG_LIST 532 -#define MSG_MEM_ALLOC_ERROR 533 -#define MSG_PTR_NOT_FOUND 534 -#define MSG_SEMANTIC_TREE 535 -#define MSG_WRONG_TYPE 536 -#define MSG_ARRAY_ERROR 537 -#define MSG_BAD_EVAL_TYPE 538 -#define MSG_BAD_FILTER_LINK 539 -#define MSG_BAD_IN_ENDING 540 -#define MSG_BAD_IN_STRING 541 -#define MSG_BAD_LIST_TYPE 542 -#define MSG_BAD_ORDER_MODE 543 -#define MSG_BAD_ORDER_TYPE 544 -#define MSG_GROUP_ON_FUNC 545 -#define MSG_GRP_LIST_MISMAT 546 -#define MSG_LINEAR_ERROR 547 -#define MSG_NO_FUNC_ORDER 548 -#define MSG_NO_OP_MODIF 549 -#define MSG_NO_TABLE_LIST 550 -#define MSG_ORDER_TWICE 551 -#define MSG_UNKNOWN_ERROR 552 -#define MSG_VOID_IN_STRING 553 -#define MSG_VOID_ORDER_LIST 554 -#define MSG_ACCESS_VIOLATN 555 -#define MSG_ARRAY_BNDS_EXCD 556 -#define MSG_BREAKPOINT 557 -#define MSG_CONTROL_C_EXIT 558 -#define MSG_DATA_MISALIGN 559 -#define MSG_FLT_BAD_RESULT 560 -#define MSG_FLT_DENORMAL_OP 561 -#define MSG_FLT_INVALID_OP 562 -#define MSG_FLT_OVERFLOW 563 -#define MSG_FLT_STACK_CHECK 564 -#define MSG_FLT_UNDERFLOW 565 -#define MSG_FLT_ZERO_DIVIDE 566 -#define MSG_GUARD_PAGE 567 -#define MSG_ILLEGAL_INSTR 568 -#define MSG_INT_OVERFLOW 569 -#define MSG_INT_ZERO_DIVIDE 570 -#define MSG_INVALID_DISP 571 -#define MSG_INVALID_HANDLE 572 -#define MSG_NEW_RETURN_NULL 573 -#define MSG_NONCONT_EXCEPT 574 -#define MSG_NO_ACTIVE_DB 575 -#define MSG_NO_MEMORY 576 -#define MSG_PAGE_ERROR 577 -#define MSG_PARSING_QUERY 578 -#define MSG_PRIV_INSTR 579 -#define MSG_SINGLE_STEP 580 -#define MSG_SQL_BAD_TYPE 581 -#define MSG_UNKNOWN_EXCPT 582 -#define MSG_WRONG_FUNCTION 583 -#define MSG_BAD_RESULT_TYPE 584 -#define MSG_BUFF_TOO_SMALL 585 -#define MSG_COL_ALLOC_ERROR 586 -#define MSG_DATA_IS_NULL 587 -#define MSG_GET_ERROR 588 -#define MSG_INV_COL_DATATYP 589 -#define MSG_INV_INIPATH 590 -#define MSG_NO_NBLIN_CONT 591 -#define MSG_NO_SERVER_FOUND 592 -#define MSG_TYPES_ERROR 593 -#define MSG_UNDEFINED_PATH 594 -#define MSG_UNKNOWN_PATH 595 -#define MSG_WRONG_DB_LIST 596 -#define MSG_BAD_SPECIAL_CMD 597 -#define MSG_CURSOR_SET 598 -#define MSG_EVAL_EXPIRED 599 -#define MSG_EVAL_ONLY 600 -#define MSG_INV_SPECIAL_CMD 601 -#define MSG_PROGRESS_INFO 602 -#define MSG_PROMPT_CANCEL 603 -#define MSG_ARG_ALREADY_SET 604 -#define MSG_BAD_ARG_NUM 605 -#define MSG_BAD_CHECK_VAL 606 -#define MSG_BAD_EXEC_MODE 607 -#define MSG_BAD_MAX_PARAM 608 -#define MSG_BAD_MAX_SETTING 609 -#define MSG_BAD_USETEMP 610 -#define MSG_BAD_USETEMP_VAL 611 -#define MSG_CHECK_LEVEL 612 -#define MSG_COLS_REDUCED 613 -#define MSG_COLUMN_MISMATCH 614 -#define MSG_COL_NOT_IN_DB 615 -#define MSG_DB_NOT_SPEC 616 -#define MSG_DONE 617 -#define MSG_EXEC_MODE_IS 618 -#define MSG_EXEC_MODE_RESET 619 -#define MSG_HUGE_DEFAULT 620 -#define MSG_INDEX_ONE_SAVE 621 -#define MSG_INDEX_SEP_SAVE 622 -#define MSG_INVALID_OPTION 623 -#define MSG_INV_COL_NUM 624 -#define MSG_INV_INFO_TYPE 625 -#define MSG_INV_RESULT_TYPE 626 -#define MSG_LANG_ACTIVE 627 -#define MSG_MAX_BITMAP 628 -#define MSG_MYSQL_CNC_OFF 629 -#define MSG_MYSQL_CNC_ON 630 -#define MSG_MYSQL_NOT_SUP 631 -#define MSG_MY_CNC_ALREADY 632 -#define MSG_NO_AVAIL_RESULT 633 -#define MSG_NO_HQL_CONV 634 -#define MSG_NO_MYSQL_CONN 635 -#define MSG_NO_UNIX_CATINFO 636 -#define MSG_OPENING 637 -#define MSG_PLUG_NOT_RUN 638 -#define MSG_PROMPT_NIY 639 -#define MSG_QUERY_SAVED 640 -#define MSG_REC_SKIPPED 641 -#define MSG_ROWS_SELECTED 642 -#define MSG_ROWS_TRUNCATED 643 -#define MSG_SLEEP 644 -#define MSG_SPEC_CMD_SEP 645 -#define MSG_SYSTEM_ERROR 646 -#define MSG_UNLOADABLE 647 -#define MSG_UNLOADABLE_PRM 648 -#define MSG_USETEMP_IS 649 -#define MSG_USETEMP_RESET 650 -#define MSG_USETEMP_SET 651 -#define MSG_USING_INDEX 652 -#define MSG_VOID_QUERY 653 -#define MSG_WORK_TOO_SMALL 654 -#define MSG_WRITING_QUERY 655 -#define MSG_X_ARG_SET 656 -#define MSG_BAS_NS_LIST 657 -#define MSG_DOM_NOT_SUPP 658 -#define MSG_AFTER 659 -#define MSG_ARG_OUT_CONTEXT 660 -#define MSG_ARG_OUT_RANGE 661 -#define MSG_ARG_PTR_NOSEM 662 -#define MSG_ARG_PTR_NOSEMS 663 -#define MSG_BAD_ARG_TYPE 664 -#define MSG_ERR_RET_RULE 665 -#define MSG_ERR_RET_TYPE 666 -#define MSG_FUNC_REF_DEL 667 -#define MSG_INV_TOPSEM_CMD 668 -#define MSG_NON_EVAL_SEM 669 -#define MSG_N_FULL_PARSES 670 -#define MSG_PARSE_NULL_SEM 671 -#define MSG_PNODE_RULE 672 -#define MSG_SCAN_NOT_IMP 673 -#define MSG_SEM_BAD_REF 674 -#define MSG_SEM_UNKNOWN 675 -#define MSG_SUBARG_NOSEM 676 -#define MSG_SUBARG_OUTRANGE 677 -#define MSG_SYNTAX_ERROR 678 -#define MSG_TOPSEM_ERROR 679 -#define MSG_UNKN_ERR_CODE 680 -#define MSG_ATTRIBUTE_ERROR 681 -#define MSG_BAD_PHRASE_NB 682 -#define MSG_INV_OPERATOR 683 -#define MSG_NO_LANGUAGE 684 -#define MSG_PIX_ERROR 685 -#define MSG_PIX_TEST_ERROR 686 -#define MSG_PLUG_NOT_INIT 687 -#define MSG_STACK_ERROR 688 -#define MSG_STACK_OVERFLOW 689 -#define MSG_APPL_ACCESSIBLE 690 -#define MSG_APPL_BAD_SAVE 691 -#define MSG_APPL_CREATED 692 -#define MSG_APPL_NOT_LOADED 693 -#define MSG_APPL_QUIT 694 -#define MSG_APPL_SAVED 695 -#define MSG_ARG_NOT_AN_ATTR 696 -#define MSG_ATT_NOT_CASE 697 -#define MSG_ATT_POSCODE_BIG 698 -#define MSG_BAD_EDIT_INIT 699 -#define MSG_BAD_FPARM_NEXT 700 -#define MSG_BAD_PHASE_NUM 701 -#define MSG_BAD_SUBLST_TYPE 702 -#define MSG_BAD_USERBLK_LEN 703 -#define MSG_COPY_INV_TYPE 704 -#define MSG_DEBUG_NOT_ACTIV 705 -#define MSG_DEBUG_SET_INV 706 -#define MSG_DICTIONARY 707 -#define MSG_ENDSTR_MISMATCH 708 -#define MSG_ERROR_NO_PARM 709 -#define MSG_EXECUTION_ERROR 710 -#define MSG_FILE_NOT_FOUND 711 -#define MSG_INPUT 712 -#define MSG_INPUT_KEYBD_YET 713 -#define MSG_INV_CONC_BIP 714 -#define MSG_INV_DOMAIN_TYPE 715 -#define MSG_INV_PARAMETER 716 -#define MSG_INV_PARM_TYPE 717 -#define MSG_INV_TRANSF_USE 718 -#define MSG_INV_TYPE_SPEC 719 -#define MSG_LDF_RN_MISMATCH 720 -#define MSG_LDF_WLEN_ERROR 721 -#define MSG_MOVE_INV_TYPE 722 -#define MSG_NODE_FOR_CHAR 723 -#define MSG_NOT_IMPLEMENTED 724 -#define MSG_NOT_IMPL_YET 725 -#define MSG_NOT_MODIFIABLE 726 -#define MSG_NO_ACTIVE_APPL 727 -#define MSG_NO_ACTIVE_UDIC 728 -#define MSG_NO_AREA_FILE 729 -#define MSG_NO_EDITED_LANG 730 -#define MSG_NO_PARAMETER 731 -#define MSG_NO_RCUR_DSK_YET 732 -#define MSG_NO_SOURCE 733 -#define MSG_ONE_PARAM_ONLY 734 -#define MSG_READING_FROM 735 -#define MSG_RESET_TO 736 -#define MSG_STRING_INV_LIST 737 -#define MSG_UNKNOWN_SEM 738 -#define MSG_USED_FREE_MEM 739 -#define MSG_WRONG_PASSWORD 740 -#define MSG_WRONG_USERFILE 741 -#define MSG_ACT_ALLOC_FAIL 742 -#define MSG_APPL_ACTIVE 743 -#define MSG_BAD_CASE_SPEC 744 -#define MSG_DOSALMEM_NOMEM 745 -#define MSG_EXIT_FROM_LANG 746 -#define MSG_GLOBAL_ERROR 747 -#define MSG_HUGE_WARNING_1 748 -#define MSG_HUGE_WARNING_2 749 -#define MSG_LANG_ALLOC_FAIL 750 -#define MSG_MALLOC_ERROR 751 -#define MSG_NO_INIT_LANG 752 -#define MSG_NULL_ENTRY 753 -#define MSG_READ_MEM_ERROR 754 -#define MSG_READ_SEG_ERROR 755 -#define MSG_RECEIVED 756 -#define MSG_RET_FROM_LANG 757 -#define MSG_STRG_NOT_FOUND 758 -#define MSG_SUBALLOC_ERROR 759 -#define MSG_SUBAL_HUGE_ERR 760 -#define MSG_S_ACCESS_DENIED 761 -#define MSG_S_ERROR 762 -#define MSG_S_ERROR_NUM 763 -#define MSG_S_INTRUPT_ERROR 764 -#define MSG_S_INVALID_PARM 765 -#define MSG_S_INV_ADDRESS 766 -#define MSG_S_UNKNOWN_ERROR 767 -#define MSG_VOID_POS_DICT 768 -#define MSG_WORK_AREA 769 -#define MSG_BAD_AGGREG_FUNC 770 -#define MSG_BAD_MAX_HAVING 771 -#define MSG_BUILDING_GROUPS 772 -#define MSG_CD_ONE_STEP 773 -#define MSG_CNTDIS_COL_LOST 774 -#define MSG_COMPUTING 775 -#define MSG_DISTINCT_ROWS 776 -#define MSG_DISTINCT_VALUES 777 -#define MSG_FETCHING_DATA 778 -#define MSG_FETCHING_ROWS 779 -#define MSG_GROUPBY_NOT_ALL 780 -#define MSG_HAVING_FILTER 781 -#define MSG_IDLE 782 -#define MSG_INTERNAL 783 -#define MSG_INV_QUERY_TYPE 784 -#define MSG_MAKING_DISTINCT 785 -#define MSG_MAXTMP_TRUNCATE 786 -#define MSG_MEM_ALLOC_YET 787 -#define MSG_NOT_ENOUGH_MEM 788 -#define MSG_NO_NULL_CONST 789 -#define MSG_OFFSET_NOT_SUPP 790 -#define MSG_OPENING_QUERY 791 -#define MSG_OPEN_SORT_ERROR 792 -#define MSG_PROC_WOULD_LOOP 793 -#define MSG_RSC_ALLOC_ERROR 794 -#define MSG_SMART_SORTING 795 -#define MSG_SMART_SORT_ERR 796 -#define MSG_SORTING 797 -#define MSG_DEF_ALLOC_ERROR 798 -#define MSG_GET_FUNC_ERR 799 -#define MSG_PROCADD_ERROR 800 -#define MSG_PXDEF_IS_NULL 801 -#define MSG_SHARED_LIB_ERR 802 -#define MSG_ADPOS_IN_DICTP 803 -#define MSG_BAD_CHAR_SPEC 804 -#define MSG_BAD_GENRE 805 -#define MSG_BAD_INPUT 806 -#define MSG_BAD_LOCDFON_ARG 807 -#define MSG_BAD_LOCNODE_USE 808 -#define MSG_BAD_POS_CODE 809 -#define MSG_BAD_POS_TYPE 810 -#define MSG_BAD_TYPE_FOR_S 811 -#define MSG_BLOCK_NO_MATCH 812 -#define MSG_BXP_NULL 813 -#define MSG_DIRECT_VARTOK 814 -#define MSG_FSBPARP_NULL 815 -#define MSG_LOCSTRG_TOO_BIG 816 -#define MSG_MISSING_POS 817 -#define MSG_NO_POS_ADDED 818 -#define MSG_NO_TERM_IN_TOK 819 -#define MSG_POS_TOO_LONG 820 -#define MSG_RENUM_RULES 821 -#define MSG_RULE_ENTERED 822 -#define MSG_TOO_MANY_POS 823 -#define MSG_TO_FTR_NOT_NULL 824 -#define MSG_TO_PIX_NOT_NULL 825 -#define MSG_TO_SEM_NOT_NULL 826 -#define MSG_UNKNOWN_POS 827 -#define MSG_UNKNOWN_SYNONYM 828 -#define MSG_USE_NO_MATCH 829 -#define MSG_ALLOC_ERROR 830 -#define MSG_ARG_TWO_CONST 831 -#define MSG_BAD_ARGTYPES 832 -#define MSG_BAD_ARGUMENTS 833 -#define MSG_BAD_ROW_VALIST 834 -#define MSG_BAD_ROW_VALNB 835 -#define MSG_BAD_SCF_ARGTYPE 836 -#define MSG_BAD_SUB_SELECT 837 -#define MSG_BAD_TYPE_FOR_IN 838 -#define MSG_CONNECT_ERROR 839 -#define MSG_EXIT_EVAL_ERR 840 -#define MSG_FORMAT_ERROR 841 -#define MSG_INIT_ERROR 842 -#define MSG_INVALID_OPER 843 -#define MSG_NO_SFEXIT_UNIX 844 -#define MSG_READING_RECORD 845 -#define MSG_REQU_ARG_NUM 846 -#define MSG_SFUNC_NOT_IMPL 847 -#define MSG_UNKNOWN_DOMAIN 848 -#define MSG_WRONG_ARG_NUM 849 -#define MSG_WRONG_OP_PARM 850 -#define MSG_WRONG_PARMS 851 -#define MSG_AMBIG_CORREL 852 -#define MSG_BAD_CHECK_TYPE 853 -#define MSG_BAD_CORREL 854 -#define MSG_BAD_XOBJ_TYPE 855 -#define MSG_HBUF_TOO_SMALL 856 -#define MSG_MISSING 857 -#define MSG_MULT_DISTINCT 858 -#define MSG_NO_TABLE_COL 859 -#define MSG_ARG_REF_LOOP 860 -#define MSG_GETCWD_ERR_NO 861 -#define MSG_UNRESOLVED_ARG 862 -#define MSG_ARGS_SYNTAX_ERR 863 -#define MSG_AMBIG_COL_QUAL 864 -#define MSG_AMBIG_SPEC_COL 865 -#define MSG_BAD_COL_QUALIF 866 -#define MSG_BAD_FETCH_RC 867 -#define MSG_BAD_FILTER_OP 868 -#define MSG_BAD_HAV_FILTER 869 -#define MSG_BAD_JOIN_FILTER 870 -#define MSG_BAD_SET_TYPE 871 -#define MSG_BAD_SPECIAL_COL 872 -#define MSG_BAD_SPEC_COLUMN 873 -#define MSG_BAD_SQL_PARAM 874 -#define MSG_BAD_TABLE_LIST 875 -#define MSG_BAD_UPD_COR 876 -#define MSG_BAD_VALUE_TYPE 877 -#define MSG_BUILD_DIST_GRPS 878 -#define MSG_CHECKING_ROWS 879 -#define MSG_COL_INVAL_TABLE 880 -#define MSG_COL_ISNOT_TABLE 881 -#define MSG_COL_NOTIN_TABLE 882 -#define MSG_COL_NOTIN_UPDT 883 -#define MSG_COMPUTING_DIST 884 -#define MSG_COMPUTING_FUNC 885 -#define MSG_DELETING_ROWS 886 -#define MSG_ERROR 887 -#define MSG_FILGRP_NO_TABLE 888 -#define MSG_FILTER_NO_TABLE 889 -#define MSG_INSERTING 890 -#define MSG_INSERT_MISMATCH 891 -#define MSG_INV_FILTER 892 -#define MSG_INV_UPDT_TABLE 893 -#define MSG_INV_VALUE_LIST 894 -#define MSG_INV_WHERE_JOIN 895 -#define MSG_NOT_LINEARIZED 896 -#define MSG_NO_CONST_FILTER 897 -#define MSG_NO_INDEX_GBX 898 -#define MSG_READB_BAD_INIT 899 -#define MSG_READING 900 -#define MSG_SEVERAL_TREES 901 -#define MSG_UNKNW_QRY_TYPE 902 -#define MSG_UNQ_COL_SEV_TAB 903 -#define MSG_UPDATING_ROWS 904 -#define MSG_VAL_TOO_LONG 905 -#define MSG_BAD_FILTEST_OP 906 -#define MSG_BAD_SUBSEL_TYPE 907 -#define MSG_BAD_SUB_RESULT 908 -#define MSG_CORREL_NO_QRY 909 -#define MSG_FLTST_NO_CORREL 910 -#define MSG_NO_MEM_CORR_SUB 911 -#define MSG_NO_QUERY_ARRAY 912 -#define MSG_PROCESS_SUBQRY 913 -#define MSG_READ_ERROR_RC 914 -#define MSG_RES_NOT_UNIQUE 915 -#define MSG_SQL_BLOCK_MISM 916 -#define MSG_SUBQRY_ONEITEM 917 -#define MSG_SUB_OPEN_YET 918 -#define MSG_FNC_NOTIN_SLIST 919 -#define MSG_NO_FORMAT_COL 920 -#define MSG_ORDER_OUT_RANGE 921 -#define MSG_SEP_IN_FIELD 922 -#define MSG_BAD_OPEN_MODE 923 -#define MSG_OPEN_MODE_ERROR 924 -#define MSG_RECORD_NO_SEP 925 -#define MSG_BAD_BLK_ESTIM 926 -#define MSG_BAD_FREQ_SET 927 -#define MSG_BAD_RECFM 928 -#define MSG_BAD_RECFM_VAL 929 -#define MSG_BIN_F_TOO_LONG 930 -#define MSG_CHSIZE_ERROR 931 -#define MSG_DEL_FILE_ERR 932 -#define MSG_DEL_READ_ERROR 933 -#define MSG_DEL_WRITE_ERROR 934 -#define MSG_DVAL_NOTIN_LIST 935 -#define MSG_FILELEN_ERROR 936 -#define MSG_FILE_IS_EMPTY 937 -#define MSG_FILE_MAP_ERROR 938 -#define MSG_FPUTS_ERROR 939 -#define MSG_FSEEK_ERROR 940 -#define MSG_FSETPOS_ERROR 941 -#define MSG_FTELL_ERROR 942 -#define MSG_FUNCTION_ERROR 943 -#define MSG_GETFILESIZE_ERR 944 -#define MSG_GET_DIST_VALS 945 -#define MSG_INDEX_NOT_DEF 946 -#define MSG_INDEX_YET_ON 947 -#define MSG_INDX_COL_NOTIN 948 -#define MSG_INDX_EXIST_YET 949 -#define MSG_INSERT_ERROR 950 -#define MSG_INV_DEF_READ 951 -#define MSG_INV_MAP_POS 952 -#define MSG_MAP_VIEW_ERROR 953 -#define MSG_NOT_FIXED_LEN 954 -#define MSG_NO_INDEX_IN 955 -#define MSG_NO_RECOV_SPACE 956 -#define MSG_NO_ROWID_FOR_AM 957 -#define MSG_OPEN_STRERROR 958 -#define MSG_OPTBLK_RD_ERR 959 -#define MSG_OPTBLK_WR_ERR 960 -#define MSG_OPT_BMAP_RD_ERR 961 -#define MSG_OPT_BMAP_WR_ERR 962 -#define MSG_OPT_DVAL_RD_ERR 963 -#define MSG_OPT_DVAL_WR_ERR 964 -#define MSG_OPT_LOGIC_ERR 965 -#define MSG_READ_ERROR 966 -#define MSG_READ_SEEK_ERROR 967 -#define MSG_TABLE_NOT_OPT 968 -#define MSG_TRUNCATE_ERROR 969 -#define MSG_VALUE_TOO_LONG 970 -#define MSG_WRITE_SEEK_ERR 971 -#define MSG_BAD_BIN_FMT 972 -#define MSG_BAD_DEF_READ 973 -#define MSG_COL_NOT_SORTED 974 -#define MSG_ERROR_IN_LSK 975 -#define MSG_ERROR_IN_SFP 976 -#define MSG_FILE_OPEN_YET 977 -#define MSG_FWRITE_ERROR 978 -#define MSG_INVALID_FTYPE 979 -#define MSG_INV_REC_POS 980 -#define MSG_NO_BIG_DELETE 981 -#define MSG_NO_CLUSTER_COL 982 -#define MSG_OPEN_ERROR 983 -#define MSG_OPTIMIZING 984 -#define MSG_OPT_CANCELLED 985 -#define MSG_OPT_HEAD_RD_ERR 986 -#define MSG_OPT_HEAD_WR_ERR 987 -#define MSG_OPT_MAX_RD_ERR 988 -#define MSG_OPT_MAX_WR_ERR 989 -#define MSG_OPT_MIN_RD_ERR 990 -#define MSG_OPT_MIN_WR_ERR 991 -#define MSG_OPT_NOT_MATCH 992 -#define MSG_VALUE_TOO_BIG 993 -#define MSG_WRITING_ERROR 994 -#define MSG_BAD_FIELD_RANK 995 -#define MSG_BAD_FLD_FORMAT 996 -#define MSG_BAD_FLD_LENGTH 997 -#define MSG_BAD_LINEFLD_FMT 998 -#define MSG_BAD_QUOTE_FIELD 999 -#define MSG_CANNOT_OPEN 1000 -#define MSG_EOF_AFTER_LINE 1001 -#define MSG_ERR_READING_REC 1002 -#define MSG_FIELD_TOO_LONG 1003 -#define MSG_FLD_TOO_LNG_FOR 1004 -#define MSG_FMT_WRITE_NIY 1005 -#define MSG_LINE_TOO_LONG 1006 -#define MSG_LRECL_TOO_SMALL 1007 -#define MSG_MISPLACED_QUOTE 1008 -#define MSG_MISSING_EOL 1009 -#define MSG_MISSING_FIELD 1010 -#define MSG_MISSING_FNAME 1011 -#define MSG_NO_FLD_FORMAT 1012 -#define MSG_QUOTE_IN_QUOTE 1013 -#define MSG_TOO_MANY_FIELDS 1014 -#define MSG_UNBALANCE_QUOTE 1015 -#define MSG_BAD_JCOL_TYPE 1016 -#define MSG_COL_USED_TWICE 1017 -#define MSG_DUMMY_NO_COLS 1018 -#define MSG_JCT_MISS_COLS 1019 -#define MSG_JCT_MISS_TABLE 1020 -#define MSG_JCT_NO_FILTER 1021 -#define MSG_JCT_NO_KEY 1022 -#define MSG_NO_DMY_DIR_ACC 1023 -#define MSG_NO_EXP_LINK 1024 -#define MSG_VIR_NO_DELETE 1025 -#define MSG_VIR_READ_ONLY 1026 -#define MSG_BAD_JOIN_EXP 1027 -#define MSG_BAD_JOIN_OP 1028 -#define MSG_COLUMN_NOT_KEY 1029 -#define MSG_DB_SORT_ERROR 1030 -#define MSG_LINJOINDB_ERROR 1031 -#define MSG_MULT_KEY_ERROR 1032 -#define MSG_NO_JOIN_TO_EXP 1033 -#define MSG_NO_MULCOL_JOIN 1034 -#define MSG_READ_ONLY 1035 -#define MSG_ROWID_NOT_IMPL 1036 -#define MSG_SETRECPOS_NIY 1037 -#define MSG_TABLE_MULT_JOIN 1038 -#define MSG_TDB_USE_ERROR 1039 -#define MSG_BAD_CARDINALITY 1040 -#define MSG_BAD_DIRECTORY 1041 -#define MSG_BAD_FILE_HANDLE 1042 -#define MSG_INV_DIRCOL_OFST 1043 -#define MSG_MAXSIZE_ERROR 1044 -#define MSG_MUL_MAKECOL_ERR 1045 -#define MSG_NEXT_FILE_ERROR 1046 -#define MSG_NO_DIR_INDX_RD 1047 -#define MSG_NO_INDEX_READ 1048 -#define MSG_NO_MUL_DIR_ACC 1049 -#define MSG_SRCH_CLOSE_ERR 1050 -#define MSG_TABDIR_READONLY 1051 -#define MSG_TABMUL_READONLY 1052 -#define MSG_NO_EXT_FILTER 1053 -#define MSG_NO_EXT_UPDATE 1054 -#define MSG_NO_ODBC_DELETE 1055 -#define MSG_NO_ODBC_DIRECT 1056 -#define MSG_NO_ODBC_MUL 1057 -#define MSG_NO_ODBC_SPECOL 1058 -#define MSG_NO_UPDEL_JOIN 1059 -#define MSG_ODBC_READ_ONLY 1060 -#define MSG_PARM_CNT_MISS 1061 -#define MSG_COLNAM_TOO_LONG 1062 -#define MSG_NOT_ENOUGH_COLS 1063 -#define MSG_NO_DEF_FNCCOL 1064 -#define MSG_NO_DEF_PIVOTCOL 1065 -#define MSG_NO_MATCH_COL 1066 -#define MSG_NO_MORE_COL 1067 -#define MSG_NO_PIV_DIR_ACC 1068 -#define MSG_NO_TABLE_DEL 1069 -#define MSG_SRC_TABLE_UNDEF 1070 -#define MSG_TABLE_READ_ONLY 1071 -#define MSG_TOO_MANY_COLS 1072 -#define MSG_BAD_COLDEF_TYPE 1073 -#define MSG_BAD_MERGE_TYPE 1074 -#define MSG_COL_NB_MISM 1075 -#define MSG_ERROR_OPENING 1076 -#define MSG_FETCH_NO_RES 1077 -#define MSG_LOAD_CDLL_ERROR 1078 -#define MSG_NO_NBCOL 1079 -#define MSG_NO_NBLIN 1080 -#define MSG_NO_PROMPTING 1081 -#define MSG_NO_REMOTE_FNC 1082 -#define MSG_NO_VIEW_COLDEF 1083 -#define MSG_PLG_READ_ONLY 1084 -#define MSG_PLM_NULL_SFP 1085 -#define MSG_QUERY_NOT_EXEC 1086 -#define MSG_REMOTE_CONN_ERR 1087 -#define MSG_RPC_SERVER_ERR 1088 -#define MSG_BAD_QUERY_OPEN 1089 -#define MSG_BAD_RETURN_TYPE 1090 -#define MSG_BAD_VIEW_OPEN 1091 -#define MSG_NO_QRY_DELETE 1092 -#define MSG_NO_SQL_DELETE 1093 -#define MSG_NO_VIEW_SORT 1094 -#define MSG_NULL_COL_VALUE 1095 -#define MSG_QRY_READ_ONLY 1096 -#define MSG_READCOL_ERROR 1097 -#define MSG_SQL_READ_ONLY 1098 -#define MSG_GET_NAME_ERR 1099 -#define MSG_INV_SUBTYPE 1100 -#define MSG_NO_CURLY_BRKT 1101 -#define MSG_NO_KEY_UPDATE 1102 -#define MSG_NO_SECTION_NAME 1103 -#define MSG_NO_SEC_UPDATE 1104 -#define MSG_SEC_KEY_FIRST 1105 -#define MSG_SEC_NAME_FIRST 1106 -#define MSG_NO_MATCHING_COL 1107 -#define MSG_BAD_BYTE_NUM 1108 -#define MSG_BAD_BYTE_READ 1109 -#define MSG_BAD_READ_NUMBER 1110 -#define MSG_BLK_IS_NULL 1111 -#define MSG_EMPTY_FILE 1112 -#define MSG_MAKE_EMPTY_FILE 1113 -#define MSG_MAKING 1114 -#define MSG_NO_VCT_DELETE 1115 -#define MSG_OPEN_EMPTY_FILE 1116 -#define MSG_OPT_INIT 1117 -#define MSG_SFP_ERROR 1118 -#define MSG_TO_BLK_IS_NULL 1119 -#define MSG_TRUNC_BY_ESTIM 1120 -#define MSG_UPDATE_ERROR 1121 -#define MSG_WRITE_STRERROR 1122 -#define MSG_WRITING 1123 -#define MSG_BAD_COL_XPATH 1124 -#define MSG_BAD_NODE_TYPE 1125 -#define MSG_BAD_VALNODE 1126 -#define MSG_BAD_VAL_UPDATE 1127 -#define MSG_COL_ALLOC_ERR 1128 -#define MSG_COM_ERROR 1129 -#define MSG_CONCAT_SUBNODE 1130 -#define MSG_CREATED_PLUGDB 1131 -#define MSG_DEPREC_FLAG 1132 -#define MSG_EMPTY_DOC 1133 -#define MSG_FAIL_ADD_NODE 1134 -#define MSG_FILE_UNFOUND 1135 -#define MSG_INIT_FAILED 1136 -#define MSG_INV_COL_TYPE 1137 -#define MSG_LOADING_FAILED 1138 -#define MSG_MISSING_NODE 1139 -#define MSG_MISSING_ROWNODE 1140 -#define MSG_MIS_TAG_LIST 1141 -#define MSG_NEW_DOC_FAILED 1142 -#define MSG_NO_ROW_NODE 1143 -#define MSG_VAL_ALLOC_ERR 1144 -#define MSG_XMLTAB_INIT_ERR 1145 -#define MSG_XML_INIT_ERROR 1146 -#define MSG_XPATH_NOT_SUPP 1147 -#define MSG_DLL_LOAD_ERROR 1148 -#define MSG_GZOPEN_ERROR 1149 -#define MSG_GZPUTS_ERROR 1150 -#define MSG_NO_ZIP_DELETE 1151 -#define MSG_NO_ZIP_DIR_ACC 1152 -#define MSG_UPD_ZIP_NOT_IMP 1153 -#define MSG_MAC_NO_DELETE 1154 -#define MSG_MAC_NO_INDEX 1155 -#define MSG_MAC_READ_ONLY 1156 -#define MSG_BAD_FIELD_TYPE 1157 -#define MSG_BAD_PARM_COUNT 1158 -#define MSG_NO_JOIN_UPDEL 1159 -#define MSG_NO_MYSQL_DELETE 1160 -#define MSG_NO_REF_DELETE 1161 -#define MSG_NO_REF_UPDATE 1162 -#define MSG_NO_SPEC_COL 1163 -#define MSG_ADD_NULL_DOM 1164 -#define MSG_BAD_DOM_VALUE 1165 -#define MSG_BAD_SET_STRING 1166 -#define MSG_BAD_VALBLK_INDX 1167 -#define MSG_BAD_VALBLK_TYPE 1168 -#define MSG_COMPUTE_NIY 1169 -#define MSG_DOMAIN_EMPTY 1170 -#define MSG_DOMAIN_FULL 1171 -#define MSG_DOM_FILE_ERROR 1172 -#define MSG_DOM_OPEN_ERROR 1173 -#define MSG_DOM_READ_ERROR 1174 -#define MSG_DOM_READ_ONLY 1175 -#define MSG_DOM_WRITE_ERROR 1176 -#define MSG_ERR_NUM_GT_MAX 1177 -#define MSG_INV_TOK_DOMAIN 1178 -#define MSG_MEMSIZE_TOO_BIG 1179 -#define MSG_NO_DOM_DELETE 1180 -#define MSG_NO_DOM_MATCH 1181 -#define MSG_SET_NULL_DOM 1182 -#define MSG_STRING_TOO_BIG 1183 -#define MSG_VALTYPE_NOMATCH 1184 -#define MSG_NO_DATE_FMT 1185 -#define MSG_NO_LISTVAL_HERE 1186 -#define MSG_BAD_COL_FORMAT 1187 -#define MSG_BAD_DATETIME 1188 -#define MSG_BAD_DATE_OPER 1189 -#define MSG_BAD_EXP_OPER 1190 -#define MSG_BAD_PAD_ARGTYP 1191 -#define MSG_BAD_TRIM_ARGTYP 1192 -#define MSG_BLKTYPLEN_MISM 1193 -#define MSG_COMPUTE_ERROR 1194 -#define MSG_FIX_OVFLW_ADD 1195 -#define MSG_FIX_OVFLW_TIMES 1196 -#define MSG_FIX_UNFLW_ADD 1197 -#define MSG_FIX_UNFLW_TIMES 1198 -#define MSG_HARRY_COMP_NIY 1199 -#define MSG_NO_CHAR_FROM 1200 -#define MSG_NO_FORMAT_TYPE 1201 -#define MSG_ONLY_LOG10_IMPL 1202 -#define MSG_OP_RES_TOO_LONG 1203 -#define MSG_SET_STR_TRUNC 1204 -#define MSG_SUB_RES_TOO_LNG 1205 -#define MSG_VALIST_MISMATCH 1206 -#define MSG_VALSTR_TOO_LONG 1207 -#define MSG_ZERO_DIVIDE 1208 -#define MSG_ADDVAL_ERROR 1209 -#define MSG_ARRAY_ALLOC_ERR 1210 -#define MSG_BAD_DEF_ARG 1211 -#define MSG_BAD_FUNC_MODE 1212 -#define MSG_BAD_INDEX_COL 1213 -#define MSG_BAD_INDEX_DEF 1214 -#define MSG_BAD_INDEX_FILE 1215 -#define MSG_BAD_INDEX_PART 1216 -#define MSG_EOF_INDEX_FILE 1217 -#define MSG_FILE_CLOSE_ERR 1218 -#define MSG_FILE_MAP_ERR 1219 -#define MSG_FUNC_ERRNO 1220 -#define MSG_FUNC_ERROR 1221 -#define MSG_GRP_COL_MISM 1222 -#define MSG_HANDLE_IS_NULL 1223 -#define MSG_HI_OFFSET_ERR 1224 -#define MSG_INDEX_DEF_ERR 1225 -#define MSG_INDEX_INIT_ERR 1226 -#define MSG_INDEX_NOT_UNIQ 1227 -#define MSG_INT_COL_ERROR 1228 -#define MSG_KEY_ALLOC_ERR 1229 -#define MSG_MAP_OBJ_ERR 1230 -#define MSG_MISS_LEAD_COL 1231 -#define MSG_NEW_TABLE_ERR 1232 -#define MSG_NO_KEY_COL 1233 -#define MSG_NO_PART_MAP 1234 -#define MSG_NUMVAL_NOMATCH 1235 -#define MSG_RANGE_NIY 1236 -#define MSG_RANGE_NO_JOIN 1237 -#define MSG_REDUCE_INDEX 1238 -#define MSG_SAVING_INDEX 1239 -#define MSG_TABLE_NO_INDEX 1240 -#define MSG_XCOL_MISMATCH 1241 -#define MSG_XFILE_READERR 1242 -#define MSG_XFILE_TOO_SMALL 1243 -#define MSG_XFILE_WRITERR 1244 -#define MSG_ADD_BAD_TYPE 1245 -#define MSG_BAD_ARRAY_TYPE 1246 -#define MSG_BAD_CONST_TYPE 1247 -#define MSG_BAD_CONV_TYPE 1248 -#define MSG_BAD_FLOAT_CONV 1249 -#define MSG_BAD_TEST_TYPE 1250 -#define MSG_FIND_BAD_TYPE 1251 +#define MSG_ACCESS_VIOLATN 200 +#define MSG_ADD_BAD_TYPE 201 +#define MSG_ALLOC_ERROR 202 +#define MSG_ANSWER_TYPE 203 +#define MSG_API_CONF_ERROR 204 +#define MSG_APPL_NOT_INIT 205 +#define MSG_ARRAY_BNDS_EXCD 206 +#define MSG_BAD_ARRAY_OPER 207 +#define MSG_BAD_ARRAY_TYPE 208 +#define MSG_BAD_ARRAY_VAL 209 +#define MSG_BAD_BIN_FMT 210 +#define MSG_BAD_BLK_ESTIM 211 +#define MSG_BAD_BLK_SIZE 212 +#define MSG_BAD_BYTE_NUM 213 +#define MSG_BAD_BYTE_READ 214 +#define MSG_BAD_COL_TYPE 215 +#define MSG_BAD_COL_XPATH 216 +#define MSG_BAD_CONST_TYPE 217 +#define MSG_BAD_CONV_TYPE 218 +#define MSG_BAD_DATETIME 219 +#define MSG_BAD_DBF_FILE 220 +#define MSG_BAD_DBF_REC 221 +#define MSG_BAD_DBF_TYPE 222 +#define MSG_BAD_DIRECTORY 223 +#define MSG_BAD_FIELD_RANK 224 +#define MSG_BAD_FIELD_TYPE 225 +#define MSG_BAD_FILE_HANDLE 226 +#define MSG_BAD_FILTER 227 +#define MSG_BAD_FILTER_CONV 228 +#define MSG_BAD_FILTER_OP 229 +#define MSG_BAD_FLD_FORMAT 230 +#define MSG_BAD_FLD_LENGTH 231 +#define MSG_BAD_FREQ_SET 232 +#define MSG_BAD_FUNC_MODE 233 +#define MSG_BAD_HANDLE_VAL 234 +#define MSG_BAD_HEADER 235 +#define MSG_BAD_HEAD_END 236 +#define MSG_BAD_INDEX_FILE 237 +#define MSG_BAD_LINEFLD_FMT 238 +#define MSG_BAD_LINE_LEN 239 +#define MSG_BAD_LRECL 240 +#define MSG_BAD_NODE_TYPE 241 +#define MSG_BAD_OFFSET_VAL 242 +#define MSG_BAD_OPEN_MODE 243 +#define MSG_BAD_PARAM_TYPE 244 +#define MSG_BAD_PARM_COUNT 245 +#define MSG_BAD_QUOTE_FIELD 246 +#define MSG_BAD_READ_NUMBER 247 +#define MSG_BAD_RECFM 248 +#define MSG_BAD_RECFM_VAL 249 +#define MSG_BAD_SET_CASE 250 +#define MSG_BAD_SET_STRING 251 +#define MSG_BAD_SPECIAL_COL 252 +#define MSG_BAD_SPEC_COLUMN 253 +#define MSG_BAD_TABLE_TYPE 254 +#define MSG_BAD_TYPE_LIKE 255 +#define MSG_BAD_VALBLK_INDX 256 +#define MSG_BAD_VALBLK_TYPE 257 +#define MSG_BAD_VALNODE 258 +#define MSG_BAD_VALUE_TYPE 259 +#define MSG_BAD_VAL_UPDATE 260 +#define MSG_BAS_NS_LIST 261 +#define MSG_BIN_F_TOO_LONG 262 +#define MSG_BIN_MODE_FAIL 263 +#define MSG_BLKTYPLEN_MISM 264 +#define MSG_BLK_IS_NULL 265 +#define MSG_BREAKPOINT 266 +#define MSG_BUILD_INDEX 267 +#define MSG_CANNOT_OPEN 268 +#define MSG_CHSIZE_ERROR 269 +#define MSG_COL_ALLOC_ERR 270 +#define MSG_COL_ISNOT_TABLE 271 +#define MSG_COL_NOT_SORTED 272 +#define MSG_COL_NUM_MISM 273 +#define MSG_COM_ERROR 274 +#define MSG_CONCAT_SUBNODE 275 +#define MSG_CONNECT_CANCEL 276 +#define MSG_CONTROL_C_EXIT 277 +#define MSG_DATABASE_LOADED 278 +#define MSG_DATA_MISALIGN 279 +#define MSG_DBASE_FILE 280 +#define MSG_DEF_ALLOC_ERROR 281 +#define MSG_DEL_FILE_ERR 282 +#define MSG_DEL_READ_ERROR 283 +#define MSG_DEL_WRITE_ERROR 284 +#define MSG_DEPREC_FLAG 285 +#define MSG_DLL_LOAD_ERROR 286 +#define MSG_DOM_NOT_SUPP 287 +#define MSG_DVAL_NOTIN_LIST 288 +#define MSG_EMPTY_DOC 289 +#define MSG_EMPTY_FILE 290 +#define MSG_EOF_AFTER_LINE 291 +#define MSG_EOF_INDEX_FILE 292 +#define MSG_ERROR_IN_LSK 293 +#define MSG_ERROR_IN_SFP 294 +#define MSG_ERR_READING_REC 295 +#define MSG_FAIL_ADD_NODE 296 +#define MSG_FETCH_NO_RES 297 +#define MSG_FIELD_TOO_LONG 298 +#define MSG_FILELEN_ERROR 299 +#define MSG_FILE_IS_EMPTY 300 +#define MSG_FILE_MAP_ERR 301 +#define MSG_FILE_MAP_ERROR 302 +#define MSG_FILE_OPEN_YET 303 +#define MSG_FILE_UNFOUND 304 +#define MSG_FLD_TOO_LNG_FOR 305 +#define MSG_FLT_BAD_RESULT 306 +#define MSG_FLT_DENORMAL_OP 307 +#define MSG_FLT_INVALID_OP 308 +#define MSG_FLT_OVERFLOW 309 +#define MSG_FLT_STACK_CHECK 310 +#define MSG_FLT_UNDERFLOW 311 +#define MSG_FLT_ZERO_DIVIDE 312 +#define MSG_FMT_WRITE_NIY 313 +#define MSG_FOXPRO_FILE 314 +#define MSG_FPUTS_ERROR 315 +#define MSG_FSEEK_ERROR 316 +#define MSG_FSETPOS_ERROR 317 +#define MSG_FTELL_ERROR 318 +#define MSG_FUNCTION_ERROR 319 +#define MSG_FUNC_ERRNO 320 +#define MSG_FUNC_ERROR 321 +#define MSG_FUNC_ERR_S 322 +#define MSG_FWRITE_ERROR 323 +#define MSG_GET_DIST_VALS 324 +#define MSG_GET_FUNC_ERR 325 +#define MSG_GLOBAL_ERROR 326 +#define MSG_GUARD_PAGE 327 +#define MSG_GZOPEN_ERROR 328 +#define MSG_ILLEGAL_INSTR 329 +#define MSG_ILL_FILTER_CONV 330 +#define MSG_INDEX_NOT_UNIQ 331 +#define MSG_INDEX_YET_ON 332 +#define MSG_INDX_COL_NOTIN 333 +#define MSG_INDX_EXIST_YET 334 +#define MSG_INIT_FAILED 335 +#define MSG_INT_COL_ERROR 336 +#define MSG_INT_OVERFLOW 337 +#define MSG_INT_ZERO_DIVIDE 338 +#define MSG_INVALID_DISP 339 +#define MSG_INVALID_FTYPE 340 +#define MSG_INVALID_HANDLE 341 +#define MSG_INVALID_OPER 342 +#define MSG_INV_COLUMN_TYPE 343 +#define MSG_INV_COL_TYPE 344 +#define MSG_INV_DEF_READ 345 +#define MSG_INV_DIRCOL_OFST 346 +#define MSG_INV_MAP_POS 347 +#define MSG_INV_RAND_ACC 348 +#define MSG_INV_REC_POS 349 +#define MSG_INV_RESULT_TYPE 350 +#define MSG_INV_UPDT_TABLE 351 +#define MSG_IN_WITHOUT_SUB 352 +#define MSG_KEY_ALLOC_ERR 353 +#define MSG_KEY_ALLOC_ERROR 354 +#define MSG_LINE_TOO_LONG 355 +#define MSG_LIST 356 +#define MSG_LOADING_FAILED 357 +#define MSG_LRECL_TOO_SMALL 358 +#define MSG_MAKE_EMPTY_FILE 359 +#define MSG_MAKING 360 +#define MSG_MALLOC_ERROR 361 +#define MSG_MAP_VIEW_ERROR 362 +#define MSG_MAXSIZE_ERROR 363 +#define MSG_MEM_ALLOC_ERR 364 +#define MSG_MEM_ALLOC_ERROR 365 +#define MSG_MISPLACED_QUOTE 366 +#define MSG_MISSING_ARG 367 +#define MSG_MISSING_FIELD 368 +#define MSG_MISSING_FNAME 369 +#define MSG_MISSING_NODE 370 +#define MSG_MISSING_ROWNODE 371 +#define MSG_MIS_TAG_LIST 372 +#define MSG_MUL_MAKECOL_ERR 373 +#define MSG_NAME_CONV_ERR 374 +#define MSG_NEW_DOC_FAILED 375 +#define MSG_NEW_RETURN_NULL 376 +#define MSG_NEXT_FILE_ERROR 377 +#define MSG_NONCONT_EXCEPT 378 +#define MSG_NOP_ZLIB_INDEX 379 +#define MSG_NOT_A_DBF_FILE 380 +#define MSG_NOT_FIXED_LEN 381 +#define MSG_NO_0DH_HEAD 382 +#define MSG_NO_ACTIVE_DB 383 +#define MSG_NO_CHAR_FROM 384 +#define MSG_NO_DATE_FMT 385 +#define MSG_NO_DEF_FNCCOL 386 +#define MSG_NO_DEF_PIVOTCOL 387 +#define MSG_NO_DIR_INDX_RD 388 +#define MSG_NO_FEAT_SUPPORT 389 +#define MSG_NO_FLD_FORMAT 390 +#define MSG_NO_FORMAT_COL 391 +#define MSG_NO_FORMAT_TYPE 392 +#define MSG_NO_INDEX_READ 393 +#define MSG_NO_KEY_COL 394 +#define MSG_NO_KEY_UPDATE 395 +#define MSG_NO_MAP_INSERT 396 +#define MSG_NO_MATCHING_COL 397 +#define MSG_NO_MATCH_COL 398 +#define MSG_NO_MEMORY 399 +#define MSG_NO_MODE_PADDED 400 +#define MSG_NO_MUL_VCT 401 +#define MSG_NO_ODBC_DELETE 402 +#define MSG_NO_ODBC_DIRECT 403 +#define MSG_NO_ODBC_MUL 404 +#define MSG_NO_ODBC_SPECOL 405 +#define MSG_NO_PART_DEL 406 +#define MSG_NO_PART_MAP 407 +#define MSG_NO_PAR_BLK_INS 408 +#define MSG_NO_PIV_DIR_ACC 409 +#define MSG_NO_READ_32 410 +#define MSG_NO_RECOV_SPACE 411 +#define MSG_NO_ROWID_FOR_AM 412 +#define MSG_NO_ROW_NODE 413 +#define MSG_NO_SECTION_NAME 414 +#define MSG_NO_SEC_UPDATE 415 +#define MSG_NO_SETPOS_YET 416 +#define MSG_NO_SPEC_COL 417 +#define MSG_NO_SUB_VAL 418 +#define MSG_NO_TABCOL_DATA 419 +#define MSG_NO_TABLE_DEL 420 +#define MSG_NO_TAB_DATA 421 +#define MSG_NO_VCT_DELETE 422 +#define MSG_NO_ZIP_DELETE 423 +#define MSG_OPENING 424 +#define MSG_OPEN_EMPTY_FILE 425 +#define MSG_OPEN_ERROR 426 +#define MSG_OPEN_ERROR_IS 427 +#define MSG_OPEN_MODE_ERROR 428 +#define MSG_OPEN_STRERROR 429 +#define MSG_OPTBLK_RD_ERR 430 +#define MSG_OPTBLK_WR_ERR 431 +#define MSG_OPTIMIZING 432 +#define MSG_OPT_BMAP_RD_ERR 433 +#define MSG_OPT_BMAP_WR_ERR 434 +#define MSG_OPT_CANCELLED 435 +#define MSG_OPT_DVAL_RD_ERR 436 +#define MSG_OPT_DVAL_WR_ERR 437 +#define MSG_OPT_HEAD_RD_ERR 438 +#define MSG_OPT_HEAD_WR_ERR 439 +#define MSG_OPT_LOGIC_ERR 440 +#define MSG_OPT_MAX_RD_ERR 441 +#define MSG_OPT_MAX_WR_ERR 442 +#define MSG_OPT_MIN_RD_ERR 443 +#define MSG_OPT_MIN_WR_ERR 444 +#define MSG_OPT_NOT_MATCH 445 +#define MSG_PAGE_ERROR 446 +#define MSG_PARM_CNT_MISS 447 +#define MSG_PREC_VBLP_NULL 448 +#define MSG_PRIV_INSTR 449 +#define MSG_PROCADD_ERROR 450 +#define MSG_QUERY_CANCELLED 451 +#define MSG_RANGE_NO_JOIN 452 +#define MSG_RC_READING 453 +#define MSG_READY 454 +#define MSG_READ_ERROR 455 +#define MSG_READ_ONLY 456 +#define MSG_READ_SEEK_ERROR 457 +#define MSG_REGISTER_ERR 458 +#define MSG_REMOVE_ERROR 459 +#define MSG_RENAME_ERROR 460 +#define MSG_ROWID_NOT_IMPL 461 +#define MSG_SEC_KEY_FIRST 462 +#define MSG_SEC_NAME_FIRST 463 +#define MSG_SEP_IN_FIELD 464 +#define MSG_SEQUENCE_ERROR 465 +#define MSG_SETEOF_ERROR 466 +#define MSG_SETRECPOS_NIY 467 +#define MSG_SET_STR_TRUNC 468 +#define MSG_SFP_ERROR 469 +#define MSG_SHARED_LIB_ERR 470 +#define MSG_SINGLE_STEP 471 +#define MSG_SORTING_VAL 472 +#define MSG_SPCOL_READONLY 473 +#define MSG_SQL_CONF_ERROR 474 +#define MSG_SRCH_CLOSE_ERR 475 +#define MSG_SRC_TABLE_UNDEF 476 +#define MSG_STACK_OVERFLOW 477 +#define MSG_TABDIR_READONLY 478 +#define MSG_TABLE_NOT_OPT 479 +#define MSG_TABLE_NO_INDEX 480 +#define MSG_TABLE_READ_ONLY 481 +#define MSG_TABMUL_READONLY 482 +#define MSG_TOO_MANY_FIELDS 483 +#define MSG_TOO_MANY_JUMPS 484 +#define MSG_TOO_MANY_KEYS 485 +#define MSG_TO_BLK_IS_NULL 486 +#define MSG_TRUNCATE_ERROR 487 +#define MSG_TRUNC_BY_ESTIM 488 +#define MSG_TYPE_MISMATCH 489 +#define MSG_TYPE_VALUE_ERR 490 +#define MSG_UNBALANCE_QUOTE 491 +#define MSG_UNDEFINED_AM 492 +#define MSG_UNKNOWN_EXCPT 493 +#define MSG_UNMATCH_FIL_ARG 494 +#define MSG_UPDATE_ERROR 495 +#define MSG_UPD_ZIP_NOT_IMP 496 +#define MSG_VALSTR_TOO_LONG 497 +#define MSG_VALTYPE_NOMATCH 498 +#define MSG_VALUE_ERROR 499 +#define MSG_VALUE_TOO_BIG 500 +#define MSG_VALUE_TOO_LONG 501 +#define MSG_VAL_ALLOC_ERR 502 +#define MSG_VIR_NO_DELETE 503 +#define MSG_VIR_READ_ONLY 504 +#define MSG_VOID_FIRST_ARG 505 +#define MSG_WORK_AREA 506 +#define MSG_WRITE_SEEK_ERR 507 +#define MSG_WRITE_STRERROR 508 +#define MSG_WRITING 509 +#define MSG_WRITING_ERROR 510 +#define MSG_WS_CONV_ERR 511 +#define MSG_XCOL_MISMATCH 512 +#define MSG_XFILE_READERR 513 +#define MSG_XFILE_WRITERR 514 +#define MSG_XMLTAB_INIT_ERR 515 +#define MSG_XML_INIT_ERROR 516 +#define MSG_XPATH_CNTX_ERR 517 +#define MSG_XPATH_EVAL_ERR 518 +#define MSG_XPATH_NOT_SUPP 519 diff --git a/storage/connect/mycat.cc b/storage/connect/mycat.cc index 5c11580c891..fc6c29092a1 100644 --- a/storage/connect/mycat.cc +++ b/storage/connect/mycat.cc @@ -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 diff --git a/storage/connect/myconn.cpp b/storage/connect/myconn.cpp index 0c4b50f1d0b..92c2faea676 100644 --- a/storage/connect/myconn.cpp +++ b/storage/connect/myconn.cpp @@ -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; diff --git a/storage/connect/mysql-test/connect/r/xcol.result b/storage/connect/mysql-test/connect/r/xcol.result index f6899b47504..94d1e0619cb 100644 --- a/storage/connect/mysql-test/connect/r/xcol.result +++ b/storage/connect/mysql-test/connect/r/xcol.result @@ -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; diff --git a/storage/connect/mysql-test/connect/t/xcol.test b/storage/connect/mysql-test/connect/t/xcol.test index b6998ee77e0..8f0edc2b268 100644 --- a/storage/connect/mysql-test/connect/t/xcol.test +++ b/storage/connect/mysql-test/connect/t/xcol.test @@ -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; diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index 679e8dc703c..bef735b4a6d 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -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 */ /***********************************************************************/ diff --git a/storage/connect/odbconn.h b/storage/connect/odbconn.h index 90d116cb1ad..1dd2aa2c16e 100644 --- a/storage/connect/odbconn.h +++ b/storage/connect/odbconn.h @@ -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 diff --git a/storage/connect/os.h b/storage/connect/os.h index 8e94f4241bb..8f77a0ad39f 100644 --- a/storage/connect/os.h +++ b/storage/connect/os.h @@ -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 */ diff --git a/storage/connect/plgdbsem.h b/storage/connect/plgdbsem.h index ef209a9b8b8..bbbbc1486b6 100644 --- a/storage/connect/plgdbsem.h +++ b/storage/connect/plgdbsem.h @@ -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 */ diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index 755aeb21105..d8009bcc71f 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -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 diff --git a/storage/connect/plugutil.c b/storage/connect/plugutil.c index c3b77544983..c77975e5e30 100644 --- a/storage/connect/plugutil.c +++ b/storage/connect/plugutil.c @@ -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 diff --git a/storage/connect/rcmsg.c b/storage/connect/rcmsg.c index bac420e696f..abd74d169cc 100644 --- a/storage/connect/rcmsg.c +++ b/storage/connect/rcmsg.c @@ -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 -#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 +#include +#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 diff --git a/storage/connect/reldef.cpp b/storage/connect/reldef.cpp index 22076b78086..e469ae40f1f 100644 --- a/storage/connect/reldef.cpp +++ b/storage/connect/reldef.cpp @@ -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; diff --git a/storage/connect/resource.h b/storage/connect/resource.h index 773942cf280..1c3e1ee3727 100644 --- a/storage/connect/resource.h +++ b/storage/connect/resource.h @@ -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 diff --git a/storage/connect/tabcol.cpp b/storage/connect/tabcol.cpp index 96ec4f45861..8f350c6f074 100644 --- a/storage/connect/tabcol.cpp +++ b/storage/connect/tabcol.cpp @@ -22,8 +22,6 @@ #include "xtable.h" #include "tabcol.h" -extern "C" int trace; - /***********************************************************************/ /* XTAB public constructor. */ /***********************************************************************/ diff --git a/storage/connect/tabdos.cpp b/storage/connect/tabdos.cpp index 7bba914a1ca..0ef9625ac9b 100644 --- a/storage/connect/tabdos.cpp +++ b/storage/connect/tabdos.cpp @@ -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. */ diff --git a/storage/connect/tabfix.cpp b/storage/connect/tabfix.cpp index 91f06536272..77e47e6f8dd 100644 --- a/storage/connect/tabfix.cpp +++ b/storage/connect/tabfix.cpp @@ -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); diff --git a/storage/connect/tabfmt.cpp b/storage/connect/tabfmt.cpp index 2efdd0d661b..d5f8dc50a89 100644 --- a/storage/connect/tabfmt.cpp +++ b/storage/connect/tabfmt.cpp @@ -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 && diff --git a/storage/connect/tabfmt.h b/storage/connect/tabfmt.h index 1b39a47e7d9..8a1e1f17561 100644 --- a/storage/connect/tabfmt.h +++ b/storage/connect/tabfmt.h @@ -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 diff --git a/storage/connect/table.cpp b/storage/connect/table.cpp index 5db50d44787..b093e2102c2 100644 --- a/storage/connect/table.cpp +++ b/storage/connect/table.cpp @@ -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. */ diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp old mode 100755 new mode 100644 index 4b40e6c5509..415a1523d30 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -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; diff --git a/storage/connect/tabmysql.cpp b/storage/connect/tabmysql.cpp index 08938cb9626..3ec9a1feaee 100644 --- a/storage/connect/tabmysql.cpp +++ b/storage/connect/tabmysql.cpp @@ -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 diff --git a/storage/connect/tabmysql.h b/storage/connect/tabmysql.h index 68cf453a9e6..99930d43a57 100644 --- a/storage/connect/tabmysql.h +++ b/storage/connect/tabmysql.h @@ -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 diff --git a/storage/connect/taboccur.cpp b/storage/connect/taboccur.cpp index 917685faae3..86f0bd20d47 100644 --- a/storage/connect/taboccur.cpp +++ b/storage/connect/taboccur.cpp @@ -51,8 +51,6 @@ #include "ha_connect.h" #include "mycat.h" -extern "C" int trace; - /***********************************************************************/ /* Prepare and count columns in the column list. */ /***********************************************************************/ diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp index c9f5fbe31c7..bbc17129aaf 100644 --- a/storage/connect/tabodbc.cpp +++ b/storage/connect/tabodbc.cpp @@ -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 diff --git a/storage/connect/tabodbc.h b/storage/connect/tabodbc.h index 360f52c9d21..f042b0c73ca 100644 --- a/storage/connect/tabodbc.h +++ b/storage/connect/tabodbc.h @@ -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 /***********************************************************************/ diff --git a/storage/connect/tabpivot.cpp b/storage/connect/tabpivot.cpp index 7e54b62caaa..94e9d7187f0 100644 --- a/storage/connect/tabpivot.cpp +++ b/storage/connect/tabpivot.cpp @@ -51,8 +51,6 @@ #include "ha_connect.h" #include "mycat.h" // For GetHandler -extern "C" int trace; - /***********************************************************************/ /* Make the Pivot table column list. */ /***********************************************************************/ diff --git a/storage/connect/tabsys.cpp b/storage/connect/tabsys.cpp index ae92c0771b6..3ed182c5e33 100644 --- a/storage/connect/tabsys.cpp +++ b/storage/connect/tabsys.cpp @@ -53,8 +53,6 @@ GetPrivateProfileString(NULL,NULL,"",S,L,I) #endif // !WIN32 -extern "C" int trace; - /* -------------- Implementation of the INI classes ------------------ */ /***********************************************************************/ diff --git a/storage/connect/tabtbl.cpp b/storage/connect/tabtbl.cpp index f5a516ad1d0..22ec3849b6f 100644 --- a/storage/connect/tabtbl.cpp +++ b/storage/connect/tabtbl.cpp @@ -86,8 +86,6 @@ #define SYSEXIT void * #endif // !WIN32 -extern "C" int trace; - /* ---------------------------- Class TBLDEF ---------------------------- */ /**************************************************************************/ diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index f4a8f2ee470..d469594916f 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -54,7 +54,6 @@ #include "tabutil.h" #include "ha_connect.h" -extern "C" int trace; extern "C" int zconv; /************************************************************************/ diff --git a/storage/connect/tabvct.cpp b/storage/connect/tabvct.cpp index 6d7059e2306..3ed40540395 100644 --- a/storage/connect/tabvct.cpp +++ b/storage/connect/tabvct.cpp @@ -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 /***********************************************************************/ diff --git a/storage/connect/tabvir.cpp b/storage/connect/tabvir.cpp new file mode 100644 index 00000000000..b4c76f5ad56 --- /dev/null +++ b/storage/connect/tabvir.cpp @@ -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 + +/***********************************************************************/ +/* 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 -------------------------- */ diff --git a/storage/connect/tabvir.h b/storage/connect/tabvir.h new file mode 100644 index 00000000000..8d0caa257e7 --- /dev/null +++ b/storage/connect/tabvir.h @@ -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 diff --git a/storage/connect/tabwmi.cpp b/storage/connect/tabwmi.cpp index f93776c31da..7c69426a066 100644 --- a/storage/connect/tabwmi.cpp +++ b/storage/connect/tabwmi.cpp @@ -21,8 +21,6 @@ #include "plgcnx.h" // For DB types #include "resource.h" -extern "C" int trace; - /* ------------------- Functions WMI Column info --------------------- */ /***********************************************************************/ diff --git a/storage/connect/tabwmi.h b/storage/connect/tabwmi.h index 6f25c0de258..6abb85453a1 100644 --- a/storage/connect/tabwmi.h +++ b/storage/connect/tabwmi.h @@ -1,151 +1,151 @@ -// TABWMI.H Olivier Bertrand 2012 -// WMI: Virtual table to Get WMI information -#define _WIN32_DCOM -#include -# pragma comment(lib, "wbemuuid.lib") -#include -using namespace std; -#include - -/***********************************************************************/ -/* 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 +# pragma comment(lib, "wbemuuid.lib") +#include +using namespace std; +#include + +/***********************************************************************/ +/* 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 diff --git a/storage/connect/tabxcl.cpp b/storage/connect/tabxcl.cpp index 66e2577056a..57f0e1e03b9 100644 --- a/storage/connect/tabxcl.cpp +++ b/storage/connect/tabxcl.cpp @@ -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; diff --git a/storage/connect/tabxcl.h b/storage/connect/tabxcl.h index 05118c5dd25..7e11600c090 100644 --- a/storage/connect/tabxcl.h +++ b/storage/connect/tabxcl.h @@ -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); diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 76e4b111bda..8c73907c7ee 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -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" diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc index b5f835c9cc9..4affe447b00 100644 --- a/storage/connect/user_connect.cc +++ b/storage/connect/user_connect.cc @@ -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 diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index 3827deec43d..df7011583cd 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -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 */ /***********************************************************************/ diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index 41e425d54e2..81d00862703 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -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::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); diff --git a/storage/connect/value.h b/storage/connect/value.h index 295fa11107a..3ce7027aeeb 100644 --- a/storage/connect/value.h +++ b/storage/connect/value.h @@ -256,6 +256,7 @@ class DllExport TYPVAL: 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 { 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; diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp index 7cc52580760..024a9c081cd 100755 --- a/storage/connect/xindex.cpp +++ b/storage/connect/xindex.cpp @@ -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 /***********************************************************************/ diff --git a/storage/connect/xobject.cpp b/storage/connect/xobject.cpp index cdc2ef9bf62..4ddd4f5b30f 100644 --- a/storage/connect/xobject.cpp +++ b/storage/connect/xobject.cpp @@ -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 + diff --git a/storage/connect/xobject.h b/storage/connect/xobject.h index 1621b4e82ff..bb7b0150ed8 100644 --- a/storage/connect/xobject.h +++ b/storage/connect/xobject.h @@ -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 diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index 628ab96135d..49fbbb0de26 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -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);