Kaydet (Commit) edbbc471 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

HSQLDB: correct syntax of change password from MySQL to HSQLDB

Change-Id: Iacf60c456912f2e38c7a082e48c45164e79c1097
üst 9203ae33
......@@ -272,10 +272,13 @@ void SAL_CALL OHSQLUser::changePassword( const OUString& /*oldPassword*/, const
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
OUString sAlterPwd = "SET PASSWORD FOR " +
::dbtools::quoteName(xMeta->getIdentifierQuoteString(), m_Name) +
"@\"%\" = PASSWORD('" + newPassword + "')";
if( m_Name != xMeta->getUserName() )
{
::dbtools::throwGenericSQLException("HSQLDB can only change password of the current user.", *this);
}
OUString sAlterPwd = "SET PASSWORD " +
::dbtools::quoteName(xMeta->getIdentifierQuoteString(), newPassword);
Reference<XStatement> xStmt = m_xConnection->createStatement();
if ( xStmt.is() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment