summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/mysql')
-rw-r--r--connectivity/source/drivers/mysql/YCatalog.cxx6
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx7
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx16
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx20
5 files changed, 25 insertions, 26 deletions
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index 85adabef944c..cb071e05b4f5 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -54,9 +54,9 @@ void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TS
void OMySQLCatalog::refreshTables()
{
TStringVector aVector;
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sAll("%");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index c76ade75e6ab..aa776a4234c9 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -278,7 +278,7 @@ namespace connectivity
OUString sAdd;
if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() )
{
- static const OUString s_sCharSetOp("useUnicode=true&");
+ static const char s_sCharSetOp[] = "useUnicode=true&";
if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) )
{
sAdd = s_sCharSetOp;
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index 37a3ce40ee5c..8fc146324c72 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -196,7 +196,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
::dbtools::OPropertyMap& rProp = OMetaConnection::getPropMap();
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType;
- // and precsions and scale
+ // and precisions and scale
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec;
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale;
@@ -229,7 +229,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
OUString sTypeName;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName;
- static OUString s_sAutoIncrement("auto_increment");
+ static const char s_sAutoIncrement[] = "auto_increment";
if ( bAutoIncrement )
{
if ( sTypeName.indexOf(s_sAutoIncrement) == -1 )
@@ -308,8 +308,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName,
OUString OMySQLTable::getTypeCreatePattern() const
{
- static const OUString s_sCreatePattern("(M,D)");
- return s_sCreatePattern;
+ return OUString("(M,D)");
}
void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName)
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index e1773333c623..e1c2fb6e7589 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -51,9 +51,9 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sAll("%");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
@@ -164,15 +164,15 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName)
OUString OTables::adjustSQL(const OUString& _sSql)
{
OUString sSQL = _sSql;
- static const OUString s_sUNSIGNED("UNSIGNED");
+ static const char s_sUNSIGNED[] = "UNSIGNED";
sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED);
while(nIndex != -1 )
{
sal_Int32 nParen = sSQL.indexOf(')',nIndex);
- sal_Int32 nPos = nIndex + s_sUNSIGNED.getLength();
+ sal_Int32 nPos = nIndex + strlen(s_sUNSIGNED);
OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1));
- sSQL = sSQL.replaceAt(nIndex,s_sUNSIGNED.getLength()+sNewUnsigned.getLength(),sNewUnsigned + s_sUNSIGNED);
- nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + s_sUNSIGNED.getLength()+sNewUnsigned.getLength());
+ sSQL = sSQL.replaceAt(nIndex, strlen(s_sUNSIGNED) + sNewUnsigned.getLength(), sNewUnsigned + s_sUNSIGNED);
+ nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + strlen(s_sUNSIGNED) + sNewUnsigned.getLength());
}
return sSQL;
}
@@ -180,7 +180,7 @@ OUString OTables::adjustSQL(const OUString& _sSql)
void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
- static const OUString s_sCreatePattern("(M,D)");
+ static const char s_sCreatePattern[] = "(M,D)";
const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
Reference< XStatement > xStmt = xConnection->createStatement( );
if ( xStmt.is() )
diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx
index 2a54977a2824..709e98445c82 100644
--- a/connectivity/source/drivers/mysql/YUser.cxx
+++ b/connectivity/source/drivers/mysql/YUser.cxx
@@ -119,16 +119,16 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I
if ( xRes.is() )
{
- static const OUString sSELECT( "SELECT" );
- static const OUString sINSERT( "INSERT" );
- static const OUString sUPDATE( "UPDATE" );
- static const OUString sDELETE( "DELETE" );
- static const OUString sREAD( "READ" );
- static const OUString sCREATE( "CREATE" );
- static const OUString sALTER( "ALTER" );
- static const OUString sREFERENCE( "REFERENCES" );
- static const OUString sDROP( "DROP" );
- static const OUString sYes( "YES" );
+ static const char sSELECT [] = "SELECT";
+ static const char sINSERT [] = "INSERT";
+ static const char sUPDATE [] = "UPDATE";
+ static const char sDELETE [] = "DELETE";
+ static const char sREAD [] = "READ";
+ static const char sCREATE [] = "CREATE";
+ static const char sALTER [] = "ALTER";
+ static const char sREFERENCE[] = "REFERENCES";
+ static const char sDROP [] = "DROP";
+ static const char sYes [] = "YES";
nRightsWithGrant = nRights = 0;