Repository navigation
Conversation
|
👍 |
There was a problem hiding this comment.
Add a comment explaining why to_char is necessary?
There was a problem hiding this comment.
The query is still pretty much the same, so reuse everything except the uri part?
There was a problem hiding this comment.
yes, other than the to_char the queries are the same. oracle needs a hack to enable comparing CLOB columns to strings.
regarding reusing everything except the uri part. I very much prefer complete sql queries over a statement that is assembled by concatenating several parts for a reason: readability. Try to follow the sql queries that are used in the sharing code and you can see an example of sql that is well, cut to pieces. There it might even be necessary to handle different cases. Forthermore, some of the IDEs around allow you to execute SQL with prepared statements when they are written as a single string (some also allow concatenated strings, but they fail when adding $variables)
There was a problem hiding this comment.
@butonic So, if you have a query with n combinations, you write down 2^n queries?
You seem to have added a comment saying "//FIXME oracle hack" now. How about you turn that into something useful to the next reader? E.g. (using the information you just gave me) "//FIXME Need to explicitly cast CLOB to CHAR for comparison on Oracle"
There was a problem hiding this comment.
@bantu depends on the tradeoff. Code should be optimized for human readability when not loosing performance. Furthermore, when having to deal with 2^n queries that cannot be handled with prepared statements there is something fundamentally wrong with the code. In this case I have been lamenting about CLOB columns for nearly half a year and used a fork without them to have oracle running at a customer. I'm glad I can now fallback to the to_char workaround, although we will have to measure the performance impact. But first, can we focus on making OC5 work on oracle - at all.
|
@DeepDiver1975 couldn't resist. strict mode working fine on sqlite, mysql and oracle. postgres untested. |
|
I'm fine with it Am Montag, dem 03.06.2013 um 21:52 schrieb Jörn Friedrich Dreyer:
|
|
@owncloud-bot retest this please |
1 similar comment
|
@owncloud-bot retest this please |
|
@Raydiation The apptemplateadvanced table Name is too long, producing a sequence name oft more than 30 characters, which is not supported in Oracle. Can I just rename it to apptmpladv? |
|
I had a look at the code, mainly to the changes on the encryption app, looks good! |
|
damn, contacts and calendar also seem to have problems ... on it |
|
@georgehrke @tanghus could you shorten the table names of contacts and calendar to at most 30-3-4=23 chars? Another quick solution would be to not install these apps when testing oracle. @DeepDiver1975 disabling these apps is not enough. The code needs to be deleted to prevent the installation. Maybe we can do than in autotest.sh, but I don't know if that will interfere with the other tests or how and when their cod is checked out. Any idea? |
|
@butonic contacts and calendar repos are not pulled into the jenkins job - how do they get there? |
|
@owncloud-bot retest this please |
1 similar comment
|
@owncloud-bot retest this please |
|
before: |
|
Status update for OC5 on Oracle in PhPUnit words: @karlitschek @MTRichards @msrex status update for OC5 on Oracle in words: breakthrough - I can install, login, fill and update the filecache, browse the web ui, enabel and disable apps. trash seems to work as well. I'll keep you posted. |
|
Woooohooooooo!!!! @DeepDiver1975 @karlitschek @tanghus @Raydiation @icewind1991 @MTGap @schiesbn testsuite completing on oracle. I had to throw exceptions instead of just dying. But I consider this better practice anyway. This can be improved, but I'd like to get this in ASAP to have everything also tested on oracle. When this reaches 3 👍 I'll merge |
|
Oh, this also requires fixes in the MDB2 oracle code that I commited to 3rdparty. I know this is against the rules ... well oracle is an abomination in itself ... I'll submit a PR to upstream when this is merged. |
|
Awesome! Let's nominate @butonic for Oracle Masochist of the year! I'll have a look tomorrow. Thx PS: I'll join your pain as soon as we get mssql available for ci. |
There was a problem hiding this comment.
Empty strings are considered null by oracle. #2389 uses the big hammer but just hides the problem. I think the cache stores '' for storage root nodes. I assume other columns with this problem will surface too. For now, this will allow the file scan to complete successfully.
|
I don't understand why some database queries have isError($result). This is rather annoying, that sort of thing should be done by the database class. |
|
I agree that the isError() check should be handled by the database, unfortunately we can only add this to the PDOStatementWrapper. Currently I see unchecked db queries everywhere, which makes debugging impossible, and is the reason why I added the checks with isError() in the first place. I hope you agree that we should use exceptions which I started with throwExceptionOnError($result). I guess what we really want to do is introduce a wrapper around the pdo and mdb2 prepared statements. Buuuuuut thats out of scope for this PR. Maybe we should implement a wrapper method OC_DB::execute($statement, $params) that executes the PDO/MDB2 statement and checks the result, logs errors and throws an exception. @DeepDiver1975 @MTGap @bartv2 @karlitschek opinions? |
sounds better than isError() everywhere - but I cannot judge the impact of that change because as of today we don't catch these exceptions. The behavior is unpredictable - at least for me. But we should just give it a try! |
|
rebased |
|
@MTGap @DeepDiver1975 @karlitschek @bartv2 @icewind1991 @schiesbn I added an OC_DB::executeAudited() which does some sanity checks and even handles creating a prepared statement when passed a string or an array with 'sql', 'limit' and 'offset' keys. The local testsuite is running fine and it revealed two other unquoted identifiers. Schema tests just reveal the known oracle problems. I'd like to get this in as it is to get master tested on oracle. @DeepDiver1975 we can just catch exceptions in the index.php and show a message to the user. We are now at least getting a log for everything. |
|
👍 |
|
@owncloud-bot retest this please |
|
We need to catch exceptions in index, public, remote, cron Where else? -------- Ursprüngliche Nachricht -------- @MTGap @DeepDiver1975 @karlitschek @bartv2 @icewind1991 @schiesbn I added an OC_DB::executeAudited() which does some sanity checks and even handles creating a prepared statement when passed a string or an array with 'sql', 'limit' and 'offset' keys. The local testsuite is running fine and it revealed two other unquoted identifiers. Schema tests just reveal the known oracle problems. I'd like to get this in as it is to get master tested on oracle. @DeepDiver1975 we can just catch exceptions in the index.php and show a message to the user. We are now at least getting a log for everything. — |
|
not in the tests so they can bubble up and get logged ;) |
|
I'll split this PR up into more digestable parts |
got the testsuite to execute on oracle:
@karlitschek @DeepDiver1975 @tanghus @Raydiation @icewind1991 @MTGap @schiesbn