Commit aa3e57d
committed
PDO: add mysql-specific warning count function
MySQL supplies the count of warnings along with the result set and
provides a handy function to retrieve it.
Without this, the only way to discover if there has been warnings
in the last query is to run *another* query: "SHOW WARNINGS" OR
"SELECT @@warning_count". This requires another round-trip across
the network which makes warning discovery or reporting a drag on
performance.
Instead, we use the existing get_driver_methods function that others
(postgres, sqlite) use to provide custom functionality outside the
standard PDO interface.
Thinking about the PDO interface, I looked into several other PDO
drivers but couldn't find an analog for mysql_warning_count(). Thus I
determined that this may well stay mysql-specific.
Fixes php bug: #51499 (https://bugs.php.net/bug.php?id=51499)1 parent 21f8612 commit aa3e57d
File tree
2 files changed
+53
-1
lines changed- ext/pdo_mysql
- tests
2 files changed
+53
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
536 | 566 | | |
537 | 567 | | |
538 | 568 | | |
| |||
562 | 592 | | |
563 | 593 | | |
564 | 594 | | |
565 | | - | |
| 595 | + | |
566 | 596 | | |
567 | 597 | | |
568 | 598 | | |
| |||
| 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 | + | |
0 commit comments