SQLite

Check-in [9762ad0639]
Login

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

Overview
Comment:Implement sqlite3_create_collation() by invoking sqlite3_create_collation_v2() with a NULL destructor argument. This saves a little space.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9762ad0639cca2fc1ef0573113fb613ce9e7e83e
User & Date: drh 2014-10-23 01:01:26.636
Context
2014-10-24
14:32
Get the likelihood() functions working on operators like BETWEEN that create virtual terms in the WHERE-clause analysis. (check-in: 03d0498d0f user: drh tags: trunk)
00:35
Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in progress and is not yet completely functional. (check-in: c297a84bc6 user: drh tags: api-armor)
2014-10-23
01:01
Implement sqlite3_create_collation() by invoking sqlite3_create_collation_v2() with a NULL destructor argument. This saves a little space. (check-in: 9762ad0639 user: drh tags: trunk)
2014-10-22
20:07
Disable the use of strchrnul() unless specifically enabled by compile-time options. (check-in: e580470db7 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
int sqlite3_create_collation(
  sqlite3* db, 
  const char *zName, 
  int enc, 
  void* pCtx,
  int(*xCompare)(void*,int,const void*,int,const void*)
){
  int rc;
  sqlite3_mutex_enter(db->mutex);
  assert( !db->mallocFailed );
  rc = createCollation(db, zName, (u8)enc, pCtx, xCompare, 0);
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

/*
** Register a new collation sequence with the database handle db.
*/
int sqlite3_create_collation_v2(
  sqlite3* db, 







<
<
<
|
<
<
<







2747
2748
2749
2750
2751
2752
2753



2754



2755
2756
2757
2758
2759
2760
2761
int sqlite3_create_collation(
  sqlite3* db, 
  const char *zName, 
  int enc, 
  void* pCtx,
  int(*xCompare)(void*,int,const void*,int,const void*)
){



  return sqlite3_create_collation_v2(db, zName, enc, pCtx, xCompare, 0);



}

/*
** Register a new collation sequence with the database handle db.
*/
int sqlite3_create_collation_v2(
  sqlite3* db,