- 13 Apr, 2020 1 commit
-
-
Sergei Morozov authored
1. `FetchMode::STANDARD_OBJECT` and `FetchMode::CUSTOM_OBJECT` are no longer supported. 2. `FetchMode::COLUMN` with a non-zero index is no longer supported. 3. Incompatible change in the `Connection::fetchColumn()` signature where the 3rd argument is now `$types`, not `$columnIndex`.
-
- 08 Apr, 2020 1 commit
-
-
Sergei Morozov authored
-
- 21 Mar, 2020 1 commit
-
-
Sergei Morozov authored
-
- 27 Jan, 2020 1 commit
-
-
Sergei Morozov authored
-
- 26 Jan, 2020 1 commit
-
-
Sergei Morozov authored
-
- 12 Jan, 2020 1 commit
-
-
Sergei Morozov authored
The `$columnNames` property has a too complex type `string[]|false|null` which leads to: 1. Non-trivial to understand conditions and assertions like `if ($columnNames === false)`, `if ($columnNames === true)` and `assert(is_array($columnNames))`. 2. Avoidable [false-positives](https://scrutinizer-ci.com/g/doctrine/dbal/inspections/20d1aea4-2217-4f38-8adc-5ce10fa9cf0b/issues/files/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php?status=new&orderField=path&order=asc&honorSelectedPaths=0) on Scrutinizer that thinks that `$columnNames` can be TRUE.
-
- 11 Jan, 2020 2 commits
-
-
Jonathan H. Wage authored
-
Jonathan H. Wage authored
-
- 30 Dec, 2019 2 commits
-
-
Sergei Morozov authored
-
Sergei Morozov authored
[DBAL-2958] Replaced extension of \PDOStatement with a composition to avoid having to replicate the \PDOStatement interface in ResultStatement
-
- 02 Nov, 2019 11 commits
-
-
Sergei Morozov authored
-
Jonathan H. Wage authored
-
Michael Moravec authored
Extract Doctrine\DBAL\DBALException::notSupported() Extract Doctrine\DBAL\DBALException::invalidPlatformVersionSpecified() Extract Doctrine\DBAL\DBALException::invalidPdoInstance() Extract Doctrine\DBAL\DBALException::invalidWrapperClass() Extract Doctrine\DBAL\DBALException::invalidDriverClass() Extract Doctrine\DBAL\DBALException::invalidTableName() Extract Doctrine\DBAL\DBALException::noColumnsSpecifiedForTable() Extract Doctrine\DBAL\DBALException::typeExists() Extract Doctrine\DBAL\DBALException::typeAlreadyRegistered() Extract Doctrine\DBAL\DBALException::typeNotRegistered() Extract Doctrine\DBAL\DBALException::unknownColumnType() Extract Doctrine\DBAL\DBALException::typeNotFound() Extract Doctrine\DBAL\DBALException::invalidPlatformType() Extract Doctrine\DBAL\DBALException::driverRequired() Extract Doctrine\DBAL\DBALException::unknownDriver() Extract Doctrine\DBAL\DBALException::invalidColumnIndex() Extract Doctrine\DBAL\Exception\ConnectionException::commitFailedRollbackOnly() Extract Doctrine\DBAL\Exception\ConnectionException::noActiveTransaction() Extract Doctrine\DBAL\Exception\ConnectionException::savepointsNotSupported() Extract Doctrine\DBAL\Exception\ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction() Extract Doctrine\DBAL\Exception\InvalidArgumentException::fromEmptyCriteria() Extract Doctrine\DBAL\Type\ConversionException::conversionFailed() Extract Doctrine\DBAL\Type\ConversionException::conversionFailedFormat() Extract Doctrine\DBAL\Type\ConversionException::conversionFailedInvalidType() Extract Doctrine\DBAL\Type\ConversionException::conversionFailedSerialization() Extract Doctrine\DBAL\Query\QueryException::unknownAlias() Extract Doctrine\DBAL\Query\QueryException::nonUniqueAlias() Extract Doctrine\DBAL\Sharding\ShardingException::notImplemented() Extract Doctrine\DBAL\Sharding\ShardingException::missingDefaultFederationName() Extract Doctrine\DBAL\Sharding\ShardingException::missingDefaultDistributionKey() Extract Doctrine\DBAL\Sharding\ShardingException::activeTransaction() Extract Doctrine\DBAL\Sharding\ShardingException::noShardDistributionValue() Extract Doctrine\DBAL\Sharding\ShardingException::missingDistributionType() Extract Doctrine\DBAL\Cache\CacheException::noCacheKey() Extract Doctrine\DBAL\Cache\CacheException::noResultDriverConfigured() Extract Doctrine\DBAL\Schema\SchemaException::tableDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::indexNameInvalid() Extract Doctrine\DBAL\Schema\SchemaException::indexDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::indexAlreadyExists() Extract Doctrine\DBAL\Schema\SchemaException::columnDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::namespaceAlreadyExists() Extract Doctrine\DBAL\Schema\SchemaException::tableAlreadyExists() Extract Doctrine\DBAL\Schema\SchemaException::columnAlreadyExists() Extract Doctrine\DBAL\Schema\SchemaException::sequenceAlreadyExists() Extract Doctrine\DBAL\Schema\SchemaException::sequenceDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::uniqueConstraintDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::foreignKeyDoesNotExist() Extract Doctrine\DBAL\Schema\SchemaException::namedForeignKeyRequired() Extract Doctrine\DBAL\SQLParserUtilsException::missingParam() Extract Doctrine\DBAL\SQLParserUtilsException::missingType() Drop Doctrine\DBAL\DBALException::invalidPlatformSpecified() Drop Doctrine\DBAL\DBALException::limitOffsetInvalid() Drop Doctrine\DBAL\Schema\SchemaException::alterTableChangeNotSupported()
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Michael Moravec authored
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Sergei Morozov authored
[BC] Replaced extension of \PDOStatement with a composition to avoid having to replicate the \PDOStatement interface in ResultStatement
-
- 17 Mar, 2019 2 commits
-
-
Ahmed Abdou authored
-
Ahmed Abdou authored
-
- 03 Feb, 2019 1 commit
-
-
Sergei Morozov authored
-
- 29 Jan, 2019 1 commit
-
-
Sergei Morozov authored
-
- 22 Jan, 2019 1 commit
-
-
Sergei Morozov authored
-
- 20 Jan, 2019 1 commit
-
-
Sergei Morozov authored
-
- 02 Oct, 2018 3 commits
-
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Sergei Morozov authored
-
- 27 Sep, 2018 1 commit
-
-
Matthias Pigulla authored
The blob type maps BLOB (and also TEXT) columns to PHP streams. Internally, they use the ParameterType::LARGE_OBJECT (i. e. \PDO::PARAM_LOB) binding type, which suggests that efficient handling of PHP stream resources was intended. However, at least when using the mysqli driver, stream resources passed into insert() or update() are simply cast to strings. As a result, a literal string like "Resource id #126" will end up in the database. This PR fixes the issue by correctly processing streams in the MysqliStatement when they are passed with the ParameterType::LARGE_OBJECT binding type. It uses the mysqli::send_long_data() method to pass stream data in chunks to the MySQL server, thus keeping the memory footprint low. This method does not (despite claims to the contrary) allow to bypass the max_allowed_package size! The pdo_mysql driver was already capable of handling streams this way. Now this is covered by tests. Helpful documentation: - http://php.net/manual/en/mysqli-stmt.send-long-data.php - http://php.net/manual/en/mysqli-stmt.bind-param.php - see first "Note" - http://php.net/manual/en/pdo.lobs.php - https://blogs.oracle.com/oswald/phps-mysqli-extension:-storing-and-retrieving-blobs Additional notes on MySQL's max_allowed_packet: This change does not not intend to work around the max_allowed_packet setting, and quick tests show that this is not possible: When MySQL is configured to use a low max_allowed_packet value, an error will be triggered stating Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_allowed_packet' bytes. Documentation for the underlying mysql_stmt_send_long_data() C API function suggests that max_allowed_packet is always a hard limit. References: - https://dev.mysql.com/doc/refman/8.0/en/mysql-stmt-send-long-data.html - https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_max_allowed_packet - https://bugs.mysql.com/bug.php?id=83958 What mysqli::send_long_data() seems to do is that every data chunk of data passed to it is immediately sent out to the network. I have confirmed this using tcpdump, and so the advantage might be that we can keep the memory footprint low on the PHP side while processing streams.
-
- 12 Sep, 2018 1 commit
-
-
Matthias Pigulla authored
As discussed in #3217 (see https://github.com/doctrine/dbal/pull/3217#issuecomment-419673323 in particular), there is no way in MySQL to get around the `max_allowed_packet` limitation.
-
- 16 Aug, 2018 1 commit
-
-
Sergei Morozov authored
-
- 27 Jun, 2018 1 commit
-
-
Michael Moravec authored
-
- 19 May, 2018 1 commit
-
-
Sergei Morozov authored
-
- 01 Apr, 2018 1 commit
-
-
Michael Moravec authored
-
- 29 Jan, 2018 3 commits
-
-
Sergei Morozov authored
-
Sergei Morozov authored
-
Gabriel Caruso authored
-
- 07 Jan, 2018 1 commit
-
-
Sergei Morozov authored
Fixes #2953.
-