Skip to content

Fix Cache::update() to reset column on oracle - #31989

Merged
IljaN merged 1 commit into
masterfrom
oracle_cache_reset_column
Jul 5, 2018
Merged

IljaN merged 1 commit into
masterfrom
oracle_cache_reset_column

Conversation

@IljaN

@IljaN IljaN commented Jul 4, 2018 •

Copy link
Copy Markdown
Contributor

Description

FileCache columns were not reset on oracle when an empty value was passed instead of null.

Related Issue

How Has This Been Tested?

Unit-tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@IljaN IljaN added this to the development milestone Jul 4, 2018
@IljaN IljaN self-assigned this Jul 4, 2018
@IljaN
IljaN requested a review from PVince81 July 4, 2018 15:21
Comment thread lib/private/Files/Cache/Cache.php Outdated

// Oracle does not support empty string values so we convert them to nulls
// https://github.com/owncloud/core/issues/31692
if ($this->connection->getDatabasePlatform()->getName() === 'oracle') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

usually we go for

if ($this->connection->getDatabasePlatform() instanceof OraclePlatform) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👌

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will push changes after/if more change requests arrive to conserve ci-ressources.

@IljaN IljaN changed the title Fix update to reset column on oracle Fix Cache::update() to reset column on oracle Jul 4, 2018
@IljaN
IljaN force-pushed the oracle_cache_reset_column branch from b2dd00f to d7ed633 Compare July 4, 2018 15:58
@ownclouders ownclouders added Type:Bug p3-medium Normal priority labels Jul 4, 2018
@codecov

codecov Bot commented Jul 4, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #31989 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #31989      +/-   ##
============================================
+ Coverage     63.49%   63.49%   +<.01%     
- Complexity    18547    18550       +3     
============================================
  Files          1167     1167              
  Lines         69548    69551       +3     
  Branches       1264     1264              
============================================
+ Hits          44159    44162       +3     
  Misses        25020    25020              
  Partials        369      369
Flag Coverage Δ Complexity Δ
#javascript 52.59% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 64.74% <100%> (ø) 18550 <0> (+3) ⬆️
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Cache/Cache.php 98.09% <100%> (+0.01%) 105 <0> (+3) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9c4857c...97d0454. Read the comment docs.

@IljaN
IljaN force-pushed the oracle_cache_reset_column branch from d7ed633 to 828e0c6 Compare July 4, 2018 16:44
@PVince81

PVince81 commented Jul 5, 2018

Copy link
Copy Markdown
Contributor

@IljaN try running make test-php-style locally to see the style issues

Wow, it looks like your fix worked and passed on Oracle!

In previous attempts I was struggling because of the "is null" condition but didn't think of just converting all values. Well done.

So far I can't think of any side effect that could happen here. It is likely that this also fixes other yet undiscovered bugs.

@IljaN
IljaN force-pushed the oracle_cache_reset_column branch from 828e0c6 to 97d0454 Compare July 5, 2018 09:21

@PVince81 PVince81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@IljaN
IljaN merged commit 615ba79 into master Jul 5, 2018
@IljaN
IljaN deleted the oracle_cache_reset_column branch July 5, 2018 10:04
@IljaN

IljaN commented Jul 5, 2018

Copy link
Copy Markdown
Contributor Author

Backport here: #31996

@lock

lock Bot commented Jul 30, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File cache update() cannot set empty string on Oracle

4 participants