summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2003-03-25 14:49:43 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2003-03-25 14:49:43 +0200
commitf9df0feecbdd8c576d043731558a8d1b80b78be2 (patch)
treefae63df75f7d9e8b6e0727e082542ebe35e44fdc
parent0783e5bc2f6fa2aa754958d147619b1ba92e60a5 (diff)
downloadmariadb-git-f9df0feecbdd8c576d043731558a8d1b80b78be2.tar.gz
A fix for a bug in MyISAM with large number of NULL columns and at
least one BLOB column.
-rw-r--r--myisam/mi_dynrec.c4
-rw-r--r--mysql-test/t/myisam.test4
2 files changed, 4 insertions, 4 deletions
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c
index c9fe493744d..4f321c268f1 100644
--- a/myisam/mi_dynrec.c
+++ b/myisam/mi_dynrec.c
@@ -62,8 +62,8 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record)
extra=ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER+1;
- reclength=info->s->base.pack_reclength+
- _my_calc_total_blob_length(info,record)+ extra;
+ reclength= (info->s->base.pack_reclength+ info->s->base.pack_bits+
+ _my_calc_total_blob_length(info,record)+ extra);
if (reclength > MI_DYN_MAX_ROW_LENGTH)
{
my_errno=HA_ERR_TO_BIG_ROW;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 92f22d35b81..c9cb77d2a3a 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -244,7 +244,7 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
-int, i999 int, i1000 int) row_format=dynamic;
+int, i999 int, i1000 int, b blob) row_format=dynamic;
insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -283,6 +283,6 @@ insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "Sergei");
drop table if exists t1;