SQLite

Check-in [3efc79427e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Prevent the series.c extension from loading on older versions of SQLite that do not support xCreate==NULL.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | table-valued-functions
Files: files | file ages | folders
SHA1: 3efc79427ef4686142d074cfe5b2f0a33af19b2e
User & Date: drh 2015-08-20 18:28:46.970
Context
2015-08-20
19:55
Add support for table-valued functions in the FROM clause implemented as virtual tables. (check-in: 9b718b06b1 user: drh tags: trunk)
18:28
Prevent the series.c extension from loading on older versions of SQLite that do not support xCreate==NULL. (Closed-Leaf check-in: 3efc79427e user: drh tags: table-valued-functions)
16:16
Fix a typo in series.c. (check-in: 23db7f50f1 user: dan tags: table-valued-functions)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/misc/series.c.
385
386
387
388
389
390
391





392
393
394
395
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  int rc = SQLITE_OK;
  SQLITE_EXTENSION_INIT2(pApi);
#ifndef SQLITE_OMIT_VIRTUALTABLE





  rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
#endif
  return rc;
}







>
>
>
>
>




385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  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;
}