Project

General

Profile

Actions

Bug #88272

closed

Different return types between mysqli and pdo_mysql driver

Added by Patrick Broens over 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2019-05-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The mysqli driver is returning most types as they are in the database, so integers are returned as integers, the pdo_mysql driver casts everything to strings. This makes switching to a different driver a hell of a job, expecially coming from mysqli and going to pdo_mysql. When developing with mysqli, you get properly casted values back from Doctrine, so as a developer you won't cast them anymore to a specific type, when the type is already what it needs to be. Especially extension can break easily when developed on mysqli, but executed on a system with pdo_mysql.

It would be good to get the same behaviour from both drivers, both returning the types as they are in the database, so integers returned as integers.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #87518: Update ConnectionPool.phpClosed2019-01-22

Actions
Actions #1

Updated by Patrick Broens over 5 years ago

With pdo_mysql even $queryBuilder->count('uid') returns a string where you would expect an integer.

Actions #2

Updated by Patrick Broens over 5 years ago

  • Related to Task #87518: Update ConnectionPool.php added
Actions #3

Updated by Patrick Broens over 5 years ago

Since there are more drivers (not mysql) not returning native types (and are not capable of), but strings, it might be a good idea to have Doctrine return all as strings, so TYPO3 is compliant to all drivers. This might however break stuff, especially extensions, which are developed on mysqli. This is a change of the idea in my previous postings ;-)

Actions #4

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #5

Updated by Gerrit Code Review about 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #6

Updated by Gerrit Code Review about 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #7

Updated by Gerrit Code Review about 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #8

Updated by Gerrit Code Review about 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #9

Updated by Gerrit Code Review about 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #10

Updated by Gerrit Code Review about 5 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #11

Updated by Gerrit Code Review about 5 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #12

Updated by Gerrit Code Review about 5 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #13

Updated by Gerrit Code Review about 5 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62003

Actions #14

Updated by Manuel Selbach about 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Gerrit Code Review about 5 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62044

Actions #16

Updated by Manuel Selbach about 5 years ago

  • Status changed from Under Review to Resolved
Actions #17

Updated by Benni Mack about 5 years ago

  • Related to Task #87518: Update ConnectionPool.php added
Actions #18

Updated by Benni Mack about 5 years ago

  • Related to deleted (Task #87518: Update ConnectionPool.php)
Actions #19

Updated by Benni Mack almost 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF