1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MWL#106: Backport optimizations for derived tables and views.

The main consolidated patch.
This commit is contained in:
Igor Babaev
2010-05-26 13:18:18 -07:00
parent cb325eb2b2
commit 709a0a1310
70 changed files with 4208 additions and 919 deletions

View File

@ -91,6 +91,10 @@ public:
DBUG_ASSERT(sizeof(buffer) >= 4);
return (ulonglong) uint4korr(buffer);
}
uint bits_set()
{
return bitmap_bits_set(&map);
}
};
/* An iterator to quickly walk over bits in unlonglong bitmap. */
@ -169,5 +173,16 @@ public:
public:
Iterator(Bitmap<64> &bmp) : Table_map_iterator(bmp.map) {}
};
uint bits_set()
{
//TODO: use my_count_bits()
uint res= 0, i= 0;
for (; i < 64 ; i++)
{
if (map & ((ulonglong)1<<i))
res++;
}
return res;
}
};