List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:February 15 2011 12:20pm
Subject:bzr push into mysql-5.5 branch (Dmitry.Lenev:3327)
View as plain text  
 3327 Dmitry Lenev	2011-02-15 [merge]
      Merged recent changes from mysql-5.5 tree with
      fix for bug @59888.

    removed:
      mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt
    modified:
      mysql-test/extra/rpl_tests/rpl_failed_optimize.test
      mysql-test/suite/rpl/r/rpl_failed_optimize.result
      mysql-test/suite/rpl/r/rpl_read_only.result
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/rpl/t/rpl_read_only.test
=== modified file 'mysql-test/r/gis.result'
--- a/mysql-test/r/gis.result	2011-02-02 13:53:56 +0000
+++ b/mysql-test/r/gis.result	2011-02-15 12:04:52 +0000
@@ -1034,6 +1034,14 @@ p
 NULL
 NULL
 drop table t1;
+#
+# Test for bug #59888 "debug assertion when attempt to create spatial index
+#                      on char > 31 bytes".
+#
+create table t1(a char(32) not null) engine=myisam;
+create spatial index i on t1 (a);
+ERROR 42000: A SPATIAL index may only contain a geometrical type column
+drop table t1;
 End of 5.1 tests
 CREATE TABLE t1(
 col0 BINARY NOT NULL,

=== modified file 'mysql-test/t/gis.test'
--- a/mysql-test/t/gis.test	2011-01-14 21:02:02 +0000
+++ b/mysql-test/t/gis.test	2011-02-15 12:04:52 +0000
@@ -757,6 +757,17 @@ insert into t1 values (geomfromtext("poi
 select * from (select polygon(t1.a) as p from t1 order by t1.a) d;
 drop table t1;
 
+
+--echo #
+--echo # Test for bug #59888 "debug assertion when attempt to create spatial index
+--echo #                      on char > 31 bytes".
+--echo #
+create table t1(a char(32) not null) engine=myisam;
+--error ER_SPATIAL_MUST_HAVE_GEOM_COL
+create spatial index i on t1 (a);
+drop table t1;
+
+
 --echo End of 5.1 tests
 
 #

=== modified file 'storage/myisam/mi_create.c'
--- a/storage/myisam/mi_create.c	2010-11-16 09:45:07 +0000
+++ b/storage/myisam/mi_create.c	2011-02-15 12:04:52 +0000
@@ -269,7 +269,7 @@ int mi_create(const char *name,uint keys
             keyseg->type != HA_KEYTYPE_VARBINARY2)
         {
           my_errno=HA_WRONG_CREATE_OPTION;
-          goto err;
+          goto err_no_lock;
         }
       }
       keydef->keysegs+=sp_segs;
@@ -278,7 +278,7 @@ int mi_create(const char *name,uint keys
       min_key_length_skip+=SPLEN*2*SPDIMS;
 #else
       my_errno= HA_ERR_UNSUPPORTED;
-      goto err;
+      goto err_no_lock;
 #endif /*HAVE_SPATIAL*/
     }
     else if (keydef->flag & HA_FULLTEXT)
@@ -294,7 +294,7 @@ int mi_create(const char *name,uint keys
             keyseg->type != HA_KEYTYPE_VARTEXT2)
         {
           my_errno=HA_WRONG_CREATE_OPTION;
-          goto err;
+          goto err_no_lock;
         }
         if (!(keyseg->flag & HA_BLOB_PART) &&
 	    (keyseg->type == HA_KEYTYPE_VARTEXT1 ||
@@ -419,7 +419,7 @@ int mi_create(const char *name,uint keys
     if (keydef->keysegs > MI_MAX_KEY_SEG)
     {
       my_errno=HA_WRONG_CREATE_OPTION;
-      goto err;
+      goto err_no_lock;
     }
     /*
       key_segs may be 0 in the case when we only want to be able to
@@ -444,7 +444,7 @@ int mi_create(const char *name,uint keys
         length >= MI_MAX_KEY_BUFF)
     {
       my_errno=HA_WRONG_CREATE_OPTION;
-      goto err;
+      goto err_no_lock;
     }
     set_if_bigger(max_key_block_length,keydef->block_length);
     keydef->keylength= (uint16) key_length;
@@ -491,7 +491,7 @@ int mi_create(const char *name,uint keys
                     "indexes and/or unique constraints.",
                     MYF(0), name + dirname_length(name));
     my_errno= HA_WRONG_CREATE_OPTION;
-    goto err;
+    goto err_no_lock;
   }
 
   bmove(share.state.header.file_version,(uchar*) myisam_file_magic,4);
@@ -810,12 +810,14 @@ int mi_create(const char *name,uint keys
   errpos=0;
   mysql_mutex_unlock(&THR_LOCK_myisam);
   if (mysql_file_close(file, MYF(0)))
-    goto err;
+    goto err_no_lock;
   my_free(rec_per_key_part);
   DBUG_RETURN(0);
 
 err:
   mysql_mutex_unlock(&THR_LOCK_myisam);
+
+err_no_lock:
   save_errno=my_errno;
   switch (errpos) {
   case 3:

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (Dmitry.Lenev:3327) Dmitry Lenev15 Feb