aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c1
-rw-r--r--src/prepare.c3
-rw-r--r--src/sqliteInt.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e0dcf3923..65fe4a668 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3205,6 +3205,7 @@ static int openDatabase(
db->nextAutovac = -1;
db->szMmap = sqlite3GlobalConfig.szMmap;
db->nextPagesize = 0;
+ db->init.azInit = sqlite3StdType; /* Any array of string ptrs will do */
#ifdef SQLITE_ENABLE_SORTER_MMAP
/* Beginning with version 3.37.0, using the VFS xFetch() API to memory-map
** the temporary files used to do external sorts (see code in vdbesort.c)
diff --git a/src/prepare.c b/src/prepare.c
index 6dcb3842e..62dca01b6 100644
--- a/src/prepare.c
+++ b/src/prepare.c
@@ -134,7 +134,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){
}
}
db->init.orphanTrigger = 0;
- db->init.azInit = argv;
+ db->init.azInit = (const char**)argv;
pStmt = 0;
TESTONLY(rcp = ) sqlite3Prepare(db, argv[4], -1, 0, 0, &pStmt, 0);
rc = db->errCode;
@@ -153,6 +153,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){
}
}
}
+ db->init.azInit = sqlite3StdType; /* Any array of string ptrs will do */
sqlite3_finalize(pStmt);
}else if( argv[1]==0 || (argv[4]!=0 && argv[4][0]!=0) ){
corruptSchema(pData, argv, 0);
diff --git a/src/sqliteInt.h b/src/sqliteInt.h
index d10d02f74..dd19131fc 100644
--- a/src/sqliteInt.h
+++ b/src/sqliteInt.h
@@ -1546,7 +1546,7 @@ struct sqlite3 {
unsigned orphanTrigger : 1; /* Last statement is orphaned TEMP trigger */
unsigned imposterTable : 1; /* Building an imposter table */
unsigned reopenMemdb : 1; /* ATTACH is really a reopen using MemDB */
- char **azInit; /* "type", "name", and "tbl_name" columns */
+ const char **azInit; /* "type", "name", and "tbl_name" columns */
} init;
int nVdbeActive; /* Number of VDBEs currently running */
int nVdbeRead; /* Number of active VDBEs that read or write */