Repository navigation
Repair step to remove bogus expiration dates from non-link shares - #19132
Conversation
|
👍 |
There was a problem hiding this comment.
SQL syntax for unequal is <> not !=
Most DBs understand != but you never know how long stares at oracle
There was a problem hiding this comment.
Why not use the query builder?
There was a problem hiding this comment.
Right... I copy-pasted from the orphaned shares code that also didn't use the query builder
|
Looks good apart from the comment |
|
Right, I wanted to run the OCI test locally |
171ce28 to
0e45fab
Compare
|
@PVince81 oracle doesn't like that: |
|
Yeah... I'll use the query builder instead and the proper operator... |
0e45fab to
b6929a9
Compare
|
I fixed the comparator, hoping it will work now with OCI. |
b6929a9 to
5e6453f
Compare
|
still issues with oracle: |
There was a problem hiding this comment.
Fails on oracle, no quotes in sight 😞
There was a problem hiding this comment.
Gargglllllllbrlrlrlrlrl okay
There was a problem hiding this comment.
We all work in the service of the mighty Oracle 🔮
5e6453f to
884bc2f
Compare
|
Backticks added and squashed |
There was a problem hiding this comment.
Now you reverted it back? No more query builder?
There was a problem hiding this comment.
I never pushed the query builder here because it didn't work.
Now that you fixed it I can move the query builder version to this branch.
|
Let me move this to the query builder |
884bc2f to
32f30e2
Compare
|
Ok, I query buildered all the things, including the SQLs from the test case |
There was a problem hiding this comment.
13:08:16 1) Test\Repair\RepairInvalidShares::testRemoveExpirationDateForNonLinkShares
13:08:16 sanity check
13:08:16 Failed asserting that '1' matches expected false.
13:08:16
13:08:16 /var/jenkins/workspace/core-ci-linux@2/database/oci/label/SLAVE/tests/lib/repair/repairinvalidshares.php:100
There was a problem hiding this comment.
$bogusShareId = $this->connection->lastInsertId();
This seems to return false. @nickvergessen didn't you mention that this is tricky on oracle?
There was a problem hiding this comment.
I knew it, found the code:
core/lib/private/share/share.php
Lines 2303 to 2317 in 1911472
There was a problem hiding this comment.
Thanks... ok I'll rewrite the test to not rely on the id
32f30e2 to
1bd7d97
Compare
|
Replaced 'lastInsertId` with a select to get the id. |
|
@nickvergessen @MorrisJobke tests are green now 😄 |
There was a problem hiding this comment.
Should delete all existing shares in setUp(), to avoid problems when a previous test one day creates a share
|
Tested with a group share:
Beside my comment above 👍 |
1bd7d97 to
6aed476
Compare
|
#19132 (comment) is still open @MorrisJobke |
|
Code looks good, agree with @nickvergessen about cleaning up before starting the test |
|
Feel free to change it yourself. Busy fixing IE8 (unless you want to swap with me) |
6aed476 to
8f2600a
Compare
|
Done and rebased |
|
@nickvergessen thanks |
|
👍 for @nickvergessen's changes, merging |
…date Repair step to remove bogus expiration dates from non-link shares
To clean up the mess by the bug that existed pre-8.2: #11396
The new share dialog doesn't set the expiration date for user shares any more, so cleaning that up should be permanent (hence the version check)
@MorrisJobke @nickvergessen @schiesbn @DeepDiver1975
(8.2 only)