Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySql TEXT and BLOB type declarations #227

Closed
wants to merge 5 commits into from
Closed

MySql TEXT and BLOB type declarations #227

wants to merge 5 commits into from

Conversation

jaspernbrouwer
Copy link

Fixed maximum length of MySql TEXT type declaration, this should be 65535 (2 ^ 16 - 1) in stead of 65532.

Added support for TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB based on the length of the field, the same way as the clob type declarations are determined.

Added tests to prevent regression.

Jasper N. Brouwer added 4 commits November 13, 2012 20:45
This should be 65535 (2 ^ 16 - 1) in stead of 65532.
Modified docblock to show the max lengths.
Choose between TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB based on the length of the field.
Behaves the same way as the TEXT type declaration.
Conflicts:
	tests/Doctrine/Tests/DBAL/Platforms/MySqlPlatformTest.php
@doctrinebot
Copy link

Hello,

thank you for positing this Pull Request. I have automatically opened an issue on our Jira Bug Tracker for you with the details of this Pull-Request. See the Link:

http://doctrine-project.org/jira/browse/DBAL-381

@@ -9,6 +9,8 @@
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Index;

require_once __DIR__ . '/../../TestInit.php';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed. It is not needed

@Ocramius
Copy link
Member

Ocramius commented Feb 9, 2013

Can you replace all those magic numbers with contstants please?
(and rebase)

@asm89
Copy link
Member

asm89 commented Feb 9, 2013

I rebased and merged this branch here:
eb6ee9a

Thanks!

@asm89 asm89 closed this Feb 9, 2013
@jaspernbrouwer
Copy link
Author

Thanx for updating the code for me!

PS: I would have gone with constants like LENGTH_LIMIT_LOB and use them for both TEXT and BLOB, as the same limits apply. But if those rules change (not likely) this would be more future-proof ;)

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 39bc14a on jaspernbrouwer:master into * on doctrine:master*.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants