[Libreoffice-commits] core.git: dbaccess/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 11 19:38:17 UTC 2019


 dbaccess/source/filter/hsqldb/parseschema.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 2a08db9a0473e2f87715aacfc7b481beaa490dcf
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sun Feb 3 07:47:21 2019 +0100
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Mon Feb 11 20:37:55 2019 +0100

    tdf#123020: migration to Firebird fix tablename for indexes (2)
    
    Change-Id: Ibb296611c152807d143fa1e212554fd54aea45fb
    Reviewed-on: https://gerrit.libreoffice.org/67301
    Tested-by: Jenkins
    Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/dbaccess/source/filter/hsqldb/parseschema.cxx b/dbaccess/source/filter/hsqldb/parseschema.cxx
index e04998c80f28..c17369f4950a 100644
--- a/dbaccess/source/filter/hsqldb/parseschema.cxx
+++ b/dbaccess/source/filter/hsqldb/parseschema.cxx
@@ -75,7 +75,12 @@ public:
     OUString getTableName() const
     {
         // SET TABLE <tableName>
-        return string::split(m_sql, u' ')[2];
+        constexpr int SET_TABLE_LITERAL_SIZE = 9;
+        if (m_sql.indexOf("\"") >= 0) // delimited identifier
+            return m_sql.copy(m_sql.indexOf("\""),
+                              m_sql.lastIndexOf("\"") - SET_TABLE_LITERAL_SIZE);
+        else
+            return string::split(m_sql, u' ')[2];
     }
 };
 


More information about the Libreoffice-commits mailing list