forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9779bda
committed
Fix newly-introduced issues in pgbench.
The result of FD_ISSET() doesn't necessarily fit in a bool, thoughassigning it to one might accidentally work depending on platform and whichsocket FD number is being inquired of. Rewrite to test it with if(),rather than making any specific assumption about the result width,to match the way every other such call in PG is written.Don't break out of the input_mask-filling loop after finding the firstclient that we're waiting for results from. That mostly breaks parallelquery management.Also, if we choose not to call select(), be sure to clear out any bitsthe mask-filling loop might have set, so that we don't accidentally calldoCustom for clients we don't know have input. Doing so would likelybe harmless, but it's a waste of cycles and doesn't seem to be intended.Make this_usec wide enough. (Yeah, the value would usually fit in anint, but then why are we using int64 everywhere else?)Minor cosmetic adjustments, mostly comment improvements.Problems introduced by commit12788ae. The first issue was discoveredby buildfarm testing, the others by code review.1 parentfdc9186 commit9779bda
1 file changed
+49
-33
lines changedLines changed: 49 additions & 33 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
302 |
| - | |
| 302 | + | |
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
| |||
4420 | 4420 |
| |
4421 | 4421 |
| |
4422 | 4422 |
| |
4423 |
| - | |
| 4423 | + | |
4424 | 4424 |
| |
4425 | 4425 |
| |
4426 | 4426 |
| |
4427 | 4427 |
| |
4428 | 4428 |
| |
| 4429 | + | |
4429 | 4430 |
| |
4430 | 4431 |
| |
4431 | 4432 |
| |
4432 |
| - | |
4433 |
| - | |
| 4433 | + | |
4434 | 4434 |
| |
| 4435 | + | |
4435 | 4436 |
| |
| 4437 | + | |
4436 | 4438 |
| |
4437 |
| - | |
4438 | 4439 |
| |
4439 | 4440 |
| |
4440 | 4441 |
| |
4441 | 4442 |
| |
4442 | 4443 |
| |
4443 |
| - | |
4444 | 4444 |
| |
4445 | 4445 |
| |
4446 | 4446 |
| |
4447 |
| - | |
| 4447 | + | |
4448 | 4448 |
| |
4449 |
| - | |
4450 | 4449 |
| |
4451 | 4450 |
| |
4452 |
| - | |
| 4451 | + | |
4453 | 4452 |
| |
4454 | 4453 |
| |
4455 | 4454 |
| |
4456 | 4455 |
| |
4457 |
| - | |
| 4456 | + | |
4458 | 4457 |
| |
4459 |
| - | |
| 4458 | + | |
| 4459 | + | |
4460 | 4460 |
| |
4461 | 4461 |
| |
4462 | 4462 |
| |
4463 | 4463 |
| |
4464 | 4464 |
| |
4465 | 4465 |
| |
4466 | 4466 |
| |
| 4467 | + | |
4467 | 4468 |
| |
4468 | 4469 |
| |
4469 | 4470 |
| |
| |||
4475 | 4476 |
| |
4476 | 4477 |
| |
4477 | 4478 |
| |
4478 |
| - | |
| 4479 | + | |
| 4480 | + | |
4479 | 4481 |
| |
4480 | 4482 |
| |
4481 |
| - | |
| 4483 | + | |
| 4484 | + | |
4482 | 4485 |
| |
4483 | 4486 |
| |
4484 | 4487 |
| |
4485 | 4488 |
| |
4486 |
| - | |
4487 | 4489 |
| |
4488 | 4490 |
| |
4489 |
| - | |
4490 | 4491 |
| |
4491 |
| - | |
| 4492 | + | |
| 4493 | + | |
4492 | 4494 |
| |
4493 |
| - | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
4494 | 4499 |
| |
4495 | 4500 |
| |
4496 | 4501 |
| |
| |||
4515 | 4520 |
| |
4516 | 4521 |
| |
4517 | 4522 |
| |
4518 |
| - | |
4519 |
| - | |
4520 |
| - | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
4521 | 4527 |
| |
4522 | 4528 |
| |
4523 | 4529 |
| |
| |||
4536 | 4542 |
| |
4537 | 4543 |
| |
4538 | 4544 |
| |
| 4545 | + | |
| 4546 | + | |
4539 | 4547 |
| |
| 4548 | + | |
4540 | 4549 |
| |
4541 | 4550 |
| |
4542 | 4551 |
| |
4543 | 4552 |
| |
4544 | 4553 |
| |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
4545 | 4559 |
| |
4546 | 4560 |
| |
4547 | 4561 |
| |
4548 | 4562 |
| |
4549 | 4563 |
| |
4550 |
| - | |
4551 | 4564 |
| |
4552 |
| - | |
| 4565 | + | |
4553 | 4566 |
| |
| 4567 | + | |
4554 | 4568 |
| |
4555 | 4569 |
| |
4556 | 4570 |
| |
| |||
4560 | 4574 |
| |
4561 | 4575 |
| |
4562 | 4576 |
| |
4563 |
| - | |
| 4577 | + | |
| 4578 | + | |
4564 | 4579 |
| |
4565 |
| - | |
4566 |
| - | |
4567 |
| - | |
4568 |
| - | |
4569 |
| - | |
4570 |
| - | |
| 4580 | + | |
| 4581 | + | |
4571 | 4582 |
| |
4572 |
| - | |
4573 |
| - | |
4574 |
| - | |
| 4583 | + | |
| 4584 | + | |
4575 | 4585 |
| |
| 4586 | + | |
| 4587 | + | |
| 4588 | + | |
| 4589 | + | |
| 4590 | + | |
| 4591 | + | |
4576 | 4592 |
| |
4577 | 4593 |
| |
4578 |
| - | |
| 4594 | + | |
4579 | 4595 |
| |
4580 | 4596 |
| |
4581 | 4597 |
| |
|
0 commit comments
Comments
(0)