Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a problem in hash.c when replacing entries in tables configured with copyKey==0. (CVS 4375) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a19d3a73a91f2040ec35d913f11743ff |
User & Date: | danielk1977 2007-09-03 15:03:21.000 |
Context
2007-09-03
| ||
15:19 | Honor the SQLITE_OPEN_ flags passed into sqlite3_open_v2(). Some test cases added but more are needed. Ticket #2616. (CVS 4376) (check-in: 020a2b10d4 user: drh tags: trunk) | |
15:03 | Fix a problem in hash.c when replacing entries in tables configured with copyKey==0. (CVS 4375) (check-in: a19d3a73a9 user: danielk1977 tags: trunk) | |
13:06 | Improvements to the xRandomness() method on the default windows VFS. Ticket #2615. (CVS 4374) (check-in: 91b50f31e3 user: drh tags: trunk) | |
Changes
Changes to src/hash.c.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + | ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** This is the implementation of generic hash-tables ** used in SQLite. ** |
︙ | |||
358 359 360 361 362 363 364 365 366 367 368 369 370 371 | 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 | + + + + | elem = findElementGivenHash(pH,pKey,nKey,h); if( elem ){ void *old_data = elem->data; if( data==0 ){ removeElementGivenHash(pH,elem,h); }else{ elem->data = data; if( !pH->copyKey ){ elem->pKey = (void *)pKey; } assert(nKey==elem->nKey); } return old_data; } if( data==0 ) return 0; new_elem = (HashElem*)sqlite3_malloc( sizeof(HashElem) ); if( new_elem==0 ) return data; if( pH->copyKey && pKey!=0 ){ |
︙ |
Changes to src/test8.c.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing the virtual table interfaces. This code ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** |
︙ | |||
448 449 450 451 452 453 454 455 456 457 458 459 460 461 | 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | + + + + + + + + | if( rc==SQLITE_OK && argc==5 ){ char *zSql; echo_vtab *pVtab = *(echo_vtab **)ppVtab; pVtab->zLogName = sqlite3MPrintf(0, "%s", argv[4]); zSql = sqlite3MPrintf(0, "CREATE TABLE %Q(logmsg)", pVtab->zLogName); rc = sqlite3_exec(db, zSql, 0, 0, 0); sqlite3_free(zSql); if( rc!=SQLITE_OK ){ *pzErr = sqlite3StrDup(sqlite3_errmsg(db)); } } if( *ppVtab && rc!=SQLITE_OK ){ echoDestructor(*ppVtab); *ppVtab = 0; } return rc; } /* ** Echo virtual table module xConnect method. |
︙ |
Changes to test/vtab1.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + | # 2006 June 10 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is creating and dropping virtual tables. # |
︙ | |||
175 176 177 178 179 180 181 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | + + + + - + + + + + + + + + + + | do_test vtab1-1.15 { catchsql { DROP TABLE techo; } } {1 {no such module: echo}} register_echo_module [sqlite3_connection_pointer db] register_echo_module [sqlite3_connection_pointer db] # Test an error message returned from a v-table constructor. # |
︙ |