2923 Sergey Vojtovich 2008-12-04 [merge]
Merge.
modified:
storage/falcon/DataPage.cpp
2922 Christopher Powers 2008-12-01
Bug#40994, "Regression: can't create unique index on NOT NULL columns if engine is falcon"
The MySQL server interprets unique indexes on NOT NULL columns as a primary key.
Falcon online add/drop index does not yet support primary keys.
added:
mysql-test/suite/falcon/r/falcon_bug_40994.result
mysql-test/suite/falcon/t/falcon_bug_40994.test
modified:
storage/falcon/ha_falcon.cpp
=== modified file 'storage/falcon/DataPage.cpp'
--- a/storage/falcon/DataPage.cpp 2008-06-17 17:41:54 +0000
+++ b/storage/falcon/DataPage.cpp 2008-12-04 12:22:04 +0000
@@ -225,7 +225,7 @@ int DataPage::storeRecord(Dbb *dbb, Bdb
short id = -1;
short highWater = dbb->pageSize;
- short used = OFFSET (DataPage*, lineIndex) + maxLine * sizeof (LineIndex);
+ int spaceRemaining = dbb->pageSize - OFFSET (DataPage*, lineIndex) - maxLine * sizeof (LineIndex) - length;
LineIndex *line, *end;
for (line = lineIndex, end = line + maxLine; line < end; ++line)
@@ -234,19 +234,17 @@ int DataPage::storeRecord(Dbb *dbb, Bdb
if (line->offset < highWater)
highWater = line->offset;
- used += ABS (line->length);
+ spaceRemaining -= ABS (line->length);
}
else if (id == -1)
id = (int) (line - lineIndex);
if (id == -1)
{
- used += sizeof (LineIndex);
+ spaceRemaining -= sizeof (LineIndex);
++end;
}
- int spaceRemaining = dbb->pageSize - used - length;
-
if (spaceRemaining < 0)
return 0;
@@ -318,7 +316,7 @@ int DataPage::deleteLine (Dbb *dbb, int
if (lineIndex [n].offset)
{
max = n + 1;
- available -= lineIndex[n].length;
+ available -= ABS(lineIndex[n].length);
}
maxLine = max;
| Thread |
|---|
| • bzr push into mysql-6.0-falcon-team branch (svoj:2922 to 2923) | Sergey Vojtovich | 4 Dec |