| OLD | NEW |
| 1 # 2009 February 23 | 1 # 2009 February 23 |
| 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 #*********************************************************************** |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 } {1 2 3 2 hello world 3 4.53 {}} | 27 } {1 2 3 2 hello world 3 4.53 {}} |
| 28 do_test whereA-1.2 { | 28 do_test whereA-1.2 { |
| 29 db eval { | 29 db eval { |
| 30 PRAGMA reverse_unordered_selects=1; | 30 PRAGMA reverse_unordered_selects=1; |
| 31 SELECT * FROM t1; | 31 SELECT * FROM t1; |
| 32 } | 32 } |
| 33 } {3 4.53 {} 2 hello world 1 2 3} | 33 } {3 4.53 {} 2 hello world 1 2 3} |
| 34 | 34 |
| 35 do_test whereA-1.3 { | 35 do_test whereA-1.3 { |
| 36 db close |
| 37 sqlite3 db test.db |
| 38 db eval { |
| 39 PRAGMA reverse_unordered_selects=1; |
| 40 SELECT * FROM t1; |
| 41 } |
| 42 } {3 4.53 {} 2 hello world 1 2 3} |
| 43 do_test whereA-1.4 { |
| 44 db close |
| 45 sqlite3 db test.db |
| 36 db eval { | 46 db eval { |
| 37 PRAGMA reverse_unordered_selects=1; | 47 PRAGMA reverse_unordered_selects=1; |
| 38 SELECT * FROM t1 ORDER BY rowid; | 48 SELECT * FROM t1 ORDER BY rowid; |
| 39 } | 49 } |
| 40 } {1 2 3 2 hello world 3 4.53 {}} | 50 } {1 2 3 2 hello world 3 4.53 {}} |
| 51 do_test whereA-1.5 { |
| 52 db eval { |
| 53 VACUUM; |
| 54 SELECT * FROM t1 ORDER BY rowid; |
| 55 } |
| 56 } {1 2 3 2 hello world 3 4.53 {}} |
| 57 do_test whereA-1.6 { |
| 58 db eval { |
| 59 PRAGMA reverse_unordered_selects; |
| 60 } |
| 61 } {1} |
| 62 do_test whereA-1.7 { |
| 63 db close |
| 64 sqlite3 db test.db |
| 65 db eval { |
| 66 PRAGMA reverse_unordered_selects=1; |
| 67 VACUUM; |
| 68 SELECT * FROM t1; |
| 69 } |
| 70 } {3 4.53 {} 2 hello world 1 2 3} |
| 41 | 71 |
| 42 do_test whereA-2.1 { | 72 do_test whereA-2.1 { |
| 43 db eval { | 73 db eval { |
| 44 PRAGMA reverse_unordered_selects=0; | 74 PRAGMA reverse_unordered_selects=0; |
| 45 SELECT * FROM t1 WHERE a>0; | 75 SELECT * FROM t1 WHERE a>0; |
| 46 } | 76 } |
| 47 } {1 2 3 2 hello world 3 4.53 {}} | 77 } {1 2 3 2 hello world 3 4.53 {}} |
| 48 do_test whereA-2.2 { | 78 do_test whereA-2.2 { |
| 49 db eval { | 79 db eval { |
| 50 PRAGMA reverse_unordered_selects=1; | 80 PRAGMA reverse_unordered_selects=1; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 } | 147 } |
| 118 } {1 2 1} | 148 } {1 2 1} |
| 119 do_test whereA-4.6 { | 149 do_test whereA-4.6 { |
| 120 count { | 150 count { |
| 121 SELECT x FROM t2 ORDER BY x DESC; | 151 SELECT x FROM t2 ORDER BY x DESC; |
| 122 } | 152 } |
| 123 } {2 1 1} | 153 } {2 1 1} |
| 124 | 154 |
| 125 | 155 |
| 126 finish_test | 156 finish_test |
| OLD | NEW |