summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql/YDriver.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-19 15:38:50 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-19 15:38:50 +0000
commit53128e64b7552217c8cf290e73ef7a69c375a37c (patch)
treeaff2389b82d86c4bc405f32d413f7d93b3785246 /connectivity/source/drivers/mysql/YDriver.cxx
parenta0b65deaa6e999132779e26f2b448dfa8662963c (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'connectivity/source/drivers/mysql/YDriver.cxx')
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index a3691623ddb4..2dbcb132eec9 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: YDriver.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2002-12-05 14:50:48 $
+ * last change: $Author: hr $ $Date: 2003-03-19 16:38:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -282,10 +282,14 @@ namespace connectivity
//--------------------------------------------------------------------
sal_Bool SAL_CALL ODriverDelegator::acceptsURL( const ::rtl::OUString& url ) throw (SQLException, RuntimeException)
{
- ::rtl::OUString sPrefix = url.copy(0,16);
- sal_Bool bOK = sPrefix.equalsAscii("sdbc:mysql:odbc:");
- if ( !bOK )
- bOK = sPrefix.equalsAscii("sdbc:mysql:jdbc:");
+ sal_Bool bOK = sal_False;
+ if ( url.getLength() >= 16 )
+ {
+ ::rtl::OUString sPrefix = url.copy(0,16);
+ bOK = sPrefix.equalsAscii("sdbc:mysql:odbc:");
+ if ( !bOK )
+ bOK = sPrefix.equalsAscii("sdbc:mysql:jdbc:");
+ }
return bOK;
}