]> source.dussan.org Git - jackcess.git/commitdiff
Fix table name quoting for append and make table queries. fixes patch #17
authorJames Ahlborn <jtahlborn@yahoo.com>
Mon, 1 Dec 2014 02:12:32 +0000 (02:12 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Mon, 1 Dec 2014 02:12:32 +0000 (02:12 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@900 f203690c-595d-4dc9-a70b-905162fa7fd2

pom.xml
src/changes/changes.xml
src/main/java/com/healthmarketscience/jackcess/impl/query/AppendQueryImpl.java
src/main/java/com/healthmarketscience/jackcess/impl/query/MakeTableQueryImpl.java

diff --git a/pom.xml b/pom.xml
index 581e7f6b56d45a77d9bd697c95928fb76053098c..3d83e23c6bd2395655700f93b3c8dc54c466b7d3 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <configuration>
           <issueLinkTemplatePerSystem>
             <SourceForge2Features>http://sourceforge.net/p/jackcess/feature-requests/%ISSUE%</SourceForge2Features>
+            <SourceForge2Patches>http://sourceforge.net/p/jackcess/patches/%ISSUE%</SourceForge2Patches>
           </issueLinkTemplatePerSystem>
         </configuration>
         <reportSets>
index e745224532a97156f4fa965d7cb04dd7fdd14743..721e92361d3625b7ceafcdec151593aee0b42958 100644 (file)
@@ -8,6 +8,9 @@
       <action dev="jahlborn" type="fix" system="SourceForge2" issue="113">
         Add newer sql type to access type mappings if the jvm supports them.
       </action>
+      <action dev="jahlborn" type="fix" system="SourceForge2Patches" issue="17">
+        Fix table name quoting for append and make table queries.
+      </action>
     </release>
     <release version="2.0.7" date="2014-11-22">
       <action dev="jahlborn" type="fix" system="SourceForge2" issue="111">
index 285ff04114b0dc9b8d0a923ebedbef13cd367f6c..a15ca5f8fff9a860f768432b9c06f3f8e26602db 100644 (file)
@@ -79,7 +79,8 @@ public class AppendQueryImpl extends BaseSelectQueryImpl implements AppendQuery
   @Override
   protected void toSQLString(StringBuilder builder)
   {
-    builder.append("INSERT INTO ").append(getTargetTable());
+    builder.append("INSERT INTO ");
+    toOptionalQuotedExpr(builder, getTargetTable(), true);
     toRemoteDb(builder, getRemoteDbPath(), getRemoteDbType());
     builder.append(NEWLINE);
     List<String> values = getValues();
index 00c94177c9f60d0b7425db99c0e7c6feed195328..6a862670b541c64d0dc13cef83c2750adebaef64 100644 (file)
@@ -61,7 +61,8 @@ public class MakeTableQueryImpl extends BaseSelectQueryImpl
   @Override
   protected void toSelectInto(StringBuilder builder) 
   {
-    builder.append(" INTO ").append(getTargetTable());
+    builder.append(" INTO ");
+    toOptionalQuotedExpr(builder, getTargetTable(), true);
     toRemoteDb(builder, getRemoteDbPath(), getRemoteDbType());
   }