1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Disable the CSV extension when virtual tables are disabled.

FossilOrigin-Name: ec7180892ac737f0731cf61f2d095a5c1d18ad93
This commit is contained in:
drh
2016-07-15 02:50:18 +00:00
parent 86396219a3
commit eb5a549ecf
3 changed files with 14 additions and 7 deletions

View File

@ -48,6 +48,8 @@ SQLITE_EXTENSION_INIT1
#include <ctype.h>
#include <stdio.h>
#ifndef SQLITE_OMIT_VIRTUALTABLE
/*
** A macro to hint to the compiler that a function should not be
** inlined.
@ -834,6 +836,7 @@ static sqlite3_module CsvModuleFauxWrite = {
};
#endif /* SQLITE_TEST */
#endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
#ifdef _WIN32
@ -849,6 +852,7 @@ int sqlite3_csv_init(
char **pzErrMsg,
const sqlite3_api_routines *pApi
){
#ifndef SQLITE_OMIT_VIRTUALTABLE
int rc;
SQLITE_EXTENSION_INIT2(pApi);
rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
@ -858,4 +862,7 @@ int sqlite3_csv_init(
}
#endif
return rc;
#else
return SQLITE_OK;
#endif
}