From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 3E0B02B2B6 for ; Tue, 9 Apr 2019 13:17:07 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I8sSwkOZ1dxP for ; Tue, 9 Apr 2019 13:17:07 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 9FF4C2B2DC for ; Tue, 9 Apr 2019 13:17:06 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v1 2/3] sql: remove unused macros in SQL Date: Tue, 9 Apr 2019 20:17:04 +0300 Message-Id: <7654181f806322478e4de2b4c9c800fd5fa33077.1554830037.git.imeevma@gmail.com> In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: korablev@tarantool.org Cc: tarantool-patches@freelists.org Thise macros unused and should be removed. Needed for #4074 --- src/box/sql/expr.c | 8 -- src/box/sql/fault.c | 6 -- src/box/sql/func.c | 10 --- src/box/sql/global.c | 6 -- src/box/sql/main.c | 230 +------------------------------------------------ src/box/sql/malloc.c | 21 ----- src/box/sql/os.c | 14 --- src/box/sql/os_unix.c | 5 -- src/box/sql/prepare.c | 4 - src/box/sql/printf.c | 35 -------- src/box/sql/random.c | 11 --- src/box/sql/sqlInt.h | 61 +------------ src/box/sql/status.c | 25 +----- src/box/sql/treeview.c | 2 - src/box/sql/update.c | 2 - src/box/sql/util.c | 41 --------- src/box/sql/vdbe.c | 12 --- src/box/sql/vdbeInt.h | 4 - src/box/sql/vdbeapi.c | 15 ---- src/box/sql/vdbeaux.c | 29 +------ src/box/sql/vdbemem.c | 8 -- 21 files changed, 10 insertions(+), 539 deletions(-) diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c index 6ff41a5..a95d576 100644 --- a/src/box/sql/expr.c +++ b/src/box/sql/expr.c @@ -3287,7 +3287,6 @@ sqlExprCodeIN(Parse * pParse, /* Parsing and code generating context */ sqlDbFree(pParse->db, zAff); } -#ifndef SQL_OMIT_FLOATING_POINT /* * Generate an instruction that will put the floating point * value described by z[0..n-1] into register iMem. @@ -3309,7 +3308,6 @@ codeReal(Vdbe * v, const char *z, int negateFlag, int iMem) P4_REAL); } } -#endif /** * Generate an instruction that will put the integer describe by @@ -3760,13 +3758,11 @@ sqlExprCodeTarget(Parse * pParse, Expr * pExpr, int target) expr_code_int(pParse, pExpr, false, target); return target; } -#ifndef SQL_OMIT_FLOATING_POINT case TK_FLOAT:{ assert(!ExprHasProperty(pExpr, EP_IntValue)); codeReal(v, pExpr->u.zToken, 0, target); return target; } -#endif case TK_STRING:{ assert(!ExprHasProperty(pExpr, EP_IntValue)); sqlVdbeLoadString(v, target, pExpr->u.zToken); @@ -3923,12 +3919,10 @@ sqlExprCodeTarget(Parse * pParse, Expr * pExpr, int target) if (pLeft->op == TK_INTEGER) { expr_code_int(pParse, pLeft, true, target); return target; -#ifndef SQL_OMIT_FLOATING_POINT } else if (pLeft->op == TK_FLOAT) { assert(!ExprHasProperty(pExpr, EP_IntValue)); codeReal(v, pLeft->u.zToken, 1, target); return target; -#endif } else { tempX.op = TK_INTEGER; tempX.flags = EP_IntValue | EP_TokenOnly; @@ -4283,7 +4277,6 @@ sqlExprCodeTarget(Parse * pParse, Expr * pExpr, int target) pExpr->space_def->fields[ pExpr->iColumn].name, target)); -#ifndef SQL_OMIT_FLOATING_POINT /* If the column has type NUMBER, it may currently be stored as an * integer. Use OP_Realify to make sure it is really real. */ @@ -4291,7 +4284,6 @@ sqlExprCodeTarget(Parse * pParse, Expr * pExpr, int target) pExpr->iColumn].type == FIELD_TYPE_NUMBER) { sqlVdbeAddOp1(v, OP_Realify, target); } -#endif break; } diff --git a/src/box/sql/fault.c b/src/box/sql/fault.c index d83af36..8ee774e 100644 --- a/src/box/sql/fault.c +++ b/src/box/sql/fault.c @@ -65,14 +65,8 @@ static SQL_WSD struct BenignMallocHooks { * case where writable static data is supported, wsdHooks can refer directly * to the "sqlHooks" state vector declared above. */ -#ifdef SQL_OMIT_WSD -#define wsdHooksInit \ - BenignMallocHooks *x = &GLOBAL(BenignMallocHooks,sqlHooks) -#define wsdHooks x[0] -#else #define wsdHooksInit #define wsdHooks sqlHooks -#endif /* * Register hooks to call when sqlBeginBenignMalloc() and diff --git a/src/box/sql/func.c b/src/box/sql/func.c index b86a95d..9288dbe 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -498,7 +498,6 @@ substrFunc(sql_context * context, int argc, sql_value ** argv) /* * Implementation of the round() function */ -#ifndef SQL_OMIT_FLOATING_POINT static void roundFunc(sql_context * context, int argc, sql_value ** argv) { @@ -535,7 +534,6 @@ roundFunc(sql_context * context, int argc, sql_value ** argv) } sql_result_double(context, r); } -#endif /* * Allocate nByte bytes of space using sqlMalloc(). If the @@ -1547,7 +1545,6 @@ totalFinalize(sql_context * context) { SumCtx *p; p = sql_aggregate_context(context, 0); - /* (double)0 In case of SQL_OMIT_FLOATING_POINT... */ sql_result_double(context, p ? p->rSum : (double)0); } @@ -1703,11 +1700,6 @@ sql_overload_function(sql * db, const char *zName, { int rc = SQL_OK; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db) || zName == 0 || nArg < -2) { - return SQL_MISUSE; - } -#endif if (sqlFindFunction(db, zName, nArg, 0) == 0) { rc = sqlCreateFunc(db, zName, type, nArg, 0, 0, sqlInvalidFunction, 0, 0, 0); @@ -1841,10 +1833,8 @@ sqlRegisterBuiltinFunctions(void) FUNCTION(unicode, 1, 0, 0, unicodeFunc, FIELD_TYPE_STRING), FUNCTION(char, -1, 0, 0, charFunc, FIELD_TYPE_STRING), FUNCTION(abs, 1, 0, 0, absFunc, FIELD_TYPE_NUMBER), -#ifndef SQL_OMIT_FLOATING_POINT FUNCTION(round, 1, 0, 0, roundFunc, FIELD_TYPE_INTEGER), FUNCTION(round, 2, 0, 0, roundFunc, FIELD_TYPE_INTEGER), -#endif FUNCTION_COLL(upper, 1, 0, 1, UpperICUFunc), FUNCTION_COLL(lower, 1, 0, 1, LowerICUFunc), FUNCTION(hex, 1, 0, 0, hexFunc, FIELD_TYPE_STRING), diff --git a/src/box/sql/global.c b/src/box/sql/global.c index 159b35e..f48cb8c 100644 --- a/src/box/sql/global.c +++ b/src/box/sql/global.c @@ -200,10 +200,6 @@ SQL_WSD struct sqlConfig sqlConfig = { 0, /* isMallocInit */ 0, /* xLog */ 0, /* pLogArg */ -#ifdef SQL_ENABLE_SQLLOG - 0, /* xSqllog */ - 0, /* pSqllogArg */ -#endif #ifdef SQL_VDBE_COVERAGE 0, /* xVdbeBranch */ 0, /* pVbeBranchArg */ @@ -240,9 +236,7 @@ FuncDefHash sqlBuiltinFunctions; * Changing the pending byte during operation will result in undefined * and incorrect behavior. */ -#ifndef SQL_OMIT_WSD int sqlPendingByte = 0x40000000; -#endif #include "opcodes.h" /* diff --git a/src/box/sql/main.c b/src/box/sql/main.c index 0b3bd20..9cc6536 100644 --- a/src/box/sql/main.c +++ b/src/box/sql/main.c @@ -40,22 +40,6 @@ #include "version.h" #include "box/session.h" -#ifdef SQL_ENABLE_FTS3 -#include "fts3.h" -#endif -#ifdef SQL_ENABLE_RTREE -#include "rtree.h" -#endif -#ifdef SQL_ENABLE_ICU -#include "sqlicu.h" -#endif -#ifdef SQL_ENABLE_JSON1 -int sqlJson1Init(sql *); -#endif -#ifdef SQL_ENABLE_FTS5 -int sqlFts5Init(sql *); -#endif - #if !defined(SQL_OMIT_TRACE) && defined(SQL_ENABLE_IOTRACE) /* * If the following function pointer is not NULL and if @@ -89,9 +73,7 @@ char *sql_data_directory = 0; * * This routine must be called to initialize the memory allocation, * and VFS subsystems prior to doing any serious work with - * sql. But as long as you do not compile with SQL_OMIT_AUTOINIT - * this routine will be called automatically by key routines such as - * sql_open(). + * sql. * * This routine is a no-op except on its very first call for the process, * or for the first call after a call to sql_shutdown. @@ -119,16 +101,6 @@ int sql_initialize(void) { int rc = SQL_OK; -#ifdef SQL_EXTRA_INIT - int bRunExtraInit = 0; /* Extra initialization needed */ -#endif - -#ifdef SQL_OMIT_WSD - rc = sql_wsd_init(4096, 24); - if (rc != SQL_OK) { - return rc; - } -#endif /* If the following assert() fails on some obscure processor/compiler * combination, the work-around is to set the correct pointer @@ -170,12 +142,6 @@ sql_initialize(void) if (sqlGlobalConfig.isInit == 0 && sqlGlobalConfig.inProgress == 0) { sqlGlobalConfig.inProgress = 1; -#ifdef SQL_ENABLE_SQLLOG - { - extern void sql_init_sqllog(void); - sql_init_sqllog(); - } -#endif memset(&sqlBuiltinFunctions, 0, sizeof(sqlBuiltinFunctions)); sqlRegisterBuiltinFunctions(); @@ -184,9 +150,6 @@ sql_initialize(void) } if (rc == SQL_OK) { sqlGlobalConfig.isInit = 1; -#ifdef SQL_EXTRA_INIT - bRunExtraInit = 1; -#endif } sqlGlobalConfig.inProgress = 0; } @@ -197,7 +160,6 @@ sql_initialize(void) * reason. So we run it once during initialization. */ #ifndef NDEBUG -#ifndef SQL_OMIT_FLOATING_POINT /* This section of code's only "output" is via assert() statements. */ if (rc == SQL_OK) { u64 x = (((u64) 1) << 63) - 1; @@ -208,17 +170,6 @@ sql_initialize(void) assert(sqlIsNaN(y)); } #endif -#endif - - /* Do extra initialization steps requested by the SQL_EXTRA_INIT - * compile-time option. - */ -#ifdef SQL_EXTRA_INIT - if (bRunExtraInit) { - int SQL_EXTRA_INIT(const char *); - rc = SQL_EXTRA_INIT(0); - } -#endif return rc; } @@ -234,13 +185,6 @@ sql_initialize(void) int sql_shutdown(void) { -#ifdef SQL_OMIT_WSD - int rc = sql_wsd_init(4096, 24); - if (rc != SQL_OK) { - return rc; - } -#endif - if (sqlGlobalConfig.isInit) { #ifdef SQL_EXTRA_SHUTDOWN void SQL_EXTRA_SHUTDOWN(void); @@ -354,16 +298,6 @@ sql_config(int op, ...) break; } -#ifdef SQL_ENABLE_SQLLOG - case SQL_CONFIG_SQLLOG:{ - typedef void (*SQLLOGFUNC_t) (void *, sql *, - const char *, int); - sqlGlobalConfig.xSqllog = va_arg(ap, SQLLOGFUNC_t); - sqlGlobalConfig.pSqllogArg = va_arg(ap, void *); - break; - } -#endif - case SQL_CONFIG_MMAP_SIZE:{ /* EVIDENCE-OF: R-58063-38258 SQL_CONFIG_MMAP_SIZE takes two 64-bit * integer (sql_int64) values that are the default mmap size limit @@ -556,13 +490,6 @@ sqlClose(sql * db, int forceZombie) "statements"); return SQL_BUSY; } -#ifdef SQL_ENABLE_SQLLOG - if (sqlGlobalConfig.xSqllog) { - /* Closing the handle. Fourth parameter is passed the value 2. */ - sqlGlobalConfig.xSqllog(sqlGlobalConfig.pSqllogArg, db, - 0, 2); - } -#endif /* Convert the connection into a zombie and then close it. */ @@ -650,11 +577,6 @@ void sql_progress_handler(sql * db, int nOps, int (*xProgress) (void *), void *pArg) { -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return; - } -#endif if (nOps > 0) { db->xProgress = xProgress; db->nProgressOps = (unsigned)nOps; @@ -673,12 +595,6 @@ sql_progress_handler(sql * db, void sql_interrupt(sql * db) { -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db) - && (db == 0 || db->magic != SQL_MAGIC_ZOMBIE)) { - return; - } -#endif db->u1.isInterrupted = 1; } @@ -775,11 +691,6 @@ sql_create_function_v2(sql * db, int rc = SQL_ERROR; FuncDestructor *pArg = 0; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return SQL_MISUSE; - } -#endif if (xDestroy) { pArg = (FuncDestructor *) sqlDbMallocZero(db, @@ -814,11 +725,6 @@ sql_trace_v2(sql * db, /* Trace this connection */ int (*xTrace) (unsigned, void *, void *, void *), /* Callback to invoke */ void *pArg) /* Context */ { -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return SQL_MISUSE; - } -#endif if (mTrace == 0) xTrace = 0; if (xTrace == 0) @@ -843,11 +749,6 @@ sql_commit_hook(sql * db, /* Attach the hook to this database */ { void *pOld; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return 0; - } -#endif pOld = db->pCommitArg; db->xCommitCallback = xCallback; db->pCommitArg = pArg; @@ -866,11 +767,6 @@ sql_update_hook(sql * db, /* Attach the hook to this database */ { void *pRet; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return 0; - } -#endif pRet = db->pUpdateArg; db->xUpdateCallback = xCallback; db->pUpdateArg = pArg; @@ -888,11 +784,6 @@ sql_rollback_hook(sql * db, /* Attach the hook to this database */ { void *pRet; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return 0; - } -#endif pRet = db->pRollbackArg; db->xRollbackCallback = xCallback; db->pRollbackArg = pArg; @@ -1103,12 +994,6 @@ sql_limit(sql * db, int limitId, int newLimit) { int oldLimit; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) { - return -1; - } -#endif - /* EVIDENCE-OF: R-30189-54097 For each limit category SQL_LIMIT_NAME * there is a hard upper bound set at compile-time by a C preprocessor * macro called SQL_MAX_NAME. (The "_LIMIT_" in the name is changed to @@ -1449,15 +1334,9 @@ sql_init_db(sql **out_db) sql *db; int rc; /* Return code */ -#ifdef SQL_ENABLE_API_ARMOR - if (ppDb == 0) - return SQL_MISUSE; -#endif -#ifndef SQL_OMIT_AUTOINIT rc = sql_initialize(); if (rc) return rc; -#endif /* Allocate the sql data structure */ db = sqlMallocZero(sizeof(sql)); @@ -1488,54 +1367,6 @@ sql_init_db(sql **out_db) sqlRegisterPerConnectionBuiltinFunctions(db); rc = sql_errcode(db); -#ifdef SQL_ENABLE_FTS5 - /* Register any built-in FTS5 module before loading the automatic - * extensions. This allows automatic extensions to register FTS5 - * tokenizers and auxiliary functions. - */ - if (!db->mallocFailed && rc == SQL_OK) { - rc = sqlFts5Init(db); - } -#endif - -#ifdef SQL_ENABLE_FTS1 - if (!db->mallocFailed) { - extern int sqlFts1Init(sql *); - rc = sqlFts1Init(db); - } -#endif - -#ifdef SQL_ENABLE_FTS2 - if (!db->mallocFailed && rc == SQL_OK) { - extern int sqlFts2Init(sql *); - rc = sqlFts2Init(db); - } -#endif - -#ifdef SQL_ENABLE_FTS3 /* automatically defined by SQL_ENABLE_FTS4 */ - if (!db->mallocFailed && rc == SQL_OK) { - rc = sqlFts3Init(db); - } -#endif - -#ifdef SQL_ENABLE_ICU - if (!db->mallocFailed && rc == SQL_OK) { - rc = sqlIcuInit(db); - } -#endif - -#ifdef SQL_ENABLE_RTREE - if (!db->mallocFailed && rc == SQL_OK) { - rc = sqlRtreeInit(db); - } -#endif - -#ifdef SQL_ENABLE_JSON1 - if (!db->mallocFailed && rc == SQL_OK) { - rc = sqlJson1Init(db); - } -#endif - if (rc) sqlError(db, rc); @@ -1553,13 +1384,6 @@ opendb_out: db->magic = SQL_MAGIC_SICK; *out_db = db; -#ifdef SQL_ENABLE_SQLLOG - if (sqlGlobalConfig.xSqllog) { - /* Opening a db handle. Fourth parameter is passed 0. */ - void *pArg = sqlGlobalConfig.pSqllogArg; - sqlGlobalConfig.xSqllog(pArg, db, zFilename, 0); - } -#endif return rc; } @@ -1570,10 +1394,6 @@ opendb_out: int sql_extended_result_codes(sql * db, int onoff) { -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db)) - return SQL_MISUSE; -#endif db->errMask = onoff ? 0xffffffff : 0xff; return SQL_OK; } @@ -1669,13 +1489,11 @@ sql_test_control(int op, ...) */ case SQL_TESTCTRL_PENDING_BYTE:{ rc = PENDING_BYTE; -#ifndef SQL_OMIT_WSD { unsigned int newVal = va_arg(ap, unsigned int); if (newVal) sqlPendingByte = newVal; } -#endif break; } @@ -1924,49 +1742,3 @@ sql_uri_int64(const char *zFilename, /* Filename as passed to xOpen */ bDflt = v; return bDflt; } - - -#ifdef SQL_ENABLE_SNAPSHOT -/* - * Obtain a snapshot handle for the snapshot of database zDb currently - * being read by handle db. - */ -int -sql_snapshot_get(sql * db, - const char *zDb, sql_snapshot ** ppSnapshot) -{ - int rc = SQL_ERROR; - return rc; -} - -/* - * Open a read-transaction on the snapshot idendified by pSnapshot. - */ -int -sql_snapshot_open(sql * db, - const char *zDb, sql_snapshot * pSnapshot) -{ - int rc = SQL_ERROR; - return rc; -} - -/* - * Recover as many snapshots as possible from the wal file associated with - * schema zDb of database db. - */ -int -sql_snapshot_recover(sql * db, const char *zDb) -{ - int rc = SQL_ERROR; - return rc; -} - -/* - * Free a snapshot handle obtained from sql_snapshot_get(). - */ -void -sql_snapshot_free(sql_snapshot * pSnapshot) -{ - sql_free(pSnapshot); -} -#endif /* SQL_ENABLE_SNAPSHOT */ diff --git a/src/box/sql/malloc.c b/src/box/sql/malloc.c index dc018fc..d6f99b4 100644 --- a/src/box/sql/malloc.c +++ b/src/box/sql/malloc.c @@ -185,11 +185,6 @@ sql_soft_heap_limit64(sql_int64 n) sql_int64 priorLimit; sql_int64 excess; sql_int64 nUsed; -#ifndef SQL_OMIT_AUTOINIT - int rc = sql_initialize(); - if (rc) - return -1; -#endif priorLimit = mem0.alarmThreshold; if (n < 0) { return priorLimit; @@ -372,20 +367,12 @@ sqlMalloc(u64 n) void * sql_malloc(int n) { -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif return n <= 0 ? 0 : sqlMalloc(n); } void * sql_malloc64(sql_uint64 n) { -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif return sqlMalloc(n); } @@ -661,10 +648,6 @@ sqlRealloc(void *pOld, u64 nBytes) void * sql_realloc(void *pOld, int n) { -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif if (n < 0) n = 0; /* IMP: R-26507-47431 */ return sqlRealloc(pOld, n); @@ -673,10 +656,6 @@ sql_realloc(void *pOld, int n) void * sql_realloc64(void *pOld, sql_uint64 n) { -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif return sqlRealloc(pOld, n); } diff --git a/src/box/sql/os.c b/src/box/sql/os.c index 76a15ed..eb7450b 100644 --- a/src/box/sql/os.c +++ b/src/box/sql/os.c @@ -213,11 +213,6 @@ sql_vfs * sql_vfs_find(const char *zVfs) { sql_vfs *pVfs = 0; -#ifndef SQL_OMIT_AUTOINIT - int rc = sql_initialize(); - if (rc) - return 0; -#endif for (pVfs = vfsList; pVfs; pVfs = pVfs->pNext) { if (zVfs == 0) break; @@ -256,15 +251,6 @@ vfsUnlink(sql_vfs * pVfs) int sql_vfs_register(sql_vfs * pVfs, int makeDflt) { -#ifndef SQL_OMIT_AUTOINIT - int rc = sql_initialize(); - if (rc) - return rc; -#endif -#ifdef SQL_ENABLE_API_ARMOR - if (pVfs == 0) - return SQL_MISUSE; -#endif vfsUnlink(pVfs); if (makeDflt || vfsList == 0) { diff --git a/src/box/sql/os_unix.c b/src/box/sql/os_unix.c index b659985..615d539 100644 --- a/src/box/sql/os_unix.c +++ b/src/box/sql/os_unix.c @@ -1693,11 +1693,6 @@ getFileMode(const char *zFile, /* File name */ * corresponding database file and sets *pMode to this value. Whenever * possible, journal files are created using the same permissions * as the associated database file. - * - * If the SQL_ENABLE_8_3_NAMES option is enabled, then the - * original filename is unavailable. But 8_3_NAMES is only used for - * FAT filesystems and permissions do not matter there, so just use - * the default permissions. */ static int findCreateFileMode(const char *zPath, /* Path of file (possibly) being created */ diff --git a/src/box/sql/prepare.c b/src/box/sql/prepare.c index 4ae6c13..3df6b5c 100644 --- a/src/box/sql/prepare.c +++ b/src/box/sql/prepare.c @@ -194,10 +194,6 @@ sqlLockAndPrepare(sql * db, /* Database handle. */ { int rc; -#ifdef SQL_ENABLE_API_ARMOR - if (ppStmt == 0) - return SQL_MISUSE; -#endif *ppStmt = 0; if (!sqlSafetyCheckOk(db) || zSql == 0) { return SQL_MISUSE; diff --git a/src/box/sql/printf.c b/src/box/sql/printf.c index 592f906..31d21db 100644 --- a/src/box/sql/printf.c +++ b/src/box/sql/printf.c @@ -80,12 +80,10 @@ static const et_info fmtinfo[] = { {'u', 10, 0, etRADIX, 0, 0}, {'x', 16, 0, etRADIX, 16, 1}, {'X', 16, 0, etRADIX, 0, 4}, -#ifndef SQL_OMIT_FLOATING_POINT {'f', 0, 1, etFLOAT, 0, 0}, {'e', 0, 1, etEXP, 30, 0}, {'E', 0, 1, etEXP, 14, 0}, {'G', 0, 1, etGENERIC, 14, 0}, -#endif {'i', 10, 1, etRADIX, 0, 0}, {'n', 0, 0, etSIZE, 0, 0}, {'%', 0, 0, etPERCENT, 0, 0}, @@ -99,11 +97,6 @@ static const et_info fmtinfo[] = { }; /* - * If SQL_OMIT_FLOATING_POINT is defined, then none of the floating point - * conversions will work. - */ -#ifndef SQL_OMIT_FLOATING_POINT -/* * "*val" is a double such that 0.1 <= *val < 10.0 * Return the ascii code for the leading digit of *val, then * multiply "*val" by 10.0 to renormalize. @@ -130,7 +123,6 @@ et_getdigit(LONGDOUBLE_TYPE * val, int *cnt) *val = (*val - d) * 10.0; return (char)digit; } -#endif /* SQL_OMIT_FLOATING_POINT */ /* * Set the StrAccum object to an error mode. @@ -213,13 +205,11 @@ sqlVXPrintf(StrAccum * pAccum, /* Accumulate results here */ char *zOut; /* Rendering buffer */ int nOut; /* Size of the rendering buffer */ char *zExtra = 0; /* Malloced memory used by some conversion */ -#ifndef SQL_OMIT_FLOATING_POINT int exp, e2; /* exponent of real numbers */ int nsd; /* Number of significant digits returned */ double rounder; /* Used for rounding floating point values */ etByte flag_dp; /* True if decimal point should be shown */ etByte flag_rtz; /* True if trailing zeros should be removed */ -#endif PrintfArguments *pArgList = 0; /* Arguments for SQL_PRINTF_SQLFUNC */ char buf[etBUFSIZE]; /* Conversion buffer */ @@ -499,9 +489,6 @@ sqlVXPrintf(StrAccum * pAccum, /* Accumulate results here */ } else { realvalue = va_arg(ap, double); } -#ifdef SQL_OMIT_FLOATING_POINT - length = 0; -#else if (precision < 0) precision = 6; /* Set default precision */ if (realvalue < 0.0) { @@ -682,7 +669,6 @@ sqlVXPrintf(StrAccum * pAccum, /* Accumulate results here */ bufpt[i++] = '0'; length = width; } -#endif /* !defined(SQL_OMIT_FLOATING_POINT) */ break; case etSIZE: if (!bArgList) { @@ -1082,16 +1068,6 @@ sql_vmprintf(const char *zFormat, va_list ap) char *z; char zBase[SQL_PRINT_BUF_SIZE]; StrAccum acc; - -#ifdef SQL_ENABLE_API_ARMOR - if (zFormat == 0) { - return 0; - } -#endif -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif sqlStrAccumInit(&acc, 0, zBase, sizeof(zBase), SQL_MAX_LENGTH); sqlVXPrintf(&acc, zFormat, ap); z = sqlStrAccumFinish(&acc); @@ -1107,10 +1083,6 @@ sql_mprintf(const char *zFormat, ...) { va_list ap; char *z; -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return 0; -#endif va_start(ap, zFormat); z = sql_vmprintf(zFormat, ap); va_end(ap); @@ -1136,13 +1108,6 @@ sql_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap) StrAccum acc; if (n <= 0) return zBuf; -#ifdef SQL_ENABLE_API_ARMOR - if (zBuf == 0 || zFormat == 0) { - if (zBuf) - zBuf[0] = 0; - return zBuf; - } -#endif sqlStrAccumInit(&acc, 0, zBuf, n, 0); sqlVXPrintf(&acc, zFormat, ap); zBuf[acc.nChar] = 0; diff --git a/src/box/sql/random.c b/src/box/sql/random.c index fe98e55..2de1890 100644 --- a/src/box/sql/random.c +++ b/src/box/sql/random.c @@ -62,18 +62,7 @@ sql_randomness(int N, void *pBuf) * case where writable static data is supported, wsdPrng can refer directly * to the "sqlPrng" state vector declared above. */ -#ifdef SQL_OMIT_WSD - struct sqlPrngType *p = - &GLOBAL(struct sqlPrngType, sqlPrng); -#define wsdPrng p[0] -#else #define wsdPrng sqlPrng -#endif - -#ifndef SQL_OMIT_AUTOINIT - if (sql_initialize()) - return; -#endif if (N <= 0 || pBuf == 0) { wsdPrng.isInit = 0; diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 1a42d0d..cfeb49c 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -945,18 +945,6 @@ sql_bind_parameter_lindex(sql_stmt * pStmt, const char *zName, * If compiling for a processor that lacks floating point support, * substitute integer for floating-point */ -#ifdef SQL_OMIT_FLOATING_POINT -#define double sql_int64 -#define float sql_int64 -#define LONGDOUBLE_TYPE sql_int64 -#ifndef SQL_BIG_DBL -#define SQL_BIG_DBL (((sql_int64)1)<<50) -#endif -#define SQL_OMIT_DATETIME_FUNCS 1 -#define SQL_OMIT_TRACE 1 -#undef SQL_MIXED_ENDIAN_64BIT_FLOAT -#undef SQL_HAVE_ISNAN -#endif #ifndef SQL_BIG_DBL #define SQL_BIG_DBL (1e99) #endif @@ -1301,30 +1289,13 @@ extern const int sqlone; #define SQL_DYNAMIC ((sql_destructor_type)sqlMallocSize) /* - * When sql_OMIT_WSD is defined, it means that the target platform does - * not support Writable Static Data (WSD) such as global and static variables. - * All variables must either be on the stack or dynamically allocated from - * the heap. When WSD is unsupported, the variable declarations scattered - * throughout the sql code must become constants instead. The sql_WSD - * macro is used for this purpose. And instead of referencing the variable - * directly, we use its constant as a key to lookup the run-time allocated - * buffer that holds real variable. The constant is also the initializer - * for the run-time allocated buffer. - * - * In the usual case where WSD is supported, the sql_WSD and GLOBAL - * macros become no-ops and have zero performance impact. - */ -#ifdef SQL_OMIT_WSD -#define SQL_WSD const -#define GLOBAL(t,v) (*(t*)sql_wsd_find((void*)&(v), sizeof(v))) -#define sqlGlobalConfig GLOBAL(struct sqlConfig, sqlConfig) -int sql_wsd_init(int N, int J); -void *sql_wsd_find(void *K, int L); -#else + * The usual case where Writable Static Data (WSD) is supported, + * the sql_WSD and GLOBAL macros become no-ops and have zero + * performance impact. + */ #define SQL_WSD #define GLOBAL(t,v) v #define sqlGlobalConfig sqlConfig -#endif /* * The following macros are used to suppress compiler warnings and to @@ -2930,10 +2901,6 @@ struct sqlConfig { int isMallocInit; /* True after malloc is initialized */ void (*xLog) (void *, int, const char *); /* Function for logging */ void *pLogArg; /* First argument to xLog() */ -#ifdef SQL_ENABLE_SQLLOG - void (*xSqllog) (void *, sql *, const char *, int); - void *pSqllogArg; -#endif #ifdef SQL_VDBE_COVERAGE /* The following callback (if not NULL) is invoked on every VDBE branch * operation. Set the callback using sql_TESTCTRL_VDBE_COVERAGE. @@ -3041,15 +3008,6 @@ struct TreeView { } /* - * FTS4 is really an extension for FTS3. It is enabled using the - * sql_ENABLE_FTS3 macro. But to avoid confusion we also call - * the sql_ENABLE_FTS4 macro to serve as an alias for sql_ENABLE_FTS3. - */ -#if defined(SQL_ENABLE_FTS4) && !defined(SQL_ENABLE_FTS3) -#define SQL_ENABLE_FTS3 1 -#endif - -/* * The following macros mimic the standard library functions toupper(), * isspace(), isalnum(), isdigit() and isxdigit(), respectively. The * sql versions only work for ASCII characters, regardless of locale. @@ -3118,11 +3076,7 @@ void sqlStatusUp(int, int); void sqlStatusDown(int, int); void sqlStatusHighwater(int, int); -#ifndef SQL_OMIT_FLOATING_POINT int sqlIsNaN(double); -#else -#define sqlIsNaN(X) 0 -#endif /* * An instance of the following structure holds information about SQL @@ -4546,11 +4500,6 @@ int sqlAddInt64(i64 *, i64); int sqlSubInt64(i64 *, i64); int sqlMulInt64(i64 *, i64); int sqlAbsInt32(int); -#ifdef SQL_ENABLE_8_3_NAMES -void sqlFileSuffix3(const char *, char *); -#else -#define sqlFileSuffix3(X,Y) -#endif u8 sqlGetBoolean(const char *z, u8); const void *sqlValueText(sql_value *); @@ -4571,10 +4520,8 @@ extern const unsigned char sqlCtypeMap[]; extern const Token sqlIntTokens[]; extern SQL_WSD struct sqlConfig sqlConfig; extern FuncDefHash sqlBuiltinFunctions; -#ifndef SQL_OMIT_WSD extern int sqlPendingByte; #endif -#endif /** * Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" diff --git a/src/box/sql/status.c b/src/box/sql/status.c index 2abf7a5..bc170c8 100644 --- a/src/box/sql/status.c +++ b/src/box/sql/status.c @@ -54,18 +54,12 @@ static SQL_WSD struct sqlStatType { /* The "wsdStat" macro will resolve to the status information - * state vector. If writable static data is unsupported on the target, - * we have to locate the state vector at run-time. In the more common - * case where writable static data is supported, wsdStat can refer directly - * to the "sqlStat" state vector declared above. + * state vector. In the common case where writable static data is + * supported, wsdStat can refer directly to the "sqlStat" state + * vector declared above. */ -#ifdef SQL_OMIT_WSD -#define wsdStatInit sqlStatType *x = &GLOBAL(sqlStatType,sqlStat) -#define wsdStat x[0] -#else #define wsdStatInit #define wsdStat sqlStat -#endif /* * Return the current value of a status parameter. @@ -144,10 +138,6 @@ sql_status64(int op, if (op < 0 || op >= ArraySize(wsdStat.nowValue)) { return SQL_MISUSE; } -#ifdef SQL_ENABLE_API_ARMOR - if (pCurrent == 0 || pHighwater == 0) - return SQL_MISUSE; -#endif *pCurrent = wsdStat.nowValue[op]; *pHighwater = wsdStat.mxValue[op]; if (resetFlag) { @@ -161,10 +151,6 @@ sql_status(int op, int *pCurrent, int *pHighwater, int resetFlag) { sql_int64 iCur = 0, iHwtr = 0; int rc; -#ifdef SQL_ENABLE_API_ARMOR - if (pCurrent == 0 || pHighwater == 0) - return SQL_MISUSE; -#endif rc = sql_status64(op, &iCur, &iHwtr, resetFlag); if (rc == 0) { *pCurrent = (int)iCur; @@ -185,11 +171,6 @@ sql_db_status(sql * db, /* The database connection whose status is desired */ ) { int rc = SQL_OK; /* Return code */ -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(db) || pCurrent == 0 || pHighwater == 0) { - return SQL_MISUSE; - } -#endif switch (op) { case SQL_DBSTATUS_LOOKASIDE_USED:{ *pCurrent = db->lookaside.nOut; diff --git a/src/box/sql/treeview.c b/src/box/sql/treeview.c index 1fd8668..5acea58 100644 --- a/src/box/sql/treeview.c +++ b/src/box/sql/treeview.c @@ -349,12 +349,10 @@ sqlTreeViewExpr(TreeView * pView, const Expr * pExpr, u8 moreToFollow) } break; } -#ifndef SQL_OMIT_FLOATING_POINT case TK_FLOAT:{ sqlTreeViewLine(pView, "%s", pExpr->u.zToken); break; } -#endif case TK_STRING:{ sqlTreeViewLine(pView, "%Q", pExpr->u.zToken); break; diff --git a/src/box/sql/update.c b/src/box/sql/update.c index aeaa863..35c0019 100644 --- a/src/box/sql/update.c +++ b/src/box/sql/update.c @@ -58,11 +58,9 @@ sqlColumnDefault(Vdbe *v, struct space_def *def, int i, int ireg) if (pValue) { sqlVdbeAppendP4(v, pValue, P4_MEM); } -#ifndef SQL_OMIT_FLOATING_POINT if (type == FIELD_TYPE_NUMBER) { sqlVdbeAddOp1(v, OP_Realify, ireg); } -#endif } } diff --git a/src/box/sql/util.c b/src/box/sql/util.c index 52a8663..d5c93f8 100644 --- a/src/box/sql/util.c +++ b/src/box/sql/util.c @@ -77,7 +77,6 @@ int } #endif -#ifndef SQL_OMIT_FLOATING_POINT /* * Return true if the floating point value is Not a Number (NaN). * @@ -114,7 +113,6 @@ sqlIsNaN(double x) testcase(rc); return rc; } -#endif /* SQL_OMIT_FLOATING_POINT */ /* * Compute a string length that is limited to what can be stored in @@ -413,7 +411,6 @@ sql_strnicmp(const char *zLeft, const char *zRight, int N) int sqlAtoF(const char *z, double *pResult, int length) { -#ifndef SQL_OMIT_FLOATING_POINT int incr = 1; // UTF-8 const char *zEnd = z + length; /* sign * significand * (10 ^ (esign * exponent)) */ @@ -594,9 +591,6 @@ sqlAtoF(const char *z, double *pResult, int length) /* return true if number and no extra non-whitespace chracters after */ return z == zEnd && nDigits > 0 && eValid && nonNum == 0; -#else - return !sqlAtoi64(z, pResult, length); -#endif /* SQL_OMIT_FLOATING_POINT */ } /* @@ -1363,41 +1357,6 @@ sqlAbsInt32(int x) return -x; } -#ifdef SQL_ENABLE_8_3_NAMES -/* - * If SQL_ENABLE_8_3_NAMES is set at compile-time and if the database - * filename in zBaseFilename is a URI with the "8_3_names=1" parameter and - * if filename in z[] has a suffix (a.k.a. "extension") that is longer than - * three characters, then shorten the suffix on z[] to be the last three - * characters of the original suffix. - * - * If SQL_ENABLE_8_3_NAMES is set to 2 at compile-time, then always - * do the suffix shortening regardless of URI parameter. - * - * Examples: - * - * test.db-journal => test.nal - * test.db-wal => test.wal - * test.db-shm => test.shm - * test.db-mj7f3319fa => test.9fa - */ -void -sqlFileSuffix3(const char *zBaseFilename, char *z) -{ -#if SQL_ENABLE_8_3_NAMES<2 - if (sql_uri_boolean(zBaseFilename, "8_3_names", 0)) -#endif - { - int i, sz; - sz = sqlStrlen30(z); - for (i = sz - 1; i > 0 && z[i] != '/' && z[i] != '.'; i--) { - } - if (z[i] == '.' && ALWAYS(sz > i + 4)) - memmove(&z[i + 1], &z[sz - 3], 4); - } -} -#endif - /* * Find (an approximate) sum of two LogEst values. This computation is * not a simple "+" operator because LogEst is stored as a logarithmic diff --git a/src/box/sql/vdbe.c b/src/box/sql/vdbe.c index ed7bf88..f746559 100644 --- a/src/box/sql/vdbe.c +++ b/src/box/sql/vdbe.c @@ -530,10 +530,8 @@ memTracePrint(Mem *p) printf(" si:%lld", p->u.i); } else if (p->flags & MEM_Int) { printf(" i:%lld", p->u.i); -#ifndef SQL_OMIT_FLOATING_POINT } else if (p->flags & MEM_Real) { printf(" r:%g", p->u.r); -#endif } else { char zBuf[200]; sqlVdbeMemPrettyPrint(p, zBuf); @@ -1140,7 +1138,6 @@ case OP_Int64: { /* out2 */ break; } -#ifndef SQL_OMIT_FLOATING_POINT /* Opcode: Real * P2 * P4 * * Synopsis: r[P2]=P4 * @@ -1154,7 +1151,6 @@ case OP_Real: { /* same as TK_FLOAT, out2 */ pOut->u.r = *pOp->p4.pReal; break; } -#endif /* Opcode: String8 * P2 * P4 * * Synopsis: r[P2]='P4' @@ -1692,7 +1688,6 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ case OP_Subtract: rB -= rA; break; case OP_Multiply: rB *= rA; break; case OP_Divide: { - /* (double)0 In case of SQL_OMIT_FLOATING_POINT... */ if (rA == (double)0) goto division_by_zero; rB /= rA; @@ -1708,10 +1703,6 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ break; } } -#ifdef SQL_OMIT_FLOATING_POINT - pOut->u.i = rB; - MemSetTypeFlag(pOut, MEM_Int); -#else if (sqlIsNaN(rB)) { goto arithmetic_result_is_null; } @@ -1720,7 +1711,6 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ if (((type1|type2)&MEM_Real)==0 && !bIntint) { mem_apply_integer_type(pOut); } -#endif } break; @@ -2006,7 +1996,6 @@ case OP_MustBeInt: { /* jump, in1 */ break; } -#ifndef SQL_OMIT_FLOATING_POINT /* Opcode: Realify P1 * * * * * * If register P1 holds an integer convert it to a real value. @@ -2023,7 +2012,6 @@ case OP_Realify: { /* in1 */ } break; } -#endif #ifndef SQL_OMIT_CAST /* Opcode: Cast P1 P2 * * * diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h index c84f22c..577b022 100644 --- a/src/box/sql/vdbeInt.h +++ b/src/box/sql/vdbeInt.h @@ -481,11 +481,7 @@ void sqlVdbeMemMove(Mem *, Mem *); int sqlVdbeMemNulTerminate(Mem *); int sqlVdbeMemSetStr(Mem *, const char *, int, u8, void (*)(void *)); void sqlVdbeMemSetInt64(Mem *, i64); -#ifdef SQL_OMIT_FLOATING_POINT -#define sqlVdbeMemSetDouble sqlVdbeMemSetInt64 -#else void sqlVdbeMemSetDouble(Mem *, double); -#endif void sqlVdbeMemInit(Mem *, sql *, u32); void sqlVdbeMemSetNull(Mem *); void sqlVdbeMemSetZeroBlob(Mem *, int); diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c index be5c9df..e6219e2 100644 --- a/src/box/sql/vdbeapi.c +++ b/src/box/sql/vdbeapi.c @@ -1074,11 +1074,6 @@ columnName(sql_stmt * pStmt, Vdbe *p; int n; sql *db; -#ifdef SQL_ENABLE_API_ARMOR - if (pStmt == 0) { - return 0; - } -#endif ret = 0; p = (Vdbe *) pStmt; db = p->db; @@ -1576,11 +1571,6 @@ sql_stmt * sql_next_stmt(sql * pDb, sql_stmt * pStmt) { sql_stmt *pNext; -#ifdef SQL_ENABLE_API_ARMOR - if (!sqlSafetyCheckOk(pDb)) { - return 0; - } -#endif if (pStmt == 0) { pNext = (sql_stmt *) pDb->pVdbe; } else { @@ -1597,11 +1587,6 @@ sql_stmt_status(sql_stmt * pStmt, int op, int resetFlag) { Vdbe *pVdbe = (Vdbe *) pStmt; u32 v; -#ifdef SQL_ENABLE_API_ARMOR - if (!pStmt) { - return 0; - } -#endif v = pVdbe->aCounter[op]; if (resetFlag) pVdbe->aCounter[op] = 0; diff --git a/src/box/sql/vdbeaux.c b/src/box/sql/vdbeaux.c index 0cc3c14..136c14e 100644 --- a/src/box/sql/vdbeaux.c +++ b/src/box/sql/vdbeaux.c @@ -136,7 +136,7 @@ sqlVdbeSetSql(Vdbe * p, const char *z, int n, int isPrepareV2) assert(isPrepareV2 == 1 || isPrepareV2 == 0); if (p == 0) return; -#if defined(SQL_OMIT_TRACE) && !defined(SQL_ENABLE_SQLLOG) +#if defined(SQL_OMIT_TRACE) if (!isPrepareV2) return; #endif @@ -2552,30 +2552,6 @@ sqlVdbeTransferError(Vdbe * p) return rc; } -#ifdef SQL_ENABLE_SQLLOG -/* - * If an SQL_CONFIG_SQLLOG hook is registered and the VM has been run, - * invoke it. - */ -static void -vdbeInvokeSqllog(Vdbe * v) -{ - if (sqlGlobalConfig.xSqllog && v->rc == SQL_OK && v->zSql - && v->pc >= 0) { - char *zExpanded = sqlVdbeExpandSql(v, v->zSql); - assert(v->db->init.busy == 0); - if (zExpanded) { - sqlGlobalConfig.xSqllog(sqlGlobalConfig. - pSqllogArg, v->db, - zExpanded, 1); - sqlDbFree(v->db, zExpanded); - } - } -} -#else -#define vdbeInvokeSqllog(x) -#endif - /* * Clean up a VDBE after execution but do not delete the VDBE just yet. * Write any error messages into *pzErrMsg. Return the result code. @@ -2605,7 +2581,6 @@ sqlVdbeReset(Vdbe * p) * instructions yet, leave the main database error information unchanged. */ if (p->pc >= 0) { - vdbeInvokeSqllog(p); sqlVdbeTransferError(p); sqlDbFree(db, p->zErrMsg); p->zErrMsg = 0; @@ -3084,7 +3059,7 @@ serialGet(const unsigned char *buf, /* Buffer to deserialize from */ /* EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit * floating point number. */ -#if !defined(NDEBUG) && !defined(SQL_OMIT_FLOATING_POINT) +#if !defined(NDEBUG) /* Verify that integers and floating point values use the same * byte order. Or, that if SQL_MIXED_ENDIAN_64BIT_FLOAT is * defined that 64-bit floating point values really are mixed diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c index 15a2f55..85fc08c 100644 --- a/src/box/sql/vdbemem.c +++ b/src/box/sql/vdbemem.c @@ -418,11 +418,6 @@ sqlVdbeMemRelease(Mem * p) static int doubleToInt64(double r, int64_t *i) { -#ifdef SQL_OMIT_FLOATING_POINT - /* When floating-point is omitted, double and int64 are the same thing */ - *i = r; - return 0; -#else /* * Many compilers we encounter do not define constants for the * minimum and maximum 64-bit integers, or they define them @@ -443,7 +438,6 @@ doubleToInt64(double r, int64_t *i) *i = (int64_t) r; return *i != r; } -#endif } /* @@ -726,7 +720,6 @@ sqlVdbeMemSetInt64(Mem * pMem, i64 val) } } -#ifndef SQL_OMIT_FLOATING_POINT /* * Delete any previous value and set the value stored in *pMem to val, * manifest type REAL. @@ -740,7 +733,6 @@ sqlVdbeMemSetDouble(Mem * pMem, double val) pMem->flags = MEM_Real; } } -#endif /* * Return true if the Mem object contains a TEXT or BLOB that is -- 2.7.4