1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

312 Commits

Author SHA1 Message Date
Christoph M. Becker 502c630d01 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix oci8/pdo_oci random test failures when run in parallel
2022-08-25 15:21:52 +02:00
Michael Voříšek be4dd60c55 Fix oci8/pdo_oci random test failures when run in parallel
Closes GH-9424.
2022-08-25 15:20:50 +02:00
Michael Voříšek 2db2cab6ad Fix pdo_oci tests for PHP 8.1
Closes GH-9051
2022-08-24 14:39:45 +02:00
Máté Kocsis 3e0f144b2c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix pdo_oci tests for PHP 8.0
2022-08-22 09:28:29 +02:00
Michael Voříšek 305892580e Fix pdo_oci tests for PHP 8.0 2022-08-22 09:25:43 +02:00
Patrick Allaert aff365871a Fixed some spaces used instead of tabs 2021-06-29 11:30:26 +02:00
Nikita Popov 39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
Sergei Morozov e496123c36 [Bug #77120] Handle OCI_SUCCESS_WITH_INFO returned from OCIStmtExecute
1. Backup last_error before replacing it with the error code
2. Continue normal operations if last_error is OCI_SUCCESS_WITH_INFO
2021-06-09 15:45:46 -05:00
Sergei Morozov ee51eac39f [Bug #77120] Handle OCI_SUCCESS_WITH_INFO returned from OCISessionBegin
1. Proceed with connection initialization if OCI_SUCCESS_WITH_INFO is returned
2. Do not throw an exception upon OCI_SUCCESS_WITH_INFO
2021-06-09 15:45:46 -05:00
KsaR 01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
George Peter Banyard ebaeb93c3f Add API to fetch bool value for PDO attribute values
Closes GH-6766
2021-03-17 00:58:01 +00:00
George Peter Banyard c465462e91 Use standard PDO way for fetching integer attribute values 2021-03-17 00:58:01 +00:00
George Peter Banyard b44e29f843 php_pdo_register_driver() might fail
Therefore correctly report failure in MINIT for the drivers which didn't.
2021-01-19 12:55:07 +00:00
George Peter Banyard a78aea8948 Refactor PDO's last inserted ID handler to use and return zend_string
Closes GH-6617
2021-01-19 11:54:25 +00:00
George Peter Banyard 94ea8e247b Refactor PDO doer handler to use zend_string 2021-01-19 11:42:39 +00:00
Nikita Popov 3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Nikita Popov daa420a0da Fix misleading indentation warning in pdo_oci 2021-01-15 11:51:43 +01:00
Shivam Mathur c1391227da Fix pdo_oci - declare quotedlen in oci_driver.c
Closes GH-6590
2021-01-09 04:27:40 +00:00
George Peter Banyard 63cda0fea8 Refactor PDO's quoter handler to return a zend_string
Closes GH-6547
2021-01-07 15:53:48 +00:00
George Peter Banyard 1a58611ae5 Voidify PDO's fetch_error handler 2021-01-06 10:20:57 +00:00
George Peter Banyard 60a61afd3c Boolify PDO's preparer handler 2021-01-06 10:20:57 +00:00
George Peter Banyard 53ba72ec03 Voidify PDO's closer handler 2021-01-06 10:20:57 +00:00
George Peter Banyard 954d3743cc Boolify PDO's quoter handler 2021-01-06 10:21:06 +00:00
George Peter Banyard 43f69160cf Boolify PDO's set_attribute driver function 2021-01-06 10:20:59 +00:00
George Peter Banyard d04adf60be Boolify PDO's transaction handlers
This includes begin(), commit(), rollBack(), and inTransaction()
2021-01-06 10:20:57 +00:00
George Peter Banyard 6728c1bd72 Formalize pdo_dbh_check_liveness_func() return type to zend_result 2021-01-06 10:20:57 +00:00
Christopher Jones ec6f6dfcfc Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix PDO_OCI test
2020-12-24 17:48:53 +11:00
Christopher Jones 34aefa36f4 Fix PDO_OCI test 2020-12-24 17:48:39 +11:00
Christopher Jones e387e4da0e Fix PDO_OCI build 2020-12-24 17:18:57 +11:00
Nikita Popov caa710037e Rewrite PDO result binding
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
2020-12-22 15:56:34 +01:00
Nikita Popov 2d51c203f0 PDO: Store/pass query_string as zend_string
Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.
2020-12-14 10:43:28 +01:00
Nikita Popov e735de6eae Add GC support for PDO driver data
Add a get_gc method that can be implemented by drivers, which can
be used to add additional zvals to the GC buffer.

Implement GC support for PDO SQLite callbacks in particular.

Closes GH-6262.
2020-10-12 13:00:41 +02:00
George Peter Banyard c8d47cf875 Convert warnings to assetions in OCI PDO driver
Closes GH-6118
2020-09-14 01:07:58 +02:00
Christopher Jones 14657ec42d Squash compile warnings the easy way 2020-09-10 17:37:18 +10:00
Christopher Jones bca32de0c7 Make PDO_OCI test more resilient 2020-09-10 17:33:30 +10:00
Christopher Jones f8f55ba010 Fix premature test termination 2020-09-10 16:45:28 +10:00
Máté Kocsis 9975986b7e Improve error messages mentioning parameters instead of arguments
Closes GH-5999
2020-09-09 10:47:43 +02:00
Matteo Beccati ee2506cc02 Fix #80027 Terrible performance using $query->fetch on queries with many bind parameters
Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
2020-08-31 11:02:34 +02:00
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
Máté Kocsis ec22e5aa38 Get rid of empty function entries
Closes GH-5917
2020-08-01 10:07:05 +02:00
Max Semenik 2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
George Peter Banyard a43f100fda Fix [-Wundef] warning in PDO OCI extension 2020-05-20 16:29:53 +02:00
Cameron Porter a527c60ede PDO_OCI: Add test of the phpinfo output 2020-03-04 10:10:05 +01:00
Máté Kocsis 960318ed95 Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Máté Kocsis ac0853eb26 Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00
Nikita Popov f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis d1764ca330 Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis afdaa91170 Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis 0b4778c377 Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00