1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Prevent the series.c extension from loading on older versions of SQLite that

do not support xCreate==NULL.

FossilOrigin-Name: 3efc79427ef4686142d074cfe5b2f0a33af19b2e
This commit is contained in:
drh
2015-08-20 18:28:46 +00:00
parent 01dced109f
commit b81fba1930
3 changed files with 13 additions and 8 deletions

View File

@ -389,6 +389,11 @@ int sqlite3_series_init(
int rc = SQLITE_OK;
SQLITE_EXTENSION_INIT2(pApi);
#ifndef SQLITE_OMIT_VIRTUALTABLE
if( sqlite3_libversion_number()<3008012 ){
*pzErrMsg = sqlite3_mprintf(
"generate_series() requires SQLite 3.8.12 or later");
return SQLITE_ERROR;
}
rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
#endif
return rc;