[Commits] Rev 3524: Check of name limit check in file:///home/bell/maria/bzr/work-maria-5.5-cassandra/

sanja at montyprogram.com sanja at montyprogram.com
Thu Sep 27 12:14:16 EEST 2012


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

------------------------------------------------------------
revno: 3524
revision-id: sanja at montyprogram.com-20120927091416-3ex6r84a29az6p46
parent: sanja at montyprogram.com-20120927075306-xj00c5ao4hqgxf9c
committer: sanja at montyprogram.com
branch nick: work-maria-5.5-cassandra
timestamp: Thu 2012-09-27 12:14:16 +0300
message:
  Check of name limit check
  
  The error message rewritten to keep more useful informetion.
-------------- next part --------------
=== modified file 'mysql-test/r/cassandra.result'
--- a/mysql-test/r/cassandra.result	2012-09-26 19:09:23 +0000
+++ b/mysql-test/r/cassandra.result	2012-09-27 09:14:16 +0000
@@ -383,3 +383,7 @@ rowkey	column_json(dyn)
 1	[{"dyn1":"1"},{"dyn2":"two"}]
 delete from t2;
 drop table t2;
+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'
+drop table t1;

=== modified file 'mysql-test/t/cassandra.test'
--- a/mysql-test/t/cassandra.test	2012-09-26 19:09:23 +0000
+++ b/mysql-test/t/cassandra.test	2012-09-27 09:14:16 +0000
@@ -87,6 +87,13 @@ CREATE COLUMN FAMILY cf10
   WITH comparator = UTF8Type
   AND key_validation_class=UTF8Type
   AND default_validation_class = UTF8Type;
+
+CREATE COLUMN FAMILY cf11
+  WITH comparator = UTF8Type
+  AND key_validation_class=UTF8Type 
+  AND default_validation_class = UTF8Type;
+SET cf11['1']['very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_very_long_name']='1';
+
 EOF
 
 --error 0,1,2
@@ -482,6 +489,11 @@ select rowkey, column_json(dyn) from t2;
 delete from t2;
 drop table t2;
 
+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
+select * from t1;
+drop table t1;
+
 ############################################################################
 ## Cassandra cleanup
 ############################################################################

=== modified file 'storage/cassandra/ha_cassandra.cc'
--- a/storage/cassandra/ha_cassandra.cc	2012-09-27 07:53:06 +0000
+++ b/storage/cassandra/ha_cassandra.cc	2012-09-27 09:14:16 +0000
@@ -1717,9 +1717,9 @@ int ha_cassandra::read_cassandra_columns
       {
         se->print_error("Unable to convert value for field `%s`"
                         " from Cassandra's data format. Name"
-                        " length of the field '%s' exceed limit of %u",
+                        " length exceed limit of %u: '%s'",
                         table->field[dyncol_field]->field_name,
-                        cass_name, (uint)MAX_NAME_LENGTH);
+                        (uint)MAX_NAME_LENGTH, cass_name);
         my_error(ER_INTERNAL_ERROR, MYF(0), se->error_str());
         res=1;
         goto err;



More information about the commits mailing list