Remove the show_datatypes pragma. (CVS 1461)

FossilOrigin-Name: 93bb958d939302795027f738b8f663cbce3e8783
This commit is contained in:
danielk1977
2004-05-26 06:58:43 +00:00
parent 6590493d53
commit 398eae781e
7 changed files with 22 additions and 138 deletions
+7 -14
View File
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.191 2004/05/26 06:18:37 danielk1977 Exp $
** $Id: main.c,v 1.192 2004/05/26 06:58:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -655,18 +655,12 @@ int sqlite3_create_function(
FuncDef *p;
int nName;
if( db==0 || zFunctionName==0 || sqlite3SafetyCheck(db) ){
return SQLITE_ERROR;
}
if( (xFunc && (xFinal || xStep)) || (!xFunc && (!xFinal && !xStep)) ){
return SQLITE_ERROR;
}
if( nArg<-1 || nArg>127 ){
return SQLITE_ERROR;
}
nName = strlen(zFunctionName);
if( nName>255 ){
if( (db==0 || zFunctionName==0 || sqlite3SafetyCheck(db)) ||
(xFunc && (xFinal || xStep)) ||
(!xFunc && (xFinal && !xStep)) ||
(!xFunc && (!xFinal && xStep)) ||
(nArg<-1 || nArg>127) ||
(255<(nName = strlen(zFunctionName))) ){
return SQLITE_ERROR;
}
@@ -678,7 +672,6 @@ int sqlite3_create_function(
p->pUserData = pUserData;
return SQLITE_OK;
}
int sqlite3_create_function16(
sqlite3 *db,
const void *zFunctionName,
+1 -2
View File
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.30 2004/05/26 00:01:54 drh Exp $
** $Id: pragma.c,v 1.31 2004/05/26 06:58:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -119,7 +119,6 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
{ "vdbe_trace", SQLITE_VdbeTrace },
{ "full_column_names", SQLITE_FullColNames },
{ "short_column_names", SQLITE_ShortColNames },
{ "show_datatypes", SQLITE_ReportTypes },
{ "count_changes", SQLITE_CountRows },
{ "empty_result_callbacks", SQLITE_NullCallback },
};
+1 -3
View File
@@ -11,7 +11,7 @@
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.251 2004/05/25 12:05:57 danielk1977 Exp $
** @(#) $Id: sqliteInt.h,v 1.252 2004/05/26 06:58:44 danielk1977 Exp $
*/
#include "config.h"
#include "sqlite.h"
@@ -444,8 +444,6 @@ struct sqlite {
/* the count using a callback. */
#define SQLITE_NullCallback 0x00000100 /* Invoke the callback once if the */
/* result set is empty */
#define SQLITE_ReportTypes 0x00000200 /* Include information on datatypes */
/* in 4th argument of callback */
/*
** Possible values for the sqlite.magic field.
+1 -31
View File
@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.55 2004/05/26 06:18:38 danielk1977 Exp $
** $Id: test1.c,v 1.56 2004/05/26 06:58:44 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -719,35 +719,6 @@ static int rememberDataTypes(void *pArg, int nCol, char **argv, char **colv){
return 1;
}
/*
** Invoke an SQL statement but ignore all the data in the result. Instead,
** return a list that consists of the datatypes of the various columns.
**
** This only works if "PRAGMA show_datatypes=on" has been executed against
** the database connection.
*/
static int sqlite_datatypes(
void *NotUsed,
Tcl_Interp *interp, /* The TCL interpreter that invoked this command */
int argc, /* Number of arguments */
char **argv /* Text of each argument */
){
sqlite *db;
int rc;
if( argc!=3 ){
Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
" DB SQL", 0);
return TCL_ERROR;
}
if( getDbPointer(interp, argv[1], &db) ) return TCL_ERROR;
rc = sqlite3_exec(db, argv[2], rememberDataTypes, interp, 0);
if( rc!=0 && rc!=SQLITE_ABORT ){
Tcl_AppendResult(interp, sqlite3_error_string(rc), 0);
return TCL_ERROR;
}
return TCL_OK;
}
/*
** Usage: sqlite3_finalize STMT
**
@@ -1551,7 +1522,6 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
{ "sqlite3_create_aggregate", (Tcl_CmdProc*)test_create_aggregate },
{ "sqlite_register_test_function", (Tcl_CmdProc*)test_register_func },
{ "sqlite_abort", (Tcl_CmdProc*)sqlite_abort },
{ "sqlite_datatypes", (Tcl_CmdProc*)sqlite_datatypes },
#ifdef MEMORY_DEBUG
{ "sqlite_malloc_fail", (Tcl_CmdProc*)sqlite_malloc_fail },
{ "sqlite_malloc_stat", (Tcl_CmdProc*)sqlite_malloc_stat },