| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is not guaranteed, that the driver inserts only a single NUL byte at
the end of the buffer. Apparently, there is no way to find out the
actual data length in the buffer after calling `SQLGetData()`, so we
adjust after the next `SQLGetData()` call.
We also prevent PDO::ODBC_ATTR_ASSUME_UTF8 from fetching garbage, by
fetching all chunks with the same C type.
Closes GH-6716.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add add skipif to test.
(cherry picked from commit aa58db723221ec891d4432621003bfa55dc15edf)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.
[1] <https://ci.appveyor.com/project/php/php-src/builds/38267250/job/6y3ngn1k6ryxx6j3?fullLog=true#L9783>
Closes GH-6785.
|
| | |
| | |
| | |
| | | |
Closes GH-6766
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This includes begin(), commit(), rollBack(), and inTransaction()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 ;)
|
| | |
| | |
| | |
| | |
| | | |
Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.
|
| | |
| | |
| | |
| | | |
Add add skipif to test.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #67465: NULL Pointer dereference in odbc_handle_preparer
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #67465: NULL Pointer dereference in odbc_handle_preparer
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have to initialize `stmt->driver_data` before we use it.
Closes GH-6225.
|
| | |
| | |
| | |
| | | |
This functionallity is not (yet) implemented and therefore gives a bogus error while using PDO
|
| | |
| | |
| | |
| | | |
Closes GH-6173
|
| | |
| | |
| | |
| | |
| | | |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
| | |
| | |
| | |
| | | |
Closes GH-5958
|
| | |
| | |
| | |
| | | |
Closes GH-5917
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From Microsoft's `SQLColAttribute()` documentation[1]:
| Please note that some drivers may only write the lower 32-bit or
| 16-bit of a buffer and leave the higher-order bit unchanged.
| Therefore, applications should initialize the value to 0 before
| calling this function.
[1] <https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolattribute-function>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We fix (hopefully) all instances of:
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273>
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312>
`zend_llist_add_element()` and `zend_llist_prepend_element()` now
explicitly expect a *const* pointer.
We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress
C4090; this should prevent accidential removal of the cast by
clarifying the intention, and makes it easier to remove the casts if
the issue[1] will be resolved sometime.
[1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79038: PDOStatement::nextRowset() leaks column values
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix #79038: PDOStatement::nextRowset() leaks column values
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Firstly, we must not rely on `stmt->column_count` when freeing the
driver specific column values, but rather store the column count in
the driver data. Since the column count is a `short`, 16 bit are
sufficient, so we can store it in reserved bits of `pdo_odbc_stmt`.
Furthermore, we must not allocate new column value storage when the
statement is not executed, but rather when the column value storage has
not been allocated.
Finally, we have to introduce a driver specific `cursor_closer` to
avoid that `::closeCursor()` calls `odbc_stmt_next_rowset()` which then
frees the column value storage, because it may be still needed for
bound columns.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.
According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.
C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."
Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.
According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.
C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."
Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-4732.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Remove conditional calls of always available macros
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These checks were once relevant for these extensions in PECL and PHP
versions without availability of the checked macros.
Closes GH-4405
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Simplify PHP_CHECK_PDO_INCLUDES calls
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conditional checks were once used for backwards compatibility with
phpize from PHP versions that didn't have this macro call yet.
Closes GH-4376
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Prevent further potential test conflicts
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Normalize comments in *nix build system m4 files
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Replace dirname(__FILE__) by __DIR__ in tests
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Cleanup unused module globals
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Add AS_HELP_STRING to *nix build configure options
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.
[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
|