5 new revisions:

Revision: f97b06dd798c
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 18:56:51 2012
Log:      Remove the log4j.properties file from src/main/resources...
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=f97b06dd798c

Revision: 5a690f77f8e7
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 13:49:16 2012
Log:      Show more information in error messages from Server
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=5a690f77f8e7

Revision: 4930d2526457
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 13:50:55 2012
Log:      Add test for Issue #33....
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=4930d2526457

Revision: 320b789c5fb1
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 18:57:35 2012
Log:      Merge branch 'issue-33' into v1.1.0
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=320b789c5fb1

Revision: af085cd94571
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 19:29:00 2012
Log: Update dependencies in build.xml and pom.xml to version 1.1.1 of C*
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=af085cd94571

==============================================================================
Revision: f97b06dd798c
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 18:56:51 2012
Log:      Remove the log4j.properties file from src/main/resources

log4j file was getting put into the jar overriding client usage
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=f97b06dd798c

Deleted:
 /src/main/resources/log4j.properties

=======================================
--- /src/main/resources/log4j.properties        Mon Nov 21 14:37:51 2011
+++ /dev/null
@@ -1,8 +0,0 @@
-#  Test Log4J Properties File
-
-log4j.rootLogger=WARN, stdout
-log4j.logger.org.apache.cassandra.cql.jdbc=INFO
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%-6r %-5p [%-30c{3}] = %m%n

==============================================================================
Revision: 5a690f77f8e7
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 13:49:16 2012
Log:      Show more information in error messages from Server
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=5a690f77f8e7

Modified:
 /src/main/java/org/apache/cassandra/cql/jdbc/CassandraStatement.java

=======================================
--- /src/main/java/org/apache/cassandra/cql/jdbc/CassandraStatement.java Wed Dec 21 21:16:09 2011 +++ /src/main/java/org/apache/cassandra/cql/jdbc/CassandraStatement.java Thu Jun 14 13:49:16 2012
@@ -176,7 +176,7 @@
         }
         catch (InvalidRequestException e)
         {
-            throw new SQLSyntaxErrorException(e.getWhy());
+            throw new SQLSyntaxErrorException(e.getWhy()+"\n'"+sql+"'",e);
         }
         catch (UnavailableException e)
         {
@@ -184,7 +184,7 @@
         }
         catch (TimedOutException e)
         {
-            throw new SQLTransientConnectionException(e.getMessage());
+            throw new SQLTransientConnectionException(e);
         }
         catch (SchemaDisagreementException e)
         {
@@ -192,7 +192,7 @@
         }
         catch (TException e)
         {
-            throw new SQLNonTransientConnectionException(e.getMessage());
+            throw new SQLNonTransientConnectionException(e);
         }

     }

==============================================================================
Revision: 4930d2526457
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 13:50:55 2012
Log:      Add test for Issue #33.

 o also add a bit of tidying up.
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=4930d2526457

Modified:
 /src/test/java/org/apache/cassandra/cql/jdbc/JdbcRegressionTest.java

=======================================
--- /src/test/java/org/apache/cassandra/cql/jdbc/JdbcRegressionTest.java Sat Mar 24 18:43:56 2012 +++ /src/test/java/org/apache/cassandra/cql/jdbc/JdbcRegressionTest.java Thu Jun 14 13:50:55 2012
@@ -48,7 +48,10 @@
     public static void setUpBeforeClass() throws Exception
     {
         Class.forName("org.apache.cassandra.cql.jdbc.CassandraDriver");
- con = DriverManager.getConnection(String.format("jdbc:cassandra://%s:%d/%s",HOST,PORT,"system")); + String URL = String.format("jdbc:cassandra://%s:%d/%s",HOST,PORT,"system");
+        System.out.println("Connection URL = '"+URL +"'");
+
+        con = DriverManager.getConnection(URL);
         Statement stmt = con.createStatement();

         // Drop Keyspace
@@ -56,10 +59,12 @@

         try { stmt.execute(dropKS);}
         catch (Exception e){/* Exception on DROP is OK */}
-
+
         // Create KeySpace
String createKS = String.format("CREATE KEYSPACE %s WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1;",KEYSPACE);
+        System.out.println("createKS = '"+createKS+"'");
         stmt = con.createStatement();
+        stmt.execute("USE system;");
         stmt.execute(createKS);

         // Use Keyspace
@@ -100,8 +105,6 @@
         statement.executeUpdate(insert);
         statement.close();

-        Thread.sleep(3000);
-
         statement = con.createStatement();
ResultSet result = statement.executeQuery("SELECT bValue,notThere,iValue FROM RegressionTest WHERE keyname=key0;");
         result.next();
@@ -130,6 +133,7 @@
 //        con.close();

     }
+
     @Test
     public void testIssue18() throws Exception
     {
@@ -176,6 +180,49 @@
            System.out.println();
        }
     }
+
+    @Test
+    public void testIssue33() throws Exception
+    {
+        Statement stmt = con.createStatement();
+
+        // Create the target Column family
+        String createCF = "CREATE COLUMNFAMILY t33 (k int PRIMARY KEY,"
+                        + "c text "
+ + ") WITH comparator = ascii AND default_validation = text;";
+
+        stmt.execute(createCF);
+        stmt.close();
+        con.close();
+
+        // open it up again to see the new CF
+ con = DriverManager.getConnection(String.format("jdbc:cassandra://%s:%d/%s",HOST,PORT,KEYSPACE));
+
+        // paraphrase of the snippet from the ISSUE #33 provided test
+ PreparedStatement statement = con.prepareStatement("update t33 set c=? where k=123");
+        statement.setString(1, "mark");
+        statement.executeUpdate();
+
+        ResultSet result = statement.executeQuery("SELECT * FROM t33;");
+
+        ResultSetMetaData metadata = result.getMetaData();
+
+        int colCount = metadata.getColumnCount();
+
+        System.out.println("Test Issue #33");
+        System.out.println("--------------");
+        while (result.next())
+        {
+            metadata = result.getMetaData();
+            colCount = metadata.getColumnCount();
+            System.out.printf("(%d) ",result.getRow());
+            for (int i = 1; i <= colCount; i++)
+            {
+                System.out.print(showColumn(i,result)+ " ");
+            }
+            System.out.println();
+        }
+   }


private final String showColumn(int index, ResultSet result) throws SQLException

==============================================================================
Revision: 320b789c5fb1
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 18:57:35 2012
Log:      Merge branch 'issue-33' into v1.1.0
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=320b789c5fb1



==============================================================================
Revision: af085cd94571
Author:   Rick Shaw <[email protected]>
Date:     Thu Jun 14 19:29:00 2012
Log: Update dependencies in build.xml and pom.xml to version 1.1.1 of C*
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=af085cd94571

Modified:
 /build.xml
 /pom.xml

=======================================
--- /build.xml  Sun May 13 12:24:45 2012
+++ /build.xml  Thu Jun 14 19:29:00 2012
@@ -36,7 +36,7 @@
   <property name="debuglevel" value="source,lines,vars" />
   <property name="test.name" value="*Test" />
   <property name="test.timeout" value="60000" />
-  <property name="base.version" value="1.1.0" />
+  <property name="base.version" value="1.1.1" />

   <condition property="version" value="${base.version}">
     <isset property="release" />
=======================================
--- /pom.xml    Sun May 13 12:24:45 2012
+++ /pom.xml    Thu Jun 14 19:29:00 2012
@@ -30,7 +30,7 @@

   <groupId>org.apache-extras.cassandra-jdbc</groupId>
   <artifactId>cassandra-jdbc</artifactId>
-  <version>1.1.0</version>
+  <version>1.1.1</version>

   <name>JDBC driver for Cassandra/CQL</name>
<description>A JDBC-compliant driver for Cassandra using CQL.</description>
@@ -105,12 +105,12 @@
     <dependency>
       <groupId>org.apache.cassandra</groupId>
       <artifactId>cassandra-clientutil</artifactId>
-      <version>1.1.0</version>
+      <version>1.1.1</version>
     </dependency>
     <dependency>
       <groupId>org.apache.cassandra</groupId>
       <artifactId>cassandra-thrift</artifactId>
-      <version>1.1.0</version>
+      <version>1.1.1</version>
       <exclusions>
         <exclusion>
           <groupId>javax.servlet</groupId>

Reply via email to