-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Oracle] Fix list table columns when using external or OS authentication with Oracle #2318
Conversation
Requires tests |
I am on it |
803c0ef
to
62452f3
Compare
@Ocramius I copied the |
), | ||
); | ||
} | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty newline to be introduced here
@butonic @Ocramius hmm another funny Oracle story :D The fix seems a bit akward and tends to lead to additional checks against |
$this->assertEquals($expectedSql, $this->_platform->getListTableColumnsSQL('"test"', $database)); | ||
} | ||
|
||
public function getReturnsGetListTableColumnsSQL() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend to avoid testing against complete SQL strings when it comes to testing getList*()
Methods as those tests are fragile and need to be adjusted on every change in SQL. I would rather do a contains check in the string to check whether all_tab_columns
or user_tab_columns
is present (which is the interesting difference).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging this regardless of the fragile test. We may simply rework the test, should some changes break this.
Btw this would also automatically fix other |
…-or-os-authentication-on-oracledb-2.5' into 2.5 Close #2318 Close DBAL-831
To use an external authentication mechanism, ef. Oracle Wallet you specify "/" us the db user and "" as the host when calling oci_connect. See http://php.net/manual/de/function.oci-connect.php#refsect1-function.oci-connect-parameters
This works as expected until you try to read the table columns with
getListTableColumnsSQL()
.Since
$database
is "/" the code that should limit the listed columns to the given user actually prevents listing anything because a user "/" never exists.I did not find a test for
getListTableColumnsSQL()
but am documenting the debug session that lead to this PR at https://github.com/owncloud/core/wiki/%5BWIP%5D-Oracle-Wallet