[Commits] Rev 3525: more types for test in file:///home/bell/maria/bzr/work-maria-5.5-cassandra/

sanja at montyprogram.com sanja at montyprogram.com
Thu Sep 27 15:12:43 EEST 2012


At file:///home/bell/maria/bzr/work-maria-5.5-cassandra/

------------------------------------------------------------
revno: 3525
revision-id: sanja at montyprogram.com-20120927121242-03xvaaeg39ba1j2j
parent: sanja at montyprogram.com-20120927091416-3ex6r84a29az6p46
committer: sanja at montyprogram.com
branch nick: work-maria-5.5-cassandra
timestamp: Thu 2012-09-27 15:12:42 +0300
message:
  more types for test
-------------- next part --------------
=== modified file 'mysql-test/r/cassandra.result'
--- a/mysql-test/r/cassandra.result	2012-09-27 09:14:16 +0000
+++ b/mysql-test/r/cassandra.result	2012-09-27 12:12:42 +0000
@@ -383,6 +383,46 @@ rowkey	column_json(dyn)
 1	[{"dyn1":"1"},{"dyn2":"two"}]
 delete from t2;
 drop table t2;
+# bigint
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf2';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'a', 254324));
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'a', 2543));
+select rowkey, column_json(dyn) from t1;
+rowkey	column_json(dyn)
+1	[{"a":254324},{"dyn1":"1"},{"dyn2":"two"}]
+2	[{"a":2543},{"dyn1":"1"},{"dyn2":"two"}]
+delete from t1;
+drop table t1;
+# int
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf3';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'intcol', 254324));
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'intcol', 2543));
+select rowkey, column_json(dyn) from t1;
+rowkey	column_json(dyn)
+1	[{"dyn1":"1"},{"dyn2":"two"},{"intcol":254324}]
+2	[{"dyn1":"1"},{"dyn2":"two"},{"intcol":2543}]
+delete from t1;
+drop table t1;
+# timestamp
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf4';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'datecol', 254324));
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'datecol', 2543));
+select rowkey, column_json(dyn) from t1;
+rowkey	column_json(dyn)
+1	[{"dyn1":"1"},{"dyn2":"two"},{"datecol":254324}]
+2	[{"dyn1":"1"},{"dyn2":"two"},{"datecol":2543}]
+delete from t1;
+drop table t1;
+# boolean
+CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf7';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'boolcol', 254324));
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'boolcol', 0));
+select rowkey, column_json(dyn) from t1;
+rowkey	column_json(dyn)
+1	[{"dyn1":"1"},{"dyn2":"two"},{"boolcol":1}]
+2	[{"dyn1":"1"},{"dyn2":"two"},{"boolcol":0}]
+delete from t1;
+drop table t1;
 CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf11';
 select * from t1;
 ERROR HY000: Internal error: 'Unable to convert value for field `dyn` from Cassandra's data format. Name length exceed limit of 255: 'very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_ver'

=== modified file 'mysql-test/t/cassandra.test'
--- a/mysql-test/t/cassandra.test	2012-09-27 09:14:16 +0000
+++ b/mysql-test/t/cassandra.test	2012-09-27 12:12:42 +0000
@@ -488,6 +488,34 @@ insert into t2 values (1, column_create(
 select rowkey, column_json(dyn) from t2;
 delete from t2;
 drop table t2;
+--echo # bigint
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf2';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'a', 254324)); 
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'a', 2543)); 
+select rowkey, column_json(dyn) from t1;
+delete from t1;
+drop table t1;
+--echo # int
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf3';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'intcol', 254324)); 
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'intcol', 2543)); 
+select rowkey, column_json(dyn) from t1;
+delete from t1;
+drop table t1;
+--echo # timestamp
+CREATE TABLE t1 (rowkey bigint PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf4';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'datecol', 254324)); 
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'datecol', 2543)); 
+select rowkey, column_json(dyn) from t1;
+delete from t1;
+drop table t1;
+--echo # boolean
+CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf7';
+insert into t1 values (1, column_create("dyn1", 1, "dyn2", "two", 'boolcol', 254324)); 
+insert into t1 values (2, column_create("dyn1", 1, "dyn2", "two", 'boolcol', 0)); 
+select rowkey, column_json(dyn) from t1;
+delete from t1;
+drop table t1;
 
 CREATE TABLE t1 (rowkey varchar(10) PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cf11';
 --error ER_INTERNAL_ERROR



More information about the commits mailing list