forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb71a9cb
committed
Fix libpq state machine in pipeline mode
The original coding required that PQpipelineSync had been called beforethe first call to PQgetResult, and failure to do that would result in anunexpected NULL result being returned. Fix by setting the right statewhen a query is sent, rather than leaving it unchanged and havingPQpipelineSync apply the necessary state change.A new test case to verify the behavior is added, which relies on the newPQsendFlushRequest() function added by commita719232.Backpatch to 14, where pipeline mode was added.Reported-by: Boris Kolpackov <boris@codesynthesis.com>Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/boris.20210616110321@codesynthesis.com1 parenta719232 commitb71a9cb
File tree
4 files changed
+188
-15
lines changed- src
- interfaces/libpq
- test/modules/libpq_pipeline
- t
- traces
4 files changed
+188
-15
lines changedLines changed: 5 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1375 | 1375 |
| |
1376 | 1376 |
| |
1377 | 1377 |
| |
1378 |
| - | |
1379 |
| - | |
| 1378 | + | |
1380 | 1379 |
| |
1381 | 1380 |
| |
1382 | 1381 |
| |
| |||
1513 | 1512 |
| |
1514 | 1513 |
| |
1515 | 1514 |
| |
1516 |
| - | |
1517 |
| - | |
| 1515 | + | |
1518 | 1516 |
| |
1519 | 1517 |
| |
1520 | 1518 |
| |
| |||
1817 | 1815 |
| |
1818 | 1816 |
| |
1819 | 1817 |
| |
1820 |
| - | |
1821 |
| - | |
| 1818 | + | |
1822 | 1819 |
| |
1823 | 1820 |
| |
1824 | 1821 |
| |
| |||
2448 | 2445 |
| |
2449 | 2446 |
| |
2450 | 2447 |
| |
2451 |
| - | |
2452 |
| - | |
| 2448 | + | |
2453 | 2449 |
| |
2454 | 2450 |
| |
2455 | 2451 |
| |
| |||
3084 | 3080 |
| |
3085 | 3081 |
| |
3086 | 3082 |
| |
3087 |
| - | |
3088 |
| - | |
3089 |
| - | |
3090 |
| - | |
3091 |
| - | |
3092 |
| - | |
| 3083 | + | |
3093 | 3084 |
| |
3094 | 3085 |
| |
3095 | 3086 |
| |
|
Lines changed: 90 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
230 | 230 |
| |
231 | 231 |
| |
232 | 232 |
| |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
233 | 320 |
| |
234 | 321 |
| |
235 | 322 |
| |
| |||
1237 | 1324 |
| |
1238 | 1325 |
| |
1239 | 1326 |
| |
| 1327 | + | |
1240 | 1328 |
| |
1241 | 1329 |
| |
1242 | 1330 |
| |
| |||
1334 | 1422 |
| |
1335 | 1423 |
| |
1336 | 1424 |
| |
| 1425 | + | |
| 1426 | + | |
1337 | 1427 |
| |
1338 | 1428 |
| |
1339 | 1429 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
|
Lines changed: 92 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + |
0 commit comments
Comments
(0)