forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd55aa2
committed
Fix two new-in-9.0 bugs in hstore.
There was an incorrect Assert in hstoreValidOldFormat(), which would causeimmediate core dumps when attempting to work with pre-9.0 hstore data,but of course only in an assert-enabled build.Also, ghstore_decompress() incorrectly applied DatumGetHStoreP() to a datumthat wasn't actually an hstore, but rather a ghstore (ie, a gist signaturebitstring). That used to be harmless, but could now result in misbehaviorif the hstore format conversion code happened to trigger. In reality,since ghstore is not marked toastable (and doesn't need to be), thisfunction is useless anyway; we can lobotomize it down to returning thepassed-in pointer.Both bugs found by Andrew Gierth, though this isn't exactly his proposedpatch.1 parente1089e3 commitcd55aa2
2 files changed
+9
-22
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
183 |
| - | |
| 183 | + | |
| 184 | + | |
184 | 185 |
| |
185 | 186 |
| |
186 | 187 |
| |
|
Lines changed: 6 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
171 | 175 |
| |
172 | 176 |
| |
173 | 177 |
| |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
| 178 | + | |
193 | 179 |
| |
194 | 180 |
| |
195 | 181 |
| |
|
0 commit comments
Comments
(0)