Project

General

Profile

Actions

Bug #67442

closed

Setting NOT NULL on „BLOB“ column in Install Tool

Added by Morton Jonuschat almost 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2015-06-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

To see this bug most patches under review for DBAL must be in the working tree, otherwise this will be swallowed by other bugs!

When the InstallTool suggests a change like this:

ALTER TABLE sys_category CHANGE l10n_diffsource l10n_diffsource longblob NOT NULL; 
Current value: longblob

this alteration will not be performed, it seems as if the NOT NULL is being silently swallowed, the statements logged by the DB server for this alteration are:

LOG:  statement: ALTER TABLE "sys_category" ALTER COLUMN "l10n_diffsource" TYPE BYTEA
LOG:  statement: ALTER TABLE "sys_category" ALTER COLUMN "l10n_diffsource" SET DEFAULT ''

Manually setting the field to NOT NULL using a statement like this:

ALTER TABLE sys_category ALTER COLUMN l10n_diffsource SET NOT NULL;
<pre>

works and will be recognized by the install tool.

Test Environment: TYPO3 7.3-dev@master + DBAL patches
PostgreSQL 9.4.1
Actions #1

Updated by Morton Jonuschat almost 9 years ago

Bug has been traced back to ADOdb which disables NOT NULL and DEFAULT globally for all DBMS types.

Pull request for ADOdb to make this behaviour configurable per DBMS: https://github.com/ADOdb/ADOdb/pull/118

Actions #2

Updated by Morton Jonuschat almost 9 years ago

  • Assignee set to Morton Jonuschat
Actions #3

Updated by Morton Jonuschat almost 9 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from In Progress 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 http://review.typo3.org/40398

Actions #5

Updated by Gerrit Code Review almost 9 years ago

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

Actions #6

Updated by Morton Jonuschat almost 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF