diff options
author | monty@mysql.com <> | 2004-05-05 17:05:24 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-05-05 17:05:24 +0300 |
commit | d21d49a32a1689d2c486a449574e120d7a2f60c4 (patch) | |
tree | 3238bd16530e02dbfef96513749a73b7294880f8 /extra | |
parent | 104fdf607d312bb13f24063d28d993243bf24ca2 (diff) | |
parent | e51887b05082622a1882217b7f8ec8ae7f6b4598 (diff) | |
download | mariadb-git-d21d49a32a1689d2c486a449574e120d7a2f60c4.tar.gz |
Merge with 4.0.19
Diffstat (limited to 'extra')
-rw-r--r-- | extra/perror.c | 2 | ||||
-rw-r--r-- | extra/replace.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/extra/perror.c b/extra/perror.c index d05fa2492de..10b2442de20 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -71,7 +71,7 @@ static HA_ERRORS ha_errlist[]= { 136,"No more room in index file" }, { 137,"No more records (read after end of file)" }, { 138,"Unsupported extension used for table" }, - { 139,"Too big row (>= 16 M)"}, + { 139,"Too big row"}, { 140,"Wrong create options"}, { 141,"Duplicate unique key or constraint on write or update"}, { 142,"Unknown character set used"}, diff --git a/extra/replace.c b/extra/replace.c index a44c33a4694..5a086e5ca9c 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -279,8 +279,10 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) length=(uint) strlen(name)+1; if (pa->length+length >= pa->max_length) { + pa->max_length=(pa->length+length+MALLOC_OVERHEAD+PS_MALLOC-1)/PS_MALLOC; + pa->max_length=pa->max_length*PS_MALLOC-MALLOC_OVERHEAD; if (!(new_pos= (byte*) my_realloc((gptr) pa->str, - (uint) (pa->max_length+PS_MALLOC), + (uint) pa->max_length, MYF(MY_WME)))) DBUG_RETURN(1); if (new_pos != pa->str) @@ -291,7 +293,6 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,my_string name) char*); pa->str=new_pos; } - pa->max_length+=PS_MALLOC; } if (pa->typelib.count >= pa->max_count-1) { |