[Commits] Rev 3494: - Enable mapping of CHAR(n) in file:///data0/psergey/dev2/5.5-cassandra-r01/

Sergey Petrunya psergey at askmonty.org
Thu Aug 23 20:16:02 EEST 2012


At file:///data0/psergey/dev2/5.5-cassandra-r01/

------------------------------------------------------------
revno: 3494
revision-id: psergey at askmonty.org-20120823171601-31juuznejpayb5yb
parent: psergey at askmonty.org-20120823121528-1p4qx0yzc7ktdcc9
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.5-cassandra-r01
timestamp: Thu 2012-08-23 21:16:01 +0400
message:
  - Enable mapping of CHAR(n)
  - preparations for support of bulk INSERT.
=== modified file 'storage/cassandra/ha_cassandra.cc'
--- a/storage/cassandra/ha_cassandra.cc	2012-08-23 12:15:28 +0000
+++ b/storage/cassandra/ha_cassandra.cc	2012-08-23 17:16:01 +0000
@@ -527,7 +527,7 @@
 
     case MYSQL_TYPE_VAR_STRING:
     case MYSQL_TYPE_VARCHAR:
-    //case MYSQL_TYPE_STRING:  <-- todo: should we allow end-padded 'CHAR(N)'?
+    case MYSQL_TYPE_STRING: // these are space padded strings.
       if (!strcmp(validator_name, validator_blob) ||
           !strcmp(validator_name, validator_ascii) ||
           !strcmp(validator_name, validator_text))
@@ -893,7 +893,19 @@
   DBUG_RETURN(rc);
 }
 
-
+#if 0
+void ha_cassandra::start_bulk_insert(ha_rows rows)
+{
+  /* Do nothing? */
+}
+
+
+int ha_cassandra::end_bulk_insert()
+{
+  // TODO!
+  return 0;
+}
+#endif 
 /////////////////////////////////////////////////////////////////////////////
 // Dummy implementations start
 /////////////////////////////////////////////////////////////////////////////

=== modified file 'storage/cassandra/ha_cassandra.h'
--- a/storage/cassandra/ha_cassandra.h	2012-08-21 14:38:27 +0000
+++ b/storage/cassandra/ha_cassandra.h	2012-08-23 17:16:01 +0000
@@ -145,7 +145,10 @@
   */
   virtual double read_time(uint, uint, ha_rows rows)
   { return (double) rows /  20.0+1; }
-
+#if 0
+  virtual void start_bulk_insert(ha_rows rows);
+  virtual int end_bulk_insert();
+#endif  
   /*
     Everything below are methods that we implement in ha_example.cc.
 



More information about the commits mailing list