| OLD | NEW | 
|---|
| 1 # 2005 December 21 | 1 # 2005 December 21 | 
| 2 # | 2 # | 
| 3 # The author disclaims copyright to this source code.  In place of | 3 # The author disclaims copyright to this source code.  In place of | 
| 4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: | 
| 5 # | 5 # | 
| 6 #    May you do good and not evil. | 6 #    May you do good and not evil. | 
| 7 #    May you find forgiveness for yourself and forgive others. | 7 #    May you find forgiveness for yourself and forgive others. | 
| 8 #    May you share freely, never taking more than you give. | 8 #    May you share freely, never taking more than you give. | 
| 9 # | 9 # | 
| 10 #************************************************************************* | 10 #************************************************************************* | 
| 11 # This file implements regression tests for SQLite library.  The | 11 # This file implements regression tests for SQLite library.  The | 
| 12 # focus of this script is descending indices. | 12 # focus of this script is descending indices. | 
| 13 # | 13 # | 
| 14 # $Id: descidx1.test,v 1.10 2008/03/19 00:21:31 drh Exp $ | 14 # $Id: descidx1.test,v 1.10 2008/03/19 00:21:31 drh Exp $ | 
| 15 # | 15 # | 
| 16 | 16 | 
| 17 set testdir [file dirname $argv0] | 17 set testdir [file dirname $argv0] | 
| 18 source $testdir/tester.tcl | 18 source $testdir/tester.tcl | 
| 19 | 19 | 
|  | 20 # Do not use a codec for tests in this file, as the database file is | 
|  | 21 # manipulated directly using tcl scripts (using the [hexio_write] command). | 
|  | 22 # | 
|  | 23 do_not_use_codec | 
|  | 24 | 
| 20 db eval {PRAGMA legacy_file_format=OFF} | 25 db eval {PRAGMA legacy_file_format=OFF} | 
| 21 | 26 | 
| 22 # This procedure sets the value of the file-format in file 'test.db' | 27 # This procedure sets the value of the file-format in file 'test.db' | 
| 23 # to $newval. Also, the schema cookie is incremented. | 28 # to $newval. Also, the schema cookie is incremented. | 
| 24 # | 29 # | 
| 25 proc set_file_format {newval} { | 30 proc set_file_format {newval} { | 
| 26   hexio_write test.db 44 [hexio_render_int32 $newval] | 31   hexio_write test.db 44 [hexio_render_int32 $newval] | 
| 27   set schemacookie [hexio_get_int [hexio_read test.db 40 4]] | 32   set schemacookie [hexio_get_int [hexio_read test.db 40 4]] | 
| 28   incr schemacookie | 33   incr schemacookie | 
| 29   hexio_write test.db 40 [hexio_render_int32 $schemacookie] | 34   hexio_write test.db 40 [hexio_render_int32 $schemacookie] | 
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 350       PRAGMA legacy_file_format=ON; | 355       PRAGMA legacy_file_format=ON; | 
| 351       VACUUM; | 356       VACUUM; | 
| 352     } | 357     } | 
| 353     get_file_format | 358     get_file_format | 
| 354   } {4} | 359   } {4} | 
| 355 } | 360 } | 
| 356 | 361 | 
| 357 | 362 | 
| 358 | 363 | 
| 359 finish_test | 364 finish_test | 
| OLD | NEW | 
|---|