List:Maria Storage Engine« Previous MessageNext Message »
From:sanja Date:September 28 2008 6:33pm
Subject:bzr commit into MySQL/Maria:mysql-maria branch (sanja:2671) Bug#39399
View as plain text  
#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/

 2671 sanja@stripped	2008-09-28
      Comparison of tables during altering fixed. (BUG#39399)
modified:
  mysql-test/r/maria.result
  mysql-test/t/maria.test
  storage/maria/ha_maria.cc

per-file messages:
  mysql-test/r/maria.result
    Test suite of BUG#39399.
  mysql-test/t/maria.test
    Test suite of BUG#39399.
  storage/maria/ha_maria.cc
    Comparison of tables during altering fixed. (BUG#39399)
    Unused function parameter removed.
=== modified file 'mysql-test/r/maria.result'
--- a/mysql-test/r/maria.result	2008-09-26 13:49:51 +0000
+++ b/mysql-test/r/maria.result	2008-09-28 18:32:59 +0000
@@ -2284,3 +2284,9 @@ insert into v1 (f1) values (3) on duplic
 insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
 drop table t1,t2;
 drop view v1;
+CREATE TABLE t1 (id int, c varchar(10)) engine=maria;
+INSERT INTO t1 VALUES (1,"1");
+ALTER TABLE t1 CHANGE c d varchar(10);
+affected rows: 0
+info: Records: 0  Duplicates: 0  Warnings: 0
+drop table t1;

=== modified file 'mysql-test/t/maria.test'
--- a/mysql-test/t/maria.test	2008-09-26 13:49:51 +0000
+++ b/mysql-test/t/maria.test	2008-09-28 18:32:59 +0000
@@ -1575,3 +1575,14 @@ insert into v1 (f1) values (3) on duplic
 insert into v1 (f1) values (3) on duplicate key update f1= f3 + 10;
 drop table t1,t2;
 drop view v1;
+
+#
+# BUG#39399 ALTER TABLE renaming column: affected_rows > 0
+#
+
+CREATE TABLE t1 (id int, c varchar(10)) engine=maria;
+INSERT INTO t1 VALUES (1,"1");
+--enable_info
+ALTER TABLE t1 CHANGE c d varchar(10);
+--disable_info
+drop table t1;

=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2008-08-28 18:52:23 +0000
+++ b/storage/maria/ha_maria.cc	2008-09-28 18:32:59 +0000
@@ -2605,10 +2605,9 @@ enum row_type ha_maria::get_row_type() c
 }
 
 
-static enum data_file_type maria_row_type(HA_CREATE_INFO *info,
-                                          my_bool ignore_transactional)
+static enum data_file_type maria_row_type(HA_CREATE_INFO *info)
 {
-  if (info->transactional == HA_CHOICE_YES && ! ignore_transactional)
+  if (info->transactional == HA_CHOICE_YES)
     return BLOCK_RECORD;
   switch (info->row_type) {
   case ROW_TYPE_FIXED:   return STATIC_RECORD;
@@ -2641,7 +2640,7 @@ int ha_maria::create(const char *name, r
     }
   }
   /* Note: BLOCK_RECORD is used if table is transactional */
-  row_type= maria_row_type(ha_create_info, 0);
+  row_type= maria_row_type(ha_create_info);
   if (ha_create_info->transactional == HA_CHOICE_YES &&
       ha_create_info->row_type != ROW_TYPE_PAGE &&
       ha_create_info->row_type != ROW_TYPE_NOT_USED &&
@@ -2825,15 +2824,15 @@ bool ha_maria::check_if_incompatible_dat
   if (create_info->auto_increment_value != stats.auto_increment_value ||
       create_info->data_file_name != data_file_name ||
       create_info->index_file_name != index_file_name ||
-      (maria_row_type(create_info,  1) != data_file_type &&
+      (maria_row_type(create_info) != data_file_type &&
        create_info->row_type != ROW_TYPE_DEFAULT) ||
       table_changes == IS_EQUAL_NO ||
       table_changes & IS_EQUAL_PACK_LENGTH) // Not implemented yet
     return COMPATIBLE_DATA_NO;
 
-  if ((options & (HA_OPTION_PACK_RECORD | HA_OPTION_CHECKSUM |
+  if ((options & (HA_OPTION_CHECKSUM |
                   HA_OPTION_DELAY_KEY_WRITE)) !=
-      (create_info->table_options & (HA_OPTION_PACK_RECORD | HA_OPTION_CHECKSUM |
+      (create_info->table_options & (HA_OPTION_CHECKSUM |
                               HA_OPTION_DELAY_KEY_WRITE)))
     return COMPATIBLE_DATA_NO;
   return COMPATIBLE_DATA_YES;

Thread
bzr commit into MySQL/Maria:mysql-maria branch (sanja:2671) Bug#39399sanja28 Sep