Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


hsqldb fails to properly escape column names it generates
automatically from an expression in the "script" file it uses to
recreate the database (in memory) on load/connect.

The net effect is that any .odb file where such a view has been
defined cannot be reopened, unless one manually fiddles with the
database/script file in the .odb file seen as a zip file.

This patch fixes that, by saying that *any* expression that is not
already a column name *should* be escaped (instead of *not* escaped)
when seen as a column name/alias.

I hope no bad side-effects, but I'm not intimate with HSQLDB internals,
so never can be really sure.

Please apply to libreoffice-3-5.

-- 
Lionel
From bed3049c4c04a202ff288189d225ca6e5941d69b Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Tue, 3 Jul 2012 20:00:06 +0200
Subject: [PATCH 1/2] fdo#36824 hsqldb properly escape automatically built
 names

Change-Id: Id2c36fb24d1f7c8f8e9800c10226323594bb766e
---
 hsqldb/makefile.mk            |    3 ++-
 hsqldb/patches/fdo36824.patch |   11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 hsqldb/patches/fdo36824.patch

diff --git a/hsqldb/makefile.mk b/hsqldb/makefile.mk
index e500462..3692403 100644
--- a/hsqldb/makefile.mk
+++ b/hsqldb/makefile.mk
@@ -58,7 +58,8 @@ CONVERTFILES=build$/build.xml \
 PATCH_FILES=patches$/i96823.patch \
             patches$/i97032.patch \
             patches$/i103528.patch \
-            patches$/i104901.patch
+            patches$/i104901.patch \
+            patches$/fdo36824.patch
 
 .IF "$(JAVANUMVER:s/.//)" >= "000100060000"
 PATCH_FILES+= \
diff --git a/hsqldb/patches/fdo36824.patch b/hsqldb/patches/fdo36824.patch
new file mode 100644
index 0000000..ad753e3
--- /dev/null
+++ b/hsqldb/patches/fdo36824.patch
@@ -0,0 +1,11 @@
+--- misc/hsqldb/src/org/hsqldb/Expression.java 2012-07-03 19:49:00.000000000 +0200
++++ misc/build/hsqldb/src/org/hsqldb/Expression.java   2012-07-03 19:39:00.000000000 +0200
+@@ -1552,7 +1552,7 @@
+             return columnQuoted;
+         }
+ 
+-        return false;
++        return true;
+     }
+ 
+     /**
-- 
1.7.10


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.