]> git.pld-linux.org Git - packages/mysql.git/blobdiff - memory_dynamic_rows.patch
- up to 5.5.21
[packages/mysql.git] / memory_dynamic_rows.patch
index dbea06bc38eca052206d433775dbcd5e4dcd663d..3026815470758991b9538c194d203766b4e66f11 100644 (file)
@@ -19,7 +19,7 @@
  
  #define HP_MAX_LEVELS 4               /* 128^5 records is enough */
  #define HP_PTRS_IN_NOD        128
-@@ -130,22 +140,58 @@
+@@ -131,22 +141,58 @@
    uint (*get_key_length)(struct st_hp_keydef *keydef, const uchar *key);
  } HP_KEYDEF;
  
@@ -83,9 +83,9 @@
    uint open_count;
 -  uchar *del_link;                    /* Link to next block with del. rec */
    char * name;                        /* Name of "memory-file" */
+   time_t create_time;
    THR_LOCK lock;
-   mysql_mutex_t intern_lock;            /* Locking for use with _locking */
-@@ -154,6 +200,7 @@
+@@ -156,6 +202,7 @@
    uint auto_key;
    uint auto_key_type;                 /* real type of the auto key segment */
    ulonglong auto_increment;
@@ -93,7 +93,7 @@
  } HP_SHARE;
  
  struct st_hp_hash_info;
-@@ -163,7 +210,7 @@
+@@ -165,7 +212,7 @@
    HP_SHARE *s;
    uchar *current_ptr;
    struct st_hp_hash_info *current_hash_ptr;
    int lastinx,errkey;
    int  mode;                          /* Mode of file (READONLY..) */
    uint opt_flag,update;
-@@ -176,6 +223,9 @@
+@@ -178,6 +225,9 @@
    my_bool implicit_emptied;
    THR_LOCK_DATA lock;
    LIST open_list;
  } HP_INFO;
  
  
-@@ -197,6 +247,14 @@
+@@ -199,6 +249,14 @@
      open_count to 1. Is only looked at if not internal_table.
    */
    my_bool pin_share;
  } HP_CREATE_INFO;
  
        /* Prototypes for heap-functions */
-@@ -213,9 +271,8 @@
+@@ -215,9 +273,8 @@
  extern int heap_scan(register HP_INFO *info, uchar *record);
  extern int heap_delete(HP_INFO *info,const uchar *buff);
  extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
    }
  }
  
-@@ -428,6 +435,13 @@
+@@ -429,6 +436,13 @@
    return 0;
  }
  
  
  int ha_heap::extra(enum ha_extra_function operation)
  {
-@@ -645,23 +659,70 @@
+@@ -646,23 +660,70 @@
  heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
                              HP_CREATE_INFO *hp_create_info)
  {
    seg= reinterpret_cast<HA_KEYSEG*>(keydef + keys);
    for (key= 0; key < keys; key++)
    {
-@@ -677,11 +738,11 @@
+@@ -678,11 +739,11 @@
      case HA_KEY_ALG_UNDEF:
      case HA_KEY_ALG_HASH:
        keydef[key].algorithm= HA_KEY_ALG_HASH;
        break;
      default:
        DBUG_ASSERT(0); // cannot happen
-@@ -706,6 +767,16 @@
+@@ -707,6 +768,16 @@
        seg->length=  (uint) key_part->length;
        seg->flag=    key_part->key_part_flag;
  
        if (field->flags & (ENUM_FLAG | SET_FLAG))
          seg->charset= &my_charset_bin;
        else
-@@ -731,9 +802,75 @@
+@@ -732,9 +803,75 @@
          auto_key= key+ 1;
        auto_key_type= field->key_type();
        }
    if (table_arg->found_next_number_field)
    {
      keydef[share->next_number_index].flag|= HA_AUTO_KEY;
-@@ -744,16 +881,19 @@
+@@ -745,16 +882,19 @@
    hp_create_info->max_table_size=current_thd->variables.max_heap_table_size;
    hp_create_info->with_auto_increment= found_real_auto_increment;
    hp_create_info->internal_table= internal_table;
    return 0;
  }
  
-@@ -773,6 +913,7 @@
+@@ -774,6 +914,7 @@
                                  create_info->auto_increment_value - 1 : 0);
    error= heap_create(name, &hp_create_info, &internal_share, &created);
    my_free(hp_create_info.keydef);
    DBUG_ASSERT(file == 0);
    return (error);
  }
-@@ -783,6 +924,13 @@
+@@ -784,6 +925,13 @@
    table->file->info(HA_STATUS_AUTO);
    if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
      create_info->auto_increment_value= stats.auto_increment_value;
        /* Fix keys */
      memcpy(share->keydef, keydef, (size_t) (sizeof(keydef[0]) * keys));
      for (i= 0, keyinfo= share->keydef; i < keys; i++, keyinfo++)
-@@ -177,15 +310,35 @@
+@@ -177,16 +310,36 @@
      share->min_records= min_records;
      share->max_records= max_records;
      share->max_table_size= create_info->max_table_size;
      share->auto_key= create_info->auto_key;
      share->auto_key_type= create_info->auto_key_type;
      share->auto_increment= create_info->auto_increment;
+     share->create_time= (long) time((time_t*) 0);
 +
 +    share->fixed_data_length= fixed_data_length;
 +    share->fixed_column_count= fixed_column_count;
      /* Must be allocated separately for rename to work */
      if (!(share->name= my_strdup(name,MYF(0))))
      {
-@@ -227,7 +380,7 @@
+@@ -228,7 +381,7 @@
                    param->search_flag, not_used);
  }
  
                       ulong max_records)
  {
    uint i,recbuffer,records_in_block;
-@@ -235,7 +388,12 @@
+@@ -236,7 +389,12 @@
    max_records= max(min_records,max_records);
    if (!max_records)
      max_records= 1000;                        /* As good as quess as anything */
      records_in_block= 10;
 --- a/storage/heap/hp_delete.c
 +++ b/storage/heap/hp_delete.c
-@@ -22,6 +22,8 @@
+@@ -22,6 +22,7 @@
    uchar *pos;
    HP_SHARE *share=info->s;
    HP_KEYDEF *keydef, *end, *p_lastinx;
-+  uint rec_length, chunk_count;
 +
    DBUG_ENTER("heap_delete");
    DBUG_PRINT("enter",("info: 0x%lx  record: 0x%lx", (long) info, (long) record));
  
-@@ -31,6 +33,8 @@
-     DBUG_RETURN(my_errno);                    /* Record changed */
-   share->changed=1;
-+  rec_length = hp_get_encoded_data_length(share, record, &chunk_count);
-+
-   if ( --(share->records) < share->blength >> 1) share->blength>>=1;
-   pos=info->current_ptr;
-@@ -43,10 +47,7 @@
+@@ -43,10 +44,7 @@
    }
  
    info->update=HA_STATE_DELETED;
    info->current_hash_ptr=0;
  #if !defined(DBUG_OFF) && defined(EXTRA_HEAP_DEBUG)
    DBUG_EXECUTE("check_heap",heap_check_heap(info, 0););
-@@ -75,7 +76,8 @@
+@@ -75,7 +73,8 @@
      info->last_pos= NULL; /* For heap_rnext/heap_rprev */
  
    custom_arg.keyseg= keyinfo->seg;
    custom_arg.search_flag= SEARCH_SAME;
    old_allocated= keyinfo->rb_tree.allocated;
    res= tree_delete(&keyinfo->rb_tree, info->recbuf, custom_arg.key_length,
-@@ -112,6 +114,7 @@
+@@ -112,6 +111,7 @@
    blength=share->blength;
    if (share->records+1 == blength)
      blength+= blength;
  
  #define MAX_RECORDS 100000
  #define MAX_KEYS 4
-@@ -44,6 +45,7 @@
-   register uint i,j;
-   uint ant,n1,n2,n3;
-   uint write_count,update,opt_delete,check2,dupp_keys,found_key;
-+  uint mem_per_keys;
-   int error;
-   ulong pos;
-   unsigned long key_check;
-@@ -53,6 +55,7 @@
+@@ -53,6 +54,7 @@
    HP_SHARE *tmp_share;
    HP_KEYDEF keyinfo[MAX_KEYS];
    HA_KEYSEG keyseg[MAX_KEYS*5];
    HEAP_PTR UNINIT_VAR(position);
    HP_CREATE_INFO hp_create_info;
    CHARSET_INFO *cs= &my_charset_latin1;
-@@ -65,12 +68,16 @@
+@@ -65,12 +67,16 @@
    get_options(argc,argv);
  
    bzero(&hp_create_info, sizeof(hp_create_info));
  
    write_count=update=opt_delete=0;
    key_check=0;
-@@ -118,11 +125,30 @@
+@@ -118,11 +124,28 @@
    keyinfo[3].seg[0].null_pos=38;
    keyinfo[3].seg[0].charset=cs;
  
 +  columndef[3].length= 1;
 +  columndef[3].null_bit= 1;
 +  columndef[3].null_pos= 38;
-+
-+  mem_per_keys= (sizeof(char*) * 2) * 4;
 +
    bzero((char*) key1,sizeof(key1));
    bzero((char*) key3,sizeof(key3));
    HP_KEYDEF *keydef, *end;
    uchar *pos;
    HP_SHARE *share=info->s;
-+  uint rec_length, chunk_count;
++  uint chunk_count;
 +
    DBUG_ENTER("heap_write");
  #ifndef DBUG_OFF
 +    DBUG_RETURN(my_errno);
 +  }
 +
-+  rec_length= hp_get_encoded_data_length(share, record, &chunk_count);
++  hp_get_encoded_data_length(share, record, &chunk_count);
 +
 +  if (!(pos= hp_allocate_chunkset(&share->recordspace, chunk_count)))
      DBUG_RETURN(my_errno);
    Write a hash-key to the hash-index
 --- a/storage/heap/hp_update.c
 +++ b/storage/heap/hp_update.c
-@@ -17,43 +17,66 @@
+@@ -17,43 +17,65 @@
  
  #include "heapdef.h"
  
    uchar *pos;
    my_bool auto_key_changed= 0;
    HP_SHARE *share= info->s;
-+  uint old_length, new_length;
 +  uint old_chunk_count, new_chunk_count;
 +
    DBUG_ENTER("heap_update");
 +  if (info->opt_flag & READ_CHECK_USED && hp_rectest(info, old_record))
      DBUG_RETURN(my_errno);                            /* Record changed */
 +
-+  old_length = hp_get_encoded_data_length(share, old_record, &old_chunk_count);
-+  new_length = hp_get_encoded_data_length(share, new_record, &new_chunk_count);
++  hp_get_encoded_data_length(share, old_record, &old_chunk_count);
++  hp_get_encoded_data_length(share, new_record, &new_chunk_count);
 +
 +  if (new_chunk_count > old_chunk_count)
 +  {
    DBUG_RETURN(0);
  
   err:
-@@ -63,7 +86,7 @@
+@@ -63,7 +85,7 @@
      if (keydef->algorithm == HA_KEY_ALG_BTREE)
      {
        /* we don't need to delete non-inserted key from rb-tree */
        {
          if (++(share->records) == share->blength)
          share->blength+= share->blength;
-@@ -73,10 +96,10 @@
+@@ -73,10 +95,10 @@
      }
      while (keydef >= share->keydef)
      {
          break;
        }
        keydef--;
-@@ -84,5 +107,12 @@
+@@ -84,5 +106,12 @@
    }
    if (++(share->records) == share->blength)
      share->blength+= share->blength;
 +2
 +DROP FUNCTION f1;
 +DROP TABLE t1;
-+SET default_storage_engine=@old_default_storage_engine;
 +SET @old_max_heap_table_size = @@global.max_heap_table_size;
 +SET @old_max_allowed_packet = @@global.max_allowed_packet;
 +SET GLOBAL max_heap_table_size = 18 * 1024 * 1024;
 +SET GLOBAL max_allowed_packet = 24 * 1024 * 1024;
 +drop table if exists t1;
-+CREATE TABLE t1 (data LONGBLOB) ENGINE=memory;
++CREATE TABLE t1 (data LONGBLOB);
 +INSERT INTO t1 (data) VALUES (NULL);
 +UPDATE t1 set data=repeat('a',18*1024*1024);
 +select length(data) from t1;
 +length(data)
 +0
 +drop table t1;
-+CREATE TABLE t1 (data BLOB) ENGINE=myisam;
++CREATE TABLE t1 (data BLOB);
 +INSERT INTO t1 (data) VALUES (NULL);
 +UPDATE t1 set data=repeat('a',18*1024*1024);
 +Warnings:
 +drop table t1;
 +SET GLOBAL max_allowed_packet = @old_max_allowed_packet;
 +SET GLOBAL max_heap_table_size = @old_max_heap_table_size;
++SET default_storage_engine=@old_default_storage_engine;
 --- /dev/null
 +++ b/mysql-test/r/percona_heap_bug783366.result
 @@ -0,0 +1,14 @@
 +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=34    
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=34    
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=123   
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=123   
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=1000  
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=1000  
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=34    
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=34    
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=121   
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=121   
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=1000  
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=1000  
 +DROP TABLE t1;
 --- /dev/null
 +++ b/mysql-test/r/percona_heap_bug784464_32bit.result
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=124   
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=124   
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=122   
++t1    MEMORY  10      Dynamic 0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=122   
 +DROP TABLE t1;
 --- /dev/null
 +++ b/mysql-test/r/percona_heap_bug784464_64bit.result
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=124   
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=124   
 +DROP TABLE t1;
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=122   
++t1    MEMORY  10      Fixed   0       X       0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC KEY_BLOCK_SIZE=122   
 +DROP TABLE t1;
 --- /dev/null
 +++ b/mysql-test/r/percona_heap_bug784468.result
 +CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       32      0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
++t1    MEMORY  10      Fixed   0       32      0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
 +DROP TABLE t1;
 +CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       33      0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
++t1    MEMORY  10      Fixed   0       33      0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
 +DROP TABLE t1;
 +CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
 +SHOW TABLE STATUS LIKE 't1';
 +Name  Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
-+t1    MEMORY  10      Fixed   0       34      0       X       0       0       NULL    NULL    NULL    NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
++t1    MEMORY  10      Fixed   0       34      0       X       0       0       NULL    X       X       NULL    latin1_swedish_ci       NULL    row_format=DYNAMIC      
 +DROP TABLE t1;
 --- /dev/null
 +++ b/mysql-test/r/percona_heap_bug788544.result
 +
 +
 +
-+SET default_storage_engine=@old_default_storage_engine;
 +
 +
 +########################################################################
 +
 +# Bug #2159 (Problem with update of blob to > 16M)
 +
-+CREATE TABLE t1 (data LONGBLOB) ENGINE=memory;
++CREATE TABLE t1 (data LONGBLOB);
 +INSERT INTO t1 (data) VALUES (NULL);
 +UPDATE t1 set data=repeat('a',18*1024*1024);
 +select length(data) from t1;
 +select length(data) from t1;
 +drop table t1;
 +
-+CREATE TABLE t1 (data BLOB) ENGINE=myisam;
++CREATE TABLE t1 (data BLOB);
 +INSERT INTO t1 (data) VALUES (NULL);
 +UPDATE t1 set data=repeat('a',18*1024*1024);
 +select length(data) from t1;
 +
 +SET GLOBAL max_allowed_packet = @old_max_allowed_packet;
 +SET GLOBAL max_heap_table_size = @old_max_heap_table_size;
++SET default_storage_engine=@old_default_storage_engine;
 --- /dev/null
 +++ b/mysql-test/t/percona_heap_bug783366.test
 @@ -0,0 +1,19 @@
 +DROP TABLE local_1_1;
 --- /dev/null
 +++ b/mysql-test/t/percona_heap_bug784464.test
-@@ -0,0 +1,64 @@
+@@ -0,0 +1,66 @@
 +#
 +# Bug #784464: Silent conversion from Dynamic to Fixed row_format for certain
 +# values of key_block_size.
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +--error ER_CANT_USE_OPTION_HERE
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
++--replace_column 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=123 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +--error ER_CANT_USE_OPTION_HERE
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=33 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
++--replace_column 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=34 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=121 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=1000 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 --- /dev/null
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(32), f3 VARCHAR(32), f4 VARCHAR(32),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=124 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 (f1 VARCHAR(32), f2 VARCHAR(96),
 +                      PRIMARY KEY (f1)) KEY_BLOCK_SIZE=122 ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 6 X 8 X
++--replace_column 6 X 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 --- /dev/null
 +#
 +
 +CREATE TABLE t1 ( f1 VARCHAR(30)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 8 X
++--replace_column 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 ( f1 VARCHAR(31)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 8 X
++--replace_column 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
 +CREATE TABLE t1 ( f1 VARCHAR(32)) ENGINE=HEAP ROW_FORMAT=DYNAMIC;
-+--replace_column 8 X
++--replace_column 8 X 12 X 13 X
 +SHOW TABLE STATUS LIKE 't1';
 +DROP TABLE t1;
 +
This page took 0.131747 seconds and 4 git commands to generate.