mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)
This commit is contained in:
@ -494,9 +494,11 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
|
||||
|
||||
for (; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag))
|
||||
{
|
||||
/* The following is safe as -1.0 is an exact number */
|
||||
if ((increase = rtree_area_increase(keyinfo->seg, k, key, key_length,
|
||||
&area)) == -1)
|
||||
&area)) == -1.0)
|
||||
return NULL;
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
if (increase < best_incr)
|
||||
{
|
||||
best_key = k;
|
||||
@ -505,6 +507,7 @@ static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
if ((increase == best_incr) && (area < best_area))
|
||||
{
|
||||
best_key = k;
|
||||
@ -1021,6 +1024,7 @@ ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key,
|
||||
{
|
||||
double k_area = rtree_rect_volume(keyinfo->seg, k, key_length);
|
||||
|
||||
/* The following should be safe, even if we compare doubles */
|
||||
if (k_area == 0)
|
||||
{
|
||||
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
|
||||
|
Reference in New Issue
Block a user