summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/mysql/YTable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/mysql/YTable.cxx')
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index efc80a2ae4c9..4938b724fc34 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -354,8 +354,8 @@ OUString OMySQLTable::getAlterTableColumnPart()
void OMySQLTable::executeStatement(const OUString& _rStatement )
{
OUString sSQL = _rStatement;
- if(sSQL.lastIndexOf(',') == (sSQL.getLength()-1))
- sSQL = sSQL.replaceAt(sSQL.getLength()-1,1,OUString(")"));
+ if(sSQL.endsWith(","))
+ sSQL = sSQL.replaceAt(sSQL.getLength()-1, 1, ")");
Reference< XStatement > xStmt = getConnection()->createStatement( );
if ( xStmt.is() )