[Commits] Rev 3529: fixed MDEV-561 (attempt to write incorrect data to dynamic column) in file:///home/bell/maria/bzr/work-maria-5.5-cassandra/

sanja at montyprogram.com sanja at montyprogram.com
Fri Sep 28 08:30:46 EEST 2012


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

------------------------------------------------------------
revno: 3529
revision-id: sanja at montyprogram.com-20120928053044-8lepqwn93coy49uz
parent: sanja at montyprogram.com-20120927232449-fv3s8f16hfj4kkn5
committer: sanja at montyprogram.com
branch nick: work-maria-5.5-cassandra
timestamp: Fri 2012-09-28 08:30:44 +0300
message:
  fixed MDEV-561 (attempt to write incorrect data to dynamic column)
-------------- next part --------------
=== modified file 'mysql-test/r/cassandra.result'
--- a/mysql-test/r/cassandra.result	2012-09-27 23:24:49 +0000
+++ b/mysql-test/r/cassandra.result	2012-09-28 05:30:44 +0000
@@ -540,3 +540,9 @@ rowkey	column_list(dyn)
 1	`dyn`
 delete from t1;
 DROP TABLE t1;
+CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) 
+ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd2';
+insert into t1 values (1,'9b5658dc-f32f-11e1-94cd-f46d046e9f0a');
+ERROR HY000: Encountered illegal format of dynamic column string
+delete from t1;
+DROP TABLE t1;

=== modified file 'mysql-test/t/cassandra.test'
--- a/mysql-test/t/cassandra.test	2012-09-27 23:24:49 +0000
+++ b/mysql-test/t/cassandra.test	2012-09-28 05:30:44 +0000
@@ -626,6 +626,15 @@ select rowkey, column_list(dyn) from t1;
 delete from t1;
 DROP TABLE t1;
 
+# MDEV-561 (incorrect format data to dynamic column)
+CREATE TABLE t1 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) 
+ENGINE=CASSANDRA thrift_host='localhost' keyspace='mariadbtest2' column_family = 'cfd2';
+--error ER_DYN_COL_WRONG_FORMAT
+insert into t1 values (1,'9b5658dc-f32f-11e1-94cd-f46d046e9f0a');
+delete from t1;
+DROP TABLE t1;
+
+
 ############################################################################
 ## Cassandra cleanup
 ############################################################################

=== modified file 'storage/cassandra/ha_cassandra.cc'
--- a/storage/cassandra/ha_cassandra.cc	2012-09-27 23:24:49 +0000
+++ b/storage/cassandra/ha_cassandra.cc	2012-09-28 05:30:44 +0000
@@ -1642,6 +1642,7 @@ int ha_cassandra::index_read_map(uchar *
   if (rowkey_converter->mariadb_to_cassandra(&cass_key, &cass_key_len))
   {
     /* We get here when making lookups like uuid_column='not-an-uuid' */
+    dbug_tmp_restore_column_map(table->read_set, old_map);
     DBUG_RETURN(HA_ERR_KEY_NOT_FOUND);
   }
 
@@ -1972,7 +1973,10 @@ int ha_cassandra::write_row(uchar *buf)
         rc= write_dynamic_row(&vals, &names);
       free_dynamic_row(&vals, &names, free_names);
       if (rc)
-        return rc;
+      {
+        dbug_tmp_restore_column_map(table->read_set, old_map);
+        DBUG_RETURN(rc);
+      }
     }
     else
     {



More information about the commits mailing list