[Commits] Rev 3499: Cassandra storage engine: add @@rnd_batch_size variable. in file:///data0/psergey/dev2/5.5-cassandra-r01/

Sergey Petrunya psergey at askmonty.org
Wed Aug 29 06:39:22 EEST 2012


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

------------------------------------------------------------
revno: 3499
revision-id: psergey at askmonty.org-20120829033922-6xc4r7bhsij3pgjb
parent: psergey at askmonty.org-20120828162245-rwodocdqhk30fb11
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 5.5-cassandra-r01
timestamp: Wed 2012-08-29 07:39:22 +0400
message:
  Cassandra storage engine: add @@rnd_batch_size variable.
=== modified file 'mysql-test/t/cassandra.test'
--- a/mysql-test/t/cassandra.test	2012-08-28 16:22:45 +0000
+++ b/mysql-test/t/cassandra.test	2012-08-29 03:39:22 +0000
@@ -194,6 +194,7 @@
 ############################################################################
 --disable_parsing
 drop columnfamily cf1;
+drop columnfamily cf2;
 --enable_parsing
 ############################################################################
 ## Cassandra cleanup ends

=== modified file 'storage/cassandra/ha_cassandra.cc'
--- a/storage/cassandra/ha_cassandra.cc	2012-08-28 08:53:33 +0000
+++ b/storage/cassandra/ha_cassandra.cc	2012-08-29 03:39:22 +0000
@@ -64,9 +64,14 @@
   "Number of rows in a multiget(MRR) batch",
   NULL, NULL, /*default*/ 100, /*min*/ 1, /*max*/ 1024*1024*1024, 0);
 
+static MYSQL_THDVAR_ULONG(rnd_batch_size, PLUGIN_VAR_RQCMDARG,
+  "Number of rows in an rnd_read (full scan) batch",
+  NULL, NULL, /*default*/ 10*1000, /*min*/ 1, /*max*/ 1024*1024*1024, 0);
+
 static struct st_mysql_sys_var* cassandra_system_variables[]= {
   MYSQL_SYSVAR(insert_batch_size),
   MYSQL_SYSVAR(multiget_batch_size),
+  MYSQL_SYSVAR(rnd_batch_size),
 //  MYSQL_SYSVAR(enum_var),
 //  MYSQL_SYSVAR(ulong_var),
   NULL
@@ -254,8 +259,7 @@
 
 ha_cassandra::ha_cassandra(handlerton *hton, TABLE_SHARE *table_arg)
   :handler(hton, table_arg),
-   se(NULL), field_converters(NULL), rowkey_converter(NULL),
-   rnd_batch_size(10*1000)
+   se(NULL), field_converters(NULL), rowkey_converter(NULL)
 {}
 
 
@@ -849,7 +853,7 @@
   for (uint i= 1; i < table->s->fields; i++)
     se->add_read_column(table->field[i]->field_name);
 
-  se->read_batch_size= rnd_batch_size;
+  se->read_batch_size= THDVAR(table->in_use, rnd_batch_size);
   bres= se->get_range_slices(false);
   if (bres)
     my_error(ER_INTERNAL_ERROR, MYF(0), se->error_str());

=== modified file 'storage/cassandra/ha_cassandra.h'
--- a/storage/cassandra/ha_cassandra.h	2012-08-27 04:44:58 +0000
+++ b/storage/cassandra/ha_cassandra.h	2012-08-29 03:39:22 +0000
@@ -46,8 +46,6 @@
   
   void read_cassandra_columns(bool unpack_pk);
 
-  ha_rows rnd_batch_size;
-
   bool doing_insert_batch;
   ha_rows insert_rows_batched;
 public:



More information about the commits mailing list