History log of /PHP-8.0/ext/pdo/pdo_dbh.c (Results 1 – 25 of 355)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 30d3062c 02-May-2021 Máté Kocsis

Fix the default value of $mode in PDOStatement::fetch*()

Closes GH-6933


# 8effbd1c 12-Apr-2021 Nikita Popov

PDO: Respect connection transaction state for dtor rollback

As mentioned in bug #80949, if a transaction is implicitly
committed, then PDO may still issue a ROLLBACK when the PDO
obj

PDO: Respect connection transaction state for dtor rollback

As mentioned in bug #80949, if a transaction is implicitly
committed, then PDO may still issue a ROLLBACK when the PDO
object is destroyed, as the transaction is still marked as active
in PDO's (inaccurate) transaction emulation.

Make sure we use the connection transaction state also for that
final ROLLBACK. A caveat here is that the connection might have
been dropped already, which may be the case for some drivers if
construction fails. Make sure we don't crash in that case.

show more ...


# a5527577 10-Dec-2020 Nikita Popov

Allow drivers to omit error code

And thus generate error messages that match what PDO emulation
would generate.

This fixes the error message regression from the previous commit.


Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1
# 68dcaa29 28-Oct-2020 Nikita Popov

Fixed bug #66528

Report errors in commit, rollback and autocommit handlers.


Revision tags: php-7.4.12, php-8.0.0RC3, php-7.3.24
# 7b9519a7 20-Oct-2020 Nikita Popov

Fix inconsistency in PDO transaction state

This addresses an issue introduced by #4996 and reported in
https://bugs.php.net/bug.php?id=80260.

Now that PDO::inTransaction() repor

Fix inconsistency in PDO transaction state

This addresses an issue introduced by #4996 and reported in
https://bugs.php.net/bug.php?id=80260.

Now that PDO::inTransaction() reports the real transaction state
of the connection, there may be a mismatch with PDOs internal
transaction state (in_tcx). This is compounded by the fact that
MySQL performs implicit commits for DDL queries.

This patch fixes the issue by making beginTransaction/commit/rollBack
work on the real transaction state provided by the driver as well
(or falling back to in_tcx if the driver does not support it).

This does mean that writing something like

$pdo->beginTransaction();
$pdo->exec('CREATE DATABASE ...');
$pdo->rollBack(); // <- illegal

will now result in an error, because the CREATE DATABASE already
committed the transaction. I believe this behavior is both correct
and desired -- otherwise, there is no indication that the code did
not behave correctly and the rollBack() was effectively ignored.
However, this is also a BC break.

Closes GH-6355.

show more ...


# d5f92baa 13-Oct-2020 Máté Kocsis

Fix default value handling of mysqli_fetch_object()

Make [] acceptable both for classes without constructors and
classes with a constructor that takes no arguments.

Closes GH-63

Fix default value handling of mysqli_fetch_object()

Make [] acceptable both for classes without constructors and
classes with a constructor that takes no arguments.

Closes GH-6336.

show more ...


Revision tags: php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# 7553c696 28-Sep-2020 George Peter Banyard

Another pass making some failure states unconditional erros in PDO

Also make internal function return type more accurate to inform usage


# a5cf8280 24-Sep-2020 George Peter Banyard

Make various failure conditions in PDO unconditional errors

This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Make various failure conditions in PDO unconditional errors

This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Closes GH-6212

show more ...


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22
# 1b2ec73c 26-Aug-2020 George Peter Banyard

Drop various unused macros/APIs

Also convert_libmagic_pattern() to return a zend_string*

Closes GH-6029


Revision tags: php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# 898bb977 11-Aug-2020 Nikita Popov

Drop php_pdo_get_exception_base() function

This API is more confusing than helpful.


Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16, php-7.3.3RC1, php-7.2.16RC1
# 2fe2e5b4 17-Feb-2019 Ahmed Abdou

Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable

Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.

show more ...


# 8b77c581 07-Aug-2020 Nikita Popov

Accept zend_object* in zend_update_property


# d92229d8 06-Apr-2020 Nikita Popov

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument nam

Implement named parameters

From an engine perspective, named parameters mainly add three
concepts:

* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

RFC: https://wiki.php.net/rfc/named_params

Closes GH-5357.

show more ...


# 7eec281b 24-Jul-2020 Nikita Popov

Avoid UNKNOWN default in PDO::query()


# 7d3e530f 17-Jul-2020 Nikita Popov

Use zpp for PDO fetch mode

Also changing the function signatures to accept variadic args
for the fetch params. If we're already breaking Doctrine anyway,
we may as well do it properl

Use zpp for PDO fetch mode

Also changing the function signatures to accept variadic args
for the fetch params. If we're already breaking Doctrine anyway,
we may as well do it properly.

show more ...


# 302933da 07-Jul-2020 Nikita Popov

Remove no_separation flag


# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758


# 15846ff1 17-Jun-2020 Nikita Popov

Add ZVAL_OBJ_COPY macro

For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.


# 50752401 04-May-2020 AllenJB

Change the default PDO error mode to exceptions

According to <https://www.php.net/manual/en/pdo.error-handling.php>.


# 1c469adb 14-Apr-2020 Máté Kocsis

Remove PDO::dbh_constructor()


# c6485535 12-Apr-2020 Máté Kocsis

Generate method entries from stubs for curl, ffi, pdo, phar

Closes GH-5375


# 305b17e8 29-Mar-2020 Máté Kocsis

Do not include the same stub multiple times

Closes GH-5322


# fb5bfcb7 31-Mar-2020 Nikita Popov

Add a ZEND_UNCOMPARABLE value

To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.


# 01b266aa 18-Mar-2020 Máté Kocsis

Improve error messages of various extensions

Closes GH-5278


# d1764ca3 15-Jan-2020 Máté Kocsis

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.


12345678910>>...15