Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a problem with zeroblob() and CAST(...) expressions that could cause an assert() to fail. (CVS 4041) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
03750a2a6b5186689f7db6650c0a8894 |
User & Date: | danielk1977 2007-05-30 06:19:33.000 |
Context
2007-05-30
| ||
08:18 | Add the start of the soak-test infrastructure. (CVS 4042) (check-in: 5d0b247ca1 user: danielk1977 tags: trunk) | |
06:19 | Fix a problem with zeroblob() and CAST(...) expressions that could cause an assert() to fail. (CVS 4041) (check-in: 03750a2a6b user: danielk1977 tags: trunk) | |
2007-05-29
| ||
12:11 | Consider explicit collate clauses when matching WHERE constraints to indices. Fix for #2391. (CVS 4040) (check-in: f9a95e92df user: danielk1977 tags: trunk) | |
Changes
Changes to src/vdbemem.c.
︙ | |||
158 159 160 161 162 163 164 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | + + - + + | int sqlite3VdbeMemNulTerminate(Mem *pMem){ if( (pMem->flags & MEM_Term)!=0 || (pMem->flags & MEM_Str)==0 ){ return SQLITE_OK; /* Nothing to do */ } if( pMem->flags & (MEM_Static|MEM_Ephem) ){ return sqlite3VdbeMemMakeWriteable(pMem); }else{ char *z; sqlite3VdbeMemExpandBlob(pMem); |
︙ |
Changes to test/zeroblob.test.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + | # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing of the zero-filled blob functionality # including the sqlite3_bind_zeroblob(), sqlite3_result_zeroblob(), # and the built-in zeroblob() SQL function. # |
︙ | |||
123 124 125 126 127 128 129 130 131 132 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | + + + + + + + + + + + + + + + + + + + + + + + | # Concatentation works with zeroblob # do_test zeroblob-4.1 { execsql { SELECT hex(zeroblob(2) || x'61') } } {000061} # Check various CAST(...) operations on zeroblob. # do_test zeroblob-5.1 { execsql { SELECT CAST (zeroblob(100) AS REAL); } } {0.0} do_test zeroblob-5.2 { execsql { SELECT CAST (zeroblob(100) AS INTEGER); } } {0} do_test zeroblob-5.3 { execsql { SELECT CAST (zeroblob(100) AS TEXT); } } {{}} do_test zeroblob-5.4 { execsql { SELECT CAST(zeroblob(100) AS BLOB); } } [execsql {SELECT zeroblob(100)}] finish_test |